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>
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user