Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QPlatformMediaPlayer Class Referenceabstract

#include <qplatformmediaplayer_p.h>

+ Inheritance diagram for QPlatformMediaPlayer:
+ Collaboration diagram for QPlatformMediaPlayer:

Public Types

enum  TrackType { VideoStream , AudioStream , SubtitleStream , NTrackTypes }
 

Public Member Functions

virtual ~QPlatformMediaPlayer ()
 
virtual QMediaPlayer::PlaybackState state () const
 
virtual QMediaPlayer::MediaStatus mediaStatus () const
 
virtual qint64 duration () const =0
 
virtual qint64 position () const
 
virtual void setPosition (qint64 position)=0
 
virtual float bufferProgress () const =0
 
virtual bool isAudioAvailable () const
 
virtual bool isVideoAvailable () const
 
virtual bool isSeekable () const
 
virtual QMediaTimeRange availablePlaybackRanges () const =0
 
virtual qreal playbackRate () const =0
 
virtual void setPlaybackRate (qreal rate)=0
 
virtual QUrl media () const =0
 
virtual const QIODevicemediaStream () const =0
 
virtual void setMedia (const QUrl &media, QIODevice *stream)=0
 
virtual void play ()=0
 
virtual void pause ()=0
 
virtual void stop ()=0
 
virtual bool streamPlaybackSupported () const
 
virtual void setAudioOutput (QPlatformAudioOutput *)
 
virtual QMediaMetaData metaData () const
 
virtual void setVideoSink (QVideoSink *)=0
 
virtual int trackCount (TrackType)
 
virtual QMediaMetaData trackMetaData (TrackType, int)
 
virtual int activeTrack (TrackType)
 
virtual void setActiveTrack (TrackType, int)
 
void durationChanged (qint64 duration)
 
void positionChanged (qint64 position)
 
void audioAvailableChanged (bool audioAvailable)
 
void videoAvailableChanged (bool videoAvailable)
 
void seekableChanged (bool seekable)
 
void playbackRateChanged (qreal rate)
 
void bufferProgressChanged (float progress)
 
void metaDataChanged ()
 
void tracksChanged ()
 
void activeTracksChanged ()
 
void stateChanged (QMediaPlayer::PlaybackState newState)
 
void mediaStatusChanged (QMediaPlayer::MediaStatus status)
 
void error (int error, const QString &errorString)
 
void resetCurrentLoop ()
 
bool doLoop ()
 
int loops ()
 
virtual void setLoops (int loops)
 
virtual voidnativePipeline ()
 

Static Public Member Functions

static voidnativePipeline (QMediaPlayer *player)
 

Protected Member Functions

 QPlatformMediaPlayer (QMediaPlayer *parent=nullptr)
 

Detailed Description

Definition at line 31 of file qplatformmediaplayer_p.h.

Member Enumeration Documentation

◆ TrackType

Enumerator
VideoStream 
AudioStream 
SubtitleStream 
NTrackTypes 

Definition at line 72 of file qplatformmediaplayer_p.h.

Constructor & Destructor Documentation

◆ ~QPlatformMediaPlayer()

QPlatformMediaPlayer::~QPlatformMediaPlayer ( )
virtual

Definition at line 17 of file qplatformmediaplayer.cpp.

◆ QPlatformMediaPlayer()

QT_BEGIN_NAMESPACE QPlatformMediaPlayer::QPlatformMediaPlayer ( QMediaPlayer * parent = nullptr)
explicitprotected

Definition at line 12 of file qplatformmediaplayer.cpp.

References QPlatformMediaIntegration::instance().

+ Here is the call graph for this function:

Member Function Documentation

◆ activeTrack()

virtual int QPlatformMediaPlayer::activeTrack ( TrackType )
inlinevirtual

◆ activeTracksChanged()

void QPlatformMediaPlayer::activeTracksChanged ( )
inline

Definition at line 108 of file qplatformmediaplayer_p.h.

References QMediaPlayer::activeTracksChanged(), emit, and player.

