Player
|
int32_t SetSource(const Source &source);
|
Sets the playback source for the player.
|
Player
|
int32_t Prepare();
|
Prepares the playback environment.
|
Player
|
int32_t Play();
|
Starts playback.
|
Player
|
bool IsPlaying()
|
Checks whether the player is playing.
|
Player
|
int32_t Pause();
|
Pauses playback.
|
Player
|
int32_t Stop();
|
Stops playback.
|
Player
|
int32_t Rewind(int_64 mSeconds, int32_t mode);
|
Changes the playback position.
|
Player
|
int32_t SetVolume(float leftVolume, float rightVolume);
|
Sets player volume, including volume of left and right channels.
|
Player
|
int32_t SetVideoSurface(Surface *surface)
|
Sets a surface for video playback.
|
Player
|
int32_t EnableSingleLooping(bool loop)
|
Enables loop playback.
|
Player
|
bool IsSingleLooping();
|
Checks whether loop playback is enabled.
|
Player
|
int32_t GetCurrentTime(int64_t &time) const;
|
Obtains the current playback duration, accurate to millisecond.
|
Player
|
int32_t GetDuration(int64_t &duration) const;
|
Obtains the total duration of media files, in milliseconds.
|
Player
|
int32_t GetVideoWidth(int32_t &videoWidth);
|
Obtains the width of the video.
|
Player
|
int32_t GetVideoHeight(int32_t &videoHeight);
|
Obtains the height of the video.
|
Player
|
int32_t Reset();
|
Restores the player to the initial state.
|
Player
|
int32_t Release();
|
Releases player resources.
|
Player
|
void SetPlayerCallback(const std::shared_ptr<PlayerCallback> &cb);
|
Sets a player callback.
|
Source
|
Source(const std::string& uri);
|
A constructor used to create a Source instance based on a specified URI.
|
Source
|
Source(const std::shared_ptr<StreamSource> &stream, const Format &formats);
|
A constructor used to create a Source instance based on the stream source and format information.
|
Source
|
SourceType GetSourceType() const;
|
Obtains the source type.
|
Source
|
const std::string &GetSourceUri() const;
|
Obtains the media source URI.
|
Source
|
const std::shared_ptr<StreamSource> &GetSourceStream() const;
|
Obtains information about the media source stream.
|
Source
|
const Format &GetSourceStreamFormat() const;
|
Obtains the media source stream format.
|
Format
|
bool PutIntValue(const std::string &key, int32_t value);
|
Sets metadata of the integer type.
|
Format
|
bool PutLongValue(const std::string &key, int64_t value);
|
Sets metadata of the long integer type.
|
Format
|
bool PutFloatValue(const std::string &key, float value);
|
Sets metadata of the single-precision floating-point type.
|
Format
|
bool PutDoubleValue(const std::string &key, double value);
|
Sets metadata of the double-precision floating-point type.
|
Format
|
bool PutStringValue(const std::string &key, const std::string &value);
|
Sets metadata of the string type.
|
Format
|
bool GetIntValue(const std::string &key, int32_t &value) const;
|
Obtains the metadata value of the integer type.
|
Format
|
bool GetLongValue(const std::string &key, int64_t &value) const;
|
Obtains the metadata value of the long integer type.
|
Format
|
bool GetFloatValue(const std::string &key, float &value) const;
|
Obtains the metadata value of the single-precision floating-point type.
|
Format
|
bool GetDoubleValue(const std::string &key, double &value) const;
|
Obtains the metadata value of the double-precision floating-point type.
|
Format
|
bool GetStringValue(const std::string &key, std::string &value) const;
|
Obtains the metadata value of the string type.
|
Format
|
const std::map<std::string, FormatData *> &GetFormatMap() const;
|
Obtains the metadata map.
|
Format
|
bool CopyFrom(const Format &format);
|
Sets all metadata to a specified format.
|