Ocean
Movie.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_MOVIE_H
9
#define META_OCEAN_MEDIA_MOVIE_H
10
11
#include "
ocean/media/Media.h
"
12
#include "
ocean/media/FiniteMedium.h
"
13
#include "
ocean/media/FrameMedium.h
"
14
#include "
ocean/media/SoundMedium.h
"
15
16
namespace
Ocean
17
{
18
19
namespace
Media
20
{
21
22
// Forward declaration.
23
class
Movie;
24
25
/**
26
* Definition of a smart medium reference holding a movie object.
27
* @see SmartMediumRef, Movie.
28
* @ingroup media
29
*/
30
typedef
SmartMediumRef<Movie>
MovieRef
;
31
32
/**
33
* This class is the base class for all movies.
34
* @ingroup media
35
*/
36
class
OCEAN_MEDIA_EXPORT
Movie
:
37
public
virtual
FiniteMedium
,
38
public
virtual
FrameMedium
,
39
public
virtual
SoundMedium
40
{
41
public
:
42
43
/**
44
* Enables or disables the audio in this movie (has no effect if the movie does not have audio).
45
* The selection has to be applied once before the medium has been started for the first time.
46
* @param state True, to enable the audio in this movie, false otherwise
47
* @return True, if succeeded
48
*/
49
virtual
bool
setUseSound
(
const
bool
state);
50
51
/**
52
* Returns whether the sound of this movie is enabled or disabled.
53
* @return True, if the audio of this movie is enabled
54
*/
55
virtual
bool
useSound
()
const
;
56
57
protected
:
58
59
/**
60
* Creates a new movie by a given url.
61
* @param url Url of the movie
62
*/
63
explicit
Movie
(
const
std::string& url);
64
};
65
66
}
67
68
}
69
70
#endif
// META_OCEAN_MEDIA_MOVIE_H
FiniteMedium.h
FrameMedium.h
Media.h
SoundMedium.h
Ocean::Media::FiniteMedium
This class is the base class for all finite mediums.
Definition:
FiniteMedium.h:36
Ocean::Media::FrameMedium
This is the base class for all frame mediums.
Definition:
FrameMedium.h:53
Ocean::Media::Movie
This class is the base class for all movies.
Definition:
Movie.h:40
Ocean::Media::Movie::Movie
Movie(const std::string &url)
Creates a new movie by a given url.
Ocean::Media::Movie::setUseSound
virtual bool setUseSound(const bool state)
Enables or disables the audio in this movie (has no effect if the movie does not have audio).
Ocean::Media::Movie::useSound
virtual bool useSound() const
Returns whether the sound of this movie is enabled or disabled.
Ocean::Media::SmartMediumRef< Movie >
Ocean::Media::SoundMedium
This class is the base class for all sound mediums.
Definition:
SoundMedium.h:38
Ocean::Media::MovieRef
SmartMediumRef< Movie > MovieRef
Definition of a smart medium reference holding a movie object.
Definition:
Movie.h:23
Ocean
The namespace covering the entire Ocean framework.
Definition:
Accessor.h:15
impl
ocean
media
Movie.h
Generated on Sat Dec 28 2024 06:03:12 for Ocean by
1.9.1