Provides functions for playing online movies, offline movies, and streams, for example, playing local movies and advanced audio coding (AAC) streams.
Public Member Functions
Public Member Function Name
SetSource (const Source &source)
Sets the playback source for the player. The corresponding source can be the file descriptor (FD) of the local file, local file URI, network URI, or media stream.
Prepares the playback environment and buffers media data.
Starts or resumes playback.
Checks whether the player is playing.
Rewind (int64_t mSeconds, int32_t mode)
Changes the playback position.
SetVolume (float leftVolume, float rightVolume)
Sets the volume of the player.
SetVideoSurface (Surface *surface)
Sets a surface for video playback.
EnableSingleLooping (bool loop)
Sets loop playback.
Checks whether the player is looping.
GetCurrentTime (int64_t &time) const
Obtains the playback position, accurate to millisecond.
GetDuration (int64_t &duration) const
Obtains the total duration of media files, in milliseconds.
GetVideoWidth (int32_t &videoWidth)
Obtains the width of the video.
GetVideoHeight (int32_t &videoHeight)
Obtains the height of the video.
Restores the player to the initial state.
Releases player resources.
SetPlayerCallback (const std::shared_ptr< PlayerCallback > &cb)
Registers a listener to receive events and exception notifications from the player.