summaryrefslogtreecommitdiff
path: root/libavcodec/vdpau.h
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2013-11-01 18:37:47 +0100
committerAnton Khirnov <anton@khirnov.net>2013-11-14 09:38:50 +0100
commitca22d1dea2842fca0422dd1d2bd09e7eb2c8f118 (patch)
treeae810576c03e1a1408bac9ab0d97175e3fa7a251 /libavcodec/vdpau.h
parent19e30a58fc8ee6187a0bc14aff7f566a13c81421 (diff)
vdpau: add a convenience function for getting a decoder profile.
Based on the code by RĂ©mi Denis-Courmont <remi@remlab.net> from VLC.
Diffstat (limited to 'libavcodec/vdpau.h')
-rw-r--r--libavcodec/vdpau.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/libavcodec/vdpau.h b/libavcodec/vdpau.h
index 4035f6304e..bf8c8e8b2c 100644
--- a/libavcodec/vdpau.h
+++ b/libavcodec/vdpau.h
@@ -54,6 +54,7 @@
#include "libavutil/attributes.h"
+#include "avcodec.h"
#include "version.h"
#if FF_API_BUFS_VDPAU
@@ -125,6 +126,19 @@ typedef struct AVVDPAUContext {
#endif
} AVVDPAUContext;
+/**
+ * Get a decoder profile that should be used for initializing a VDPAU decoder.
+ * Should be called from the AVCodecContext.get_format() callback.
+ *
+ * @param avctx the codec context being used for decoding the stream
+ * @param profile a pointer into which the result will be written on success.
+ * The contents of profile are undefined if this function returns
+ * an error.
+ *
+ * @return 0 on success (non-negative), a negative AVERROR on failure.
+ */
+int av_vdpau_get_profile(AVCodecContext *avctx, VdpDecoderProfile *profile);
+
#if FF_API_CAP_VDPAU
/** @brief The videoSurface is used for rendering. */
#define FF_VDPAU_STATE_USED_FOR_RENDER 1