[FFmpeg-devel] [PATCH v2 17/33] avdevice/dshow: discover source color range/space/etc

Diederick C. Niehorster dcnieho at gmail.com
Wed Jun 16 01:15:07 EEST 2021


On Tue, Jun 15, 2021 at 10:18 AM Michael Niedermayer
<michael at niedermayer.cc> wrote:
>
> On Mon, Jun 14, 2021 at 02:50:32PM -0300, James Almer wrote:
> > On 6/14/2021 1:56 PM, Michael Niedermayer wrote:
> > > On Fri, Jun 11, 2021 at 10:30:48PM +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>
> > > > Signed-off-by: Diederick Niehorster <dcnieho at gmail.com>
> > > > ---
> > > >   libavdevice/dshow.c | 250 +++++++++++++++++++++++++++++++++++++++++++-
> > > >   1 file changed, 249 insertions(+), 1 deletion(-)
> > >
> > > breaks build on mingw64
> > >
> > > make
> > > CC  libavdevice/dshow.o
> > > src/libavdevice/dshow.c: In function ‘dshow_get_device_media_types’:
> > > src/libavdevice/dshow.c:415: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:662: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:731:13: error: unknown type name ‘DXVA_ExtendedFormat’; did you mean ‘DXVA2_ExtendedFormat’?
> > >               DXVA_ExtendedFormat *extended_format_info = NULL;
> > >               ^~~~~~~~~~~~~~~~~~~
> > >               DXVA2_ExtendedFormat
> > > src/libavdevice/dshow.c:744:41: error: ‘AMCONTROL_COLORINFO_PRESENT’ undeclared (first use in this function)
> > >                   if (v->dwControlFlags & AMCONTROL_COLORINFO_PRESENT)
> > >                                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~
> >
> > $ grep -r AMCONTROL_COLORINFO_PRESENT /mingw64/x86_64-w64-mingw32/include/*
> > /mingw64/x86_64-w64-mingw32/include/dvdmedia.h:#define
> > AMCONTROL_COLORINFO_PRESENT 0x00000080
> >
> > Can you see if you can update your mingw-w64 toolchain, or at least the
> > headers/crt? This is not the first time you get an error with new code.
> > Old mingw headers releases lacked a lot of API and are not representative of
> > what a sane toolchain is meant to have.
>
> Assuming that ubuntu didnt fail to update its mingw installation on OS update
> This is a standard installation for mingw64 from 18.04 LTS packages
>
> I think you are missing my point here as you are asking me to upgrade.
> What would i achieve by upgrading ?
> Isnt that equivalent of not testing build with ubuntu 18 LTS anymore ?
>
> I think testing does make sense unless you belive theres something funky wrong
> with my setup?
> And if you want to drop support for some specific versions of platforms, question
> would be which platforms would that affect and it would require a test in
> configure not failure to build in a random source file. The later can be a pain
> for novice users.

Looks like i missed some DXVA_... ones, and i didn't know
AMCONTROL_COLORINFO_PRESENT was also an issue. I will try to set up a
mingw (instead of msvc that i am using) build environment. But i'll
fix this in any case for the next version of patches (will be later,
in waiting for reviews of other bits). On patchworks everything built
correctly by the way, is that not using MinGW?

All the best,
Dee


More information about the ffmpeg-devel mailing list