[FFmpeg-devel] [PATCH v3 1/1] avcodec: implemented Media Foundation encoder wrapper

Paweł Wegner pawel.wegner95 at gmail.com
Tue Nov 13 10:50:17 EET 2018


On Tue, Nov 13, 2018 at 12:39 AM Michael Niedermayer <michael at niedermayer.cc>
wrote:

> On Mon, Nov 12, 2018 at 02:42:36PM +0100, Paweł Wegner wrote:
> > Implemented the following encoders:
> > * ff_h264_mf_encoder
> > * ff_hevc_mf_encoder
> > * ff_aac_mf_encoder
> > * ff_ac3_mf_encoder
> > * ff_mp3_mf_encoder
> >
> > The code is based on the PLEX's FFmpeg fork which can be found here:
> > https://files.plexapp.com/elan/ffmpeg/plex-ffmpeg-2017-12-17.txz
> >
> > Signed-off-by: Paweł Wegner <pawel.wegner95 at gmail.com>
> > ---
> >  configure              |   11 +
> >  libavcodec/Makefile    |    1 +
> >  libavcodec/allcodecs.c |    5 +
> >  libavcodec/mf_utils.c  |  734 ++++++++++++++++++++++++
> >  libavcodec/mf_utils.h  |  207 +++++++
> >  libavcodec/mfenc.c     | 1242 ++++++++++++++++++++++++++++++++++++++++
> >  6 files changed, 2200 insertions(+)
> >  create mode 100644 libavcodec/mf_utils.c
> >  create mode 100644 libavcodec/mf_utils.h
> >  create mode 100644 libavcodec/mfenc.c
>
> breaks build for mingw64


> CC      libavcodec/mf_utils.o
> In file included from /usr/share/mingw-w64/include/wmcodecdsp.h:613:0,
>                  from src/libavcodec/mf_utils.h:26,
>                  from src/libavcodec/mf_utils.c:24:
> /usr/share/mingw-w64/include/strmif.h:15380:2: warning: #warning COM
> interfaces layout in this header has not been verified. [-Wcpp]
>  #warning COM interfaces layout in this header has not been verified.
>   ^
> /usr/share/mingw-w64/include/strmif.h:15381:2: warning: #warning COM
> interfaces with incorrect layout may not work at all. [-Wcpp]
>  #warning COM interfaces with incorrect layout may not work at all.
>   ^
> /usr/share/mingw-w64/include/strmif.h:15410:2: warning: #warning COM
> interfaces layout in this header has not been verified. [-Wcpp]
>  #warning COM interfaces layout in this header has not been verified.
>   ^
> /usr/share/mingw-w64/include/strmif.h:15411:2: warning: #warning COM
> interfaces with incorrect layout may not work at all. [-Wcpp]
>  #warning COM interfaces with incorrect layout may not work at all.
>   ^
>
I can silence these warnings by doing #undef __GNU_C__ before the MF
inclusion; but would that really be better?
This is where this comes from:
https://github.com/Alexpux/mingw-w64/blob/master/mingw-w64-headers/include/mfplay.h#L59


> In file included from /usr/share/mingw-w64/include/wmcodecdsp.h:613:0,
>                  from src/libavcodec/mf_utils.h:26,
>                  from src/libavcodec/mf_utils.c:24:
> /usr/share/mingw-w64/include/strmif.h:15382:9: note: #pragma message:
> Interface IAMAsyncReaderTimestampScaling has unverified layout.
>  __MINGW_BROKEN_INTERFACE(INTERFACE)
> ...
>
This one comes from mingw as well; and can be worked around the same way.

>
> [...]
> --
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> Rewriting code that is poorly written but fully understood is good.
> Rewriting code that one doesnt understand is a sign that one is less smart
> then the original author, trying to rewrite it will not make it better.
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>


More information about the ffmpeg-devel mailing list