Ocean
Loading...
Searching...
No Matches
MFMovie.h
Go to the documentation of this file.
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 */
7
8#ifndef META_OCEAN_MEDIA_MF_MOVIE_H
9#define META_OCEAN_MEDIA_MF_MOVIE_H
10
15
16#include "ocean/media/Movie.h"
17
18namespace Ocean
19{
20
21namespace Media
22{
23
24namespace MediaFoundation
25{
26
27/**
28 * This class implements a MediaFoundation movie object.
29 * @ingroup mediamf
30 */
31class OCEAN_MEDIA_MF_EXPORT MFMovie :
32 public virtual MFFiniteMedium,
33 public virtual MFFrameMedium,
34 public virtual MFSoundMedium,
35 public virtual Movie
36{
37 friend class MFLibrary;
38
39 public:
40
41 /**
42 * Enables or disables the audio in this movie (has no effect if the movie does not have audio).
43 * @see Movie::setUseSound().
44 */
45 bool setUseSound(const bool state) override;
46
47 /**
48 * Returns whether the sound of this movie is enabled or disabled.
49 * @see Movie::useSound().
50 */
51 bool useSound() const override;
52
53 /**
54 * Clones this medium and returns a new independent instance of this medium.
55 * @see Medium::clone().
56 */
57 MediumRef clone() const override;
58
59 protected:
60
61 /**
62 * Creates a new movie by a given URL.
63 * @param url The URL of the movie
64 */
65 explicit MFMovie(const std::string& url);
66
67 /**
68 * Destructs a MFMovie object.
69 */
70 ~MFMovie() override;
71
72 /**
73 * Creates and builds the topology of this object.
74 * @see MFMedium::createTopology().
75 */
76 bool createTopology(const bool respectPlaybackTime) override;
77
78 /**
79 * Releases the topology.
80 */
81 void releaseTopology() override;
82
83 private:
84
85 /// True, if the movie uses sound.
86 bool useSound_ = true;
87};
88
89}
90
91}
92
93}
94
95#endif // META_OCEAN_MEDIA_MF_MOVIE_H
friend class MFFrameMedium
Definition MFFiniteMedium.h:35
MFFiniteMedium(const std::string &url)
Creates a new finite medium by a given URL.
MFMovie(const std::string &url)
Creates a new movie by a given URL.
friend class MFLibrary
Definition MFMovie.h:37
bool setUseSound(const bool state) override
Enables or disables the audio in this movie (has no effect if the movie does not have audio).
~MFMovie() override
Destructs a MFMovie object.
MediumRef clone() const override
Clones this medium and returns a new independent instance of this medium.
void releaseTopology() override
Releases the topology.
bool useSound_
True, if the movie uses sound.
Definition MFMovie.h:86
bool createTopology(const bool respectPlaybackTime) override
Creates and builds the topology of this object.
bool useSound() const override
Returns whether the sound of this movie is enabled or disabled.
MFSoundMedium(const std::string &url)
Creates a new sound medium by a given URL.
const std::string & url() const
Returns the url of the medium.
Definition Medium.h:236
Movie(const std::string &url)
Creates a new movie by a given url.
ObjectRef< Medium > MediumRef
This class implements a medium reference with an internal reference counter.
Definition Medium.h:30
Namespace of the Media MediaFoundation library.
Definition MediaFoundation.h:46
Namespace of the Media library.
Definition AAudio.h:26
The namespace covering the entire Ocean framework.
Definition Accessor.h:15