mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-02-17 11:45:25 +00:00
Update for gst_collectpads_foo() to gst_collect_pads_foo()
Original commit message from CVS: * ext/ogg/gstoggmux.c: (gst_ogg_mux_init), (gst_ogg_mux_request_new_pad), (gst_ogg_mux_queue_pads), (gst_ogg_mux_clear_collectpads), (gst_ogg_mux_change_state): * gst/adder/gstadder.c: (gst_adder_init), (gst_adder_request_new_pad), (gst_adder_collected), (gst_adder_change_state): Update for gst_collectpads_foo() to gst_collect_pads_foo() API change.
This commit is contained in:
parent
035f96fe88
commit
46db91babf
3 changed files with 28 additions and 17 deletions
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
||||||
|
2005-11-21 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
|
* ext/ogg/gstoggmux.c: (gst_ogg_mux_init),
|
||||||
|
(gst_ogg_mux_request_new_pad), (gst_ogg_mux_queue_pads),
|
||||||
|
(gst_ogg_mux_clear_collectpads), (gst_ogg_mux_change_state):
|
||||||
|
* gst/adder/gstadder.c: (gst_adder_init),
|
||||||
|
(gst_adder_request_new_pad), (gst_adder_collected),
|
||||||
|
(gst_adder_change_state):
|
||||||
|
Update for gst_collectpads_foo() to gst_collect_pads_foo()
|
||||||
|
API change.
|
||||||
|
|
||||||
2005-11-21 Michael Smith <msmith@fluendo.com>
|
2005-11-21 Michael Smith <msmith@fluendo.com>
|
||||||
|
|
||||||
* ext/vorbis/vorbisenc.c: (gst_vorbisenc_clear),
|
* ext/vorbis/vorbisenc.c: (gst_vorbisenc_clear),
|
||||||
|
|
|
@ -289,8 +289,8 @@ gst_ogg_mux_init (GstOggMux * ogg_mux)
|
||||||
/* seed random number generator for creation of serial numbers */
|
/* seed random number generator for creation of serial numbers */
|
||||||
srand (time (NULL));
|
srand (time (NULL));
|
||||||
|
|
||||||
ogg_mux->collect = gst_collectpads_new ();
|
ogg_mux->collect = gst_collect_pads_new ();
|
||||||
gst_collectpads_set_function (ogg_mux->collect,
|
gst_collect_pads_set_function (ogg_mux->collect,
|
||||||
(GstCollectPadsFunction) gst_ogg_mux_collected, ogg_mux);
|
(GstCollectPadsFunction) gst_ogg_mux_collected, ogg_mux);
|
||||||
|
|
||||||
gst_ogg_mux_clear (ogg_mux);
|
gst_ogg_mux_clear (ogg_mux);
|
||||||
|
@ -371,7 +371,7 @@ gst_ogg_mux_request_new_pad (GstElement * element,
|
||||||
GstOggPad *oggpad;
|
GstOggPad *oggpad;
|
||||||
|
|
||||||
oggpad = (GstOggPad *)
|
oggpad = (GstOggPad *)
|
||||||
gst_collectpads_add_pad (ogg_mux->collect, newpad,
|
gst_collect_pads_add_pad (ogg_mux->collect, newpad,
|
||||||
sizeof (GstOggPad));
|
sizeof (GstOggPad));
|
||||||
|
|
||||||
oggpad->serial = serial;
|
oggpad->serial = serial;
|
||||||
|
@ -385,7 +385,7 @@ gst_ogg_mux_request_new_pad (GstElement * element,
|
||||||
oggpad->first_delta = FALSE;
|
oggpad->first_delta = FALSE;
|
||||||
oggpad->prev_delta = FALSE;
|
oggpad->prev_delta = FALSE;
|
||||||
/* TODO: delete this queue (and the things contained within) later,
|
/* TODO: delete this queue (and the things contained within) later,
|
||||||
* possibly when doing gst_collectpads_remove_pad() (which we don't seem
|
* possibly when doing gst_collect_pads_remove_pad() (which we don't seem
|
||||||
* to do at all?)
|
* to do at all?)
|
||||||
*/
|
*/
|
||||||
oggpad->pagebuffers = g_queue_new ();
|
oggpad->pagebuffers = g_queue_new ();
|
||||||
|
@ -660,7 +660,7 @@ gst_ogg_mux_queue_pads (GstOggMux * ogg_mux)
|
||||||
GstBuffer *buf;
|
GstBuffer *buf;
|
||||||
gboolean incaps;
|
gboolean incaps;
|
||||||
|
|
||||||
buf = gst_collectpads_pop (ogg_mux->collect, data);
|
buf = gst_collect_pads_pop (ogg_mux->collect, data);
|
||||||
GST_DEBUG_OBJECT (ogg_mux, "popping buffer %p", buf);
|
GST_DEBUG_OBJECT (ogg_mux, "popping buffer %p", buf);
|
||||||
|
|
||||||
/* On EOS we get a NULL buffer */
|
/* On EOS we get a NULL buffer */
|
||||||
|
@ -1303,7 +1303,7 @@ gst_ogg_mux_clear_collectpads (GstCollectPads * collect)
|
||||||
}
|
}
|
||||||
g_queue_free (pad->pagebuffers);
|
g_queue_free (pad->pagebuffers);
|
||||||
|
|
||||||
gst_collectpads_remove_pad (collect, ((GstCollectData *) pad)->pad);
|
gst_collect_pads_remove_pad (collect, ((GstCollectData *) pad)->pad);
|
||||||
walk = collect->data;
|
walk = collect->data;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1323,13 +1323,13 @@ gst_ogg_mux_change_state (GstElement * element, GstStateChange transition)
|
||||||
ogg_mux->next_ts = 0;
|
ogg_mux->next_ts = 0;
|
||||||
ogg_mux->offset = 0;
|
ogg_mux->offset = 0;
|
||||||
ogg_mux->pulling = NULL;
|
ogg_mux->pulling = NULL;
|
||||||
gst_collectpads_start (ogg_mux->collect);
|
gst_collect_pads_start (ogg_mux->collect);
|
||||||
gst_ogg_mux_clear (ogg_mux);
|
gst_ogg_mux_clear (ogg_mux);
|
||||||
break;
|
break;
|
||||||
case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
|
case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
|
||||||
break;
|
break;
|
||||||
case GST_STATE_CHANGE_PAUSED_TO_READY:
|
case GST_STATE_CHANGE_PAUSED_TO_READY:
|
||||||
gst_collectpads_stop (ogg_mux->collect);
|
gst_collect_pads_stop (ogg_mux->collect);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -286,8 +286,8 @@ gst_adder_init (GstAdder * adder)
|
||||||
adder->func = NULL;
|
adder->func = NULL;
|
||||||
|
|
||||||
/* keep track of the sinkpads requested */
|
/* keep track of the sinkpads requested */
|
||||||
adder->collect = gst_collectpads_new ();
|
adder->collect = gst_collect_pads_new ();
|
||||||
gst_collectpads_set_function (adder->collect, gst_adder_collected, adder);
|
gst_collect_pads_set_function (adder->collect, gst_adder_collected, adder);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -320,7 +320,7 @@ gst_adder_request_new_pad (GstElement * element, GstPadTemplate * templ,
|
||||||
gst_pad_set_getcaps_function (newpad,
|
gst_pad_set_getcaps_function (newpad,
|
||||||
GST_DEBUG_FUNCPTR (gst_pad_proxy_getcaps));
|
GST_DEBUG_FUNCPTR (gst_pad_proxy_getcaps));
|
||||||
gst_pad_set_setcaps_function (newpad, GST_DEBUG_FUNCPTR (gst_adder_setcaps));
|
gst_pad_set_setcaps_function (newpad, GST_DEBUG_FUNCPTR (gst_adder_setcaps));
|
||||||
gst_collectpads_add_pad (adder->collect, newpad, sizeof (GstCollectData));
|
gst_collect_pads_add_pad (adder->collect, newpad, sizeof (GstCollectData));
|
||||||
if (!gst_element_add_pad (GST_ELEMENT (adder), newpad))
|
if (!gst_element_add_pad (GST_ELEMENT (adder), newpad))
|
||||||
goto could_not_add;
|
goto could_not_add;
|
||||||
|
|
||||||
|
@ -336,7 +336,7 @@ not_sink:
|
||||||
}
|
}
|
||||||
could_not_add:
|
could_not_add:
|
||||||
{
|
{
|
||||||
gst_collectpads_remove_pad (adder->collect, newpad);
|
gst_collect_pads_remove_pad (adder->collect, newpad);
|
||||||
gst_object_unref (newpad);
|
gst_object_unref (newpad);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
@ -365,7 +365,7 @@ gst_adder_collected (GstCollectPads * pads, gpointer user_data)
|
||||||
adder = GST_ADDER (user_data);
|
adder = GST_ADDER (user_data);
|
||||||
|
|
||||||
/* get available bytes for reading */
|
/* get available bytes for reading */
|
||||||
size = gst_collectpads_available (pads);
|
size = gst_collect_pads_available (pads);
|
||||||
if (size == 0)
|
if (size == 0)
|
||||||
return GST_FLOW_OK;
|
return GST_FLOW_OK;
|
||||||
|
|
||||||
|
@ -388,7 +388,7 @@ gst_adder_collected (GstCollectPads * pads, gpointer user_data)
|
||||||
GST_LOG_OBJECT (adder, "looking into channel %p", data);
|
GST_LOG_OBJECT (adder, "looking into channel %p", data);
|
||||||
|
|
||||||
/* get pointer to copy size bytes */
|
/* get pointer to copy size bytes */
|
||||||
len = gst_collectpads_read (pads, data, &bytes, size);
|
len = gst_collect_pads_read (pads, data, &bytes, size);
|
||||||
if (len == 0)
|
if (len == 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
@ -410,7 +410,7 @@ gst_adder_collected (GstCollectPads * pads, gpointer user_data)
|
||||||
/* other buffers, need to add them */
|
/* other buffers, need to add them */
|
||||||
adder->func ((gpointer) outbytes, (gpointer) bytes, len);
|
adder->func ((gpointer) outbytes, (gpointer) bytes, len);
|
||||||
}
|
}
|
||||||
gst_collectpads_flush (pads, data, len);
|
gst_collect_pads_flush (pads, data, len);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* set timestamps on the output buffer */
|
/* set timestamps on the output buffer */
|
||||||
|
@ -459,14 +459,14 @@ gst_adder_change_state (GstElement * element, GstStateChange transition)
|
||||||
case GST_STATE_CHANGE_READY_TO_PAUSED:
|
case GST_STATE_CHANGE_READY_TO_PAUSED:
|
||||||
adder->timestamp = 0;
|
adder->timestamp = 0;
|
||||||
adder->offset = 0;
|
adder->offset = 0;
|
||||||
gst_collectpads_start (adder->collect);
|
gst_collect_pads_start (adder->collect);
|
||||||
break;
|
break;
|
||||||
case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
|
case GST_STATE_CHANGE_PAUSED_TO_PLAYING:
|
||||||
break;
|
break;
|
||||||
case GST_STATE_CHANGE_PAUSED_TO_READY:
|
case GST_STATE_CHANGE_PAUSED_TO_READY:
|
||||||
/* need to unblock the collectpads before calling the
|
/* need to unblock the collectpads before calling the
|
||||||
* parent change_state so that streaming can finish */
|
* parent change_state so that streaming can finish */
|
||||||
gst_collectpads_stop (adder->collect);
|
gst_collect_pads_stop (adder->collect);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in a new issue