X-Git-Url: https://git.piment-noir.org/?p=deb_ffmpeg.git;a=blobdiff_plain;f=ffmpeg%2Flibavcodec%2Fvdpau.h;h=100677902ef8a166c0841a4003b292c7fef47bd6;hp=e25cc42d7ec505d5e8877621c6c0b64c373a8fb3;hb=f6fa7814ccfe3e76514b36cf04f5cd3cb657c8cf;hpb=2ba45a602cbfa7b771effba9b11bb4245c21bc00 diff --git a/ffmpeg/libavcodec/vdpau.h b/ffmpeg/libavcodec/vdpau.h index e25cc42..1006779 100644 --- a/ffmpeg/libavcodec/vdpau.h +++ b/ffmpeg/libavcodec/vdpau.h @@ -149,6 +149,26 @@ AVVDPAUContext *av_alloc_vdpaucontext(void); AVVDPAU_Render2 av_vdpau_hwaccel_get_render2(const AVVDPAUContext *); void av_vdpau_hwaccel_set_render2(AVVDPAUContext *, AVVDPAU_Render2); +/** + * Associate a VDPAU device with a codec context for hardware acceleration. + * This function is meant to be called from the get_format() codec callback, + * or earlier. It can also be called after avcodec_flush_buffers() to change + * the underlying VDPAU device mid-stream (e.g. to recover from non-transparent + * display preemption). + * + * @note get_format() must return AV_PIX_FMT_VDPAU if this function completes + * successfully. + * + * @param avctx decoding context whose get_format() callback is invoked + * @param device VDPAU device handle to use for hardware acceleration + * @param get_proc_address VDPAU device driver + * @param flags zero of more OR'd AV_HWACCEL_FLAG_* flags + * + * @return 0 on success, an AVERROR code on failure. + */ +int av_vdpau_bind_context(AVCodecContext *avctx, VdpDevice device, + VdpGetProcAddress *get_proc_address, unsigned flags); + /** * Allocate an AVVDPAUContext. *