video-converter: fix dither method

This commit is contained in:
Wim Taymans 2014-11-18 12:53:06 +01:00
parent c116da93f1
commit 73349f14b9
2 changed files with 5 additions and 5 deletions

View file

@ -1418,7 +1418,8 @@ gst_video_converter_new (GstVideoInfo * in_info, GstVideoInfo * out_info,
/* default config */ /* default config */
convert->config = gst_structure_new ("GstVideoConverter", convert->config = gst_structure_new ("GstVideoConverter",
"dither", GST_TYPE_VIDEO_DITHER_METHOD, GST_VIDEO_DITHER_NONE, NULL); GST_VIDEO_CONVERTER_OPT_DITHER_METHOD, GST_TYPE_VIDEO_DITHER_METHOD,
GST_VIDEO_DITHER_NONE, NULL);
if (config) if (config)
gst_video_converter_set_config (convert, config); gst_video_converter_set_config (convert, config);
@ -1666,10 +1667,8 @@ copy_config (GQuark field_id, const GValue * value, gpointer user_data)
* %FALSE and will try to update as much state as possible. The new state can * %FALSE and will try to update as much state as possible. The new state can
* then be retrieved and refined with gst_video_converter_get_config(). * then be retrieved and refined with gst_video_converter_get_config().
* *
* The config is a GstStructure that can contain the the following fields: * Look at the #GST_VIDEO_CONVERTER_OPT_* fields to check valid configuration
* * option and values.
* "dither" GST_TYPE_VIDEO_DITHER_METHOD The dithering used when reducing
* colors
* *
* Returns: %TRUE when @config could be set. * Returns: %TRUE when @config could be set.
* *

View file

@ -61,6 +61,7 @@ typedef enum {
* *
* #GST_TYPE_VIDEO_DITHER_METHOD, The dither method to use when * #GST_TYPE_VIDEO_DITHER_METHOD, The dither method to use when
* changing bit depth. * changing bit depth.
* Default is #GST_VIDEO_DITHER_NONE.
*/ */
#define GST_VIDEO_CONVERTER_OPT_DITHER_METHOD "GstVideoConverter.dither-method" #define GST_VIDEO_CONVERTER_OPT_DITHER_METHOD "GstVideoConverter.dither-method"