summaryrefslogtreecommitdiffstats
path: root/src/multimedia/gsttools_headers
diff options
context:
space:
mode:
authorYoann Lopes <yoann.lopes@theqtcompany.com>2015-03-23 14:28:41 +0100
committerYoann Lopes <yoann.lopes@theqtcompany.com>2015-04-07 11:35:05 +0000
commitcbbcf4f3a54fe981ad9d7e649572f86bcdbaf4c6 (patch)
treef262a36735c031a4c1cbdc7c3b4ff2bbf855cd21 /src/multimedia/gsttools_headers
parentf3ee857564934332da67cc51265841bd76d62b29 (diff)
GStreamer: implement unlock() in QGstVideoRendererSink.
There are cases where blocking operations happening in the video sink need to be unblocked, that's why GstBaseSink has an unlock() virtual function. Since our custom video sink blocks when starting and when rendering a frame (while waiting for the main thread to actually do these operations), we need to implement the unlock() function in order to unblock these operations when requested by GstBaseSink. Change-Id: I5cb19ea689e655f572729d931cefec8a4266c94e Reviewed-by: Andrew den Exter <andrew.den.exter@qinetic.com.au>
Diffstat (limited to 'src/multimedia/gsttools_headers')
-rw-r--r--src/multimedia/gsttools_headers/qgstvideorenderersink_p.h3
-rw-r--r--src/multimedia/gsttools_headers/qvideosurfacegstsink_p.h4
2 files changed, 7 insertions, 0 deletions
diff --git a/src/multimedia/gsttools_headers/qgstvideorenderersink_p.h b/src/multimedia/gsttools_headers/qgstvideorenderersink_p.h
index 72beceeaf..186708872 100644
--- a/src/multimedia/gsttools_headers/qgstvideorenderersink_p.h
+++ b/src/multimedia/gsttools_headers/qgstvideorenderersink_p.h
@@ -96,6 +96,7 @@ public:
bool start(GstCaps *caps);
void stop();
+ void unlock();
bool proposeAllocation(GstQuery *query);
GstFlowReturn render(GstBuffer *buffer);
@@ -153,6 +154,8 @@ private:
static gboolean stop(GstBaseSink *sink);
+ static gboolean unlock(GstBaseSink *sink);
+
static GstFlowReturn show_frame(GstVideoSink *sink, GstBuffer *buffer);
private:
diff --git a/src/multimedia/gsttools_headers/qvideosurfacegstsink_p.h b/src/multimedia/gsttools_headers/qvideosurfacegstsink_p.h
index 0b253462e..e8f61afe0 100644
--- a/src/multimedia/gsttools_headers/qvideosurfacegstsink_p.h
+++ b/src/multimedia/gsttools_headers/qvideosurfacegstsink_p.h
@@ -88,6 +88,8 @@ public:
bool start(const QVideoSurfaceFormat &format, int bytesPerLine);
void stop();
+ void unlock();
+
bool isActive();
QGstBufferPoolInterface *pool() { return m_pool; }
@@ -148,6 +150,8 @@ private:
static gboolean start(GstBaseSink *sink);
static gboolean stop(GstBaseSink *sink);
+ static gboolean unlock(GstBaseSink *sink);
+
static GstFlowReturn show_frame(GstVideoSink *sink, GstBuffer *buffer);
private: