mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
video-converter: define some options
This commit is contained in:
parent
ad0e0006b2
commit
c409a45d13
2 changed files with 32 additions and 4 deletions
|
@ -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;
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue