From af3de9ac9fbf4659bab4a9b6de02e6d1aaceed28 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 24 Mar 2010 12:36:27 +0100 Subject: [PATCH] ffmpeg: Fix some remaining compiler warnings --- ext/libpostproc/gstpostproc.c | 27 +++++++++++++-------------- ext/libswscale/gstffmpegscale.c | 15 +++++++-------- 2 files changed, 20 insertions(+), 22 deletions(-) diff --git a/ext/libpostproc/gstpostproc.c b/ext/libpostproc/gstpostproc.c index e3495e4..4e631a2 100644 --- a/ext/libpostproc/gstpostproc.c +++ b/ext/libpostproc/gstpostproc.c @@ -41,9 +41,9 @@ typedef struct _PostProcDetails PostProcDetails; struct _PostProcDetails { - char *shortname; - char *longname; - char *description; + const char *shortname; + const char *longname; + const char *description; }; static PostProcDetails filterdetails[] = { @@ -314,7 +314,7 @@ static void inline append (gchar ** base, gchar * app) { gchar *res; - gchar *sep; + const gchar *sep; if (**base && *app) sep = ":"; @@ -352,22 +352,21 @@ gst_post_proc_base_init (GstPostProcClass * klass) { GObjectClass *gobject_class = G_OBJECT_CLASS (klass); GstElementClass *element_class = GST_ELEMENT_CLASS (klass); - GstElementDetails details; gint ppidx; + gchar *longname, *description; ppidx = GPOINTER_TO_INT (g_hash_table_lookup (global_plugins, GINT_TO_POINTER (G_OBJECT_CLASS_TYPE (gobject_class)))); - details.longname = g_strdup_printf ("LibPostProc %s filter", + longname = g_strdup_printf ("LibPostProc %s filter", filterdetails[ppidx].longname); - details.klass = "Filter/Video"; - details.description = g_strdup_printf ("LibPostProc %s", + description = g_strdup_printf ("LibPostProc %s", filterdetails[ppidx].description); - details.author = - "Edward Hervey , Mark Nauwelaerts (manauw@skynet.be)"; - gst_element_class_set_details (element_class, &details); - g_free (details.longname); - g_free (details.description); + gst_element_class_set_details_simple (element_class, longname, "Filter/Video", + description, + "Edward Hervey , Mark Nauwelaerts (manauw@skynet.be)"); + g_free (longname); + g_free (description); gst_element_class_add_pad_template (element_class, gst_static_pad_template_get (&gst_post_proc_src_template)); @@ -827,7 +826,7 @@ gst_post_proc_forcequant_get_property (GObject * object, guint prop_id, } -gboolean +static gboolean gst_post_proc_register (GstPlugin * plugin) { GTypeInfo typeinfo = { diff --git a/ext/libswscale/gstffmpegscale.c b/ext/libswscale/gstffmpegscale.c index 64fa1f3..6521de8 100644 --- a/ext/libswscale/gstffmpegscale.c +++ b/ext/libswscale/gstffmpegscale.c @@ -76,15 +76,11 @@ typedef struct _GstFFMpegScaleClass #define GST_IS_FFMPEGSCALE_CLASS(klass) \ (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_FFMPEGSCALE)) +GType gst_ffmpegscale_get_type (void); + GST_DEBUG_CATEGORY (ffmpegscale_debug); #define GST_CAT_DEFAULT ffmpegscale_debug -static const GstElementDetails plugin_details = -GST_ELEMENT_DETAILS ("FFMPEG Scale element", - "Filter/Converter/Video", - "Converts video from one resolution to another", - "Luca Ognibene , Mark Nauwelaerts "); - /* libswscale supported formats depend on endianness */ #if G_BYTE_ORDER == G_BIG_ENDIAN #define VIDEO_CAPS \ @@ -197,7 +193,10 @@ gst_ffmpegscale_base_init (gpointer g_class) gst_static_pad_template_get (&src_factory)); gst_element_class_add_pad_template (element_class, gst_static_pad_template_get (&sink_factory)); - gst_element_class_set_details (element_class, &plugin_details); + gst_element_class_set_details_simple (element_class, "FFMPEG Scale element", + "Filter/Converter/Video", + "Converts video from one resolution to another", + "Luca Ognibene , Mark Nauwelaerts "); } static void @@ -787,7 +786,7 @@ gst_ffmpeg_log_callback (void *ptr, int level, const char *fmt, va_list vl) } #endif -gboolean +static gboolean plugin_init (GstPlugin * plugin) { GST_DEBUG_CATEGORY_INIT (ffmpegscale_debug, "ffvideoscale", 0, -- 2.7.4