[FFmpeg-devel] [PATCH] Try to make new VDPAU usable by adding context to callback.
nfxjfg at googlemail.com
Wed Aug 7 23:43:40 CEST 2013
On Wed, 7 Aug 2013 21:28:15 +0200
Reimar Döffinger <Reimar.Doeffinger at gmx.de> wrote:
> Using VDPAU correctly means checking for preemption
> and possibly regenerating the context all the time.
> With the current API there is no context or other
> user-defined pointer and thus this in not possible
> unless using some hack like global variables.
What stops you from checking for preemption? You can still do that
static VdpStatus dummy_render(
VdpPictureInfo const * picture_info,
VdpBitstreamBuffer const * bitstream_buffers)
And if a preemption occurs:
context.render = dummy_render;
(Which will work because hwaccel doesn't support multithreading anyway.)
Note that you still can call vdpau functions even during preemption.
But if you reload the vdpau driver (which might change driver entry
points, i.e. the decoder_render function pointer changes) you still
need this hack.
Awkward, but better than changing the API?
More information about the ffmpeg-devel