summaryrefslogtreecommitdiffstats
path: root/src/multimedia/gsttools_headers
diff options
context:
space:
mode:
authorYoann Lopes <yoann.lopes@theqtcompany.com>2015-03-24 17:32:28 +0100
committerYoann Lopes <yoann.lopes@theqtcompany.com>2015-05-27 12:18:50 +0000
commit8143aff1b293501f2ea37b98affbadd936e55f9b (patch)
tree2481ecdfe0c09db729484d55c956b7cbc9c1b409 /src/multimedia/gsttools_headers
parent83d1255080ab2be678efbbc42e259c9681619619 (diff)
GStreamer: flush the current frame when stopping a media player.
When stopping, we don't actually stop the GStreamer pipeline, we just pause it and prevent preroll frames from being shown. We also need to make sure the last presented frame is cleared in that case, otherwise it stays on screen. Fixed for both 0.10 and 1.0. Change-Id: Ibe26a7567f271ae0c3d8819eb9d35d6a95da1c6a Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
Diffstat (limited to 'src/multimedia/gsttools_headers')
-rw-r--r--src/multimedia/gsttools_headers/qgstvideorenderersink_p.h4
-rw-r--r--src/multimedia/gsttools_headers/qvideosurfacegstsink_p.h5
2 files changed, 9 insertions, 0 deletions
diff --git a/src/multimedia/gsttools_headers/qgstvideorenderersink_p.h b/src/multimedia/gsttools_headers/qgstvideorenderersink_p.h
index 186708872..78bdf8cb8 100644
--- a/src/multimedia/gsttools_headers/qgstvideorenderersink_p.h
+++ b/src/multimedia/gsttools_headers/qgstvideorenderersink_p.h
@@ -99,6 +99,8 @@ public:
void unlock();
bool proposeAllocation(GstQuery *query);
+ void flush();
+
GstFlowReturn render(GstBuffer *buffer);
bool event(QEvent *event);
@@ -145,6 +147,8 @@ private:
static void finalize(GObject *object);
+ static void handleShowPrerollChange(GObject *o, GParamSpec *p, gpointer d);
+
static GstStateChangeReturn change_state(GstElement *element, GstStateChange transition);
static GstCaps *get_caps(GstBaseSink *sink, GstCaps *filter);
diff --git a/src/multimedia/gsttools_headers/qvideosurfacegstsink_p.h b/src/multimedia/gsttools_headers/qvideosurfacegstsink_p.h
index e8f61afe0..a1ef5616b 100644
--- a/src/multimedia/gsttools_headers/qvideosurfacegstsink_p.h
+++ b/src/multimedia/gsttools_headers/qvideosurfacegstsink_p.h
@@ -96,11 +96,14 @@ public:
QMutex *poolMutex() { return &m_poolMutex; }
void clearPoolBuffers();
+ void flush();
+
GstFlowReturn render(GstBuffer *buffer);
private slots:
void queuedStart();
void queuedStop();
+ void queuedFlush();
void queuedRender();
void updateSupportedFormats();
@@ -139,6 +142,8 @@ private:
static void finalize(GObject *object);
+ static void handleShowPrerollChange(GObject *o, GParamSpec *p, gpointer d);
+
static GstStateChangeReturn change_state(GstElement *element, GstStateChange transition);
static GstCaps *get_caps(GstBaseSink *sink);