video: Put nicer documentation in GstVideoOrientationMethod
authorOlivier CrĂȘte <olivier.crete@collabora.com>
Tue, 4 May 2021 19:28:25 +0000 (15:28 -0400)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Tue, 12 Oct 2021 20:27:34 +0000 (20:27 +0000)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1088>

subprojects/gst-docs/symbols/symbol_index.json
subprojects/gst-plugins-base/gst-libs/gst/video/meson.build
subprojects/gst-plugins-base/gst-libs/gst/video/video.c
subprojects/gst-plugins-base/gst-libs/gst/video/video.h

index e53c438..dec5e1a 100644 (file)
   "GstVideoOrientationInterface::set_hflip",
   "GstVideoOrientationInterface::set_vcenter",
   "GstVideoOrientationInterface::set_vflip",
-  "GstVideoOrientationMethod",
   "GstVideoOverlay",
   "GstVideoOverlayComposition",
   "GstVideoOverlayCompositionMeta",
index 4528b10..9c0cb6a 100644 (file)
@@ -77,7 +77,6 @@ video_headers = [
 install_headers(video_headers, subdir : 'gstreamer-1.0/gst/video/')
 
 video_mkenum_headers = [
-  'video.h',
   'video-anc.h',
   'video-format.h',
   'video-frame.h',
index 0743044..21cc5a1 100644 (file)
@@ -204,3 +204,36 @@ gst_video_alignment_reset (GstVideoAlignment * align)
   for (i = 0; i < GST_VIDEO_MAX_PLANES; i++)
     align->stride_align[i] = 0;
 }
+
+static const GEnumValue video_orientation_methods[] = {
+  {GST_VIDEO_ORIENTATION_IDENTITY, "Identity (no rotation)", "identity"},
+  {GST_VIDEO_ORIENTATION_90R, "Rotate clockwise 90 degrees", "90r"},
+  {GST_VIDEO_ORIENTATION_180, "Rotate 180 degrees", "180"},
+  {GST_VIDEO_ORIENTATION_90L, "Rotate counter-clockwise 90 degrees",
+      "90l"},
+  {GST_VIDEO_ORIENTATION_HORIZ, "Flip horizontally", "horiz"},
+  {GST_VIDEO_ORIENTATION_VERT, "Flip vertically", "vert"},
+  {GST_VIDEO_ORIENTATION_UL_LR,
+      "Flip across upper left/lower right diagonal", "ul-lr"},
+  {GST_VIDEO_ORIENTATION_UR_LL,
+      "Flip across upper right/lower left diagonal", "ur-ll"},
+  {GST_VIDEO_ORIENTATION_AUTO,
+      "Select rotate method based on image-orientation tag", "auto"},
+  {GST_VIDEO_ORIENTATION_CUSTOM,
+      "Current status depends on plugin internal setup", "custom"},
+  {0, NULL, NULL},
+};
+
+GType
+gst_video_orientation_method_get_type (void)
+{
+  static gsize video_orientation_method_type = 0;
+
+  if (g_once_init_enter (&video_orientation_method_type)) {
+    gsize res = g_enum_register_static ("GstVideoOrientationMethod",
+        video_orientation_methods);
+    g_once_init_leave (&video_orientation_method_type, res);
+  }
+
+  return (GType) video_orientation_method_type;
+}
index 8c1a07a..24a3a73 100644 (file)
@@ -89,6 +89,17 @@ typedef enum {
   GST_VIDEO_ORIENTATION_CUSTOM,
 } GstVideoOrientationMethod;
 
+/**
+ * GST_TYPE_VIDEO_ORIENTATION_METHOD:
+ *
+ * Since: 1.20
+ */
+
+GST_VIDEO_API
+GType gst_video_orientation_method_get_type (void);
+#define GST_TYPE_VIDEO_ORIENTATION_METHOD \
+  gst_video_orientation_method_get_type ()
+
 /* metadata macros */
 /**
  * GST_META_TAG_VIDEO_STR: