Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QMediaPlayerPrivate Class Reference

#include <qmediaplayer_p.h>

+ Inheritance diagram for QMediaPlayerPrivate:
+ Collaboration diagram for QMediaPlayerPrivate:

Public Member Functions

 QMediaPlayerPrivate ()=default
 
void setMedia (const QUrl &media, QIODevice *stream=nullptr)
 
QList< QMediaMetaDatatrackMetaData (QPlatformMediaPlayer::TrackType s) const
 
void setState (QMediaPlayer::PlaybackState state)
 \qmltype MediaPlayer \nativetype QMediaPlayer
 
void setStatus (QMediaPlayer::MediaStatus status)
 
void setError (QMediaPlayer::Error error, const QString &errorString)
 
void setVideoSink (QVideoSink *sink)
 
- Public Member Functions inherited from QObjectPrivate
void ensureExtraData ()
 
 QObjectPrivate (int version=QObjectPrivateVersion)
 
virtual ~QObjectPrivate ()
 
void deleteChildren ()
 
void clearBindingStorage ()
 
void checkForIncompatibleLibraryVersion (int version) const
 
void setParent_helper (QObject *)
 
void moveToThread_helper ()
 
void setThreadData_helper (QThreadData *currentData, QThreadData *targetData, QBindingStatus *status)
 
QObjectList receiverList (const char *signal) const
 
void ensureConnectionData ()
 
void addConnection (int signal, Connection *c)
 
int signalIndex (const char *signalName, const QMetaObject **meta=nullptr) const
 
bool isSignalConnected (uint signalIdx, bool checkDeclarative=true) const
 
bool maybeSignalConnected (uint signalIndex) const
 
bool isDeclarativeSignalConnected (uint signalIdx) const
 
void connectNotify (const QMetaMethod &signal)
 
void disconnectNotify (const QMetaMethod &signal)
 
void reinitBindingStorageAfterThreadMove ()
 
virtual std::string flagsForDumping () const
 
virtual void writeToDebugStream (QDebug &) const
 
QtPrivate::QPropertyAdaptorSlotObjectgetPropertyAdaptorSlotObject (const QMetaProperty &property)
 
- Public Member Functions inherited from QObjectData
 QObjectData ()=default
 
virtual ~QObjectData ()=0
 
QMetaObjectdynamicMetaObject () const
 

Static Public Member Functions

static QMediaPlayerPrivateget (QMediaPlayer *session)
 
- Static Public Member Functions inherited from QObjectPrivate
static bool removeConnection (Connection *c)
 
static QObjectPrivateget (QObject *o)
 
static const QObjectPrivateget (const QObject *o)
 
template<typename Func1 , typename Func2 >
static QMetaObject::Connection connect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot, Qt::ConnectionType type=Qt::AutoConnection)
 
template<typename Func1 , typename Func2 >
static bool disconnect (const typename QtPrivate::FunctionPointer< Func1 >::Object *sender, Func1 signal, const typename QtPrivate::FunctionPointer< Func2 >::Object *receiverPrivate, Func2 slot)
 
static QMetaObject::Connection connectImpl (const QObject *sender, int signal_index, const QObject *receiver, void **slot, QtPrivate::QSlotObjectBase *slotObj, int type, const int *types, const QMetaObject *senderMetaObject)
 
static QMetaObject::Connection connect (const QObject *sender, int signal_index, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType type)
 
static QMetaObject::Connection connect (const QObject *sender, int signal_index, const QObject *receiver, QtPrivate::QSlotObjectBase *slotObj, Qt::ConnectionType type)
 
static bool disconnect (const QObject *sender, int signal_index, void **slot)
 
static bool disconnect (const QObject *sender, int signal_index, const QObject *receiver, void **slot)
 

Public Attributes

QPlatformMediaPlayercontrol = nullptr
 
QPointer< QAudioBufferOutputaudioBufferOutput
 
QPointer< QAudioOutputaudioOutput
 
QPointer< QVideoSinkvideoSink
 
QPointer< QObjectvideoOutput
 
QUrl qrcMedia
 
std::unique_ptr< QFileqrcFile
 
QUrl source
 
QIODevicestream = nullptr
 
QMediaPlayer::PlaybackState state = QMediaPlayer::StoppedState
 
QErrorInfo< QMediaPlayer::Errorerror
 
- Public Attributes inherited from QObjectPrivate
ExtraDataextraData
 
QAtomicPointer< QThreadDatathreadData
 
QAtomicPointer< ConnectionDataconnections
 
union { 
 
   QObject *   currentChildBeingDeleted 
 
   QAbstractDeclarativeData *   declarativeData 
 
};  
 
QAtomicPointer< QtSharedPointer::ExternalRefCountDatasharedRefcount
 
- Public Attributes inherited from QObjectData
QObjectq_ptr
 
QObjectparent
 
QObjectList children
 
uint isWidget: 1
 
uint blockSig: 1
 
uint wasDeleted: 1
 
