diff options
author | Liang Qi <liang.qi@qt.io> | 2017-06-07 12:06:52 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-06-07 12:52:58 +0200 |
commit | 7fdb88a86b0782e7170eefe3dfe7ab3e9c81f847 (patch) | |
tree | 0fb34738dd5b4abd222ffac7b25f904c456006d9 /src/plugins/directshow/player/directshowplayerservice.h | |
parent | badecdbc46df6ada383f1dfd006fa3dfff1706c6 (diff) | |
parent | a6cc1af0546ab10701c10475315139ebb50ad1e5 (diff) |
Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
.qmake.conf
Change-Id: I20470ed193e818eefedd975d89f755fb9d673241
Diffstat (limited to 'src/plugins/directshow/player/directshowplayerservice.h')
-rw-r--r-- | src/plugins/directshow/player/directshowplayerservice.h | 63 |
1 files changed, 43 insertions, 20 deletions
diff --git a/src/plugins/directshow/player/directshowplayerservice.h b/src/plugins/directshow/player/directshowplayerservice.h index d933bd660..676d88fb5 100644 --- a/src/plugins/directshow/player/directshowplayerservice.h +++ b/src/plugins/directshow/player/directshowplayerservice.h @@ -55,17 +55,18 @@ #include <QtCore/qurl.h> #include <QtCore/qwaitcondition.h> +QT_BEGIN_NAMESPACE + class DirectShowAudioEndpointControl; class DirectShowMetaDataControl; class DirectShowPlayerControl; class DirectShowVideoRendererControl; +class DirectShowAudioProbeControl; +class DirectShowVideoProbeControl; +class DirectShowSampleGrabber; -QT_BEGIN_NAMESPACE class QMediaContent; class QVideoWindowControl; -QT_END_NAMESPACE - -QT_USE_NAMESPACE class DirectShowPlayerService : public QMediaService { @@ -105,10 +106,16 @@ protected: private Q_SLOTS: void videoOutputChanged(); + void onAudioBufferAvailable(double time, quint8 *buffer, long len); + void onVideoBufferAvailable(double time, quint8 *buffer, long len); + private: void releaseGraph(); void updateStatus(); + void updateAudioProbe(); + void updateVideoProbe(); + int findStreamTypes(IBaseFilter *source) const; int findStreamType(IPin *pin) const; @@ -129,29 +136,40 @@ private: void doReleaseAudioOutput(QMutexLocker *locker); void doReleaseVideoOutput(QMutexLocker *locker); void doReleaseGraph(QMutexLocker *locker); + void doSetVideoProbe(QMutexLocker *locker); + void doSetAudioProbe(QMutexLocker *locker); + void doReleaseVideoProbe(QMutexLocker *locker); + void doReleaseAudioProbe(QMutexLocker *locker); void graphEvent(QMutexLocker *locker); enum Task { - Shutdown = 0x0001, - SetUrlSource = 0x0002, - SetStreamSource = 0x0004, + Shutdown = 0x00001, + SetUrlSource = 0x00002, + SetStreamSource = 0x00004, SetSource = SetUrlSource | SetStreamSource, - SetAudioOutput = 0x0008, - SetVideoOutput = 0x0010, + SetAudioOutput = 0x00008, + SetVideoOutput = 0x00010, SetOutputs = SetAudioOutput | SetVideoOutput, - Render = 0x0020, - FinalizeLoad = 0x0040, - SetRate = 0x0080, - Seek = 0x0100, - Play = 0x0200, - Pause = 0x0400, - Stop = 0x0800, - ReleaseGraph = 0x1000, - ReleaseAudioOutput = 0x2000, - ReleaseVideoOutput = 0x4000, - ReleaseFilters = ReleaseGraph | ReleaseAudioOutput | ReleaseVideoOutput + SetAudioProbe = 0x00020, + SetVideoProbe = 0x00040, + SetProbes = SetAudioProbe | SetVideoProbe, + Render = 0x00080, + FinalizeLoad = 0x00100, + SetRate = 0x00200, + Seek = 0x00400, + Play = 0x00800, + Pause = 0x01000, + Stop = 0x02000, + ReleaseGraph = 0x04000, + ReleaseAudioOutput = 0x08000, + ReleaseVideoOutput = 0x10000, + ReleaseAudioProbe = 0x20000, + ReleaseVideoProbe = 0x40000, + ReleaseFilters = ReleaseGraph | ReleaseAudioOutput + | ReleaseVideoOutput | ReleaseAudioProbe + | ReleaseVideoProbe }; enum Event @@ -180,6 +198,10 @@ private: DirectShowVideoRendererControl *m_videoRendererControl; QVideoWindowControl *m_videoWindowControl; DirectShowAudioEndpointControl *m_audioEndpointControl; + DirectShowAudioProbeControl *m_audioProbeControl; + DirectShowVideoProbeControl *m_videoProbeControl; + DirectShowSampleGrabber *m_audioSampleGrabber; + DirectShowSampleGrabber *m_videoSampleGrabber; QThread *m_taskThread; DirectShowEventLoop *m_loop; @@ -213,5 +235,6 @@ private: friend class DirectShowPlayerServiceThread; }; +QT_END_NAMESPACE #endif |