summaryrefslogtreecommitdiffstats
path: root/src/multimedia/gsttools_headers
diff options
context:
space:
mode:
authorAndrew den Exter <andrew.den.exter@jollamobile.com>2014-08-11 16:51:36 +1000
committerAndrew den Exter <andrew.den.exter@qinetic.com.au>2014-09-12 14:32:42 +0200
commit3b20608fe3a68375934aee93031ca78f87364bf4 (patch)
treed0254114359663bd4da3c033bf119ec046d5d974 /src/multimedia/gsttools_headers
parent65d44edd3d06674ec7a0014d7ecabc4f1d0854e1 (diff)
Ensure pre-roll frames are displayed when gstreamer backend is paused.
Perform a seek before transitioning from the stopped state to paused or playing to force the pipeline to resupply the video sink with any pre-roll buffer it may have previously ignored during loading. And don't assume showPrerollFrames to be true if the current state is not stopped as the policy handling may have prevented an effectual state change. Change-Id: I288a70bc4da32f3534eab4b14702ca8f8fdb4222 Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
Diffstat (limited to 'src/multimedia/gsttools_headers')
-rw-r--r--src/multimedia/gsttools_headers/qvideosurfacegstsink_p.h13
1 files changed, 1 insertions, 12 deletions
diff --git a/src/multimedia/gsttools_headers/qvideosurfacegstsink_p.h b/src/multimedia/gsttools_headers/qvideosurfacegstsink_p.h
index d152e2a44..11b305d27 100644
--- a/src/multimedia/gsttools_headers/qvideosurfacegstsink_p.h
+++ b/src/multimedia/gsttools_headers/qvideosurfacegstsink_p.h
@@ -84,9 +84,6 @@ 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();
@@ -108,8 +105,6 @@ 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;
@@ -126,8 +121,6 @@ public:
QAbstractVideoBuffer::HandleType handleType = QAbstractVideoBuffer::NoHandle);
static void setFrameTimeStamps(QVideoFrame *frame, GstBuffer *buffer);
- static void handleShowPrerollChange(GObject *o, GParamSpec *p, gpointer d);
-
private:
static GType get_type();
static void class_init(gpointer g_class, gpointer class_data);
@@ -147,11 +140,7 @@ private:
static gboolean start(GstBaseSink *sink);
static gboolean stop(GstBaseSink *sink);
- static gboolean unlock(GstBaseSink *sink);
-
- static gboolean event(GstBaseSink *sink, GstEvent *event);
- static GstFlowReturn preroll(GstBaseSink *sink, GstBuffer *buffer);
- static GstFlowReturn render(GstBaseSink *sink, GstBuffer *buffer);
+ static GstFlowReturn show_frame(GstVideoSink *sink, GstBuffer *buffer);
private:
QVideoSurfaceGstDelegate *delegate;