* SECTION:element-uridecodebin
*
* Decodes data from a URI into raw media. It selects a source element that can
- * handle the given #GstURIDecodeBin:uri scheme and connects it to a decodebin2.
+ * handle the given #GstURIDecodeBin:uri scheme and connects it to a decodebin.
*/
#ifdef HAVE_CONFIG_H
#include "gstplay-marshal.h"
#include "gstplay-enum.h"
#include "gstrawcaps.h"
+#include "gstplayback.h"
#define GST_TYPE_URI_DECODE_BIN \
(gst_uri_decode_bin_get_type())
GList *factories; /* factories we can use for selecting elements */
gchar *uri;
- guint connection_speed;
+ guint64 connection_speed;
GstCaps *caps;
gchar *encoding;
GSList *decodebins;
GSList *pending_decodebins;
GHashTable *streams;
- gint numpads;
+ guint numpads;
/* for dynamic sources */
guint src_np_sig_id; /* new-pad signal id */
void (*drained) (GstElement * element);
};
-static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src%d",
+static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src_%u",
GST_PAD_SRC,
GST_PAD_SOMETIMES,
GST_STATIC_CAPS_ANY);
static guint gst_uri_decode_bin_signals[LAST_SIGNAL] = { 0 };
GType gst_uri_decode_bin_get_type (void);
-GST_BOILERPLATE (GstURIDecodeBin, gst_uri_decode_bin, GstBin, GST_TYPE_BIN);
+#define gst_uri_decode_bin_parent_class parent_class
+G_DEFINE_TYPE (GstURIDecodeBin, gst_uri_decode_bin, GST_TYPE_BIN);
static void remove_decoders (GstURIDecodeBin * bin, gboolean force);
static void gst_uri_decode_bin_set_property (GObject * object, guint prop_id,
static GstStateChangeReturn gst_uri_decode_bin_change_state (GstElement *
element, GstStateChange transition);
-static void
-gst_uri_decode_bin_base_init (gpointer g_class)
-{
- GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class);
-
- gst_element_class_add_static_pad_template (gstelement_class,
- &srctemplate);
- gst_element_class_set_details_simple (gstelement_class,
- "URI Decoder", "Generic/Bin/Decoder",
- "Autoplug and decode an URI to raw media",
- "Wim Taymans <wim.taymans@gmail.com>");
-}
-
static gboolean
_gst_boolean_accumulator (GSignalInvocationHint * ihint,
GValue * return_accu, const GValue * handler_return, gpointer dummy)
GST_TYPE_ELEMENT, G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_CONNECTION_SPEED,
- g_param_spec_uint ("connection-speed", "Connection Speed",
+ g_param_spec_uint64 ("connection-speed", "Connection Speed",
"Network connection speed in kbps (0 = unknown)",
- 0, G_MAXUINT / 1000, DEFAULT_CONNECTION_SPEED,
+ 0, G_MAXUINT64 / 1000, DEFAULT_CONNECTION_SPEED,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
g_object_class_install_property (gobject_class, PROP_CAPS,
*
* 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),
* @caps: The #GstCaps.
* @factories: A #GValueArray of possible #GstElementFactory to use.
*
- * Once decodebin2 has found the possible #GstElementFactory objects to try
- * for @caps on @pad, this signal is emitted. The purpose of the signal is for
+ * Once decodebin has found the possible #GstElementFactory objects to try
+ * for @caps on @pad, this signal is emited. The purpose of the signal is for
* the application to perform additional sorting or filtering on the element
* factory array.
*
* those factories, this signal is emitted.
*
* The signal handler should return a #GST_TYPE_AUTOPLUG_SELECT_RESULT enum
- * value indicating what decodebin2 should do next.
+ * value indicating what decodebin should do next.
*
* A value of #GST_AUTOPLUG_SELECT_TRY will try to autoplug an element from
* @factory.
G_SIGNAL_RUN_LAST, 0, NULL, NULL,
gst_marshal_VOID__OBJECT, G_TYPE_NONE, 1, GST_TYPE_ELEMENT);
+ gst_element_class_add_pad_template (gstelement_class,
+ gst_static_pad_template_get (&srctemplate));
+ gst_element_class_set_details_simple (gstelement_class,
+ "URI Decoder", "Generic/Bin/Decoder",
+ "Autoplug and decode an URI to raw media",
+ "Wim Taymans <wim.taymans@gmail.com>");
+
gstelement_class->query = GST_DEBUG_FUNCPTR (gst_uri_decode_bin_query);
gstelement_class->change_state =
GST_DEBUG_FUNCPTR (gst_uri_decode_bin_change_state);
}
static void
-gst_uri_decode_bin_init (GstURIDecodeBin * dec, GstURIDecodeBinClass * klass)
+gst_uri_decode_bin_init (GstURIDecodeBin * dec)
{
/* first filter out the interesting element factories */
dec->factories_lock = g_mutex_new ();
dec->expose_allstreams = DEFAULT_EXPOSE_ALL_STREAMS;
dec->ring_buffer_max_size = DEFAULT_RING_BUFFER_MAX_SIZE;
- GST_OBJECT_FLAG_SET (dec, GST_ELEMENT_IS_SOURCE);
+ GST_OBJECT_FLAG_SET (dec, GST_ELEMENT_FLAG_SOURCE);
}
static void
break;
case PROP_CONNECTION_SPEED:
GST_OBJECT_LOCK (dec);
- dec->connection_speed = g_value_get_uint (value) * 1000;
+ dec->connection_speed = g_value_get_uint64 (value) * 1000;
GST_OBJECT_UNLOCK (dec);
break;
case PROP_CAPS:
break;
case PROP_CONNECTION_SPEED:
GST_OBJECT_LOCK (dec);
- g_value_set_uint (value, dec->connection_speed / 1000);
+ g_value_set_uint64 (value, dec->connection_speed / 1000);
GST_OBJECT_UNLOCK (dec);
break;
case PROP_CAPS:
dbin->async_pending = TRUE;
- message = gst_message_new_async_start (GST_OBJECT_CAST (dbin), FALSE);
- parent_class->handle_message (GST_BIN_CAST (dbin), message);
+ message = gst_message_new_async_start (GST_OBJECT_CAST (dbin));
+ GST_BIN_CLASS (parent_class)->handle_message (GST_BIN_CAST (dbin), message);
}
static void
if (dbin->async_pending) {
GST_DEBUG_OBJECT (dbin, "posting ASYNC_DONE");
- message = gst_message_new_async_done (GST_OBJECT_CAST (dbin));
- parent_class->handle_message (GST_BIN_CAST (dbin), message);
+ message = gst_message_new_async_done (GST_OBJECT_CAST (dbin), FALSE);
+ GST_BIN_CLASS (parent_class)->handle_message (GST_BIN_CAST (dbin), message);
dbin->async_pending = FALSE;
}
gst_object_unref (queue);
}
-static gboolean
-decoded_pad_event_probe (GstPad * pad, GstEvent * event,
- GstURIDecodeBin * decoder)
+static GstPadProbeReturn
+decoded_pad_event_probe (GstPad * pad, GstPadProbeInfo * info,
+ gpointer user_data)
{
+ GstEvent *event = GST_PAD_PROBE_INFO_EVENT (info);
+ GstURIDecodeBin *decoder = user_data;
+
GST_LOG_OBJECT (pad, "%s, decoder %p", GST_EVENT_TYPE_NAME (event), decoder);
/* look for a bitrate tag */
if (stream) {
stream->bitrate = bitrate;
/* no longer need this probe now */
- gst_pad_remove_event_probe (pad, stream->probe_id);
+ gst_pad_remove_probe (pad, stream->probe_id);
/* configure buffer if possible */
configure_stream_buffering (decoder);
}
}
/* never drop */
- return TRUE;
+ return GST_PAD_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;
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);
+ padname = g_strdup_printf ("src_%u", decoder->numpads);
decoder->numpads++;
GST_URI_DECODE_BIN_UNLOCK (decoder);
/* add event probe to monitor tags */
stream = g_slice_alloc0 (sizeof (GstURIDecodeBinStream));
stream->probe_id =
- gst_pad_add_event_probe (pad, G_CALLBACK (decoded_pad_event_probe),
- decoder);
+ gst_pad_add_probe (pad, GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM,
+ decoded_pad_event_probe, decoder, NULL);
GST_URI_DECODE_BIN_LOCK (decoder);
g_hash_table_insert (decoder->streams, pad, stream);
GST_URI_DECODE_BIN_UNLOCK (decoder);
gst_element_add_pad (GST_ELEMENT_CAST (decoder), newpad);
}
-static gboolean
-source_pad_event_probe (GstPad * pad, GstEvent * event,
- GstURIDecodeBin * decoder)
+static GstPadProbeReturn
+source_pad_event_probe (GstPad * pad, GstPadProbeInfo * info,
+ gpointer user_data)
{
+ GstEvent *event = GST_PAD_PROBE_INFO_EVENT (info);
+ GstURIDecodeBin *decoder = user_data;
+
GST_LOG_OBJECT (pad, "%s, decoder %p", GST_EVENT_TYPE_NAME (event), decoder);
if (GST_EVENT_TYPE (event) == GST_EVENT_EOS) {
gst_uri_decode_bin_signals[SIGNAL_DRAINED], 0, NULL);
}
/* never drop events */
- return TRUE;
+ return GST_PAD_PROBE_OK;
}
/* called when we found a raw pad on the source element. We need to set up a
expose_decoded_pad (GstElement * element, GstPad * pad,
GstURIDecodeBin * decoder)
{
- gst_pad_add_event_probe (pad, G_CALLBACK (source_pad_event_probe), decoder);
+ gst_pad_add_probe (pad, GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM,
+ source_pad_event_probe, decoder, NULL);
- new_decoded_pad_cb (element, pad, FALSE, decoder);
+ new_decoded_pad_added_cb (element, pad, decoder);
}
static void
static GstElement *
gen_source_element (GstURIDecodeBin * decoder)
{
+ GObjectClass *source_class;
GstElement *source;
+ GParamSpec *pspec;
if (!decoder->uri)
goto no_uri;
decoder->need_queue = IS_QUEUE_URI (decoder->uri);
GST_LOG_OBJECT (decoder, "source needs queue: %d", decoder->need_queue);
+ source_class = G_OBJECT_GET_CLASS (source);
+
/* make HTTP sources send extra headers so we get icecast
* metadata in case the stream is an icecast stream */
if (!strncmp (decoder->uri, "http://", 7) &&
- g_object_class_find_property (G_OBJECT_GET_CLASS (source),
- "iradio-mode")) {
+ g_object_class_find_property (source_class, "iradio-mode")) {
GST_LOG_OBJECT (decoder, "configuring iradio-mode");
g_object_set (source, "iradio-mode", TRUE, NULL);
}
- if (g_object_class_find_property (G_OBJECT_GET_CLASS (source),
- "connection-speed")) {
- GST_DEBUG_OBJECT (decoder,
- "setting connection-speed=%d to source element",
- decoder->connection_speed / 1000);
- g_object_set (source, "connection-speed",
- decoder->connection_speed / 1000, NULL);
+ pspec = g_object_class_find_property (source_class, "connection-speed");
+ if (pspec != NULL) {
+ if (G_PARAM_SPEC_VALUE_TYPE (pspec) == G_TYPE_UINT64 ||
+ G_PARAM_SPEC_VALUE_TYPE (pspec) == G_TYPE_INT64) {
+ GST_DEBUG_OBJECT (decoder,
+ "setting connection-speed=%" G_GUINT64_FORMAT " on source element %s",
+ decoder->connection_speed / 1000, G_OBJECT_TYPE_NAME (source));
+
+ g_object_set (source, "connection-speed",
+ decoder->connection_speed / 1000, NULL);
+ } else {
+ g_warning ("connection-speed property of '%s' is not a 64-bit int type",
+ G_OBJECT_TYPE_NAME (source));
+ }
}
- if (g_object_class_find_property (G_OBJECT_GET_CLASS (source),
- "subtitle-encoding")) {
+
+ pspec = g_object_class_find_property (source_class, "subtitle-encoding");
+ if (pspec != NULL && G_PARAM_SPEC_VALUE_TYPE (pspec) == G_TYPE_STRING) {
GST_DEBUG_OBJECT (decoder,
"setting subtitle-encoding=%s to source element", decoder->encoding);
g_object_set (source, "subtitle-encoding", decoder->encoding, NULL);
gint capssize;
gboolean res = FALSE;
- caps = gst_pad_get_caps_reffed (pad);
+ caps = gst_pad_query_caps (pad, NULL);
if (caps == NULL)
return FALSE;
gboolean res = TRUE;
GstCaps *rawcaps;
GstPad *pad;
+ GValue item = { 0, };
*have_out = FALSE;
*is_raw = FALSE;
pads_iter = gst_element_iterate_src_pads (decoder->source);
while (!done) {
- switch (gst_iterator_next (pads_iter, (gpointer) & pad)) {
+ switch (gst_iterator_next (pads_iter, &item)) {
case GST_ITERATOR_ERROR:
res = FALSE;
/* FALLTROUGH */
gst_iterator_resync (pads_iter);
break;
case GST_ITERATOR_OK:
- /* we now officially have an output pad */
+ pad = g_value_get_object (&item);
+ /* we now officially have an ouput pad */
*have_out = TRUE;
/* if FALSE, this pad has no caps and we continue with the next pad. */
if (!has_all_raw_caps (pad, rawcaps, is_raw)) {
- gst_object_unref (pad);
+ g_value_reset (&item);
break;
}
}
expose_decoded_pad (outelem, pad, decoder);
}
- gst_object_unref (pad);
+ g_value_reset (&item);
break;
}
}
+ g_value_unset (&item);
gst_iterator_free (pads_iter);
gst_caps_unref (rawcaps);
{
post_missing_plugin_error (GST_ELEMENT_CAST (decoder), "queue2");
- gst_object_unref (pad);
+ g_value_unset (&item);
gst_iterator_free (pads_iter);
gst_caps_unref (rawcaps);
}
}
-/* Remove all decodebin2 from ourself
- * If force is FALSE, then the decodebin2 instances will be stored in
+/* Remove all decodebin from ourself
+ * If force is FALSE, then the decodebin instances will be stored in
* pending_decodebins for re-use later on.
- * If force is TRUE, then all decodebin2 instances will be unreferenced
+ * If force is TRUE, then all decodebin instances will be unreferenced
* and cleared, including the pending ones. */
static void
remove_decoders (GstURIDecodeBin * bin, gboolean force)
}
/* Don't loose the SOURCE flag */
- GST_OBJECT_FLAG_SET (bin, GST_ELEMENT_IS_SOURCE);
+ GST_OBJECT_FLAG_SET (bin, GST_ELEMENT_FLAG_SOURCE);
}
static void
{
GstElement *decodebin;
- /* re-use pending decodebin2 */
+ /* re-use pending decodebin */
if (decoder->pending_decodebins) {
GSList *first = decoder->pending_decodebins;
- GST_LOG_OBJECT (decoder, "re-using pending decodebin2");
+ GST_LOG_OBJECT (decoder, "re-using pending decodebin");
decodebin = (GstElement *) first->data;
decoder->pending_decodebins =
g_slist_delete_link (decoder->pending_decodebins, first);
} else {
- GST_LOG_OBJECT (decoder, "making new decodebin2");
+ GST_LOG_OBJECT (decoder, "making new decodebin");
/* now create the decoder element */
- decodebin = gst_element_factory_make ("decodebin2", NULL);
+ decodebin = gst_element_factory_make ("decodebin", NULL);
if (!decodebin)
goto no_decodebin;
/* 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",
/* ERRORS */
no_decodebin:
{
- post_missing_plugin_error (GST_ELEMENT_CAST (decoder), "decodebin2");
+ post_missing_plugin_error (GST_ELEMENT_CAST (decoder), "decodebin");
GST_ELEMENT_ERROR (decoder, CORE, MISSING_PLUGIN, (NULL),
- ("No decodebin2 element, check your installation"));
+ ("No decodebin element, check your installation"));
return NULL;
}
no_typefind:
{
gst_object_unref (decodebin);
GST_ELEMENT_ERROR (decoder, CORE, MISSING_PLUGIN, (NULL),
- ("No typefind element, decodebin2 is unusable, check your installation"));
+ ("No typefind element, decodebin is unusable, check your installation"));
return NULL;
}
}
decoder->is_download = IS_DOWNLOAD_MEDIA (media_type) && decoder->download;
/* only enable download buffering if the upstream duration is known */
if (decoder->is_download) {
- GstFormat fmt = GST_FORMAT_BYTES;
gint64 dur;
- decoder->is_download = (gst_element_query_duration (typefind, &fmt, &dur)
- && fmt == GST_FORMAT_BYTES && dur != -1);
+ decoder->is_download =
+ (gst_element_query_duration (typefind, GST_FORMAT_BYTES, &dur)
+ && dur != -1);
}
dec_elem = make_decoder (decoder);
could_not_link:
{
GST_ELEMENT_ERROR (decoder, CORE, NEGOTIATION,
- (NULL), ("Can't link typefind to decodebin2 element"));
+ (NULL), ("Can't link typefind to decodebin element"));
return;
}
no_queue2:
/* setup a streaming source. This will first plug a typefind element to the
* source. After we find the type, we decide to plug a queue2 and continue to
- * plug a decodebin2 starting from the found caps */
+ * plug a decodebin starting from the found caps */
static gboolean
setup_streaming (GstURIDecodeBin * decoder)
{
(NULL), ("Can't link source to typefind element"));
gst_bin_remove (GST_BIN_CAST (decoder), typefind);
/* Don't loose the SOURCE flag */
- GST_OBJECT_FLAG_SET (decoder, GST_ELEMENT_IS_SOURCE);
+ GST_OBJECT_FLAG_SET (decoder, GST_ELEMENT_FLAG_SOURCE);
return FALSE;
}
}
bin->streams = NULL;
}
/* Don't loose the SOURCE flag */
- GST_OBJECT_FLAG_SET (bin, GST_ELEMENT_IS_SOURCE);
+ GST_OBJECT_FLAG_SET (bin, GST_ELEMENT_FLAG_SOURCE);
}
/* is called when a dynamic source element created a new pad. */
GList *l_good = NULL, *l_neutral = NULL, *l_bad = NULL;
GValue new_list = { 0, };
guint size, i;
+ const GstStructure *structure;
GST_DEBUG_OBJECT (dec, "redirect message: %" GST_PTR_FORMAT, msg);
- GST_DEBUG_OBJECT (dec, "connection speed: %u", dec->connection_speed);
+ GST_DEBUG_OBJECT (dec, "connection speed: %" G_GUINT64_FORMAT,
+ dec->connection_speed);
- if (dec->connection_speed == 0 || msg->structure == NULL)
+ structure = gst_message_get_structure (msg);
+ if (dec->connection_speed == 0 || structure == NULL)
return msg;
- locations_list = gst_structure_get_value (msg->structure, "locations");
+ locations_list = gst_structure_get_value (structure, "locations");
if (locations_list == NULL)
return msg;
static void
handle_message (GstBin * bin, GstMessage * msg)
{
- if (GST_MESSAGE_TYPE (msg) == GST_MESSAGE_ELEMENT && msg->structure != NULL
- && gst_structure_has_name (msg->structure, "redirect")) {
+ if (GST_MESSAGE_TYPE (msg) == GST_MESSAGE_ELEMENT
+ && gst_message_has_name (msg, "redirect")) {
/* sort redirect messages based on the connection speed. This simplifies
* the user of this element as it can in most cases just pick the first item
* of the sorted list as a good redirection candidate. It can of course
}
static gboolean
-decoder_query_duration_fold (GstPad * item, GValue * ret, QueryFold * fold)
+decoder_query_duration_fold (const GValue * item, GValue * ret,
+ QueryFold * fold)
{
- if (gst_pad_query (item, fold->query)) {
+ GstPad *pad = g_value_get_object (item);
+
+ if (gst_pad_query (pad, fold->query)) {
gint64 duration;
g_value_set_boolean (ret, TRUE);
if (duration > fold->max)
fold->max = duration;
}
- gst_object_unref (item);
return TRUE;
}
}
static gboolean
-decoder_query_position_fold (GstPad * item, GValue * ret, QueryFold * fold)
+decoder_query_position_fold (const GValue * item, GValue * ret,
+ QueryFold * fold)
{
- if (gst_pad_query (item, fold->query)) {
+ GstPad *pad = g_value_get_object (item);
+
+ if (gst_pad_query (pad, fold->query)) {
gint64 position;
g_value_set_boolean (ret, TRUE);
fold->max = position;
}
- gst_object_unref (item);
return TRUE;
}
}
static gboolean
-decoder_query_latency_fold (GstPad * item, GValue * ret, QueryFold * fold)
+decoder_query_latency_fold (const GValue * item, GValue * ret, QueryFold * fold)
{
- if (gst_pad_query (item, fold->query)) {
+ GstPad *pad = g_value_get_object (item);
+
+ if (gst_pad_query (pad, fold->query)) {
GstClockTime min, max;
gboolean live;
fold->live = live;
}
- gst_object_unref (item);
return TRUE;
}
/* we are seekable if all srcpads are seekable */
static gboolean
-decoder_query_seeking_fold (GstPad * item, GValue * ret, QueryFold * fold)
+decoder_query_seeking_fold (const GValue * item, GValue * ret, QueryFold * fold)
{
- if (gst_pad_query (item, fold->query)) {
+ GstPad *pad = g_value_get_object (item);
+
+ if (gst_pad_query (pad, fold->query)) {
gboolean seekable;
g_value_set_boolean (ret, TRUE);
if (fold->seekable == TRUE)
fold->seekable = seekable;
}
- gst_object_unref (item);
return TRUE;
}
/* generic fold, return first valid result */
static gboolean
-decoder_query_generic_fold (GstPad * item, GValue * ret, QueryFold * fold)
+decoder_query_generic_fold (const GValue * item, GValue * ret, QueryFold * fold)
{
+ GstPad *pad = g_value_get_object (item);
gboolean res;
- if ((res = gst_pad_query (item, fold->query))) {
+ if ((res = gst_pad_query (pad, fold->query))) {
g_value_set_boolean (ret, TRUE);
GST_DEBUG_OBJECT (item, "answered query %p", fold->query);
}
- gst_object_unref (item);
-
/* and stop as soon as we have a valid result */
return !res;
}
}
}
-gboolean gst_decode_bin_plugin_init (GstPlugin * plugin);
-
-static gboolean
+gboolean
gst_uri_decode_bin_plugin_init (GstPlugin * plugin)
{
GST_DEBUG_CATEGORY_INIT (gst_uri_decode_bin_debug, "uridecodebin", 0,
"URI decoder element");
-#ifdef ENABLE_NLS
- GST_DEBUG ("binding text domain %s to locale dir %s", GETTEXT_PACKAGE,
- LOCALEDIR);
- bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
- bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
-#endif /* ENABLE_NLS */
-
return gst_element_register (plugin, "uridecodebin", GST_RANK_NONE,
GST_TYPE_URI_DECODE_BIN);
}
-
-static gboolean
-plugin_init (GstPlugin * plugin)
-{
- if (!gst_decode_bin_plugin_init (plugin))
- return FALSE;
- if (!gst_uri_decode_bin_plugin_init (plugin))
- return FALSE;
-
- return TRUE;
-}
-
-GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
- GST_VERSION_MINOR,
- "uridecodebin",
- "URI Decoder bin", plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME,
- GST_PACKAGE_ORIGIN)