mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
uridecodebin, decodebin: remove new-decoded-pad and removed-decoded-pad signals
They were deprecated, use "pad-added" and "pad-removed" instead.
This commit is contained in:
parent
8573dbdf66
commit
59581d464f
4 changed files with 11 additions and 62 deletions
|
@ -29,7 +29,7 @@ non-target caps are left. It is commonly done while pre-rolling, but can also
|
|||
happen whenever a new pad appears on any element.
|
||||
|
||||
Once a target caps has been found, that pad is ghosted and the
|
||||
'new-decoded-pad' signal is emitted.
|
||||
'pad-added' signal is emitted.
|
||||
|
||||
If no compatible elements can be found for a GstCaps, the pad is ghosted and
|
||||
the 'unknown-type' signal is emitted.
|
||||
|
|
|
@ -177,10 +177,6 @@ struct _GstDecodeBinClass
|
|||
{
|
||||
GstBinClass parent_class;
|
||||
|
||||
/* signal we fire when a new pad has been decoded into raw audio/video */
|
||||
void (*new_decoded_pad) (GstElement * element, GstPad * pad, gboolean last);
|
||||
/* signal we fire when a pad has been removed */
|
||||
void (*removed_decoded_pad) (GstElement * element, GstPad * pad);
|
||||
/* signal fired when we found a pad that we cannot decode */
|
||||
void (*unknown_type) (GstElement * element, GstPad * pad, GstCaps * caps);
|
||||
|
||||
|
@ -204,8 +200,6 @@ struct _GstDecodeBinClass
|
|||
/* signals */
|
||||
enum
|
||||
{
|
||||
SIGNAL_NEW_DECODED_PAD,
|
||||
SIGNAL_REMOVED_DECODED_PAD,
|
||||
SIGNAL_UNKNOWN_TYPE,
|
||||
SIGNAL_AUTOPLUG_CONTINUE,
|
||||
SIGNAL_AUTOPLUG_FACTORIES,
|
||||
|
@ -593,41 +587,6 @@ gst_decode_bin_class_init (GstDecodeBinClass * klass)
|
|||
gobject_klass->set_property = gst_decode_bin_set_property;
|
||||
gobject_klass->get_property = gst_decode_bin_get_property;
|
||||
|
||||
/**
|
||||
* GstDecodeBin::new-decoded-pad:
|
||||
* @bin: The decodebin.
|
||||
* @pad: The newly created pad.
|
||||
* @islast: #TRUE if this is the last pad to be added. Deprecated.
|
||||
*
|
||||
* This signal gets emitted as soon as a new pad of the same type as one of
|
||||
* the valid 'raw' types is added.
|
||||
*
|
||||
* Deprecated: Use GstElement::pad-added instead of this signal.
|
||||
*
|
||||
*/
|
||||
gst_decode_bin_signals[SIGNAL_NEW_DECODED_PAD] =
|
||||
g_signal_new ("new-decoded-pad", G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (GstDecodeBinClass, new_decoded_pad), NULL, NULL,
|
||||
gst_play_marshal_VOID__OBJECT_BOOLEAN, G_TYPE_NONE, 2, GST_TYPE_PAD,
|
||||
G_TYPE_BOOLEAN);
|
||||
|
||||
/**
|
||||
* GstDecodeBin::removed-decoded-pad:
|
||||
* @bin: The decodebin.
|
||||
* @pad: The pad that was removed.
|
||||
*
|
||||
* This signal is emitted when a 'final' caps pad has been removed.
|
||||
*
|
||||
* Deprecated: Use GstElement::pad-removed instead of this signal.
|
||||
*
|
||||
*/
|
||||
gst_decode_bin_signals[SIGNAL_REMOVED_DECODED_PAD] =
|
||||
g_signal_new ("removed-decoded-pad", G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST,
|
||||
G_STRUCT_OFFSET (GstDecodeBinClass, removed_decoded_pad), NULL, NULL,
|
||||
gst_marshal_VOID__OBJECT, G_TYPE_NONE, 1, GST_TYPE_PAD);
|
||||
|
||||
/**
|
||||
* GstDecodeBin::unknown-type:
|
||||
* @bin: The decodebin.
|
||||
|
@ -661,8 +620,8 @@ gst_decode_bin_class_init (GstDecodeBinClass * klass)
|
|||
*
|
||||
* Returns: #TRUE if you wish decodebin to look for elements that can
|
||||
* handle the given @caps. If #FALSE, those caps will be considered as
|
||||
* final and the pad will be exposed as such (see 'new-decoded-pad'
|
||||
* signal).
|
||||
* final and the pad will be exposed as such (see 'pad-added' signal of
|
||||
* #GstElement).
|
||||
*/
|
||||
gst_decode_bin_signals[SIGNAL_AUTOPLUG_CONTINUE] =
|
||||
g_signal_new ("autoplug-continue", G_TYPE_FROM_CLASS (klass),
|
||||
|
@ -2499,8 +2458,6 @@ gst_decode_chain_free_internal (GstDecodeChain * chain, gboolean hide)
|
|||
if (chain->endpad->exposed) {
|
||||
gst_element_remove_pad (GST_ELEMENT_CAST (chain->dbin),
|
||||
GST_PAD_CAST (chain->endpad));
|
||||
g_signal_emit (G_OBJECT (chain->dbin),
|
||||
gst_decode_bin_signals[SIGNAL_REMOVED_DECODED_PAD], 0, chain->endpad);
|
||||
}
|
||||
|
||||
gst_ghost_pad_set_target (GST_GHOST_PAD_CAST (chain->endpad), NULL);
|
||||
|
@ -3346,11 +3303,7 @@ gst_decode_bin_expose (GstDecodeBin * dbin)
|
|||
dpad->exposed = TRUE;
|
||||
|
||||
/* 3. emit signal */
|
||||
GST_DEBUG_OBJECT (dbin, "emitting new-decoded-pad");
|
||||
g_signal_emit (G_OBJECT (dbin),
|
||||
gst_decode_bin_signals[SIGNAL_NEW_DECODED_PAD], 0, dpad,
|
||||
(tmp->next == NULL));
|
||||
GST_DEBUG_OBJECT (dbin, "emitted new-decoded-pad");
|
||||
GST_INFO_OBJECT (dpad, "added new decoded pad");
|
||||
}
|
||||
|
||||
/* 4. Signal no-more-pads. This allows the application to hook stuff to the
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
BOOLEAN:OBJECT,BOXED
|
||||
BOOLEAN:OBJECT,OBJECT,OBJECT
|
||||
BOXED:OBJECT,BOXED
|
||||
VOID:OBJECT,BOOLEAN
|
||||
ENUM:OBJECT,OBJECT,BOXED
|
||||
ENUM:OBJECT,BOXED,OBJECT
|
||||
BOXED:OBJECT,BOXED,BOXED
|
||||
|
|
|
@ -486,8 +486,8 @@ gst_uri_decode_bin_class_init (GstURIDecodeBinClass * klass)
|
|||
*
|
||||
* Returns: #TRUE if you wish uridecodebin to look for elements that can
|
||||
* handle the given @caps. If #FALSE, those caps will be considered as
|
||||
* final and the pad will be exposed as such (see 'new-decoded-pad'
|
||||
* signal).
|
||||
* final and the pad will be exposed as such (see 'pad-added' signal of
|
||||
* #GstElement).
|
||||
*/
|
||||
gst_uri_decode_bin_signals[SIGNAL_AUTOPLUG_CONTINUE] =
|
||||
g_signal_new ("autoplug-continue", G_TYPE_FROM_CLASS (klass),
|
||||
|
@ -1032,11 +1032,9 @@ decoded_pad_event_probe (GstPad * pad, GstProbeType type, gpointer type_data,
|
|||
return GST_PROBE_OK;
|
||||
}
|
||||
|
||||
/* Called by the signal handlers when a decodebin has
|
||||
* found a new raw pad.
|
||||
*/
|
||||
/* Called by the signal handlers when a decodebin has found a new raw pad */
|
||||
static void
|
||||
new_decoded_pad_cb (GstElement * element, GstPad * pad, gboolean last,
|
||||
new_decoded_pad_added_cb (GstElement * element, GstPad * pad,
|
||||
GstURIDecodeBin * decoder)
|
||||
{
|
||||
GstPad *newpad;
|
||||
|
@ -1044,8 +1042,7 @@ new_decoded_pad_cb (GstElement * element, GstPad * pad, gboolean last,
|
|||
gchar *padname;
|
||||
GstURIDecodeBinStream *stream;
|
||||
|
||||
GST_DEBUG_OBJECT (element, "new decoded pad, name: <%s>. Last: %d",
|
||||
GST_PAD_NAME (pad), last);
|
||||
GST_DEBUG_OBJECT (element, "new decoded pad, name: <%s>", GST_PAD_NAME (pad));
|
||||
|
||||
GST_URI_DECODE_BIN_LOCK (decoder);
|
||||
padname = g_strdup_printf ("src%d", decoder->numpads);
|
||||
|
@ -1101,7 +1098,7 @@ expose_decoded_pad (GstElement * element, GstPad * pad,
|
|||
gst_pad_add_probe (pad, GST_PROBE_TYPE_EVENT, source_pad_event_probe, decoder,
|
||||
NULL);
|
||||
|
||||
new_decoded_pad_cb (element, pad, FALSE, decoder);
|
||||
new_decoded_pad_added_cb (element, pad, decoder);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -1658,7 +1655,7 @@ make_decoder (GstURIDecodeBin * decoder)
|
|||
/* set up callbacks to create the links between decoded data
|
||||
* and video/audio/subtitle rendering/output. */
|
||||
g_signal_connect (decodebin,
|
||||
"new-decoded-pad", G_CALLBACK (new_decoded_pad_cb), decoder);
|
||||
"pad-added", G_CALLBACK (new_decoded_pad_added_cb), decoder);
|
||||
g_signal_connect (decodebin,
|
||||
"pad-removed", G_CALLBACK (pad_removed_cb), decoder);
|
||||
g_signal_connect (decodebin, "no-more-pads",
|
||||
|
|
Loading…
Reference in a new issue