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