Skip to content

Commit

Permalink
avdevice/dshow: select format with extended color info
Browse files Browse the repository at this point in the history
Some DirectShow devices (Logitech C920 webcam) expose each DirectShow
format they support twice, once without and once with extended color
information. During format selection, both match, this patch ensures
that the format with extended color information is selected if it is
available, else it falls back to a matching format without such
information. This also necessitated a new code path taken for default
formats of a device (when user didn't request any specific video size,
etc), because the default format may be one without extended color
information when a twin with extended color information is also
available. Getting the extended color information when available is
important as it allows setting the color space, range, primaries,
transfer characteristics and chroma location of the stream provided by
dshow, enabling users to get more correct color automatically out of
their device.

Closes: #9271

Signed-off-by: Diederick Niehorster <[email protected]>
Reviewed-by: Roger Pack <[email protected]>
  • Loading branch information
dcnieho authored and GyanD committed Dec 24, 2021
1 parent dde92fb commit a1c4929
Showing 1 changed file with 340 additions and 131 deletions.
Loading

0 comments on commit a1c4929

Please sign in to comment.