decklink: Re-order modes enum for backwards compatibility with 1.16

The PAL/NTSC widescreen modes were added after 1.16 but inserted before
the HD modes, which changed the integer values of the enums.

Move them to the very end instead to keep backwards compatibility.

Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/issues/1048

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1492>
This commit is contained in:
Sebastian Dröge 2020-08-05 10:52:08 +03:00
parent e70ec38000
commit 309f6187fe
4 changed files with 71 additions and 71 deletions

View file

@ -8466,194 +8466,194 @@
"name": "pal-p",
"value": "5"
},
{
"desc": "NTSC SD 60i Widescreen",
"name": "ntsc-widescreen",
"value": "6"
},
{
"desc": "NTSC SD 60i Widescreen (24 fps)",
"name": "ntsc2398-widescreen",
"value": "7"
},
{
"desc": "PAL SD 50i Widescreen",
"name": "pal-widescreen",
"value": "8"
},
{
"desc": "NTSC SD 60p Widescreen",
"name": "ntsc-p-widescreen",
"value": "9"
},
{
"desc": "PAL SD 50p Widescreen",
"name": "pal-p-widescreen",
"value": "10"
},
{
"desc": "HD1080 23.98p",
"name": "1080p2398",
"value": "11"
"value": "6"
},
{
"desc": "HD1080 24p",
"name": "1080p24",
"value": "12"
"value": "7"
},
{
"desc": "HD1080 25p",
"name": "1080p25",
"value": "13"
"value": "8"
},
{
"desc": "HD1080 29.97p",
"name": "1080p2997",
"value": "14"
"value": "9"
},
{
"desc": "HD1080 30p",
"name": "1080p30",
"value": "15"
"value": "10"
},
{
"desc": "HD1080 50i",
"name": "1080i50",
"value": "16"
"value": "11"
},
{
"desc": "HD1080 59.94i",
"name": "1080i5994",
"value": "17"
"value": "12"
},
{
"desc": "HD1080 60i",
"name": "1080i60",
"value": "18"
"value": "13"
},
{
"desc": "HD1080 50p",
"name": "1080p50",
"value": "19"
"value": "14"
},
{
"desc": "HD1080 59.94p",
"name": "1080p5994",
"value": "20"
"value": "15"
},
{
"desc": "HD1080 60p",
"name": "1080p60",
"value": "21"
"value": "16"
},
{
"desc": "HD720 50p",
"name": "720p50",
"value": "22"
"value": "17"
},
{
"desc": "HD720 59.94p",
"name": "720p5994",
"value": "23"
"value": "18"
},
{
"desc": "HD720 60p",
"name": "720p60",
"value": "24"
"value": "19"
},
{
"desc": "2k 23.98p",
"name": "1556p2398",
"value": "25"
"value": "20"
},
{
"desc": "2k 24p",
"name": "1556p24",
"value": "26"
"value": "21"
},
{
"desc": "2k 25p",
"name": "1556p25",
"value": "27"
"value": "22"
},
{
"desc": "2k dci 23.98p",
"name": "2kdcip2398",
"value": "28"
"value": "23"
},
{
"desc": "2k dci 24p",
"name": "2kdcip24",
"value": "29"
"value": "24"
},
{
"desc": "2k dci 25p",
"name": "2kdcip25",
"value": "30"
"value": "25"
},
{
"desc": "2k dci 29.97p",
"name": "2kdcip2997",
"value": "31"
"value": "26"
},
{
"desc": "2k dci 30p",
"name": "2kdcip30",
"value": "32"
"value": "27"
},
{
"desc": "2k dci 50p",
"name": "2kdcip50",
"value": "33"
"value": "28"
},
{
"desc": "2k dci 59.94p",
"name": "2kdcip5994",
"value": "34"
"value": "29"
},
{
"desc": "2k dci 60p",
"name": "2kdcip60",
"value": "35"
"value": "30"
},
{
"desc": "4k 23.98p",
"name": "2160p2398",
"value": "36"
"value": "31"
},
{
"desc": "4k 24p",
"name": "2160p24",
"value": "37"
"value": "32"
},
{
"desc": "4k 25p",
"name": "2160p25",
"value": "38"
"value": "33"
},
{
"desc": "4k 29.97p",
"name": "2160p2997",
"value": "39"
"value": "34"
},
{
"desc": "4k 30p",
"name": "2160p30",
"value": "40"
"value": "35"
},
{
"desc": "4k 50p",
"name": "2160p50",
"value": "41"
"value": "36"
},
{
"desc": "4k 59.94p",
"name": "2160p5994",
"value": "42"
"value": "37"
},
{
"desc": "4k 60p",
"name": "2160p60",
"value": "38"
},
{
"desc": "NTSC SD 60i Widescreen",
"name": "ntsc-widescreen",
"value": "39"
},
{
"desc": "NTSC SD 60i Widescreen (24 fps)",
"name": "ntsc2398-widescreen",
"value": "40"
},
{
"desc": "PAL SD 50i Widescreen",
"name": "pal-widescreen",
"value": "41"
},
{
"desc": "NTSC SD 60p Widescreen",
"name": "ntsc-p-widescreen",
"value": "42"
},
{
"desc": "PAL SD 50p Widescreen",
"name": "pal-p-widescreen",
"value": "43"
}
]

