From: Wim Taymans Date: Fri, 24 Oct 2014 14:42:11 +0000 (+0200) Subject: video-converter: define some options X-Git-Tag: 1.6.0~917 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c409a45d1383860c76b0958b74d088559bca784f;p=platform%2Fupstream%2Fgst-plugins-base.git video-converter: define some options --- diff --git a/gst-libs/gst/video/video-converter.c b/gst-libs/gst/video/video-converter.c index ca191b3..fd1a69c 100644 --- a/gst-libs/gst/video/video-converter.c +++ b/gst-libs/gst/video/video-converter.c @@ -604,8 +604,8 @@ gst_video_converter_set_config (GstVideoConverter * convert, g_return_val_if_fail (convert != NULL, FALSE); g_return_val_if_fail (config != NULL, FALSE); - if (gst_structure_get_enum (config, "dither", GST_TYPE_VIDEO_DITHER_METHOD, - &dither)) { + if (gst_structure_get_enum (config, GST_VIDEO_CONVERTER_OPT_DITHER_METHOD, + GST_TYPE_VIDEO_DITHER_METHOD, &dither)) { gboolean update = TRUE; switch (dither) { @@ -623,7 +623,7 @@ gst_video_converter_set_config (GstVideoConverter * convert, break; } if (update) - gst_structure_set (convert->config, "dither", + gst_structure_set (convert->config, GST_VIDEO_CONVERTER_OPT_DITHER_METHOD, GST_TYPE_VIDEO_DITHER_METHOD, dither, NULL); else res = FALSE; diff --git a/gst-libs/gst/video/video-converter.h b/gst-libs/gst/video/video-converter.h index fab091b..c03dcfc 100644 --- a/gst-libs/gst/video/video-converter.h +++ b/gst-libs/gst/video/video-converter.h @@ -24,12 +24,40 @@ G_BEGIN_DECLS +/** + * GstVideoDitherMethod: + * @GST_VIDEO_DITHER_NONE: no dithering + * @GST_VIDEO_DITHER_VERTERR: propagate rounding errors downwards + * @GST_VIDEO_DITHER_HALFTONE: Dither with halftone pattern + * @GST_VIDEO_DITHER_HORIZERR: propagate rounding errors right + * + * Different dithering methods to use. + */ typedef enum { GST_VIDEO_DITHER_NONE, GST_VIDEO_DITHER_VERTERR, - GST_VIDEO_DITHER_HALFTONE + GST_VIDEO_DITHER_HALFTONE, + GST_VIDEO_DITHER_HORIZERR } GstVideoDitherMethod; +/** + * GST_VIDEO_CONVERTER_OPT_RESAMPLE_METHOD: + * + * #GST_TYPE_RESAMPLER_METHOD, The resampler method to use for + * resampling. Other options for the resampler can be used, see + * the #GstResampler. + */ +#define GST_VIDEO_CONVERTER_OPT_RESAMPLE_METHOD "GstVideoConverter.resample-method" + +/** + * GST_VIDEO_CONVERTER_OPT_DITHER_METHOD: + * + * #GST_TYPE_VIDEO_DITHER_METHOD, The dither method to use when + * changing bit depth. + */ +#define GST_VIDEO_CONVERTER_OPT_DITHER_METHOD "GstVideoConverter.dither-method" + + typedef struct _GstVideoConverter GstVideoConverter; GstVideoConverter * gst_video_converter_new (GstVideoInfo *in_info,