mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 23:06:49 +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);
|
GstObject * parent, GstBuffer * buf);
|
||||||
|
|
||||||
static void gst_ffmpegdemux_loop (GstFFMpegDemux * demux);
|
static void gst_ffmpegdemux_loop (GstFFMpegDemux * demux);
|
||||||
static gboolean gst_ffmpegdemux_sink_activate (GstPad * sinkpad);
|
static gboolean gst_ffmpegdemux_sink_activate (GstPad * sinkpad,
|
||||||
static gboolean
|
GstObject * parent);
|
||||||
gst_ffmpegdemux_sink_activate_pull (GstPad * sinkpad, gboolean active);
|
static gboolean gst_ffmpegdemux_sink_activate_pull (GstPad * sinkpad,
|
||||||
static gboolean
|
GstObject * parent, gboolean active);
|
||||||
gst_ffmpegdemux_sink_activate_push (GstPad * sinkpad, gboolean active);
|
static gboolean gst_ffmpegdemux_sink_activate_push (GstPad * sinkpad,
|
||||||
|
GstObject * parent, gboolean active);
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
static gboolean
|
static gboolean
|
||||||
|
@ -1690,7 +1691,7 @@ ignore:
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_ffmpegdemux_sink_activate (GstPad * sinkpad)
|
gst_ffmpegdemux_sink_activate (GstPad * sinkpad, GstObject * parent)
|
||||||
{
|
{
|
||||||
GstQuery *query;
|
GstQuery *query;
|
||||||
gboolean pull_mode;
|
gboolean pull_mode;
|
||||||
|
@ -1723,12 +1724,13 @@ activate_push:
|
||||||
* - (independently managed) task driving ffmpeg
|
* - (independently managed) task driving ffmpeg
|
||||||
*/
|
*/
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_ffmpegdemux_sink_activate_push (GstPad * sinkpad, gboolean active)
|
gst_ffmpegdemux_sink_activate_push (GstPad * sinkpad, GstObject * parent,
|
||||||
|
gboolean active)
|
||||||
{
|
{
|
||||||
GstFFMpegDemux *demux;
|
GstFFMpegDemux *demux;
|
||||||
gboolean res = FALSE;
|
gboolean res = FALSE;
|
||||||
|
|
||||||
demux = (GstFFMpegDemux *) (gst_pad_get_parent (sinkpad));
|
demux = (GstFFMpegDemux *) (parent);
|
||||||
|
|
||||||
if (active) {
|
if (active) {
|
||||||
if (demux->can_push == FALSE) {
|
if (demux->can_push == FALSE) {
|
||||||
|
@ -1760,8 +1762,6 @@ gst_ffmpegdemux_sink_activate_push (GstPad * sinkpad, gboolean active)
|
||||||
}
|
}
|
||||||
|
|
||||||
beach:
|
beach:
|
||||||
gst_object_unref (demux);
|
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1771,12 +1771,13 @@ beach:
|
||||||
* - task driving ffmpeg based on sink pad
|
* - task driving ffmpeg based on sink pad
|
||||||
*/
|
*/
|
||||||
static gboolean
|
static gboolean
|
||||||
gst_ffmpegdemux_sink_activate_pull (GstPad * sinkpad, gboolean active)
|
gst_ffmpegdemux_sink_activate_pull (GstPad * sinkpad, GstObject * parent,
|
||||||
|
gboolean active)
|
||||||
{
|
{
|
||||||
GstFFMpegDemux *demux;
|
GstFFMpegDemux *demux;
|
||||||
gboolean res;
|
gboolean res;
|
||||||
|
|
||||||
demux = (GstFFMpegDemux *) (gst_pad_get_parent (sinkpad));
|
demux = (GstFFMpegDemux *) parent;
|
||||||
|
|
||||||
if (active) {
|
if (active) {
|
||||||
demux->seekable = TRUE;
|
demux->seekable = TRUE;
|
||||||
|
@ -1787,8 +1788,6 @@ gst_ffmpegdemux_sink_activate_pull (GstPad * sinkpad, gboolean active)
|
||||||
demux->seekable = FALSE;
|
demux->seekable = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
gst_object_unref (demux);
|
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue