mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
decklink: Auto-detect 10-bit YUV
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2892>
This commit is contained in:
parent
356a0ce8f4
commit
0c42c4801c
1 changed files with 11 additions and 8 deletions
|
@ -1090,17 +1090,20 @@ public:
|
||||||
VideoInputFormatChanged (BMDVideoInputFormatChangedEvents,
|
VideoInputFormatChanged (BMDVideoInputFormatChangedEvents,
|
||||||
IDeckLinkDisplayMode * mode, BMDDetectedVideoInputFormatFlags formatFlags)
|
IDeckLinkDisplayMode * mode, BMDDetectedVideoInputFormatFlags formatFlags)
|
||||||
{
|
{
|
||||||
BMDPixelFormat pixelFormat;
|
/* use the user-set format, defaulting to 8BitYUV */
|
||||||
|
BMDPixelFormat pixelFormat = m_input->format;
|
||||||
|
|
||||||
GST_INFO ("Video input format changed");
|
GST_INFO ("Video input format changed");
|
||||||
|
|
||||||
if ((formatFlags & bmdDetectedVideoInputRGB444)
|
if (m_input->format == bmdFormat8BitYUV) {
|
||||||
&& m_input->format == bmdFormat8BitYUV) {
|
/* user-set format was auto or 8BitYUV */
|
||||||
/* user-set format was auto or 8BitYUV, change to RGB */
|
if (formatFlags & bmdDetectedVideoInputRGB444) {
|
||||||
pixelFormat = bmdFormat8BitARGB;
|
pixelFormat = bmdFormat8BitARGB;
|
||||||
} else {
|
} else if (formatFlags & bmdDetectedVideoInputYCbCr422) {
|
||||||
/* use the user-set format, defaulting to 8BitYUV */
|
if (formatFlags & bmdDetectedVideoInput10BitDepth) {
|
||||||
pixelFormat = m_input->format;
|
pixelFormat = bmdFormat10BitYUV;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
g_mutex_lock (&m_input->lock);
|
g_mutex_lock (&m_input->lock);
|
||||||
|
|
Loading…
Reference in a new issue