mfvideosrc: Select common formats if both VideoPreview and VideoRecord are available
authorSeungha Yang <seungha@centricular.com>
Fri, 31 Jul 2020 17:19:07 +0000 (02:19 +0900)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Sat, 1 Aug 2020 15:17:05 +0000 (15:17 +0000)
commit4986b0dd34e957d2422c342e61869442eb5bc5aa
tree139bd0ff0939b2e4f776fc3349c495be3e192ec4
parent479a67c1b7b98a58d9b832637459bff715e0f4da
mfvideosrc: Select common formats if both VideoPreview and VideoRecord are available

Some devices (e.g., Surface Book 2, Surface Pro X) will expose
both MediaStreamType_VideoPreview and MediaStreamType_VideoRecord types
for a logical device. And for some reason, MediaStreamType_VideoPreview
seems to be selected between them while initiailzing device.
But I cannot find any documentation for the decision rule.
To be safe, we will select common formats between them.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1478>
sys/mediafoundation/gstmfcapturewinrt.cpp
sys/mediafoundation/mediacapturewrapper.cpp
sys/mediafoundation/mediacapturewrapper.h