uint isDeletingChildren: 1
 
uint sendChildEvents: 1
 
uint receiveChildEvents: 1
 
uint isWindow: 1
 
uint deleteLaterCalled: 1
 
uint isQuickItem: 1
 
uint willBeWidget: 1
 
uint wasWidget: 1
 
uint receiveParentEvents: 1
 
uint unused: 20
 
QAtomicInt postedEvents
 
QDynamicMetaObjectDatametaObject
 
QBindingStorage bindingStorage
 

Additional Inherited Members

- Public Types inherited from QObjectPrivate
typedef void(*) StaticMetaCallFunction(QObject *, QMetaObject::Call, int, void **)
 
using ConnectionDataPointer = QExplicitlySharedDataPointer<ConnectionData>
 

Detailed Description

Definition at line 39 of file qmediaplayer_p.h.

Constructor & Destructor Documentation

◆ QMediaPlayerPrivate()

QMediaPlayerPrivate::QMediaPlayerPrivate ( )
default

Member Function Documentation

◆ get()

static QMediaPlayerPrivate * QMediaPlayerPrivate::get ( QMediaPlayer * session)
inlinestatic

Definition at line 44 of file qmediaplayer_p.h.

◆ setError()

void QMediaPlayerPrivate::setError ( QMediaPlayer::Error error,
const QString & errorString )

Definition at line 121 of file qmediaplayer.cpp.

◆ setMedia()

void QMediaPlayerPrivate::setMedia ( const QUrl & media,
QIODevice * stream = nullptr )

Definition at line 128 of file qmediaplayer.cpp.

References control.

◆ setState()

void QMediaPlayerPrivate::setState ( QMediaPlayer::PlaybackState toState)

\qmltype MediaPlayer \nativetype QMediaPlayer

Adds media playback to a scene.

\inqmlmodule QtMultimedia

\qml Text { text: "Click Me!"; font.pointSize: 24; width: 150; height: 50;

MediaPlayer { id: playMusic source: "music.wav" audioOutput: AudioOutput {} } MouseArea { anchors.fill: parent onPressed: { playMusic.play() } } } \endqml

You can use MediaPlayer together with a MultiMedia::AudioOutput to play audio content, or you can use it in conjunction with a Multimedia::VideoOutput for rendering video.

\qml Item { MediaPlayer { id: mediaplayer source: "groovy_video.mp4" audioOutput: AudioOutput {} videoOutput: videoOutput }

VideoOutput { id: videoOutput anchors.fill: parent }

MouseArea { anchors.fill: parent onPressed: mediaplayer.play(); } } \endqml

See also
AudioOutput, VideoOutput

Definition at line 102 of file qmediaplayer.cpp.

◆ setStatus()

void QMediaPlayerPrivate::setStatus ( QMediaPlayer::MediaStatus status)

Definition at line 114 of file qmediaplayer.cpp.

◆ setVideoSink()

void QMediaPlayerPrivate::setVideoSink ( QVideoSink * sink)
inline

Definition at line 72 of file qmediaplayer_p.h.

References control.

◆ trackMetaData()

QList< QMediaMetaData > QMediaPlayerPrivate::trackMetaData ( QPlatformMediaPlayer::TrackType s) const

Definition at line 206 of file qmediaplayer.cpp.

References control.

Member Data Documentation

◆ audioBufferOutput

QPointer<QAudioBufferOutput> QMediaPlayerPrivate::audioBufferOutput

Definition at line 52 of file qmediaplayer_p.h.

◆ audioOutput

QPointer<QAudioOutput> QMediaPlayerPrivate::audioOutput

Definition at line 53 of file qmediaplayer_p.h.

◆ control

QPlatformMediaPlayer* QMediaPlayerPrivate::control = nullptr

Definition at line 50 of file qmediaplayer_p.h.

Referenced by setMedia(), setVideoSink(), and trackMetaData().

◆ error

QErrorInfo<QMediaPlayer::Error> QMediaPlayerPrivate::error

Definition at line 62 of file qmediaplayer_p.h.

◆ qrcFile

std::unique_ptr<QFile> QMediaPlayerPrivate::qrcFile

Definition at line 57 of file qmediaplayer_p.h.

◆ qrcMedia

QUrl QMediaPlayerPrivate::qrcMedia

Definition at line 56 of file qmediaplayer_p.h.

◆ source

QUrl QMediaPlayerPrivate::source

Definition at line 58 of file qmediaplayer_p.h.

◆ state

Definition at line 61 of file qmediaplayer_p.h.

◆ stream

QIODevice* QMediaPlayerPrivate::stream = nullptr

Definition at line 59 of file qmediaplayer_p.h.

◆ videoOutput

QPointer<QObject> QMediaPlayerPrivate::videoOutput

Definition at line 55 of file qmediaplayer_p.h.

◆ videoSink

QPointer<QVideoSink> QMediaPlayerPrivate::videoSink

Definition at line 54 of file qmediaplayer_p.h.


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