Referenced by AVFMediaPlayer::setActiveTrack(), and QAndroidMediaPlayer::setActiveTrack().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ audioAvailableChanged()

void QPlatformMediaPlayer::audioAvailableChanged ( bool audioAvailable)
inline

Definition at line 86 of file qplatformmediaplayer_p.h.

References emit, QMediaPlayer::hasAudioChanged(), and player.

Referenced by MFPlayerControl::handleAudioAvailable().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ availablePlaybackRanges()

virtual QMediaTimeRange QPlatformMediaPlayer::availablePlaybackRanges ( ) const
pure virtual

◆ bufferProgress()

virtual float QPlatformMediaPlayer::bufferProgress ( ) const
pure virtual

◆ bufferProgressChanged()

void QPlatformMediaPlayer::bufferProgressChanged ( float progress)
inline

Definition at line 105 of file qplatformmediaplayer_p.h.

References QMediaPlayer::bufferProgressChanged(), emit, and player.

Referenced by MFPlayerSession::bufferProgressChanged(), QGstreamerMediaPlayer::pause(), AVFMediaPlayer::processBufferStateChange(), QGstreamerMediaPlayer::processBusMessage(), and QGstreamerMediaPlayer::setMedia().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ doLoop()

bool QPlatformMediaPlayer::doLoop ( )
inline

Definition at line 115 of file qplatformmediaplayer_p.h.

Referenced by MFPlayerControl::handleStatusChanged(), QGstreamerMediaPlayer::processBusMessage(), and AVFMediaPlayer::processEOS().

+ Here is the caller graph for this function:

◆ duration()

virtual qint64 QPlatformMediaPlayer::duration ( ) const
pure virtual

◆ durationChanged()

void QPlatformMediaPlayer::durationChanged ( qint64 duration)
inline

Definition at line 79 of file qplatformmediaplayer_p.h.

References QMediaPlayer::durationChanged(), emit, and player.

Referenced by MFPlayerControl::handleDurationUpdate(), QGstreamerMediaPlayer::processBusMessage(), AVFMediaPlayer::processDurationChange(), QGstreamerMediaPlayer::setMedia(), and AVFMediaPlayer::setMedia().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ error()

void QPlatformMediaPlayer::error ( int error,
const QString & errorString )

Definition at line 37 of file qplatformmediaplayer.cpp.

References error.

Referenced by QMediaPlayerPrivate::setMedia().

+ Here is the caller graph for this function:

◆ isAudioAvailable()

virtual bool QPlatformMediaPlayer::isAudioAvailable ( ) const
inlinevirtual

◆ isSeekable()

virtual bool QPlatformMediaPlayer::isSeekable ( ) const
inlinevirtual

Reimplemented in AVFMediaPlayer, QQnxMediaPlayer, QWasmMediaPlayer, and MFPlayerControl.

Definition at line 48 of file qplatformmediaplayer_p.h.

Referenced by QAndroidMediaPlayer::setPosition().

+ Here is the caller graph for this function:

◆ isVideoAvailable()

virtual bool QPlatformMediaPlayer::isVideoAvailable ( ) const
inlinevirtual

◆ loops()

int QPlatformMediaPlayer::loops ( )
inline

Definition at line 118 of file qplatformmediaplayer_p.h.

Referenced by QFFmpegMediaPlayer::setLoops().

+ Here is the caller graph for this function:

◆ media()

virtual QUrl QPlatformMediaPlayer::media ( ) const
pure virtual

◆ mediaStatus()

◆ mediaStatusChanged()

◆ mediaStream()

virtual const QIODevice * QPlatformMediaPlayer::mediaStream ( ) const
pure virtual

◆ metaData()

virtual QMediaMetaData QPlatformMediaPlayer::metaData ( ) const
inlinevirtual

◆ metaDataChanged()

void QPlatformMediaPlayer::metaDataChanged ( )
inline

Definition at line 106 of file qplatformmediaplayer_p.h.

References emit, QMediaPlayer::metaDataChanged(), and player.

