From 6c500b619c86ff596efa57593f75bee3997097ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Thu, 3 Feb 2022 18:18:03 +0000 Subject: [PATCH] video: fix up GstVideoOrientationMethod type registration ... in order to make older g-i happy (~1.60) which doesn't like freeform descriptions in the value_name field. Which in turn then makes hotdoc happy instead of erroring out when we bump the symbol index version. We usually only (ab)use the name field for description strings for private plugin enums, not for public API visible to bindings. This lets glib-mkenum generate the _get_type() function for the enum again, which in turn will generate the expected value names to match the enums. We might be able to add this back later once we can upgrade the g-i version requirement (and the documentation job image). This reverts most of commit b0aab48cdcf0a454d14aeb4d907209d8ee3f1add --- .../gst-libs/gst/video/meson.build | 1 + .../gst-libs/gst/video/video.c | 33 ------------------- .../gst-libs/gst/video/video.h | 5 --- 3 files changed, 1 insertion(+), 38 deletions(-) diff --git a/subprojects/gst-plugins-base/gst-libs/gst/video/meson.build b/subprojects/gst-plugins-base/gst-libs/gst/video/meson.build index 9dff3e05a8..c0abb22e52 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/video/meson.build +++ b/subprojects/gst-plugins-base/gst-libs/gst/video/meson.build @@ -77,6 +77,7 @@ video_headers = files([ install_headers(video_headers, subdir : 'gstreamer-1.0/gst/video/') video_mkenum_headers = [ + 'video.h', 'video-anc.h', 'video-format.h', 'video-frame.h', diff --git a/subprojects/gst-plugins-base/gst-libs/gst/video/video.c b/subprojects/gst-plugins-base/gst-libs/gst/video/video.c index 5fd20505d8..cf8e184c23 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/video/video.c +++ b/subprojects/gst-plugins-base/gst-libs/gst/video/video.c @@ -205,39 +205,6 @@ gst_video_alignment_reset (GstVideoAlignment * align) 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; -} - /** * gst_video_orientation_from_tag: * @taglist: A #GstTagList diff --git a/subprojects/gst-plugins-base/gst-libs/gst/video/video.h b/subprojects/gst-plugins-base/gst-libs/gst/video/video.h index a1a6d1a422..a31562a09b 100644 --- a/subprojects/gst-plugins-base/gst-libs/gst/video/video.h +++ b/subprojects/gst-plugins-base/gst-libs/gst/video/video.h @@ -95,11 +95,6 @@ typedef enum { * 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: