Ocean
Loading...
Searching...
No Matches
DSMovie.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_DS_MOVIE_H
9#define META_OCEAN_MEDIA_DS_MOVIE_H
10
15
16#include "ocean/media/Movie.h"
17
18namespace Ocean
19{
20
21namespace Media
22{
23
24namespace DirectShow
25{
26
27/**
28 * This class implements a DirectShow movie object.
29 * @ingroup mediads
30 */
31class OCEAN_MEDIA_DS_EXPORT DSMovie :
32 public virtual DSFiniteMedium,
33 public virtual DSFrameMedium,
34 public virtual DSSoundMedium,
35 public virtual Movie
36{
37 friend class DSLibrary;
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 Url of the movie
64 */
65 explicit DSMovie(const std::string& url);
66
67 /**
68 * Destructs a DSMovie object.
69 */
70 ~DSMovie() override;
71
72 /**
73 * @see DSGraphObject::buildGraph().
74 */
75 bool buildGraph() override;
76
77 /**
78 * @see DSGraphObject::releaseGraph().
79 */
80 void releaseGraph() override;
81
82 private:
83
84 /// Sound use state.
85 bool movieUseSound_ = true;
86};
87
88}
89
90}
91
92}
93
94#endif // META_OCEAN_MEDIA_DS_MOVIE_H
This class is the base class for all direct show finite mediums.
Definition DSFiniteMedium.h:34
This is the base class for all DirectShow frame mediums.
Definition DSFrameMedium.h:35
This class implements the DirectShow library.
Definition DSLibrary.h:30
This class implements a DirectShow movie object.
Definition DSMovie.h:36
bool useSound() const override
Returns whether the sound of this movie is enabled or disabled.
MediumRef clone() const override
Clones this medium and returns a new independent instance of this medium.
~DSMovie() override
Destructs a DSMovie object.
DSMovie(const std::string &url)
Creates a new movie by a given url.
bool setUseSound(const bool state) override
Enables or disables the audio in this movie (has no effect if the movie does not have audio).
This class is the base class for all DirectShow sound mediums.
Definition DSSoundMedium.h:35
This class is the base class for all movies.
Definition Movie.h:40
The namespace covering the entire Ocean framework.
Definition Accessor.h:15