这是一个播放多媒体流的类
几个重要的枚举类型
enum QMediaPlayer::MediaStatus
Defines the status of a media player's current media.
Constant | Value | Description |
---|---|---|
QMediaPlayer::UnknownMediaStatus | 0 | The status of the media cannot be determined. |
QMediaPlayer::NoMedia | 1 | The is no current media. The player is in the StoppedState. |
QMediaPlayer::LoadingMedia | 2 | The current media is being loaded. The player may be in any state. |
QMediaPlayer::LoadedMedia | 3 | The current media has been loaded. The player is in the StoppedState. |
QMediaPlayer::StalledMedia | 4 | Playback of the current media has stalled due to insufficient buffering or some other temporary interruption. The player is in thePlayingState or PausedState. |
QMediaPlayer::BufferingMedia | 5 | The player is buffering data but has enough data buffered for playback to continue for the immediate future. The player is in thePlayingState or PausedState. |
QMediaPlayer::BufferedMedia | 6 | The player has fully buffered the current media. The player is in thePlayingState or PausedState. |
QMediaPlayer::EndOfMedia | 7 | Playback has reached the end of the current media. The player is in theStoppedState. |
QMediaPlayer::InvalidMedia | 8 | The current media cannot be played. The player is in the StoppedState. |
Properties:
- audioAvailable : const bool 音频是否有效 notifier信号 void audioAvailableChanged(bool available)
- bufferStatus : const int This property holds the percentage of the temporary buffer filled before playback begins or resumes, from (empty) to (full)
- currentMedi