[FFmpeg-devel] [PATCH] qsv.c: making qsv session routines common for libavcodec and libavfilter modules.

wm4 nfxjfg at gmail.com
Thu Nov 12 23:10:44 CET 2015


On Thu, 12 Nov 2015 22:55:38 +0100
Hendrik Leppkes <h.leppkes at gmail.com> wrote:

> On Thu, Nov 12, 2015 at 10:15 PM, Ivan Uskov <ivan.uskov at nablet.com> wrote:
> > Hello All,
> >
> > As  it  turned  out, a suggested recently libavfilter/vf_qsv_vpp.c may not use
> > ff_qsv_init_internal_session() from libavcodec/qsv.c.
> > The attached patch moves qsv.c and qsv_internal.h to libavutil subdir to make
> > corresponded routines common for codecs and filters.
> > First  argument  of  ff_qsv_init_internal_session()has been changed to accept
> > pointer to any context structure compatible with av_log().
> >
> > Please review.  
> 
> Your patch does not work. Please test it with dynamic linking, and
> you'll immediately see it failing (hint: only av* symbols are
> exported)
> 

> Secondly, I don't think exposing these internals as public API (which
> avutil generally is), would be a good idea at all.
> Heck the header is even called qsv_internal.h, stuff like this should
> never be used across library boundaries. It puts the API/ABI in stone,
> and hinders any future expansions or enhancements.

+1

> avutil is not a place we dump stuff that should be shared between
> avcodec and avfilter, or similar, avutil should generally be public
> useful API.

Also +1.

I guess we need a better way to share internal things. The currently
nonsensical library separation makes this hard. We could just use
avpriv_ in this case, or make a header-only implementation. Certainly
it doesn't need to be public API.


More information about the ffmpeg-devel mailing list