Audioprobe implementation for wmf backend.

Change-Id: I63af91af870cb92c838c1ab5d4752815aa60a03f
Reviewed-by: Ling Hu <ling.hu@nokia.com>
This commit is contained in:
Lev Zelenskiy
2012-07-11 15:06:40 +10:00
committed by Qt by Nokia
parent 4d13a15bae
commit afe12ea4de
9 changed files with 610 additions and 5 deletions

View File

@@ -54,6 +54,7 @@
#include <QtCore/qmutex.h>
#include <QtCore/qurl.h>
#include <QtCore/qwaitcondition.h>
#include <QtMultimedia/qaudioformat.h>
QT_BEGIN_NAMESPACE
class QMediaContent;
@@ -70,6 +71,8 @@ class MFVideoRendererControl;
class MFPlayerControl;
class MFMetaDataControl;
class MFPlayerService;
class AudioSampleGrabberCallback;
class MFAudioProbeControl;
class MFPlayerSession : public QObject, public IMFAsyncCallback
{
@@ -115,6 +118,9 @@ public:
void close();
void addProbe(MFAudioProbeControl* probe);
void removeProbe(MFAudioProbeControl* probe);
Q_SIGNALS:
void error(QMediaPlayer::Error error, QString errorString, bool isFatal);
void sessionEvent(IMFMediaEvent *sessionEvent);
@@ -211,6 +217,12 @@ private:
IMFTopologyNode* addSourceNode(IMFTopology* topology, IMFMediaSource* source,
IMFPresentationDescriptor* presentationDesc, IMFStreamDescriptor *streamDesc);
IMFTopologyNode* addOutputNode(IMFStreamDescriptor *streamDesc, MediaType& mediaType, IMFTopology* topology, DWORD sinkID);
bool addAudioSampleGrabberNode(IMFTopology* topology);
bool setupAudioSampleGrabber(IMFTopology *topology, IMFTopologyNode *sourceNode, IMFTopologyNode *outputNode);
QAudioFormat audioFormatForMFMediaType(IMFMediaType *mediaType) const;
AudioSampleGrabberCallback *m_audioSampleGrabber;
IMFTopologyNode *m_audioSampleGrabberNode;
};