Streamline VANC/geometry/standard configuration between source and sink

This shouldn't have any effect but makes the configuration the same on
both sides.
This commit is contained in:
Sebastian Dröge 2021-03-05 21:50:22 +02:00
parent 195ffb2101
commit 8075fe577c
2 changed files with 24 additions and 7 deletions

View file

@ -811,14 +811,14 @@ static gboolean gst_aja_sink_set_caps(GstBaseSink *bsink, GstCaps *caps) {
self->vanc_mode =
::HasVANCGeometries(geometry) ? vanc_mode : ::NTV2_VANCMODE_OFF;
if (self->vanc_mode == ::NTV2_VANCMODE_OFF) {
self->device->device->SetVANCMode(self->vanc_mode, standard, geometry,
self->channel);
self->device->device->SetFrameGeometry(geometry, false, self->channel);
self->device->device->SetVANCMode(self->vanc_mode, self->channel);
} else {
const NTV2FrameGeometry vanc_geometry =
::GetVANCFrameGeometry(geometry, self->vanc_mode);
self->device->device->SetVANCMode(self->vanc_mode, standard, vanc_geometry,
self->channel);
self->device->device->SetFrameGeometry(vanc_geometry, false, self->channel);
self->device->device->SetVANCMode(self->vanc_mode, self->channel);
}
NTV2SmpteLineNumber smpte_line_num_info = ::GetSmpteLineNumber(standard);

View file

@ -587,9 +587,26 @@ static gboolean gst_aja_src_start(GstAjaSrc *self) {
self->configured_input_source = input_source;
self->vanc_mode = vanc_mode;
self->device->device->SetEnableVANCData(NTV2_IS_VANCMODE_TALL(vanc_mode),
NTV2_IS_VANCMODE_TALLER(vanc_mode),
self->channel);
const NTV2Standard standard(
::GetNTV2StandardFromVideoFormat(self->video_format));
self->device->device->SetStandard(standard, self->channel);
const NTV2FrameGeometry geometry =
::GetNTV2FrameGeometryFromVideoFormat(self->video_format);
self->vanc_mode =
::HasVANCGeometries(geometry) ? vanc_mode : ::NTV2_VANCMODE_OFF;
if (self->vanc_mode == ::NTV2_VANCMODE_OFF) {
self->device->device->SetFrameGeometry(geometry, false, self->channel);
self->device->device->SetVANCMode(self->vanc_mode, self->channel);
} else {
const NTV2FrameGeometry vanc_geometry =
::GetVANCFrameGeometry(geometry, self->vanc_mode);
self->device->device->SetFrameGeometry(vanc_geometry, false,
self->channel);
self->device->device->SetVANCMode(self->vanc_mode, self->channel);
}
CNTV2SignalRouter router;