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

2018-11-14 Thread Paweł Wegner
On Tue, Nov 13, 2018 at 6:52 PM Michael Niedermayer 
wrote:

> On Tue, Nov 13, 2018 at 12:23:42PM +0100, Paweł Wegner wrote:
> > On Tue, Nov 13, 2018 at 11:40 AM Michael Niedermayer
> 
> > wrote:
> >
> > > On Tue, Nov 13, 2018 at 09:50:17AM +0100, Paweł Wegner wrote:
> > > > On Tue, Nov 13, 2018 at 12:39 AM Michael Niedermayer
> > > 
> > > > 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 
> > > > > > ---
> > > > > >  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.
> > >
> > > sorry i have cut the compiler output incorrectly
> > > heres the full output, there are multiple real errors, not just
> warnings:
> > >
> > >
> > >
> > > 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.
> > >   ^
> > > In file included from /usr/share/mingw-w64/include/wmcodecdsp.h:613:0,
> > >  from src/libavcodec/mf_utils.h:26,
> > >  from 

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

2018-11-13 Thread Michael Niedermayer
On Tue, Nov 13, 2018 at 12:23:42PM +0100, Paweł Wegner wrote:
> On Tue, Nov 13, 2018 at 11:40 AM Michael Niedermayer 
> wrote:
> 
> > On Tue, Nov 13, 2018 at 09:50:17AM +0100, Paweł Wegner wrote:
> > > On Tue, Nov 13, 2018 at 12:39 AM Michael Niedermayer
> > 
> > > 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 
> > > > > ---
> > > > >  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.
> >
> > sorry i have cut the compiler output incorrectly
> > heres the full output, there are multiple real errors, not just warnings:
> >
> >
> >
> > 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.
> >   ^
> > 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)
> >  ^
> > In file included from /usr/share/mingw-w64/include/wmcodecdsp.h:613:0,
> >  

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

2018-11-13 Thread Paweł Wegner
On Tue, Nov 13, 2018 at 11:40 AM Michael Niedermayer 
wrote:

> On Tue, Nov 13, 2018 at 09:50:17AM +0100, Paweł Wegner wrote:
> > On Tue, Nov 13, 2018 at 12:39 AM Michael Niedermayer
> 
> > 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 
> > > > ---
> > > >  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.
>
> sorry i have cut the compiler output incorrectly
> heres the full output, there are multiple real errors, not just warnings:
>
>
>
> 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.
>   ^
> 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)
>  ^
> 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:15412:9: note: #pragma message:
> Interface IAMPluginControl has unverified layout.
>  __MINGW_BROKEN_INTERFACE(INTERFACE)
>   

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

2018-11-13 Thread Michael Niedermayer
On Tue, Nov 13, 2018 at 09:50:17AM +0100, Paweł Wegner wrote:
> On Tue, Nov 13, 2018 at 12:39 AM Michael Niedermayer 
> 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 
> > > ---
> > >  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.

sorry i have cut the compiler output incorrectly
heres the full output, there are multiple real errors, not just warnings:



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.
  ^
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)
 ^
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:15412:9: note: #pragma message: Interface 
IAMPluginControl has unverified layout.
 __MINGW_BROKEN_INTERFACE(INTERFACE)
 ^
src/libavcodec/mf_utils.c: In function ‘ff_hr_str_buf’:
src/libavcodec/mf_utils.c:96:10: error: 
‘MF_E_TRANSFORM_CANNOT_CHANGE_MEDIATYPE_WHILE_PROCESSING’ undeclared (first use 
in this function)
 

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

2018-11-13 Thread Paweł Wegner
On Tue, Nov 13, 2018 at 12:39 AM Michael Niedermayer 
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 
> > ---
> >  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@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


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

2018-11-13 Thread Paweł Wegner
On Mon, Nov 12, 2018 at 4:29 PM Carl Eugen Hoyos  wrote:

> 2018-11-12 14:42 GMT+01:00, Paweł Wegner :
> > 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
>
> You don't have to remove this link but if you are not the
> original author of this patch, please add the name(s) of
> the original author to the commit message.
>
I don't really know the name of the original author; the archive doesn't
include git history.
I can only guess that the author is the same as for this one:
https://ffmpeg.org/pipermail/ffmpeg-devel/2017-April/209720.html
So, should I put wm4  into the commit message?


>
> Weren't you already told this?
>
> Carl Eugen
> ___
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


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

2018-11-12 Thread Michael Niedermayer
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 
> ---
>  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.
  ^
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)
...

[...]
-- 
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.


signature.asc
Description: PGP signature
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


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

2018-11-12 Thread Carl Eugen Hoyos
2018-11-12 14:42 GMT+01:00, Paweł Wegner :
> 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

You don't have to remove this link but if you are not the
original author of this patch, please add the name(s) of
the original author to the commit message.

Weren't you already told this?

Carl Eugen
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


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

2018-11-12 Thread Carl Eugen Hoyos
2018-11-12 14:42 GMT+01:00, Paweł Wegner :
> +case AV_CODEC_ID_MSMPEG4V1:
> +case AV_CODEC_ID_MSMPEG4V2: return _MFVideoFormat_MP42;

This looks unexpected: Is v1 encoding really still supported?

> +case AV_CODEC_ID_MP1:   return _MPEG;
> +case AV_CODEC_ID_MP2:   return _MPEG;

This looks wrong, mp1 and mp2 are not the same.

Carl Eugen
___
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel


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

2018-11-12 Thread Paweł Wegner
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 
---
 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

diff --git a/configure b/configure
index b02b4ccb2e..f50a621ce2 100755
--- a/configure
+++ b/configure
@@ -301,6 +301,7 @@ External library support:
   --enable-mbedtls enable mbedTLS, needed for https support
if openssl, gnutls or libtls is not used [no]
   --enable-mediacodec  enable Android MediaCodec support [no]
+  --enable-mf  enable decoding via MediaFoundation [auto]
   --enable-libmysofa   enable libmysofa, needed for sofalizer filter [no]
   --enable-openal  enable OpenAL 1.1 capture support [no]
   --enable-opencl  enable OpenCL processing [no]
@@ -1651,6 +1652,7 @@ EXTERNAL_AUTODETECT_LIBRARY_LIST="
 libxcb_shape
 libxcb_xfixes
 lzma
+mf
 schannel
 sdl2
 securetransport
@@ -2318,6 +2320,7 @@ CONFIG_EXTRA="
 lpc
 lzf
 me_cmp
+mf
 mpeg_er
 mpegaudio
 mpegaudiodsp
@@ -2806,6 +2809,8 @@ zlib_decoder_deps="zlib"
 zlib_encoder_deps="zlib"
 zmbv_decoder_deps="zlib"
 zmbv_encoder_deps="zlib"
+mf_deps="mftransform_h"
+mf_extralibs="-ldxva2 -levr -lmf -lmfplat -lmfuuid -lole32 -lstrmiids -luuid 
-loleaut32 -lshlwapi"
 
 # hardware accelerators
 crystalhd_deps="libcrystalhd_libcrystalhd_if_h"
@@ -3155,6 +3160,11 @@ vapoursynth_demuxer_deps="vapoursynth"
 videotoolbox_suggest="coreservices"
 videotoolbox_deps="corefoundation coremedia corevideo"
 videotoolbox_encoder_deps="videotoolbox 
VTCompressionSessionPrepareToEncodeFrames"
+aac_mf_encoder_deps="mf"
+ac3_mf_encoder_deps="mf"
+h264_mf_encoder_deps="mf"
+hevc_mf_encoder_deps="mf"
+mp3_mf_encoder_deps="mf"
 
 # demuxers / muxers
 ac3_demuxer_select="ac3_parser"
@@ -5910,6 +5920,7 @@ check_headers io.h
 check_headers linux/perf_event.h
 check_headers libcrystalhd/libcrystalhd_if.h
 check_headers malloc.h
+check_headers mftransform.h
 check_headers net/udplite.h
 check_headers poll.h
 check_headers sys/param.h
diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index 05be02ec7d..684b4cb213 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -1002,6 +1002,7 @@ OBJS-$(CONFIG_LIBXAVS_ENCODER)+= libxavs.o
 OBJS-$(CONFIG_LIBXAVS2_ENCODER)   += libxavs2.o
 OBJS-$(CONFIG_LIBXVID_ENCODER)+= libxvid.o
 OBJS-$(CONFIG_LIBZVBI_TELETEXT_DECODER)   += libzvbi-teletextdec.o ass.o
+OBJS-$(CONFIG_MF) += mfenc.o mf_utils.o
 
 # parsers
 OBJS-$(CONFIG_AAC_LATM_PARSER) += latm_parser.o
diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c
index 2c17db5a70..b6777d6537 100644
--- a/libavcodec/allcodecs.c
+++ b/libavcodec/allcodecs.c
@@ -653,7 +653,9 @@ extern AVCodec ff_xsub_decoder;
 /* external libraries */
 extern AVCodec ff_aac_at_encoder;
 extern AVCodec ff_aac_at_decoder;
+extern AVCodec ff_aac_mf_encoder;
 extern AVCodec ff_ac3_at_decoder;
+extern AVCodec ff_ac3_mf_encoder;
 extern AVCodec ff_adpcm_ima_qt_at_decoder;
 extern AVCodec ff_alac_at_encoder;
 extern AVCodec ff_alac_at_decoder;
@@ -665,6 +667,7 @@ extern AVCodec ff_ilbc_at_decoder;
 extern AVCodec ff_mp1_at_decoder;
 extern AVCodec ff_mp2_at_decoder;
 extern AVCodec ff_mp3_at_decoder;
+extern AVCodec ff_mp3_mf_encoder;
 extern AVCodec ff_pcm_alaw_at_encoder;
 extern AVCodec ff_pcm_alaw_at_decoder;
 extern AVCodec ff_pcm_mulaw_at_encoder;
@@ -738,6 +741,7 @@ extern AVCodec ff_h264_qsv_encoder;
 extern AVCodec ff_h264_v4l2m2m_encoder;
 extern AVCodec ff_h264_vaapi_encoder;
 extern AVCodec ff_h264_videotoolbox_encoder;
+extern AVCodec ff_h264_mf_encoder;
 #if FF_API_NVENC_OLD_NAME
 extern AVCodec ff_nvenc_encoder;
 extern AVCodec ff_nvenc_h264_encoder;
@@ -751,6 +755,7 @@ extern AVCodec ff_hevc_qsv_encoder;
 extern AVCodec ff_hevc_v4l2m2m_encoder;
 extern AVCodec ff_hevc_vaapi_encoder;
 extern AVCodec ff_hevc_videotoolbox_encoder;
+extern AVCodec ff_hevc_mf_encoder;
 extern AVCodec ff_libkvazaar_encoder;
 extern AVCodec ff_mjpeg_cuvid_decoder;
 extern AVCodec ff_mjpeg_qsv_encoder;
diff --git a/libavcodec/mf_utils.c b/libavcodec/mf_utils.c
new file mode 100644
index 00..77c2cbcabf
--- /dev/null
+++ b/libavcodec/mf_utils.c
@@ -0,0 +1,734 @@
+/*
+ * This file is part of FFmpeg.
+ *
+ * FFmpeg is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU