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.
This commit is contained in:
Sebastian Dröge 2020-01-08 07:42:21 +02:00
parent 04c5a550ad
commit e4389146d9

View file

@ -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;