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) {
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;
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,