From: Tim-Philipp Müller Date: Sat, 16 Jun 2012 23:59:21 +0000 (+0100) Subject: splitfilesrc: re-port to 0.11 X-Git-Tag: RELEASE-0.11.93~170 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1d659d8e418b365a93799efafe5e57bbcbc4b411;p=platform%2Fupstream%2Fgst-plugins-good.git splitfilesrc: re-port to 0.11 --- diff --git a/gst/multifile/gstsplitfilesrc.c b/gst/multifile/gstsplitfilesrc.c index e44921a..b55de0e 100644 --- a/gst/multifile/gstsplitfilesrc.c +++ b/gst/multifile/gstsplitfilesrc.c @@ -91,22 +91,9 @@ GST_DEBUG_CATEGORY_STATIC (splitfilesrc_debug); #define GST_CAT_DEFAULT splitfilesrc_debug -G_DEFINE_TYPE (GstSplitFileSrc, gst_split_file_src, GST_TYPE_BASE_SRC); - -static void -_do_init (GType type) -{ - static const GInterfaceInfo urihandler_info = { - gst_split_file_src_uri_handler_init, - NULL, - NULL - }; - - g_type_add_interface_static (type, GST_TYPE_URI_HANDLER, &urihandler_info); - - GST_DEBUG_CATEGORY_INIT (splitfilesrc_debug, "splitfilesrc", 0, - "Split File src"); -} +G_DEFINE_TYPE_WITH_CODE (GstSplitFileSrc, gst_split_file_src, GST_TYPE_BASE_SRC, + G_IMPLEMENT_INTERFACE (GST_TYPE_URI_HANDLER, + gst_split_file_src_uri_handler_init)); #ifdef G_OS_WIN32 #define WIN32_BLURB " Location string must be in UTF-8 encoding (on Windows)." @@ -633,20 +620,20 @@ cancelled: } static guint -gst_split_file_src_uri_get_type (void) +gst_split_file_src_uri_get_type (GType type) { return GST_URI_SRC; } -static gchar ** -gst_split_file_src_uri_get_protocols (void) +static const gchar *const * +gst_split_file_src_uri_get_protocols (GType type) { static const gchar *protocols[] = { "splitfile", NULL }; - return (gchar **) protocols; + return (const gchar * const *) protocols; } -static const gchar * +static gchar * gst_split_file_src_uri_get_uri (GstURIHandler * handler) { GstSplitFileSrc *src = GST_SPLIT_FILE_SRC (handler); @@ -663,7 +650,8 @@ gst_split_file_src_uri_get_uri (GstURIHandler * handler) } static gboolean -gst_split_file_src_uri_set_uri (GstURIHandler * handler, const gchar * uri) +gst_split_file_src_uri_set_uri (GstURIHandler * handler, const gchar * uri, + GError ** error) { GstSplitFileSrc *src = GST_SPLIT_FILE_SRC (handler);