Referenced by MFPlayerSession::metaDataChanged(), QGstreamerMediaPlayer::processBusMessage(), AVFMediaPlayer::processLoadStateChange(), QGstreamerMediaPlayer::setMedia(), and AVFMediaPlayer::setMedia().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ nativePipeline() [1/2]

virtual void * QPlatformMediaPlayer::nativePipeline ( )
inlinevirtual

Reimplemented in QGstreamerMediaPlayer.

Definition at line 127 of file qplatformmediaplayer_p.h.

◆ nativePipeline() [2/2]

void * QPlatformMediaPlayer::nativePipeline ( QMediaPlayer * player)
static

Definition at line 42 of file qplatformmediaplayer.cpp.

References player.

◆ pause()

virtual void QPlatformMediaPlayer::pause ( )
pure virtual

◆ play()

virtual void QPlatformMediaPlayer::play ( )
pure virtual

◆ playbackRate()

virtual qreal QPlatformMediaPlayer::playbackRate ( ) const
pure virtual

◆ playbackRateChanged()

void QPlatformMediaPlayer::playbackRateChanged ( qreal rate)
inline

Definition at line 104 of file qplatformmediaplayer_p.h.

References emit, QMediaPlayer::playbackRateChanged(), and player.

Referenced by QAndroidMediaPlayer::play(), MFPlayerSession::playbackRateChanged(), QAndroidMediaPlayer::setPlaybackRate(), AVFMediaPlayer::setPlaybackRate(), QFFmpegMediaPlayer::setPlaybackRate(), QGstreamerMediaPlayer::setPlaybackRate(), and QWasmMediaPlayer::setPlaybackRate().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ position()

virtual qint64 QPlatformMediaPlayer::position ( ) const
inlinevirtual

Reimplemented in QAndroidMediaPlayer, AVFMediaPlayer, QGstreamerMediaPlayer, QQnxMediaPlayer, QWasmMediaPlayer, and MFPlayerControl.

Definition at line 40 of file qplatformmediaplayer_p.h.

Referenced by QFFmpegMediaPlayer::setPosition().

+ Here is the caller graph for this function:

◆ positionChanged()

void QPlatformMediaPlayer::positionChanged ( qint64 position)
inline

◆ resetCurrentLoop()

void QPlatformMediaPlayer::resetCurrentLoop ( )
inline

Definition at line 114 of file qplatformmediaplayer_p.h.

Referenced by QAndroidMediaPlayer::play(), AVFMediaPlayer::play(), QGstreamerMediaPlayer::play(), QWasmMediaPlayer::play(), and MFPlayerControl::play().

+ Here is the caller graph for this function:

◆ seekableChanged()

void QPlatformMediaPlayer::seekableChanged ( bool seekable)
inline

Definition at line 98 of file qplatformmediaplayer_p.h.

References emit, player, and QMediaPlayer::seekableChanged().

Referenced by QAndroidMediaPlayer::QAndroidMediaPlayer(), MFPlayerControl::handleSeekableUpdate(), QGstreamerMediaPlayer::processBusMessage(), and QGstreamerMediaPlayer::setMedia().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setActiveTrack()

virtual void QPlatformMediaPlayer::setActiveTrack ( TrackType ,
int  )
inlinevirtual

◆ setAudioOutput()

virtual void QPlatformMediaPlayer::setAudioOutput ( QPlatformAudioOutput * )
inlinevirtual

◆ setLoops()

virtual void QPlatformMediaPlayer::setLoops ( int loops)
inlinevirtual

Reimplemented in QFFmpegMediaPlayer.

Definition at line 119 of file qplatformmediaplayer_p.h.

References QMediaPlayer::loopsChanged(), player, and Q_EMIT.

Referenced by QFFmpegMediaPlayer::setLoops().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setMedia()

virtual void QPlatformMediaPlayer::setMedia ( const QUrl & media,
QIODevice * stream )
pure virtual

Implemented in QGstreamerMediaPlayer, AVFMediaPlayer, QFFmpegMediaPlayer, QQnxMediaPlayer, MFPlayerControl, QAndroidMediaPlayer, and QWasmMediaPlayer.

Referenced by QMediaPlayerPrivate::setMedia().

