mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 14:56:36 +00:00
add parent to activate functions
This commit is contained in:
parent
152e090891
commit
c1b511f5db
1 changed files with 13 additions and 14 deletions
|
@ -126,11 +126,12 @@ static GstFlowReturn gst_ffmpegdemux_chain (GstPad * sinkpad,
|
|||
GstObject * parent, GstBuffer * buf);
|
||||
|
||||
static void gst_ffmpegdemux_loop (GstFFMpegDemux * demux);
|
||||
static gboolean gst_ffmpegdemux_sink_activate (GstPad * sinkpad);
|
||||
static gboolean
|
||||
gst_ffmpegdemux_sink_activate_pull (GstPad * sinkpad, gboolean active);
|
||||
static gboolean
|
||||
gst_ffmpegdemux_sink_activate_push (GstPad * sinkpad, gboolean active);
|
||||
static gboolean gst_ffmpegdemux_sink_activate (GstPad * sinkpad,
|
||||
GstObject * parent);
|
||||
static gboolean gst_ffmpegdemux_sink_activate_pull (GstPad * sinkpad,
|
||||
GstObject * parent, gboolean active);
|
||||
static gboolean gst_ffmpegdemux_sink_activate_push (GstPad * sinkpad,
|
||||
GstObject * parent, gboolean active);
|
||||
|
||||
#if 0
|
||||
static gboolean
|
||||
|
@ -1690,7 +1691,7 @@ ignore:
|
|||
}
|
||||
|
||||
static gboolean
|
||||
gst_ffmpegdemux_sink_activate (GstPad * sinkpad)
|
||||
gst_ffmpegdemux_sink_activate (GstPad * sinkpad, GstObject * parent)
|
||||
{
|
||||
GstQuery *query;
|
||||
gboolean pull_mode;
|
||||
|
@ -1723,12 +1724,13 @@ activate_push:
|
|||
* - (independently managed) task driving ffmpeg
|
||||
*/
|
||||
static gboolean
|
||||
gst_ffmpegdemux_sink_activate_push (GstPad * sinkpad, gboolean active)
|
||||
gst_ffmpegdemux_sink_activate_push (GstPad * sinkpad, GstObject * parent,
|
||||
gboolean active)
|
||||
{
|
||||
GstFFMpegDemux *demux;
|
||||
gboolean res = FALSE;
|
||||
|
||||
demux = (GstFFMpegDemux *) (gst_pad_get_parent (sinkpad));
|
||||
demux = (GstFFMpegDemux *) (parent);
|
||||
|
||||
if (active) {
|
||||
if (demux->can_push == FALSE) {
|
||||
|
@ -1760,8 +1762,6 @@ gst_ffmpegdemux_sink_activate_push (GstPad * sinkpad, gboolean active)
|
|||
}
|
||||
|
||||
beach:
|
||||
gst_object_unref (demux);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
@ -1771,12 +1771,13 @@ beach:
|
|||
* - task driving ffmpeg based on sink pad
|
||||
*/
|
||||
static gboolean
|
||||
gst_ffmpegdemux_sink_activate_pull (GstPad * sinkpad, gboolean active)
|
||||
gst_ffmpegdemux_sink_activate_pull (GstPad * sinkpad, GstObject * parent,
|
||||
gboolean active)
|
||||
{
|
||||
GstFFMpegDemux *demux;
|
||||
gboolean res;
|
||||
|
||||
demux = (GstFFMpegDemux *) (gst_pad_get_parent (sinkpad));
|
||||
demux = (GstFFMpegDemux *) parent;
|
||||
|
||||
if (active) {
|
||||
demux->seekable = TRUE;
|
||||
|
@ -1787,8 +1788,6 @@ gst_ffmpegdemux_sink_activate_pull (GstPad * sinkpad, gboolean active)
|
|||
demux->seekable = FALSE;
|
||||
}
|
||||
|
||||
gst_object_unref (demux);
|
||||
|
||||
return res;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue