mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-19 06:46:38 +00:00
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.
This commit is contained in:
parent
22d712786c
commit
a07a575209
2 changed files with 12 additions and 12 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue