From: <sl...@ke...> - 2008-05-13 15:22:21
|
CVS Root: /cvs/gstreamer Module: gst-ffmpeg Changes by: slomo Date: Tue May 13 2008 15:07:39 UTC Log message: * configure.ac: * ext/ffmpeg/gstffmpegcodecmap.c: * ext/ffmpeg/gstffmpegdemux.c: * ext/libpostproc/gstpostproc.c: Fix build with (Debian's) system ffmpeg. Fixes bug #532803. Modified files: . : ChangeLog configure.ac ext/ffmpeg : gstffmpegcodecmap.c gstffmpegdemux.c ext/libpostproc : gstpostproc.c Links: http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-ffmpeg/ChangeLog.diff?r1=1.471&r2=1.472 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-ffmpeg/configure.ac.diff?r1=1.84&r2=1.85 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-ffmpeg/ext/ffmpeg/gstffmpegcodecmap.c.diff?r1=1.155&r2=1.156 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-ffmpeg/ext/ffmpeg/gstffmpegdemux.c.diff?r1=1.89&r2=1.90 http://freedesktop.org/cgi-bin/viewcvs.cgi/gstreamer/gst-ffmpeg/ext/libpostproc/gstpostproc.c.diff?r1=1.12&r2=1.13 ====Begin Diffs==== Index: ChangeLog =================================================================== RCS file: /cvs/gstreamer/gst-ffmpeg/ChangeLog,v retrieving revision 1.471 retrieving revision 1.472 diff -u -d -r1.471 -r1.472 --- ChangeLog 12 May 2008 14:28:58 -0000 1.471 +++ ChangeLog 13 May 2008 15:07:24 -0000 1.472 @@ -1,3 +1,11 @@ +2008-05-13 Sebastian Dröge <sl...@ci...> + + * configure.ac: + * ext/ffmpeg/gstffmpegcodecmap.c: + * ext/ffmpeg/gstffmpegdemux.c: + * ext/libpostproc/gstpostproc.c: + Fix build with (Debian's) system ffmpeg. Fixes bug #532803. 2008-05-13 Edward Hervey <edw...@co...> * configure.ac: Index: configure.ac RCS file: /cvs/gstreamer/gst-ffmpeg/configure.ac,v retrieving revision 1.84 retrieving revision 1.85 diff -u -d -r1.84 -r1.85 --- configure.ac 12 May 2008 14:28:58 -0000 1.84 +++ configure.ac 13 May 2008 15:07:24 -0000 1.85 @@ -207,7 +207,7 @@ [AC_HELP_STRING([--with-system-ffmpeg], [use system FFmpeg libraries])]) if test "x$with_system_ffmpeg" = "xyes"; then - PKG_CHECK_MODULES(FFMPEG, libavutil libavcodec libavformat) + PKG_CHECK_MODULES(FFMPEG, libavutil libavcodec libavformat libswscale) PKG_CHECK_MODULES(POSTPROC, libavcodec libpostproc) saved_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $FFMPEG_CFLAGS" @@ -303,9 +303,10 @@ AC_SUBST(FFMPEG_SUBDIRS) AC_SUBST(POSTPROC_CFLAGS) AC_SUBST(POSTPROC_LIBS) - -AC_DEFINE_UNQUOTED(HAVE_FFMPEG_UNINSTALLED, $HAVE_FFMPEG_UNINSTALLED, - [Defined if building against uninstalled FFmpeg source]) + +if test x$HAVE_FFMPEG_UNINSTALLED = x1; then + AC_DEFINE(HAVE_FFMPEG_UNINSTALLED, [], [Defined if building against uninstalled FFmpeg source]) +fi AM_CONDITIONAL(HAVE_FFMPEG_UNINSTALLED, test x$HAVE_FFMPEG_UNINSTALLED = x1) AC_CONFIG_FILES( Index: gstffmpegcodecmap.c RCS file: /cvs/gstreamer/gst-ffmpeg/ext/ffmpeg/gstffmpegcodecmap.c,v retrieving revision 1.155 retrieving revision 1.156 diff -u -d -r1.155 -r1.156 --- gstffmpegcodecmap.c 8 May 2008 13:45:14 -0000 1.155 +++ gstffmpegcodecmap.c 13 May 2008 15:07:24 -0000 1.156 @@ -27,6 +27,7 @@ #include <avcodec.h> #include <libswscale/swscale.h> #else +#include <ffmpeg/swscale.h> #include <ffmpeg/avcodec.h> #endif #include <string.h> Index: gstffmpegdemux.c RCS file: /cvs/gstreamer/gst-ffmpeg/ext/ffmpeg/gstffmpegdemux.c,v retrieving revision 1.89 retrieving revision 1.90 diff -u -d -r1.89 -r1.90 --- gstffmpegdemux.c 19 Apr 2008 20:27:25 -0000 1.89 +++ gstffmpegdemux.c 13 May 2008 15:07:25 -0000 1.90 @@ -31,8 +31,10 @@ #include <ffmpeg/avformat.h> +#ifdef HAVE_AVI_H #include <ffmpeg/avi.h> +#endif #include <gst/gst.h> #include "gstffmpeg.h" Index: gstpostproc.c RCS file: /cvs/gstreamer/gst-ffmpeg/ext/libpostproc/gstpostproc.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- gstpostproc.c 6 May 2008 14:31:22 -0000 1.12 +++ gstpostproc.c 13 May 2008 15:07:25 -0000 1.13 @@ -33,42 +33,43 @@ #include <postprocess.h> -#include <ffmpeg/libpostproc/postprocess.h> +#include <postproc/postprocess.h> typedef struct _PostProcDetails PostProcDetails; -struct _PostProcDetails { - char *shortname; - char *longname; - char *description; +struct _PostProcDetails +{ + char *shortname; + char *longname; + char *description; }; static PostProcDetails filterdetails[] = { - {"hb", "hdeblock", "horizontal deblocking filter"}, - {"vb", "vdeblock", "vertical deblocking filter"}, - {"h1", "x1hdeblock", "experimental horizontal deblocking filter 1"}, - {"v1", "x1vdeblock", "experimental vertical deblocking filter 1"}, - {"ha", "ahdeblock", "another horizontal deblocking filter"}, - {"va", "avdeblock", "another vertical deblocking filter"}, - {"dr", "dering", "deringing filter"}, - {"al", "autolevels", "automatic brightness/contrast filter"}, - {"lb", "linblenddeint", "linear blend interpolater"}, - {"li", "linipoldeint", "linear interpolation deinterlacer"}, - {"ci", "cubicipoldeint", "cubic interpolation deinterlacer"}, - {"md", "mediandeint", "median deinterlacer"}, - {"fd", "ffmpegdeint", "ffmpeg deinterlacer"}, - {"l5", "lowpass5", "FIR lowpass deinterlacer"}, - {"tn", "tmpnoise", "temporal noise reducer"}, - {"fq", "forcequant", "force quantizer"}, - {"de", "default", "default filters"}, - {NULL, NULL, NULL} + {"hb", "hdeblock", "horizontal deblocking filter"}, + {"vb", "vdeblock", "vertical deblocking filter"}, + {"h1", "x1hdeblock", "experimental horizontal deblocking filter 1"}, + {"v1", "x1vdeblock", "experimental vertical deblocking filter 1"}, + {"ha", "ahdeblock", "another horizontal deblocking filter"}, + {"va", "avdeblock", "another vertical deblocking filter"}, + {"dr", "dering", "deringing filter"}, + {"al", "autolevels", "automatic brightness/contrast filter"}, + {"lb", "linblenddeint", "linear blend interpolater"}, + {"li", "linipoldeint", "linear interpolation deinterlacer"}, + {"ci", "cubicipoldeint", "cubic interpolation deinterlacer"}, + {"md", "mediandeint", "median deinterlacer"}, + {"fd", "ffmpegdeint", "ffmpeg deinterlacer"}, + {"l5", "lowpass5", "FIR lowpass deinterlacer"}, + {"tn", "tmpnoise", "temporal noise reducer"}, + {"fq", "forcequant", "force quantizer"}, + {"de", "default", "default filters"}, + {NULL, NULL, NULL} -typedef struct _GstPostProc GstPostProc; +typedef struct _GstPostProc GstPostProc; -struct _GstPostProc +struct _GstPostProc { GstVideoFilter element; @@ -96,9 +97,9 @@ gchar *cargs, *args; -typedef struct _GstPostProcClass GstPostProcClass; +typedef struct _GstPostProcClass GstPostProcClass; -struct _GstPostProcClass +struct _GstPostProcClass GstVideoFilterClass parent_class; @@ -194,8 +195,8 @@ static void gst_post_proc_init (GstPostProc * pproc); static void gst_post_proc_dispose (GObject * object); -static gboolean gst_post_proc_setcaps (GstBaseTransform * btrans, GstCaps * incaps, - GstCaps * outcaps); +static gboolean gst_post_proc_setcaps (GstBaseTransform * btrans, + GstCaps * incaps, GstCaps * outcaps); static GstFlowReturn gst_post_proc_transform_ip (GstBaseTransform * btrans, GstBuffer * in); @@ -203,25 +204,25 @@ /* GstStateChange transition); */ static void gst_post_proc_set_property (GObject * object, - guint prop_id, const GValue * value, GParamSpec *pspec); + guint prop_id, const GValue * value, GParamSpec * pspec); static void gst_post_proc_get_property (GObject * object, - guint prop_id, GValue * value, GParamSpec *pspec); + guint prop_id, GValue * value, GParamSpec * pspec); static void gst_post_proc_deblock_set_property (GObject * object, static void gst_post_proc_deblock_get_property (GObject * object, static void gst_post_proc_autolevels_set_property (GObject * object, static void gst_post_proc_autolevels_get_property (GObject * object, static void gst_post_proc_tmpnoise_set_property (GObject * object, static void gst_post_proc_tmpnoise_get_property (GObject * object, static void gst_post_proc_forcequant_set_property (GObject * object, static void gst_post_proc_forcequant_get_property (GObject * object, static GstElementClass *parent_class = NULL; @@ -239,15 +240,14 @@ }; if (!pp_scope_type) { - pp_scope_type = - g_enum_register_static ("GstPostProcPPScope", pp_scope); + pp_scope_type = g_enum_register_static ("GstPostProcPPScope", pp_scope); } return pp_scope_type; } #ifndef GST_DISABLE_GST_DEBUG static void -gst_ffmpeg_log_callback (void * ptr, int level, const char * fmt, va_list vl) +gst_ffmpeg_log_callback (void *ptr, int level, const char *fmt, va_list vl) GstDebugLevel gst_level; @@ -289,7 +289,7 @@ if ((width != postproc->width) && (height != postproc->height)) { if (postproc->context) pp_free_context (postproc->context); - flags = oil_cpu_get_flags(); + flags = oil_cpu_get_flags (); ppflags = (flags & OIL_IMPL_FLAG_MMX ? PP_CPU_CAPS_MMX : 0) | (flags & OIL_IMPL_FLAG_MMXEXT ? PP_CPU_CAPS_MMX2 : 0) | (flags & OIL_IMPL_FLAG_3DNOW ? PP_CPU_CAPS_3DNOW : 0) @@ -327,9 +327,9 @@ -change_mode (GstPostProc * postproc ) +change_mode (GstPostProc * postproc) - GstPostProcClass * klass; + GstPostProcClass *klass; gchar *name; klass = (GstPostProcClass *) G_OBJECT_GET_CLASS (G_OBJECT (postproc)); @@ -356,19 +356,20 @@ gint ppidx; ppidx = GPOINTER_TO_INT (g_hash_table_lookup (global_plugins, - GINT_TO_POINTER (G_OBJECT_CLASS_TYPE (gobject_class)))); + GINT_TO_POINTER (G_OBJECT_CLASS_TYPE (gobject_class)))); details.longname = g_strdup_printf ("LibPostProc %s filter", filterdetails[ppidx].longname); details.klass = "Filter/Video"; details.description = g_strdup_printf ("LibPostProc %s", filterdetails[ppidx].description); - details.author = "Edward Hervey <ed...@fl...>, Mark Nauwelaerts (ma...@sk...)"; + details.author = + "Edward Hervey <ed...@fl...>, Mark Nauwelaerts (ma...@sk...)"; gst_element_class_set_details (element_class, &details); - g_free(details.longname); - g_free(details.description); + g_free (details.longname); + g_free (details.description); - gst_element_class_add_pad_template (element_class, + gst_element_class_add_pad_template (element_class, gst_static_pad_template_get (&gst_post_proc_src_template)); gst_element_class_add_pad_template (element_class, gst_static_pad_template_get (&gst_post_proc_sink_template)); @@ -379,7 +380,8 @@ gst_post_proc_class_init (GstPostProcClass * klass) - GObjectClass *gobject_class = G_OBJECT_CLASS (klass); + GObjectClass *gobject_class = G_OBJECT_CLASS (klass); /* GstElementClass *gstelement_class = GST_ELEMENT_CLASS (klass); */ GstBaseTransformClass *btrans_class = GST_BASE_TRANSFORM_CLASS (klass); @@ -449,8 +451,7 @@ /* autolevels */ g_object_class_install_property (gobject_class, PROP_RANGE, g_param_spec_boolean ("fully-range", "Fully Range", - "Stretch luminance to (0-255)", - DEFAULT_RANGE, G_PARAM_READWRITE)); + "Stretch luminance to (0-255)", DEFAULT_RANGE, G_PARAM_READWRITE)); gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_post_proc_autolevels_set_property); @@ -461,7 +462,7 @@ /* forcequant */ g_object_class_install_property (gobject_class, PROP_QUANT, g_param_spec_int ("quantizer", "Force Quantizer", - "Quantizer to use (-1 = pp default)", + "Quantizer to use (-1 = pp default)", -1, G_MAXINT, DEFAULT_QUANT, G_PARAM_READWRITE)); @@ -508,7 +509,7 @@ gst_post_proc_dispose (GObject * object) - GstPostProc * postproc = (GstPostProc *) object; + GstPostProc *postproc = (GstPostProc *) object; if (postproc->mode) pp_free_mode (postproc->mode); @@ -551,7 +552,7 @@ guint8 *outplane[3]; guint8 *inplane[3]; - /* postprocess the buffer !*/ + /* postprocess the buffer ! */ postproc = (GstPostProc *) btrans; stride[0] = postproc->ystride; @@ -564,8 +565,8 @@ GST_DEBUG_OBJECT (postproc, "calling pp_postprocess, width:%d, height:%d", postproc->width, postproc->height); - pp_postprocess ((const guint8**) inplane, stride, outplane, stride, - postproc->width, postproc->height, (int8_t*) "", 0, + pp_postprocess ((const guint8 **) inplane, stride, outplane, stride, + postproc->width, postproc->height, (int8_t *) "", 0, postproc->mode, postproc->context, 0); return GST_FLOW_OK; @@ -574,7 +575,7 @@ gst_post_proc_set_property (GObject * object, guint prop_id, - const GValue * value, GParamSpec *pspec) + const GValue * value, GParamSpec * pspec) GstPostProc *postproc = (GstPostProc *) object; gint quality; @@ -583,16 +584,16 @@ switch (prop_id) { case PROP_QUALITY: quality = g_value_get_uint (value); - break; + break; case PROP_AUTOQ: postproc->autoq = g_value_get_boolean (value); break; case PROP_SCOPE: postproc->scope = g_value_get_enum (value); - default: - G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); + default: + G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec); /* construct common args */ @@ -619,7 +620,7 @@ gst_post_proc_get_property (GObject * object, guint prop_id, - GValue * value, GParamSpec *pspec) + GValue * value, GParamSpec * pspec) @@ -634,15 +635,15 @@ g_value_set_enum (value, postproc->scope); default: gst_post_proc_deblock_set_property (GObject * object, guint prop_id, @@ -670,8 +671,8 @@ -gst_post_proc_deblock_get_property ( GObject * object, guint prop_id, - GValue * value, GParamSpec *pspec ) +gst_post_proc_deblock_get_property (GObject * object, guint prop_id, @@ -690,7 +691,7 @@ gst_post_proc_tmpnoise_set_property (GObject * object, guint prop_id, @@ -725,7 +726,7 @@ gst_post_proc_tmpnoise_get_property (GObject * object, guint prop_id, @@ -747,7 +748,7 @@ gst_post_proc_autolevels_set_property (GObject * object, guint prop_id, @@ -771,7 +772,7 @@ gst_post_proc_autolevels_get_property (GObject * object, guint prop_id, @@ -787,7 +788,7 @@ gst_post_proc_forcequant_set_property (GObject * object, guint prop_id, @@ -811,7 +812,7 @@ gst_post_proc_forcequant_get_property (GObject * object, guint prop_id, @@ -827,9 +828,9 @@ gboolean -gst_post_proc_register(GstPlugin * plugin) +gst_post_proc_register (GstPlugin * plugin) - GTypeInfo typeinfo = { + GTypeInfo typeinfo = { sizeof (GstPostProcClass), (GBaseInitFunc) gst_post_proc_base_init, NULL, @@ -851,7 +852,7 @@ GINT_TO_POINTER (i)); /* create type_name */ - type_name = g_strdup_printf("postproc_%s", filterdetails[i].longname); + type_name = g_strdup_printf ("postproc_%s", filterdetails[i].longname); if (g_type_from_name (type_name)) { g_free (type_name); continue; @@ -866,11 +867,11 @@ /* register element */ if (!gst_element_register (plugin, type_name, GST_RANK_PRIMARY, type)) { - g_free(type_name); + g_free (type_name); return FALSE; } - g_free(type_name); + g_free (type_name); g_hash_table_remove (global_plugins, GINT_TO_POINTER (0)); @@ -899,5 +900,3 @@ "postprocessing elements (" FFMPEG_SOURCE ")", plugin_init, PACKAGE_VERSION, "GPL", "FFMpeg", "http://ffmpeg.sourceforge.net/") - |