mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
docs/: Fix docs some more.
Original commit message from CVS: * docs/libs/gstreamer-libs-sections.txt: * docs/plugins/gstreamer-plugins-sections.txt: Fix docs some more. * libs/gst/base/gstcollectpads.c: (gst_collect_pads_remove_pad), (gst_collect_pads_event): * libs/gst/base/gstcollectpads.h: Documentation updates. Free queued buffer when removing a pad.
This commit is contained in:
parent
858de9793c
commit
41fbe76808
5 changed files with 48 additions and 23 deletions
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
||||||
|
2006-09-01 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
|
* docs/libs/gstreamer-libs-sections.txt:
|
||||||
|
* docs/plugins/gstreamer-plugins-sections.txt:
|
||||||
|
Fix docs some more.
|
||||||
|
|
||||||
|
* libs/gst/base/gstcollectpads.c: (gst_collect_pads_remove_pad),
|
||||||
|
(gst_collect_pads_event):
|
||||||
|
* libs/gst/base/gstcollectpads.h:
|
||||||
|
Documentation updates.
|
||||||
|
Free queued buffer when removing a pad.
|
||||||
|
|
||||||
2006-08-31 Michael Smith <msmith@fluendo.com>
|
2006-08-31 Michael Smith <msmith@fluendo.com>
|
||||||
|
|
||||||
* gst/gstutils.c: (gst_element_link_pads),
|
* gst/gstutils.c: (gst_element_link_pads),
|
||||||
|
|
|
@ -254,9 +254,6 @@ gst_collect_pads_pop
|
||||||
gst_collect_pads_available
|
gst_collect_pads_available
|
||||||
gst_collect_pads_read
|
gst_collect_pads_read
|
||||||
gst_collect_pads_flush
|
gst_collect_pads_flush
|
||||||
GST_COLLECT_PADS_PAD_LOCK
|
|
||||||
GST_COLLECT_PADS_PAD_UNLOCK
|
|
||||||
GST_COLLECT_PADS_GET_PAD_LOCK
|
|
||||||
<SUBSECTION Standard>
|
<SUBSECTION Standard>
|
||||||
GstCollectPadsClass
|
GstCollectPadsClass
|
||||||
GST_COLLECT_PADS
|
GST_COLLECT_PADS
|
||||||
|
@ -267,6 +264,9 @@ GST_IS_COLLECT_PADS_CLASS
|
||||||
GST_COLLECT_PADS_GET_CLASS
|
GST_COLLECT_PADS_GET_CLASS
|
||||||
<SUBSECTION Private>
|
<SUBSECTION Private>
|
||||||
gst_collect_pads_get_type
|
gst_collect_pads_get_type
|
||||||
|
GST_COLLECT_PADS_GET_PAD_LOCK
|
||||||
|
GST_COLLECT_PADS_PAD_LOCK
|
||||||
|
GST_COLLECT_PADS_PAD_UNLOCK
|
||||||
GST_COLLECT_PADS_BROADCAST
|
GST_COLLECT_PADS_BROADCAST
|
||||||
GST_COLLECT_PADS_GET_COND
|
GST_COLLECT_PADS_GET_COND
|
||||||
GST_COLLECT_PADS_SIGNAL
|
GST_COLLECT_PADS_SIGNAL
|
||||||
|
|
|
@ -26,6 +26,7 @@ GstFakeSinkStateError
|
||||||
<SUBSECTION Standard>
|
<SUBSECTION Standard>
|
||||||
GstFakeSinkClass
|
GstFakeSinkClass
|
||||||
GST_FAKE_SINK
|
GST_FAKE_SINK
|
||||||
|
GST_FAKE_SINK_CAST
|
||||||
GST_IS_FAKE_SINK
|
GST_IS_FAKE_SINK
|
||||||
GST_TYPE_FAKE_SINK
|
GST_TYPE_FAKE_SINK
|
||||||
GST_FAKE_SINK_CLASS
|
GST_FAKE_SINK_CLASS
|
||||||
|
|
|
@ -196,7 +196,7 @@ gst_collect_pads_set_function (GstCollectPads * pads,
|
||||||
* gst_collect_pads_add_pad:
|
* gst_collect_pads_add_pad:
|
||||||
* @pads: the collectspads to use
|
* @pads: the collectspads to use
|
||||||
* @pad: the pad to add
|
* @pad: the pad to add
|
||||||
* @size: the size of the returned GstCollectData structure
|
* @size: the size of the returned #GstCollectData structure
|
||||||
*
|
*
|
||||||
* Add a pad to the collection of collect pads. The pad has to be
|
* Add a pad to the collection of collect pads. The pad has to be
|
||||||
* a sinkpad. The refcount of the pad is incremented. Use
|
* a sinkpad. The refcount of the pad is incremented. Use
|
||||||
|
@ -259,15 +259,18 @@ find_pad (GstCollectData * data, GstPad * pad)
|
||||||
* @pads: the collectspads to use
|
* @pads: the collectspads to use
|
||||||
* @pad: the pad to remove
|
* @pad: the pad to remove
|
||||||
*
|
*
|
||||||
* Remove a pad from the collection of collect pads.
|
* Remove a pad from the collection of collect pads. This function will also
|
||||||
|
* free the #GstCollectData and all the resources that were allocated with
|
||||||
|
* gst_collect_pads_add_pad().
|
||||||
*
|
*
|
||||||
* Returns: TRUE if the pad could be removed.
|
* Returns: %TRUE if the pad could be removed.
|
||||||
*
|
*
|
||||||
* MT safe.
|
* MT safe.
|
||||||
*/
|
*/
|
||||||
gboolean
|
gboolean
|
||||||
gst_collect_pads_remove_pad (GstCollectPads * pads, GstPad * pad)
|
gst_collect_pads_remove_pad (GstCollectPads * pads, GstPad * pad)
|
||||||
{
|
{
|
||||||
|
GstCollectData *data;
|
||||||
GSList *list;
|
GSList *list;
|
||||||
|
|
||||||
g_return_val_if_fail (pads != NULL, FALSE);
|
g_return_val_if_fail (pads != NULL, FALSE);
|
||||||
|
@ -284,7 +287,10 @@ gst_collect_pads_remove_pad (GstCollectPads * pads, GstPad * pad)
|
||||||
if (!list)
|
if (!list)
|
||||||
goto unknown_pad;
|
goto unknown_pad;
|
||||||
|
|
||||||
GST_DEBUG ("found pad %s:%s at %p", GST_DEBUG_PAD_NAME (pad), list->data);
|
data = (GstCollectData *) list->data;
|
||||||
|
|
||||||
|
GST_DEBUG ("found pad %s:%s at %p", GST_DEBUG_PAD_NAME (pad), data);
|
||||||
|
|
||||||
/* clear the stuff we configured */
|
/* clear the stuff we configured */
|
||||||
gst_pad_set_chain_function (pad, NULL);
|
gst_pad_set_chain_function (pad, NULL);
|
||||||
gst_pad_set_event_function (pad, NULL);
|
gst_pad_set_event_function (pad, NULL);
|
||||||
|
@ -301,11 +307,17 @@ gst_collect_pads_remove_pad (GstCollectPads * pads, GstPad * pad)
|
||||||
pads->data = g_slist_delete_link (pads->data, dlist);
|
pads->data = g_slist_delete_link (pads->data, dlist);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
gst_object_unref (pad);
|
/* remove from the pad list */
|
||||||
g_free (list->data);
|
|
||||||
pads->abidata.ABI.pad_list =
|
pads->abidata.ABI.pad_list =
|
||||||
g_slist_delete_link (pads->abidata.ABI.pad_list, list);
|
g_slist_delete_link (pads->abidata.ABI.pad_list, list);
|
||||||
pads->abidata.ABI.pad_cookie++;
|
pads->abidata.ABI.pad_cookie++;
|
||||||
|
|
||||||
|
/* clean and free the collect data */
|
||||||
|
gst_object_unref (data->pad);
|
||||||
|
if (data->buffer)
|
||||||
|
gst_buffer_unref (data->buffer);
|
||||||
|
g_free (data);
|
||||||
|
|
||||||
/* signal waiters because something changed */
|
/* signal waiters because something changed */
|
||||||
GST_COLLECT_PADS_BROADCAST (pads);
|
GST_COLLECT_PADS_BROADCAST (pads);
|
||||||
GST_COLLECT_PADS_PAD_UNLOCK (pads);
|
GST_COLLECT_PADS_PAD_UNLOCK (pads);
|
||||||
|
@ -329,7 +341,7 @@ unknown_pad:
|
||||||
*
|
*
|
||||||
* This function is currently not implemented.
|
* This function is currently not implemented.
|
||||||
*
|
*
|
||||||
* Returns: TRUE if the pad is active.
|
* Returns: %TRUE if the pad is active.
|
||||||
*
|
*
|
||||||
* MT safe.
|
* MT safe.
|
||||||
*/
|
*/
|
||||||
|
@ -351,11 +363,11 @@ gst_collect_pads_is_active (GstCollectPads * pads, GstPad * pad)
|
||||||
* @pads: the collectspads to use
|
* @pads: the collectspads to use
|
||||||
*
|
*
|
||||||
* Collect data on all pads. This function is usually called
|
* Collect data on all pads. This function is usually called
|
||||||
* from a GstTask function in an element.
|
* from a #GstTask function in an element.
|
||||||
*
|
*
|
||||||
* This function is currently not implemented.
|
* This function is currently not implemented.
|
||||||
*
|
*
|
||||||
* Returns: GstFlowReturn of the operation.
|
* Returns: #GstFlowReturn of the operation.
|
||||||
*
|
*
|
||||||
* MT safe.
|
* MT safe.
|
||||||
*/
|
*/
|
||||||
|
@ -381,7 +393,7 @@ gst_collect_pads_collect (GstCollectPads * pads)
|
||||||
*
|
*
|
||||||
* This function is currently not implemented.
|
* This function is currently not implemented.
|
||||||
*
|
*
|
||||||
* Returns: GstFlowReturn of the operation.
|
* Returns: #GstFlowReturn of the operation.
|
||||||
*
|
*
|
||||||
* MT safe.
|
* MT safe.
|
||||||
*/
|
*/
|
||||||
|
@ -824,7 +836,7 @@ gst_collect_pads_check_pads (GstCollectPads * pads)
|
||||||
*
|
*
|
||||||
* Should be called with LOCK.
|
* Should be called with LOCK.
|
||||||
*
|
*
|
||||||
* Returns: The GstFlowReturn of collection.
|
* Returns: The #GstFlowReturn of collection.
|
||||||
*/
|
*/
|
||||||
static GstFlowReturn
|
static GstFlowReturn
|
||||||
gst_collect_pads_check_collected (GstCollectPads * pads)
|
gst_collect_pads_check_collected (GstCollectPads * pads)
|
||||||
|
@ -970,14 +982,14 @@ gst_collect_pads_event (GstPad * pad, GstEvent * event)
|
||||||
* accumulated and this is certainly not what we want. */
|
* accumulated and this is certainly not what we want. */
|
||||||
gst_event_unref (event);
|
gst_event_unref (event);
|
||||||
/* FIXME: collect-pads based elements need to create their own newsegment
|
/* FIXME: collect-pads based elements need to create their own newsegment
|
||||||
event (and only one really)
|
* event (and only one really)
|
||||||
(a) make the segment part of the GstCollectData structure of each pad,
|
* (a) make the segment part of the GstCollectData structure of each pad,
|
||||||
so you can just check that once you have a buffer queued on that pad,
|
* so you can just check that once you have a buffer queued on that pad,
|
||||||
(b) you can override a pad's event function with your own,
|
* (b) you can override a pad's event function with your own,
|
||||||
catch the newsegment event and then pass it on to the original
|
* catch the newsegment event and then pass it on to the original
|
||||||
gstcollectpads event function
|
* gstcollectpads event function
|
||||||
(that's what avimux does for something IIRC)
|
* (that's what avimux does for something IIRC)
|
||||||
see #340060
|
* see #340060
|
||||||
*/
|
*/
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,7 +75,7 @@ struct _GstCollectData
|
||||||
*
|
*
|
||||||
* A function that will be called when all pads have received data.
|
* A function that will be called when all pads have received data.
|
||||||
*
|
*
|
||||||
* Returns: GST_FLOW_OK for success
|
* Returns: #GST_FLOW_OK for success
|
||||||
*/
|
*/
|
||||||
typedef GstFlowReturn (*GstCollectPadsFunction) (GstCollectPads *pads, gpointer user_data);
|
typedef GstFlowReturn (*GstCollectPadsFunction) (GstCollectPads *pads, gpointer user_data);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue