mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
Don't disable quad modes on ch1 if a 12G UHD mode runs there
This commit is contained in:
parent
de8e5ed9f4
commit
083aa0bc86
1 changed files with 37 additions and 9 deletions
|
@ -491,15 +491,43 @@ static gboolean gst_aja_src_configure(GstAjaSrc *self) {
|
|||
|
||||
bool had_quad_enabled = false, had_quad_quad_enabled = false;
|
||||
|
||||
// HDMI can also be internally quad mode but it runs on a single channel.
|
||||
if (!(self->input_source >= GST_AJA_INPUT_SOURCE_HDMI1 &&
|
||||
self->input_source <= GST_AJA_INPUT_SOURCE_HDMI4)) {
|
||||
if (self->channel < ::NTV2_CHANNEL5) {
|
||||
self->device->device->GetQuadFrameEnable(had_quad_enabled, ::NTV2_CHANNEL1);
|
||||
self->device->device->GetQuadFrameEnable(had_quad_enabled,
|
||||
::NTV2_CHANNEL1);
|
||||
|
||||
// 12G UHD is also internally considered quad modes but they run on a
|
||||
// single channel.
|
||||
if (had_quad_enabled && ::NTV2DeviceCanDo12gRouting(self->device_id)) {
|
||||
NTV2VideoFormat fmt =
|
||||
self->device->device->GetInputVideoFormat(::NTV2_INPUTSOURCE_SDI1);
|
||||
if (fmt >= NTV2_FORMAT_FIRST_UHD_TSI_DEF_FORMAT &&
|
||||
fmt < NTV2_FORMAT_END_4K_TSI_DEF_FORMATS)
|
||||
had_quad_enabled = false;
|
||||
}
|
||||
|
||||
self->device->device->GetQuadQuadFrameEnable(had_quad_quad_enabled,
|
||||
::NTV2_CHANNEL1);
|
||||
} else {
|
||||
self->device->device->GetQuadFrameEnable(had_quad_enabled, ::NTV2_CHANNEL5);
|
||||
self->device->device->GetQuadFrameEnable(had_quad_enabled,
|
||||
::NTV2_CHANNEL5);
|
||||
|
||||
// 12G UHD is also internally considered quad modes but they run on a
|
||||
// single channel.
|
||||
if (had_quad_enabled && ::NTV2DeviceCanDo12gRouting(self->device_id)) {
|
||||
NTV2VideoFormat fmt =
|
||||
self->device->device->GetInputVideoFormat(::NTV2_INPUTSOURCE_SDI5);
|
||||
if (fmt >= NTV2_FORMAT_FIRST_UHD_TSI_DEF_FORMAT &&
|
||||
fmt < NTV2_FORMAT_END_4K_TSI_DEF_FORMATS)
|
||||
had_quad_enabled = false;
|
||||
}
|
||||
|
||||
self->device->device->GetQuadQuadFrameEnable(had_quad_quad_enabled,
|
||||
::NTV2_CHANNEL5);
|
||||
}
|
||||
}
|
||||
|
||||
// Stop any previously running quad mode, or other configurations on the
|
||||
// quad channels
|
||||
|
@ -708,7 +736,7 @@ static gboolean gst_aja_src_configure(GstAjaSrc *self) {
|
|||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
} else if (had_quad_enabled || had_quad_quad_enabled) {
|
||||
NTV2Channel quad_channel;
|
||||
|
||||
if (self->channel < ::NTV2_CHANNEL5)
|
||||
|
|
Loading…
Reference in a new issue