Shaka Player Embedded
|
#include <proxy_media_player.h>
Classes | |
class | Impl |
Public Member Functions | |
ProxyMediaPlayer () | |
~ProxyMediaPlayer () override | |
struct VideoPlaybackQuality | VideoPlaybackQuality () const override |
void | AddClient (Client *client) const override |
void | RemoveClient (Client *client) const override |
std::vector< BufferedRange > | GetBuffered () const override |
VideoReadyState | ReadyState () const override |
VideoPlaybackState | PlaybackState () const override |
bool | SetVideoFillMode (VideoFillMode mode) override |
uint32_t | Width () const override |
uint32_t | Height () const override |
double | Volume () const override |
void | SetVolume (double volume) override |
bool | Muted () const override |
void | SetMuted (bool muted) override |
void | Play () override |
void | Pause () override |
double | CurrentTime () const override |
void | SetCurrentTime (double time) override |
double | Duration () const override |
void | SetDuration (double duration) override |
double | PlaybackRate () const override |
void | SetPlaybackRate (double rate) override |
bool | AttachSource (const std::string &src) override |
bool | AttachMse () override |
bool | AddMseBuffer (const std::string &mime, bool is_video, const ElementaryStream *stream) override |
void | LoadedMetaData (double duration) override |
void | MseEndOfStream () override |
bool | SetEmeImplementation (const std::string &key_system, eme::Implementation *implementation) override |
void | Detach () override |
![]() | |
MediaPlayer () | |
virtual | ~ MediaPlayer () |
MediaPlayer (const MediaPlayer &)=delete | |
MediaPlayer & | operator= (const MediaPlayer &)=delete |
MediaPlayer (MediaPlayer &&)=delete | |
MediaPlayer & | operator= (MediaPlayer &&)=delete |
virtual MediaCapabilitiesInfo | DecodingInfo (const MediaDecodingConfiguration &config) const =0 |
virtual std::vector< std::shared_ptr< MediaTrack > > | AudioTracks ()=0 |
virtual std::vector< std::shared_ptr< const MediaTrack > > | AudioTracks () const =0 |
virtual std::vector< std::shared_ptr< MediaTrack > > | VideoTracks ()=0 |
virtual std::vector< std::shared_ptr< const MediaTrack > > | VideoTracks () const =0 |
virtual std::vector< std::shared_ptr< TextTrack > > | TextTracks ()=0 |
virtual std::vector< std::shared_ptr< const TextTrack > > | TextTracks () const =0 |
virtual std::shared_ptr< TextTrack > | AddTextTrack (TextTrackKind kind, const std::string &label, const std::string &language)=0 |
Protected Member Functions | |
ClientList * | GetClientList () const |
Additional Inherited Members | |
![]() | |
static void | SetMediaPlayerForSupportChecks (const MediaPlayer *player) |
static const MediaPlayer * | GetMediaPlayerForSupportChecks () |
Defines a MediaPlayer instance that proxies to one or more MediaPlayer instances based on what content is being loaded. This will store the defaults for the Set* methods and pass them to the chosen MediaPlayer once content is loaded.
Note this does not forward AddClient/RemoveClient calls to the MediaPlayer. Instead, subclasses should use the GetClientList method and call methods on that.
Definition at line 39 of file proxy_media_player.h.
shaka::media::ProxyMediaPlayer::ProxyMediaPlayer | ( | ) |
Definition at line 59 of file proxy_media_player.cc.
|
override |
Definition at line 60 of file proxy_media_player.cc.
|
overridevirtual |
Adds a new client listener. The given object will be called when events are raised. Clients are called in the order they are registered. Calling this with an already-registered client will have no effect.
Implements shaka::media::MediaPlayer.
Definition at line 70 of file proxy_media_player.cc.
|
overridevirtual |
Adds a new MSE buffer to pull frames from. This can be called after normal playback has started, but that doesn't have to be supported. This will be called for each SourceBuffer object created. If the source content is multiplexed, this will be called twice for the same input stream, but will be given separate audio/video buffers.
mime | The full MIME type given from JavaScript. |
is_video | True if this is for a video stream, false for audio. |
stream | The stream containing the encoded frames. |
Implements shaka::media::MediaPlayer.
Definition at line 241 of file proxy_media_player.cc.
|
overridevirtual |
Starts MSE-based playback. At a later time, AddMseBuffer will be called to give streams to pull from.
Implements shaka::media::MediaPlayer.
Definition at line 231 of file proxy_media_player.cc.
|
overridevirtual |
Starts playback using the given src= URL. The player should read data from the given URL and play its content.
src | The URL to read from. |
Implements shaka::media::MediaPlayer.
Definition at line 221 of file proxy_media_player.cc.
|
overridevirtual |
Implements shaka::media::MediaPlayer.
Definition at line 172 of file proxy_media_player.cc.
|
overridevirtual |
Stops playback from the current media. This should stop using the current ElementaryStream objects and halt playback.
Implements shaka::media::MediaPlayer.
Definition at line 274 of file proxy_media_player.cc.
|
overridevirtual |
Implements shaka::media::MediaPlayer.
Definition at line 188 of file proxy_media_player.cc.
|
overridevirtual |
Gets the ranges of buffered content in the media. For MSE playback, this should use the ElementaryStream objects passed to this object; for src= playback, this type will internally handle buffering.
Implements shaka::media::MediaPlayer.
Definition at line 78 of file proxy_media_player.cc.
|
protected |
Definition at line 281 of file proxy_media_player.cc.
|
overridevirtual |
Implements shaka::media::MediaPlayer.
Definition at line 118 of file proxy_media_player.cc.
|
overridevirtual |
For MSE playback, this indicates that the init segments for the input streams have been received and have the given estimated duration. If there is more than one input stream, this is called once they all have been loaded.
duration | The estimated duration of the stream based on the init segments; can be infinity if unknown. |
Implements shaka::media::MediaPlayer.
Definition at line 255 of file proxy_media_player.cc.
|
overridevirtual |
For MSE playback, this indicates that the last segment has been handled and the current buffered end represents the end of all the content.
Implements shaka::media::MediaPlayer.
Definition at line 249 of file proxy_media_player.cc.
|
overridevirtual |
Implements shaka::media::MediaPlayer.
Definition at line 139 of file proxy_media_player.cc.
|
overridevirtual |
Pauses playback of the current content. If this is called before AttachSource/AttachMse, this should not start playing when content is given.
Implements shaka::media::MediaPlayer.
Definition at line 164 of file proxy_media_player.cc.
|
overridevirtual |
Starts playback of the current content. If this is called before AttachSource/AttachMse, this should start playing when content is given.
Implements shaka::media::MediaPlayer.
Definition at line 156 of file proxy_media_player.cc.
|
overridevirtual |
Implements shaka::media::MediaPlayer.
Definition at line 204 of file proxy_media_player.cc.
|
overridevirtual |
Implements shaka::media::MediaPlayer.
Definition at line 94 of file proxy_media_player.cc.
|
overridevirtual |
Implements shaka::media::MediaPlayer.
Definition at line 86 of file proxy_media_player.cc.
|
overridevirtual |
Removes a client listener. The given client will no longer be called when events happen.
Implements shaka::media::MediaPlayer.
Definition at line 74 of file proxy_media_player.cc.
|
overridevirtual |
Seeks to a new position in the currently-playing stream. Does nothing if no content is loaded.
time | The presentation time to seek to. |
Implements shaka::media::MediaPlayer.
Definition at line 180 of file proxy_media_player.cc.
|
overridevirtual |
Sets the duration of the media.
duration | The duration, in seconds, to set to. |
Implements shaka::media::MediaPlayer.
Definition at line 196 of file proxy_media_player.cc.
|
overridevirtual |
Sets the EME implementation instance used to decrypt media. This will be set early in playback and won't be changed while playing. This will be called with nullptr to clear the EME implementation.
key_system | The name of the key system this is for. |
implementation | The implementation used to decrypt frames. |
Implements shaka::media::MediaPlayer.
Definition at line 262 of file proxy_media_player.cc.
|
overridevirtual |
Sets whether the audio is muted.
Implements shaka::media::MediaPlayer.
Definition at line 147 of file proxy_media_player.cc.
|
overridevirtual |
Sets the playback rate of the video. Does nothing if no content is loaded.
rate | The new playback rate. |
Implements shaka::media::MediaPlayer.
Definition at line 212 of file proxy_media_player.cc.
|
overridevirtual |
Sets how to resize video frames within the drawing region.
mode | The new method to resize the video frames. |
Implements shaka::media::MediaPlayer.
Definition at line 103 of file proxy_media_player.cc.
|
overridevirtual |
Sets the volume [0, 1] to render audio at.
Implements shaka::media::MediaPlayer.
Definition at line 131 of file proxy_media_player.cc.
|
overridevirtual |
Implements shaka::media::MediaPlayer.
Definition at line 62 of file proxy_media_player.cc.
|
overridevirtual |
Implements shaka::media::MediaPlayer.
Definition at line 123 of file proxy_media_player.cc.
|
overridevirtual |
Implements shaka::media::MediaPlayer.
Definition at line 113 of file proxy_media_player.cc.