mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 18:21:04 +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,14 +491,42 @@ static gboolean gst_aja_src_configure(GstAjaSrc *self) {
|
||||||
|
|
||||||
bool had_quad_enabled = false, had_quad_quad_enabled = false;
|
bool had_quad_enabled = false, had_quad_quad_enabled = false;
|
||||||
|
|
||||||
if (self->channel < ::NTV2_CHANNEL5) {
|
// HDMI can also be internally quad mode but it runs on a single channel.
|
||||||
self->device->device->GetQuadFrameEnable(had_quad_enabled, ::NTV2_CHANNEL1);
|
if (!(self->input_source >= GST_AJA_INPUT_SOURCE_HDMI1 &&
|
||||||
self->device->device->GetQuadQuadFrameEnable(had_quad_quad_enabled,
|
self->input_source <= GST_AJA_INPUT_SOURCE_HDMI4)) {
|
||||||
::NTV2_CHANNEL1);
|
if (self->channel < ::NTV2_CHANNEL5) {
|
||||||
} else {
|
self->device->device->GetQuadFrameEnable(had_quad_enabled,
|
||||||
self->device->device->GetQuadFrameEnable(had_quad_enabled, ::NTV2_CHANNEL5);
|
::NTV2_CHANNEL1);
|
||||||
self->device->device->GetQuadQuadFrameEnable(had_quad_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_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);
|
||||||
|
|
||||||
|
// 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
|
// Stop any previously running quad mode, or other configurations on the
|
||||||
|
@ -708,7 +736,7 @@ static gboolean gst_aja_src_configure(GstAjaSrc *self) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else if (had_quad_enabled || had_quad_quad_enabled) {
|
||||||
NTV2Channel quad_channel;
|
NTV2Channel quad_channel;
|
||||||
|
|
||||||
if (self->channel < ::NTV2_CHANNEL5)
|
if (self->channel < ::NTV2_CHANNEL5)
|
||||||
|
|
Loading…
Reference in a new issue