-/* GStreamer
- *
+/* GStreamer data:// uri source element
* Copyright (C) 2009 Igalia S.L
* Copyright (C) 2009 Sebastian Dröge <sebastian.droege@collabora.co.uk>
*
"URI that should be used",
NULL, G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
- gst_element_class_add_pad_template (element_class,
- gst_static_pad_template_get (&src_template));
+ gst_element_class_add_static_pad_template (element_class, &src_template);
gst_element_class_set_static_metadata (element_class,
"data: URI source element", "Source", "Handles data: uris",
"Philippe Normand <pnormand@igalia.com>, "
switch (prop_id) {
case PROP_URI:
- g_value_set_string (value,
+ g_value_take_string (value,
gst_data_uri_src_get_uri (GST_URI_HANDLER (src)));
break;
default:
GstCaps *caps;
GST_OBJECT_LOCK (src);
- if (gst_pad_has_current_caps (GST_BASE_SRC_PAD (basesrc)))
- caps = gst_pad_get_current_caps (GST_BASE_SRC_PAD (basesrc));
- else
+ caps = gst_pad_get_current_caps (GST_BASE_SRC_PAD (basesrc));
+ if (!caps)
caps = gst_caps_new_any ();
GST_OBJECT_UNLOCK (src);
iface->get_uri = gst_data_uri_src_get_uri;
iface->set_uri = gst_data_uri_src_set_uri;
}
-
-static gboolean
-plugin_init (GstPlugin * plugin)
-{
- return gst_element_register (plugin, "dataurisrc",
- GST_RANK_PRIMARY, GST_TYPE_DATA_URI_SRC);
-}
-
-GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
- GST_VERSION_MINOR,
- dataurisrc,
- "data: URI source",
- plugin_init, VERSION, GST_LICENSE, GST_PACKAGE_NAME, GST_PACKAGE_ORIGIN);