video-converter: define some options
authorWim Taymans <wtaymans@redhat.com>
Fri, 24 Oct 2014 14:42:11 +0000 (16:42 +0200)
committerWim Taymans <wtaymans@redhat.com>
Wed, 29 Oct 2014 15:26:10 +0000 (16:26 +0100)
gst-libs/gst/video/video-converter.c
gst-libs/gst/video/video-converter.h

index ca191b3..fd1a69c 100644 (file)
@@ -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;
index fab091b..c03dcfc 100644 (file)
 
 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,