aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/vdpau.h
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-10-06 15:04:03 +0200
committerMichael Niedermayer <michaelni@gmx.at>2014-10-06 15:04:03 +0200
commita61899a0f13c0b8fca26472537cf60da04347c6d (patch)
treef0fb8d03ea22d04afcc01df1b94ad6e973b32359 /libavcodec/vdpau.h
parent067d11bf71e87d6bcc6a12eb302d6281a0d2408d (diff)
parente3e158e81f0666b8fe66be9ce1cad63a535920e0 (diff)
downloadffmpeg-a61899a0f13c0b8fca26472537cf60da04347c6d.tar.gz
Merge commit 'e3e158e81f0666b8fe66be9ce1cad63a535920e0'
* commit 'e3e158e81f0666b8fe66be9ce1cad63a535920e0': vdpau: add av_vdpau_bind_context() Conflicts: doc/APIchanges libavcodec/vdpau.h libavcodec/version.h Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/vdpau.h')
-rw-r--r--libavcodec/vdpau.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/libavcodec/vdpau.h b/libavcodec/vdpau.h
index e25cc42d7e..a8483d77f3 100644
--- a/libavcodec/vdpau.h
+++ b/libavcodec/vdpau.h
@@ -150,6 +150,26 @@ 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
+ * succesfully.
+ *
+ * @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 for future use, must be zero
+ *
+ * @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.
*
* @return Newly-allocated AVVDPAUContext or NULL on failure.