GStreamer 1.0: fix some problems with QGstVideoRendererSink.
- Correctly free resources on deletion.
- Correctly stop the sink. We were stopping only when null caps
were passed to set_caps() but that doesn't seem to always happen.
Implement GstBaseSink.stop() which is always and consistently
called by GStreamer.
- Remove pre-roll support (as done previously for 0.10, see
commit 3b20608f).
Change-Id: I4c5808938f244f4f8a35e121a3a4a862588b752d
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
This commit is contained in:
@@ -98,14 +98,10 @@ public:
|
||||
void stop();
|
||||
bool proposeAllocation(GstQuery *query);
|
||||
|
||||
void flush();
|
||||
|
||||
GstFlowReturn render(GstBuffer *buffer, bool show);
|
||||
GstFlowReturn render(GstBuffer *buffer);
|
||||
|
||||
bool event(QEvent *event);
|
||||
|
||||
static void handleShowPrerollChange(GObject *o, GParamSpec *p, gpointer d);
|
||||
|
||||
private slots:
|
||||
bool handleEvent(QMutexLocker *locker);
|
||||
void updateSupportedFormats();
|
||||
@@ -126,11 +122,10 @@ private:
|
||||
|
||||
GstCaps *m_surfaceCaps;
|
||||
GstCaps *m_startCaps;
|
||||
GstBuffer *m_lastBuffer;
|
||||
GstBuffer *m_renderBuffer;
|
||||
|
||||
bool m_notified;
|
||||
bool m_stop;
|
||||
bool m_render;
|
||||
bool m_flush;
|
||||
};
|
||||
|
||||
@@ -156,7 +151,8 @@ private:
|
||||
|
||||
static gboolean propose_allocation(GstBaseSink *sink, GstQuery *query);
|
||||
|
||||
static GstFlowReturn preroll(GstBaseSink *sink, GstBuffer *buffer);
|
||||
static gboolean stop(GstBaseSink *sink);
|
||||
|
||||
static GstFlowReturn render(GstBaseSink *sink, GstBuffer *buffer);
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user