uridecodebin: Set GST_ELEMENT_IS_SOURCE flag

uridecodebin behaves like a source, let's mark it as a source
This commit is contained in:
Sebastian Dröge 2010-10-11 14:30:02 +02:00
parent a044b62cf5
commit 491b7af1fa

View file

@ -560,6 +560,8 @@ gst_uri_decode_bin_init (GstURIDecodeBin * dec, GstURIDecodeBinClass * klass)
dec->use_buffering = DEFAULT_USE_BUFFERING; dec->use_buffering = DEFAULT_USE_BUFFERING;
dec->expose_allstreams = DEFAULT_EXPOSE_ALL_STREAMS; dec->expose_allstreams = DEFAULT_EXPOSE_ALL_STREAMS;
dec->ring_buffer_max_size = DEFAULT_RING_BUFFER_MAX_SIZE; dec->ring_buffer_max_size = DEFAULT_RING_BUFFER_MAX_SIZE;
GST_OBJECT_FLAG_SET (dec, GST_ELEMENT_IS_SOURCE);
} }
static void static void
@ -1302,6 +1304,9 @@ remove_decoders (GstURIDecodeBin * bin, gboolean force)
bin->pending_decodebins = NULL; bin->pending_decodebins = NULL;
} }
/* Don't loose the SOURCE flag */
GST_OBJECT_FLAG_SET (bin, GST_ELEMENT_IS_SOURCE);
} }
static void static void
@ -1630,6 +1635,8 @@ could_not_link:
GST_ELEMENT_ERROR (decoder, CORE, NEGOTIATION, GST_ELEMENT_ERROR (decoder, CORE, NEGOTIATION,
(NULL), ("Can't link source to typefind element")); (NULL), ("Can't link source to typefind element"));
gst_bin_remove (GST_BIN_CAST (decoder), typefind); gst_bin_remove (GST_BIN_CAST (decoder), typefind);
/* Don't loose the SOURCE flag */
GST_OBJECT_FLAG_SET (decoder, GST_ELEMENT_IS_SOURCE);
return FALSE; return FALSE;
} }
} }
@ -1667,6 +1674,8 @@ remove_source (GstURIDecodeBin * bin)
gst_bin_remove (GST_BIN_CAST (bin), bin->typefind); gst_bin_remove (GST_BIN_CAST (bin), bin->typefind);
bin->typefind = NULL; bin->typefind = NULL;
} }
/* Don't loose the SOURCE flag */
GST_OBJECT_FLAG_SET (bin, GST_ELEMENT_IS_SOURCE);
} }
/* is called when a dynamic source element created a new pad. */ /* is called when a dynamic source element created a new pad. */