View file

@ -48,12 +48,6 @@ gst_decklink_mode_get_type (void)
{GST_DECKLINK_MODE_NTSC_P, "NTSC SD 60p", "ntsc-p"},
{GST_DECKLINK_MODE_PAL_P, "PAL SD 50p", "pal-p"},
{GST_DECKLINK_MODE_NTSC_WIDESCREEN, "NTSC SD 60i Widescreen", "ntsc-widescreen"},
{GST_DECKLINK_MODE_NTSC2398_WIDESCREEN, "NTSC SD 60i Widescreen (24 fps)", "ntsc2398-widescreen"},
{GST_DECKLINK_MODE_PAL_WIDESCREEN, "PAL SD 50i Widescreen", "pal-widescreen"},
{GST_DECKLINK_MODE_NTSC_P_WIDESCREEN, "NTSC SD 60p Widescreen", "ntsc-p-widescreen"},
{GST_DECKLINK_MODE_PAL_P_WIDESCREEN, "PAL SD 50p Widescreen", "pal-p-widescreen"},
{GST_DECKLINK_MODE_1080p2398, "HD1080 23.98p", "1080p2398"},
{GST_DECKLINK_MODE_1080p24, "HD1080 24p", "1080p24"},
{GST_DECKLINK_MODE_1080p25, "HD1080 25p", "1080p25"},
@ -94,6 +88,12 @@ gst_decklink_mode_get_type (void)
{GST_DECKLINK_MODE_2160p5994, "4k 59.94p", "2160p5994"},
{GST_DECKLINK_MODE_2160p60, "4k 60p", "2160p60"},
{GST_DECKLINK_MODE_NTSC_WIDESCREEN, "NTSC SD 60i Widescreen", "ntsc-widescreen"},
{GST_DECKLINK_MODE_NTSC2398_WIDESCREEN, "NTSC SD 60i Widescreen (24 fps)", "ntsc2398-widescreen"},
{GST_DECKLINK_MODE_PAL_WIDESCREEN, "PAL SD 50i Widescreen", "pal-widescreen"},
{GST_DECKLINK_MODE_NTSC_P_WIDESCREEN, "NTSC SD 60p Widescreen", "ntsc-p-widescreen"},
{GST_DECKLINK_MODE_PAL_P_WIDESCREEN, "PAL SD 50p Widescreen", "pal-p-widescreen"},
{0, NULL, NULL}
};

View file

@ -64,12 +64,6 @@ typedef enum {
GST_DECKLINK_MODE_NTSC_P,
GST_DECKLINK_MODE_PAL_P,
GST_DECKLINK_MODE_NTSC_WIDESCREEN,
GST_DECKLINK_MODE_NTSC2398_WIDESCREEN,
GST_DECKLINK_MODE_PAL_WIDESCREEN,
GST_DECKLINK_MODE_NTSC_P_WIDESCREEN,
GST_DECKLINK_MODE_PAL_P_WIDESCREEN,
GST_DECKLINK_MODE_1080p2398,
GST_DECKLINK_MODE_1080p24,
GST_DECKLINK_MODE_1080p25,
@ -108,7 +102,13 @@ typedef enum {
GST_DECKLINK_MODE_2160p30,
GST_DECKLINK_MODE_2160p50,
GST_DECKLINK_MODE_2160p5994,
GST_DECKLINK_MODE_2160p60
GST_DECKLINK_MODE_2160p60,
GST_DECKLINK_MODE_NTSC_WIDESCREEN,
GST_DECKLINK_MODE_NTSC2398_WIDESCREEN,
GST_DECKLINK_MODE_PAL_WIDESCREEN,
GST_DECKLINK_MODE_NTSC_P_WIDESCREEN,
GST_DECKLINK_MODE_PAL_P_WIDESCREEN
} GstDecklinkModeEnum;
#define GST_TYPE_DECKLINK_MODE (gst_decklink_mode_get_type ())
GType gst_decklink_mode_get_type (void);

View file

@ -1089,7 +1089,7 @@ write_vbi (GstDecklinkVideoSink * self, GstBuffer * buffer,
/* See SMPTE 2016-3 Section 4 */
/* AFD and AR */
if (self->mode < (gint) GST_DECKLINK_MODE_NTSC_WIDESCREEN) {
if (self->mode <= (gint) GST_DECKLINK_MODE_PAL_P) {
afd_bar_data_ptr[0] = (afd << 3) | 0x0;
} else {
afd_bar_data_ptr[0] = (afd << 3) | 0x4;