QMediaRecorder: GStreamer backend changes for media probing API.
QGstreamerCaptureSession: Using GStreamer buffer probe to access media data. Change-Id: I2ee38e864fbd69fcba9efe90d4dcf138528e00c0 Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
This commit is contained in:
committed by
Qt by Nokia
parent
0374f0de5e
commit
16aef59187
@@ -45,6 +45,7 @@
|
||||
#include <qmediarecordercontrol.h>
|
||||
#include <qmediarecorder.h>
|
||||
|
||||
#include <QtCore/qmutex.h>
|
||||
#include <QtCore/qurl.h>
|
||||
|
||||
#include <gst/gst.h>
|
||||
@@ -61,6 +62,7 @@ class QGstreamerImageEncode;
|
||||
class QGstreamerRecorderControl;
|
||||
class QGstreamerMediaContainerControl;
|
||||
class QGstreamerVideoRendererInterface;
|
||||
class QGstreamerAudioProbeControl;
|
||||
|
||||
class QGstreamerElementFactory
|
||||
{
|
||||
@@ -127,6 +129,10 @@ public:
|
||||
|
||||
bool processBusMessage(const QGstreamerMessage &message);
|
||||
|
||||
void addProbe(QGstreamerAudioProbeControl* probe);
|
||||
void removeProbe(QGstreamerAudioProbeControl* probe);
|
||||
static gboolean padAudioBufferProbe(GstPad *pad, GstBuffer *buffer, gpointer user_data);
|
||||
|
||||
signals:
|
||||
void stateChanged(QGstreamerCaptureSession::State state);
|
||||
void durationChanged(qint64 duration);
|
||||
@@ -160,6 +166,10 @@ private:
|
||||
void waitForStopped();
|
||||
bool rebuildGraph(QGstreamerCaptureSession::PipelineMode newMode);
|
||||
|
||||
GstPad *getAudioProbePad();
|
||||
void removeAudioBufferProbe();
|
||||
void addAudioBufferProbe();
|
||||
|
||||
QUrl m_sink;
|
||||
QString m_captureDevice;
|
||||
State m_state;
|
||||
@@ -169,6 +179,10 @@ private:
|
||||
QGstreamerCaptureSession::CaptureMode m_captureMode;
|
||||
QMap<QByteArray, QVariant> m_metaData;
|
||||
|
||||
QList<QGstreamerAudioProbeControl*> m_audioProbes;
|
||||
QMutex m_audioProbeMutex;
|
||||
int m_audioBufferProbeId;
|
||||
|
||||
QGstreamerElementFactory *m_audioInputFactory;
|
||||
QGstreamerElementFactory *m_audioPreviewFactory;
|
||||
QGstreamerVideoInput *m_videoInputFactory;
|
||||
|
||||
Reference in New Issue
Block a user