Add support for 2/4/8k DCI modes

This commit is contained in:
Sebastian Dröge 2021-07-06 14:22:32 +03:00
parent 735768b905
commit 86920489f8
2 changed files with 112 additions and 0 deletions

View file

@ -69,10 +69,29 @@ static const FormatMapEntry format_map[] = {
NTV2_FORMAT_UNKNOWN}, NTV2_FORMAT_UNKNOWN},
{GST_AJA_VIDEO_FORMAT_1080p_6000_A, NTV2_FORMAT_1080p_6000_A, {GST_AJA_VIDEO_FORMAT_1080p_6000_A, NTV2_FORMAT_1080p_6000_A,
NTV2_FORMAT_UNKNOWN}, NTV2_FORMAT_UNKNOWN},
{GST_AJA_VIDEO_FORMAT_625_5000, NTV2_FORMAT_625_5000, NTV2_FORMAT_UNKNOWN}, {GST_AJA_VIDEO_FORMAT_625_5000, NTV2_FORMAT_625_5000, NTV2_FORMAT_UNKNOWN},
{GST_AJA_VIDEO_FORMAT_525_5994, NTV2_FORMAT_525_5994, NTV2_FORMAT_UNKNOWN}, {GST_AJA_VIDEO_FORMAT_525_5994, NTV2_FORMAT_525_5994, NTV2_FORMAT_UNKNOWN},
{GST_AJA_VIDEO_FORMAT_525_2398, NTV2_FORMAT_525_2398, NTV2_FORMAT_UNKNOWN}, {GST_AJA_VIDEO_FORMAT_525_2398, NTV2_FORMAT_525_2398, NTV2_FORMAT_UNKNOWN},
{GST_AJA_VIDEO_FORMAT_525_2400, NTV2_FORMAT_525_2400, NTV2_FORMAT_UNKNOWN}, {GST_AJA_VIDEO_FORMAT_525_2400, NTV2_FORMAT_525_2400, NTV2_FORMAT_UNKNOWN},
{GST_AJA_VIDEO_FORMAT_1080p_DCI_2398, NTV2_FORMAT_1080p_2K_2398,
NTV2_FORMAT_UNKNOWN},
{GST_AJA_VIDEO_FORMAT_1080p_DCI_2400, NTV2_FORMAT_1080p_2K_2400,
NTV2_FORMAT_UNKNOWN},
{GST_AJA_VIDEO_FORMAT_1080p_DCI_2500, NTV2_FORMAT_1080p_2K_2500,
NTV2_FORMAT_UNKNOWN},
{GST_AJA_VIDEO_FORMAT_1080p_DCI_2997, NTV2_FORMAT_1080p_2K_2997,
NTV2_FORMAT_UNKNOWN},
{GST_AJA_VIDEO_FORMAT_1080p_DCI_3000, NTV2_FORMAT_1080p_2K_3000,
NTV2_FORMAT_UNKNOWN},
{GST_AJA_VIDEO_FORMAT_1080p_DCI_5000_A, NTV2_FORMAT_1080p_2K_5000_A,
NTV2_FORMAT_UNKNOWN},
{GST_AJA_VIDEO_FORMAT_1080p_DCI_5994_A, NTV2_FORMAT_1080p_2K_5994_A,
NTV2_FORMAT_UNKNOWN},
{GST_AJA_VIDEO_FORMAT_1080p_DCI_6000_A, NTV2_FORMAT_1080p_2K_6000_A,
NTV2_FORMAT_UNKNOWN},
{GST_AJA_VIDEO_FORMAT_2160p_2398, NTV2_FORMAT_3840x2160p_2398, {GST_AJA_VIDEO_FORMAT_2160p_2398, NTV2_FORMAT_3840x2160p_2398,
NTV2_FORMAT_4x1920x1080p_2398}, NTV2_FORMAT_4x1920x1080p_2398},
{GST_AJA_VIDEO_FORMAT_2160p_2400, NTV2_FORMAT_3840x2160p_2400, {GST_AJA_VIDEO_FORMAT_2160p_2400, NTV2_FORMAT_3840x2160p_2400,
@ -89,6 +108,24 @@ static const FormatMapEntry format_map[] = {
NTV2_FORMAT_4x1920x1080p_5994}, NTV2_FORMAT_4x1920x1080p_5994},
{GST_AJA_VIDEO_FORMAT_2160p_6000, NTV2_FORMAT_3840x2160p_6000, {GST_AJA_VIDEO_FORMAT_2160p_6000, NTV2_FORMAT_3840x2160p_6000,
NTV2_FORMAT_4x1920x1080p_6000}, NTV2_FORMAT_4x1920x1080p_6000},
{GST_AJA_VIDEO_FORMAT_2160p_DCI_2398, NTV2_FORMAT_4096x2160p_2398,
NTV2_FORMAT_4x2048x1080p_2398},
{GST_AJA_VIDEO_FORMAT_2160p_DCI_2400, NTV2_FORMAT_4096x2160p_2400,
NTV2_FORMAT_4x2048x1080p_2400},
{GST_AJA_VIDEO_FORMAT_2160p_DCI_2500, NTV2_FORMAT_4096x2160p_2500,
NTV2_FORMAT_4x2048x1080p_2500},
{GST_AJA_VIDEO_FORMAT_2160p_DCI_2997, NTV2_FORMAT_4096x2160p_2997,
NTV2_FORMAT_4x2048x1080p_2997},
{GST_AJA_VIDEO_FORMAT_2160p_DCI_3000, NTV2_FORMAT_4096x2160p_3000,
NTV2_FORMAT_4x2048x1080p_3000},
{GST_AJA_VIDEO_FORMAT_2160p_DCI_5000, NTV2_FORMAT_4096x2160p_5000,
NTV2_FORMAT_4x2048x1080p_5000},
{GST_AJA_VIDEO_FORMAT_2160p_DCI_5994, NTV2_FORMAT_4096x2160p_5994,
NTV2_FORMAT_4x2048x1080p_5994},
{GST_AJA_VIDEO_FORMAT_2160p_DCI_6000, NTV2_FORMAT_4096x2160p_6000,
NTV2_FORMAT_4x2048x1080p_6000},
{GST_AJA_VIDEO_FORMAT_4320p_2398, NTV2_FORMAT_UNKNOWN, {GST_AJA_VIDEO_FORMAT_4320p_2398, NTV2_FORMAT_UNKNOWN,
NTV2_FORMAT_4x3840x2160p_2398}, NTV2_FORMAT_4x3840x2160p_2398},
{GST_AJA_VIDEO_FORMAT_4320p_2400, NTV2_FORMAT_UNKNOWN, {GST_AJA_VIDEO_FORMAT_4320p_2400, NTV2_FORMAT_UNKNOWN,
@ -105,6 +142,23 @@ static const FormatMapEntry format_map[] = {
NTV2_FORMAT_4x3840x2160p_5994}, NTV2_FORMAT_4x3840x2160p_5994},
{GST_AJA_VIDEO_FORMAT_4320p_6000, NTV2_FORMAT_UNKNOWN, {GST_AJA_VIDEO_FORMAT_4320p_6000, NTV2_FORMAT_UNKNOWN,
NTV2_FORMAT_4x3840x2160p_6000}, NTV2_FORMAT_4x3840x2160p_6000},
{GST_AJA_VIDEO_FORMAT_4320p_DCI_2398, NTV2_FORMAT_UNKNOWN,
NTV2_FORMAT_4x4096x2160p_2398},
{GST_AJA_VIDEO_FORMAT_4320p_DCI_2400, NTV2_FORMAT_UNKNOWN,
NTV2_FORMAT_4x4096x2160p_2400},
{GST_AJA_VIDEO_FORMAT_4320p_DCI_2500, NTV2_FORMAT_UNKNOWN,
NTV2_FORMAT_4x4096x2160p_2500},
{GST_AJA_VIDEO_FORMAT_4320p_DCI_2997, NTV2_FORMAT_UNKNOWN,
NTV2_FORMAT_4x4096x2160p_2997},
{GST_AJA_VIDEO_FORMAT_4320p_DCI_3000, NTV2_FORMAT_UNKNOWN,
NTV2_FORMAT_4x4096x2160p_3000},
{GST_AJA_VIDEO_FORMAT_4320p_DCI_5000, NTV2_FORMAT_UNKNOWN,
NTV2_FORMAT_4x4096x2160p_5000},
{GST_AJA_VIDEO_FORMAT_4320p_DCI_5994, NTV2_FORMAT_UNKNOWN,
NTV2_FORMAT_4x4096x2160p_5994},
{GST_AJA_VIDEO_FORMAT_4320p_DCI_6000, NTV2_FORMAT_UNKNOWN,
NTV2_FORMAT_4x4096x2160p_6000},
}; };
GstCaps *gst_ntv2_supported_caps(NTV2DeviceID device_id) { GstCaps *gst_ntv2_supported_caps(NTV2DeviceID device_id) {
@ -735,10 +789,24 @@ GType gst_aja_video_format_get_type(void) {
{GST_AJA_VIDEO_FORMAT_1080p_5000_A, "1080p-5000-a", "1080p 5000 A"}, {GST_AJA_VIDEO_FORMAT_1080p_5000_A, "1080p-5000-a", "1080p 5000 A"},
{GST_AJA_VIDEO_FORMAT_1080p_5994_A, "1080p-5994-a", "1080p 5994 A"}, {GST_AJA_VIDEO_FORMAT_1080p_5994_A, "1080p-5994-a", "1080p 5994 A"},
{GST_AJA_VIDEO_FORMAT_1080p_6000_A, "1080p-6000-a", "1080p 6000 A"}, {GST_AJA_VIDEO_FORMAT_1080p_6000_A, "1080p-6000-a", "1080p 6000 A"},
{GST_AJA_VIDEO_FORMAT_625_5000, "625-5000", "625 5000"}, {GST_AJA_VIDEO_FORMAT_625_5000, "625-5000", "625 5000"},
{GST_AJA_VIDEO_FORMAT_525_5994, "525-5994", "525 5994"}, {GST_AJA_VIDEO_FORMAT_525_5994, "525-5994", "525 5994"},
{GST_AJA_VIDEO_FORMAT_525_2398, "525-2398", "525 2398"}, {GST_AJA_VIDEO_FORMAT_525_2398, "525-2398", "525 2398"},
{GST_AJA_VIDEO_FORMAT_525_2400, "525-2400", "525 2400"}, {GST_AJA_VIDEO_FORMAT_525_2400, "525-2400", "525 2400"},
{GST_AJA_VIDEO_FORMAT_1080p_DCI_2398, "1080p-dci-2398", "1080p DCI 2398"},
{GST_AJA_VIDEO_FORMAT_1080p_DCI_2400, "1080p-dci-2400", "1080p DCI 2400"},
{GST_AJA_VIDEO_FORMAT_1080p_DCI_2500, "1080p-dci-2500", "1080p DCI 2500"},
{GST_AJA_VIDEO_FORMAT_1080p_DCI_2997, "1080p-dci-2997", "1080p DCI 2997"},
{GST_AJA_VIDEO_FORMAT_1080p_DCI_3000, "1080p-dci-3000", "1080p DCI 3000"},
{GST_AJA_VIDEO_FORMAT_1080p_DCI_5000_A, "1080p-dci-5000-a",
"1080p DCI 5000 A"},
{GST_AJA_VIDEO_FORMAT_1080p_DCI_5994_A, "1080p-dci-5994-a",
"1080p DCI 5994 A"},
{GST_AJA_VIDEO_FORMAT_1080p_DCI_6000_A, "1080p-dci-6000-a",
"1080p DCI 6000 A"},
{GST_AJA_VIDEO_FORMAT_2160p_2398, "2160p-2398", "2160p 2398"}, {GST_AJA_VIDEO_FORMAT_2160p_2398, "2160p-2398", "2160p 2398"},
{GST_AJA_VIDEO_FORMAT_2160p_2400, "2160p-2400", "2160p 2400"}, {GST_AJA_VIDEO_FORMAT_2160p_2400, "2160p-2400", "2160p 2400"},
{GST_AJA_VIDEO_FORMAT_2160p_2500, "2160p-2500", "2160p 2500"}, {GST_AJA_VIDEO_FORMAT_2160p_2500, "2160p-2500", "2160p 2500"},
@ -747,6 +815,16 @@ GType gst_aja_video_format_get_type(void) {
{GST_AJA_VIDEO_FORMAT_2160p_5000, "2160p-5000", "2160p 5000"}, {GST_AJA_VIDEO_FORMAT_2160p_5000, "2160p-5000", "2160p 5000"},
{GST_AJA_VIDEO_FORMAT_2160p_5994, "2160p-5994", "2160p 5994"}, {GST_AJA_VIDEO_FORMAT_2160p_5994, "2160p-5994", "2160p 5994"},
{GST_AJA_VIDEO_FORMAT_2160p_6000, "2160p-6000", "2160p 6000"}, {GST_AJA_VIDEO_FORMAT_2160p_6000, "2160p-6000", "2160p 6000"},
{GST_AJA_VIDEO_FORMAT_2160p_DCI_2398, "2160p-dci-2398", "2160p DCI 2398"},
{GST_AJA_VIDEO_FORMAT_2160p_DCI_2400, "2160p-dci-2400", "2160p DCI 2400"},
{GST_AJA_VIDEO_FORMAT_2160p_DCI_2500, "2160p-dci-2500", "2160p DCI 2500"},
{GST_AJA_VIDEO_FORMAT_2160p_DCI_2997, "2160p-dci-2997", "2160p DCI 2997"},
{GST_AJA_VIDEO_FORMAT_2160p_DCI_3000, "2160p-dci-3000", "2160p DCI 3000"},
{GST_AJA_VIDEO_FORMAT_2160p_DCI_5000, "2160p-dci-5000", "2160p DCI 5000"},
{GST_AJA_VIDEO_FORMAT_2160p_DCI_5994, "2160p-dci-5994", "2160p DCI 5994"},
{GST_AJA_VIDEO_FORMAT_2160p_DCI_6000, "2160p-dci-6000", "2160p DCI 6000"},
{GST_AJA_VIDEO_FORMAT_4320p_2398, "4320p-2398", "4320p 2398"}, {GST_AJA_VIDEO_FORMAT_4320p_2398, "4320p-2398", "4320p 2398"},
{GST_AJA_VIDEO_FORMAT_4320p_2400, "4320p-2400", "4320p 2400"}, {GST_AJA_VIDEO_FORMAT_4320p_2400, "4320p-2400", "4320p 2400"},
{GST_AJA_VIDEO_FORMAT_4320p_2500, "4320p-2500", "4320p 2500"}, {GST_AJA_VIDEO_FORMAT_4320p_2500, "4320p-2500", "4320p 2500"},
@ -755,6 +833,16 @@ GType gst_aja_video_format_get_type(void) {
{GST_AJA_VIDEO_FORMAT_4320p_5000, "4320p-5000", "4320p 5000"}, {GST_AJA_VIDEO_FORMAT_4320p_5000, "4320p-5000", "4320p 5000"},
{GST_AJA_VIDEO_FORMAT_4320p_5994, "4320p-5994", "4320p 5994"}, {GST_AJA_VIDEO_FORMAT_4320p_5994, "4320p-5994", "4320p 5994"},
{GST_AJA_VIDEO_FORMAT_4320p_6000, "4320p-6000", "4320p 6000"}, {GST_AJA_VIDEO_FORMAT_4320p_6000, "4320p-6000", "4320p 6000"},
{GST_AJA_VIDEO_FORMAT_4320p_DCI_2398, "4320p-dci-2398", "4320p DCI 2398"},
{GST_AJA_VIDEO_FORMAT_4320p_DCI_2400, "4320p-dci-2400", "4320p DCI 2400"},
{GST_AJA_VIDEO_FORMAT_4320p_DCI_2500, "4320p-dci-2500", "4320p DCI 2500"},
{GST_AJA_VIDEO_FORMAT_4320p_DCI_2997, "4320p-dci-2997", "4320p DCI 2997"},
{GST_AJA_VIDEO_FORMAT_4320p_DCI_3000, "4320p-dci-3000", "4320p DCI 3000"},
{GST_AJA_VIDEO_FORMAT_4320p_DCI_5000, "4320p-dci-5000", "4320p DCI 5000"},
{GST_AJA_VIDEO_FORMAT_4320p_DCI_5994, "4320p-dci-5994", "4320p DCI 5994"},
{GST_AJA_VIDEO_FORMAT_4320p_DCI_6000, "4320p-dci-6000", "4320p DCI 6000"},
{0, NULL, NULL}}; {0, NULL, NULL}};
if (g_once_init_enter(&id)) { if (g_once_init_enter(&id)) {

View file

@ -203,6 +203,14 @@ typedef enum {
GST_AJA_VIDEO_FORMAT_525_5994, GST_AJA_VIDEO_FORMAT_525_5994,
GST_AJA_VIDEO_FORMAT_525_2398, GST_AJA_VIDEO_FORMAT_525_2398,
GST_AJA_VIDEO_FORMAT_525_2400, GST_AJA_VIDEO_FORMAT_525_2400,
GST_AJA_VIDEO_FORMAT_1080p_DCI_2398,
GST_AJA_VIDEO_FORMAT_1080p_DCI_2400,
GST_AJA_VIDEO_FORMAT_1080p_DCI_2500,
GST_AJA_VIDEO_FORMAT_1080p_DCI_2997,
GST_AJA_VIDEO_FORMAT_1080p_DCI_3000,
GST_AJA_VIDEO_FORMAT_1080p_DCI_5000_A,
GST_AJA_VIDEO_FORMAT_1080p_DCI_5994_A,
GST_AJA_VIDEO_FORMAT_1080p_DCI_6000_A,
GST_AJA_VIDEO_FORMAT_2160p_2398, GST_AJA_VIDEO_FORMAT_2160p_2398,
GST_AJA_VIDEO_FORMAT_2160p_2400, GST_AJA_VIDEO_FORMAT_2160p_2400,
GST_AJA_VIDEO_FORMAT_2160p_2500, GST_AJA_VIDEO_FORMAT_2160p_2500,
@ -211,6 +219,14 @@ typedef enum {
GST_AJA_VIDEO_FORMAT_2160p_5000, GST_AJA_VIDEO_FORMAT_2160p_5000,
GST_AJA_VIDEO_FORMAT_2160p_5994, GST_AJA_VIDEO_FORMAT_2160p_5994,
GST_AJA_VIDEO_FORMAT_2160p_6000, GST_AJA_VIDEO_FORMAT_2160p_6000,
GST_AJA_VIDEO_FORMAT_2160p_DCI_2398,
GST_AJA_VIDEO_FORMAT_2160p_DCI_2400,
GST_AJA_VIDEO_FORMAT_2160p_DCI_2500,
GST_AJA_VIDEO_FORMAT_2160p_DCI_2997,
GST_AJA_VIDEO_FORMAT_2160p_DCI_3000,
GST_AJA_VIDEO_FORMAT_2160p_DCI_5000,
GST_AJA_VIDEO_FORMAT_2160p_DCI_5994,
GST_AJA_VIDEO_FORMAT_2160p_DCI_6000,
GST_AJA_VIDEO_FORMAT_4320p_2398, GST_AJA_VIDEO_FORMAT_4320p_2398,
GST_AJA_VIDEO_FORMAT_4320p_2400, GST_AJA_VIDEO_FORMAT_4320p_2400,
GST_AJA_VIDEO_FORMAT_4320p_2500, GST_AJA_VIDEO_FORMAT_4320p_2500,
@ -219,6 +235,14 @@ typedef enum {
GST_AJA_VIDEO_FORMAT_4320p_5000, GST_AJA_VIDEO_FORMAT_4320p_5000,
GST_AJA_VIDEO_FORMAT_4320p_5994, GST_AJA_VIDEO_FORMAT_4320p_5994,
GST_AJA_VIDEO_FORMAT_4320p_6000, GST_AJA_VIDEO_FORMAT_4320p_6000,
GST_AJA_VIDEO_FORMAT_4320p_DCI_2398,
GST_AJA_VIDEO_FORMAT_4320p_DCI_2400,
GST_AJA_VIDEO_FORMAT_4320p_DCI_2500,
GST_AJA_VIDEO_FORMAT_4320p_DCI_2997,
GST_AJA_VIDEO_FORMAT_4320p_DCI_3000,
GST_AJA_VIDEO_FORMAT_4320p_DCI_5000,
GST_AJA_VIDEO_FORMAT_4320p_DCI_5994,
GST_AJA_VIDEO_FORMAT_4320p_DCI_6000,
} GstAjaVideoFormat; } GstAjaVideoFormat;
#define GST_TYPE_AJA_VIDEO_FORMAT (gst_aja_video_format_get_type()) #define GST_TYPE_AJA_VIDEO_FORMAT (gst_aja_video_format_get_type())