summaryrefslogtreecommitdiffstats
path: root/src/multimedia/gsttools_headers/qvideosurfacegstsink_p.h
diff options
context:
space:
mode:
authorLev Zelenskiy <lev.zelenskiy@nokia.com>2012-02-06 13:52:56 +1000
committerQt by Nokia <qt-info@nokia.com>2012-02-06 08:56:34 +0100
commit39c96db2b32147dcf5b5ddc1046a4a97645fee23 (patch)
treecaea2252c8848b9243b18ae23544aa707f381a2d /src/multimedia/gsttools_headers/qvideosurfacegstsink_p.h
parent7415e4c879e930927afae21790eede7f7c35c965 (diff)
Changes to QMediaPlayer GStreamer backend to allow setPosition before pause
Do not display prerolled frames in stopped state. Instead store prerolled frame and display it only after switching to pause or playback state. Added new unit test with a sample video file to check this functionality. Change-Id: I3fd159a199b65ca10fdf9843af5675c5ae9dad05 Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
Diffstat (limited to 'src/multimedia/gsttools_headers/qvideosurfacegstsink_p.h')
-rw-r--r--src/multimedia/gsttools_headers/qvideosurfacegstsink_p.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/multimedia/gsttools_headers/qvideosurfacegstsink_p.h b/src/multimedia/gsttools_headers/qvideosurfacegstsink_p.h
index b145d3585..9dc57bb31 100644
--- a/src/multimedia/gsttools_headers/qvideosurfacegstsink_p.h
+++ b/src/multimedia/gsttools_headers/qvideosurfacegstsink_p.h
@@ -97,6 +97,9 @@ public:
GstFlowReturn render(GstBuffer *buffer);
+ GstBuffer *lastPrerolledBuffer() const { return m_lastPrerolledBuffer; }
+ void setLastPrerolledBuffer(GstBuffer *lastPrerolledBuffer); // set prerolledBuffer to 0 to discard prerolled buffer
+
private slots:
void queuedStart();
void queuedStop();
@@ -118,6 +121,8 @@ private:
QVideoSurfaceFormat m_format;
QVideoFrame m_frame;
GstFlowReturn m_renderReturn;
+ // this pointer is not 0 when there is a prerolled buffer waiting to be displayed
+ GstBuffer *m_lastPrerolledBuffer;
int m_bytesPerLine;
bool m_started;
bool m_startCanceled;
@@ -131,6 +136,8 @@ public:
static QVideoSurfaceGstSink *createSink(QAbstractVideoSurface *surface);
static QVideoSurfaceFormat formatForCaps(GstCaps *caps, int *bytesPerLine = 0);
+ static void handleShowPrerollChange(GObject *o, GParamSpec *p, gpointer d);
+
private:
static GType get_type();
static void class_init(gpointer g_class, gpointer class_data);