From: Stefan Kost Date: Thu, 30 Jul 2009 14:57:53 +0000 (+0300) Subject: jpeg: use longer macro names to not clash with some stupid windows defines X-Git-Tag: 1.19.3~509^2~10051 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a07a57520968c76e8a1e9609376e8e4dbd2e3b99;p=platform%2Fupstream%2Fgstreamer.git jpeg: use longer macro names to not clash with some stupid windows defines libjpeg headers pull some windows system inlcudes (on windows) that contain a define for DEFAULT_QUALITY. --- diff --git a/ext/jpeg/gstjpegdec.c b/ext/jpeg/gstjpegdec.c index 136451e..a7312ba 100644 --- a/ext/jpeg/gstjpegdec.c +++ b/ext/jpeg/gstjpegdec.c @@ -52,7 +52,7 @@ GST_ELEMENT_DETAILS ("JPEG image decoder", #define MIN_HEIGHT 8 #define MAX_HEIGHT 65535 -#define DEFAULT_IDCT_METHOD JDCT_FASTEST +#define JPEG_DEFAULT_IDCT_METHOD JDCT_FASTEST enum { @@ -185,7 +185,7 @@ gst_jpeg_dec_class_init (GstJpegDecClass * klass) g_object_class_install_property (gobject_class, PROP_IDCT_METHOD, g_param_spec_enum ("idct-method", "IDCT Method", "The IDCT algorithm to use", GST_TYPE_IDCT_METHOD, - DEFAULT_IDCT_METHOD, G_PARAM_READWRITE)); + JPEG_DEFAULT_IDCT_METHOD, G_PARAM_READWRITE)); gstelement_class->change_state = GST_DEBUG_FUNCPTR (gst_jpeg_dec_change_state); @@ -310,7 +310,7 @@ gst_jpeg_dec_init (GstJpegDec * dec) dec->jsrc.dec = dec; /* init properties */ - dec->idct_method = DEFAULT_IDCT_METHOD; + dec->idct_method = JPEG_DEFAULT_IDCT_METHOD; } static inline gboolean diff --git a/ext/jpeg/gstjpegenc.c b/ext/jpeg/gstjpegenc.c index bac2292..4f8332e 100644 --- a/ext/jpeg/gstjpegenc.c +++ b/ext/jpeg/gstjpegenc.c @@ -54,9 +54,9 @@ GST_ELEMENT_DETAILS ("JPEG image encoder", GST_DEBUG_CATEGORY_STATIC (jpegenc_debug); #define GST_CAT_DEFAULT jpegenc_debug -#define DEFAULT_QUALITY 85 -#define DEFAULT_SMOOTHING 0 -#define DEFAULT_IDCT_METHOD JDCT_FASTEST +#define JPEG_DEFAULT_QUALITY 85 +#define JPEG_DEFAULT_SMOOTHING 0 +#define JPEG_DEFAULT_IDCT_METHOD JDCT_FASTEST /* These macros are adapted from videotestsrc.c * and/or gst-plugins/gst/games/gstvideoimage.c */ @@ -187,19 +187,19 @@ gst_jpegenc_class_init (GstJpegEnc * klass) g_object_class_install_property (gobject_class, PROP_QUALITY, g_param_spec_int ("quality", "Quality", "Quality of encoding", - 0, 100, DEFAULT_QUALITY, G_PARAM_READWRITE)); + 0, 100, JPEG_DEFAULT_QUALITY, G_PARAM_READWRITE)); #if ENABLE_SMOOTHING /* disabled, since it doesn't seem to work */ g_object_class_install_property (gobject_class, PROP_SMOOTHING, g_param_spec_int ("smoothing", "Smoothing", "Smoothing factor", - 0, 100, DEFAULT_SMOOTHING, G_PARAM_READWRITE)); + 0, 100, JPEG_DEFAULT_SMOOTHING, G_PARAM_READWRITE)); #endif g_object_class_install_property (gobject_class, PROP_IDCT_METHOD, g_param_spec_enum ("idct-method", "IDCT Method", "The IDCT algorithm to use", GST_TYPE_IDCT_METHOD, - DEFAULT_IDCT_METHOD, G_PARAM_READWRITE)); + JPEG_DEFAULT_IDCT_METHOD, G_PARAM_READWRITE)); gstelement_class->change_state = gst_jpegenc_change_state; @@ -266,9 +266,9 @@ gst_jpegenc_init (GstJpegEnc * jpegenc) jpegenc->cinfo.dest = &jpegenc->jdest; /* init properties */ - jpegenc->quality = DEFAULT_QUALITY; - jpegenc->smoothing = DEFAULT_SMOOTHING; - jpegenc->idct_method = DEFAULT_IDCT_METHOD; + jpegenc->quality = JPEG_DEFAULT_QUALITY; + jpegenc->smoothing = JPEG_DEFAULT_SMOOTHING; + jpegenc->idct_method = JPEG_DEFAULT_IDCT_METHOD; } static void