[FFmpeg-devel] [PATCH 17/35] avdevice/dshow: discover source color range/space/etc
Michael Niedermayer
michael at niedermayer.cc
Tue Jun 8 18:01:06 EEST 2021
On Tue, Jun 08, 2021 at 01:03:56AM +0200, Diederick Niehorster wrote:
> Enabled discovering a DirectShow device's color range, space, primaries, transfer characteristics and chroma location, if the device exposes that information. Sets them in the stream's codecpars.
>
> Signed-off-by: Diederick Niehorster <dcnieho at gmail.com>
> Co-authored-by: Valerii Zapodovnikov <val.zapod.vz at gmail.com>
> ---
> libavdevice/dshow.c | 231 +++++++++++++++++++++++++++++++++++++++++++-
> 1 file changed, 230 insertions(+), 1 deletion(-)
seems to break build on mingw64 here
CC libavdevice/dshow.o
src/libavdevice/dshow.c:58:44: error: unknown type name ‘DXVA_ExtendedFormat’
static enum AVColorRange dshow_color_range(DXVA_ExtendedFormat* fmt_info)
^~~~~~~~~~~~~~~~~~~
src/libavdevice/dshow.c:82:44: error: unknown type name ‘DXVA_ExtendedFormat’
static enum AVColorSpace dshow_color_space(DXVA_ExtendedFormat* fmt_info)
^~~~~~~~~~~~~~~~~~~
src/libavdevice/dshow.c:137:52: error: unknown type name ‘DXVA_ExtendedFormat’
static enum AVColorPrimaries dshow_color_primaries(DXVA_ExtendedFormat* fmt_info)
^~~~~~~~~~~~~~~~~~~
src/libavdevice/dshow.c:174:59: error: unknown type name ‘DXVA_ExtendedFormat’
static enum AVColorTransferCharacteristic dshow_color_trc(DXVA_ExtendedFormat* fmt_info)
^~~~~~~~~~~~~~~~~~~
src/libavdevice/dshow.c:229:47: error: unknown type name ‘DXVA_ExtendedFormat’
static enum AVChromaLocation dshow_chroma_loc(DXVA_ExtendedFormat* fmt_info)
^~~~~~~~~~~~~~~~~~~
src/libavdevice/dshow.c: In function ‘dshow_get_device_media_types’:
src/libavdevice/dshow.c:396:23: warning: unused variable ‘ctx’ [-Wunused-variable]
struct dshow_ctx *ctx = avctx->priv_data;
^~~
src/libavdevice/dshow.c: In function ‘dshow_get_device_list’:
src/libavdevice/dshow.c:643:23: warning: unused variable ‘ctx’ [-Wunused-variable]
struct dshow_ctx *ctx = avctx->priv_data;
^~~
src/libavdevice/dshow.c: In function ‘dshow_cycle_formats’:
src/libavdevice/dshow.c:712:13: error: unknown type name ‘DXVA_ExtendedFormat’
DXVA_ExtendedFormat *extended_format_info = NULL;
^~~~~~~~~~~~~~~~~~~
src/libavdevice/dshow.c:725:41: error: ‘AMCONTROL_COLORINFO_PRESENT’ undeclared (first use in this function)
if (v->dwControlFlags & AMCONTROL_COLORINFO_PRESENT)
^~~~~~~~~~~~~~~~~~~~~~~~~~~
src/libavdevice/dshow.c:725:41: note: each undeclared identifier is reported only once for each function it appears in
src/libavdevice/dshow.c:726:45: error: ‘DXVA_ExtendedFormat’ undeclared (first use in this function)
extended_format_info = (DXVA_ExtendedFormat*)&v->dwControlFlags;
^~~~~~~~~~~~~~~~~~~
src/libavdevice/dshow.c:726:65: error: expected expression before ‘)’ token
extended_format_info = (DXVA_ExtendedFormat*)&v->dwControlFlags;
^
src/libavdevice/dshow.c:749:51: error: implicit declaration of function ‘dshow_color_range’; did you mean ‘ff_color_frame’? [-Werror=implicit-function-declaration]
enum AVColorRange col_range = dshow_color_range(extended_format_info);
^~~~~~~~~~~~~~~~~
ff_color_frame
src/libavdevice/dshow.c:750:51: error: implicit declaration of function ‘dshow_color_space’; did you mean ‘ff_color_frame’? [-Werror=implicit-function-declaration]
enum AVColorSpace col_space = dshow_color_space(extended_format_info);
^~~~~~~~~~~~~~~~~
ff_color_frame
src/libavdevice/dshow.c:751:54: error: implicit declaration of function ‘dshow_color_primaries’; did you mean ‘dshow_cycle_formats’? [-Werror=implicit-function-declaration]
enum AVColorPrimaries col_prim = dshow_color_primaries(extended_format_info);
^~~~~~~~~~~~~~~~~~~~~
dshow_cycle_formats
src/libavdevice/dshow.c:752:66: error: implicit declaration of function ‘dshow_color_trc’ [-Werror=implicit-function-declaration]
enum AVColorTransferCharacteristic col_trc = dshow_color_trc(extended_format_info);
^~~~~~~~~~~~~~~
src/libavdevice/dshow.c:753:56: error: implicit declaration of function ‘dshow_chroma_loc’; did you mean ‘dshow_read_close’? [-Werror=implicit-function-declaration]
enum AVChromaLocation chroma_loc = dshow_chroma_loc(extended_format_info);
^~~~~~~~~~~~~~~~
dshow_read_close
src/libavdevice/dshow.c: In function ‘dshow_add_device’:
src/libavdevice/dshow.c:1455:9: error: unknown type name ‘DXVA_ExtendedFormat’
DXVA_ExtendedFormat* extended_format_info = NULL;
^~~~~~~~~~~~~~~~~~~
src/libavdevice/dshow.c:1465:37: error: ‘AMCONTROL_COLORINFO_PRESENT’ undeclared (first use in this function)
if (v->dwControlFlags & AMCONTROL_COLORINFO_PRESENT)
^~~~~~~~~~~~~~~~~~~~~~~~~~~
src/libavdevice/dshow.c:1466:41: error: ‘DXVA_ExtendedFormat’ undeclared (first use in this function)
extended_format_info = (DXVA_ExtendedFormat*)&v->dwControlFlags;
^~~~~~~~~~~~~~~~~~~
src/libavdevice/dshow.c:1466:61: error: expected expression before ‘)’ token
extended_format_info = (DXVA_ExtendedFormat*)&v->dwControlFlags;
^
cc1: some warnings being treated as errors
/home/michael/ffmpeg-git/ffmpeg/ffbuild/common.mak:67: recipe for target 'libavdevice/dshow.o' failed
make: *** [libavdevice/dshow.o] Error 1
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Good people do not need laws to tell them to act responsibly, while bad
people will find a way around the laws. -- Plato
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20210608/6906ed6f/attachment.sig>
More information about the ffmpeg-devel
mailing list