From e4389146d9cf32a25998d352d351b3b71e13231b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Wed, 8 Jan 2020 07:42:21 +0200 Subject: [PATCH] decklinkvideosink: Always configure 10 bit YUV for VANC frames If 8 bit are required by the device/mode then it will be converted internally by the SDK, but the SDK won't automatically convert from 8 to 10 bit. As such, always use 10 bit VANC. Some devices require configuring also a 10 bit video format when using 10 bit VANC is required but those would fail regardless and the application would have to configure the correct video format. With newer versions of the SDK this information can be retrieved via the BMDDeckLinkVANCRequires10BitYUVVideoFrames flag but we don't use a new enough SDK version yet to extract this information. --- sys/decklink/gstdecklinkvideosink.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/decklink/gstdecklinkvideosink.cpp b/sys/decklink/gstdecklinkvideosink.cpp index 5ddbe0a2a5..0061a2dedc 100644 --- a/sys/decklink/gstdecklinkvideosink.cpp +++ b/sys/decklink/gstdecklinkvideosink.cpp @@ -916,8 +916,8 @@ write_vbi (GstDecklinkVideoSink * self, GstBuffer * buffer, if (self->vbiencoder == NULL) { self->vbiencoder = - gst_video_vbi_encoder_new (self->info.finfo->format, self->info.width); - self->anc_vformat = self->info.finfo->format; + gst_video_vbi_encoder_new (GST_VIDEO_FORMAT_v210, self->info.width); + self->anc_vformat = GST_VIDEO_FORMAT_v210; } /* Put any closed captions into the configured line */ @@ -1012,7 +1012,7 @@ write_vbi (GstDecklinkVideoSink * self, GstBuffer * buffer, } if ((got_captions || self->afd_bar_line != 0) - && self->output->output->CreateAncillaryData (format, + && self->output->output->CreateAncillaryData (bmdFormat10BitYUV, &vanc_frame) == S_OK) { GstVideoAFDMeta *afd_meta = NULL, *afd_meta2 = NULL; GstVideoBarMeta *bar_meta = NULL, *bar_meta2 = NULL;