+ Here is the caller graph for this function:

◆ setPlaybackRate()

virtual void QPlatformMediaPlayer::setPlaybackRate ( qreal rate)
pure virtual

◆ setPosition()

virtual void QPlatformMediaPlayer::setPosition ( qint64 position)
pure virtual

◆ setVideoSink()

virtual void QPlatformMediaPlayer::setVideoSink ( QVideoSink * )
pure virtual

Implemented in AVFMediaPlayer, QFFmpegMediaPlayer, QGstreamerMediaPlayer, MFPlayerControl, QAndroidMediaPlayer, QWasmMediaPlayer, and QQnxMediaPlayer.

Referenced by QMediaPlayerPrivate::setVideoSink().

+ Here is the caller graph for this function:

◆ state()

virtual QMediaPlayer::PlaybackState QPlatformMediaPlayer::state ( ) const
inlinevirtual

◆ stateChanged()

void QPlatformMediaPlayer::stateChanged ( QMediaPlayer::PlaybackState newState)

Definition at line 21 of file qplatformmediaplayer.cpp.

References newState().

Referenced by QAndroidMediaPlayer::pause(), AVFMediaPlayer::pause(), QFFmpegMediaPlayer::pause(), QGstreamerMediaPlayer::pause(), QWasmMediaPlayer::pause(), QAndroidMediaPlayer::play(), AVFMediaPlayer::play(), QGstreamerMediaPlayer::play(), QQnxMediaPlayer::play(), AVFMediaPlayer::processEOS(), AVFMediaPlayer::processLoadStateFailure(), QGstreamerMediaPlayer::setMedia(), AVFMediaPlayer::setMedia(), QQnxMediaPlayer::setMedia(), QAndroidMediaPlayer::stop(), AVFMediaPlayer::stop(), and QFFmpegMediaPlayer::stop().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ stop()

virtual void QPlatformMediaPlayer::stop ( )
pure virtual

◆ streamPlaybackSupported()

virtual bool QPlatformMediaPlayer::streamPlaybackSupported ( ) const
inlinevirtual

Reimplemented in QGstreamerMediaPlayer, and MFPlayerControl.

Definition at line 63 of file qplatformmediaplayer_p.h.

Referenced by QMediaPlayerPrivate::setMedia().

+ Here is the caller graph for this function:

◆ trackCount()

virtual int QPlatformMediaPlayer::trackCount ( TrackType )
inlinevirtual

Reimplemented in QAndroidMediaPlayer, QWasmMediaPlayer, MFPlayerControl, QFFmpegMediaPlayer, and QGstreamerMediaPlayer.

Definition at line 74 of file qplatformmediaplayer_p.h.

Referenced by QMediaPlayerPrivate::trackMetaData().

+ Here is the caller graph for this function:

◆ trackMetaData()

virtual QMediaMetaData QPlatformMediaPlayer::trackMetaData ( TrackType ,
int  )
inlinevirtual

Reimplemented in QAndroidMediaPlayer, QFFmpegMediaPlayer, MFPlayerControl, and QGstreamerMediaPlayer.

Definition at line 75 of file qplatformmediaplayer_p.h.

Referenced by QMediaPlayerPrivate::trackMetaData().

+ Here is the caller graph for this function:

◆ tracksChanged()

void QPlatformMediaPlayer::tracksChanged ( )
inline

Definition at line 107 of file qplatformmediaplayer_p.h.

References emit, player, and QMediaPlayer::tracksChanged().

Referenced by MFPlayerControl::handleTracksChanged(), QGstreamerMediaPlayer::processBusMessage(), AVFMediaPlayer::setMedia(), and AVFMediaPlayer::updateTracks().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ videoAvailableChanged()

void QPlatformMediaPlayer::videoAvailableChanged ( bool videoAvailable)
inline

Definition at line 92 of file qplatformmediaplayer_p.h.

References emit, QMediaPlayer::hasVideoChanged(), and player.

Referenced by MFPlayerControl::handleVideoAvailable().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

The documentation for this class was generated from the following files: