summaryrefslogtreecommitdiff
path: root/libavcodec/d3d11va.h
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2015-09-17 11:31:40 +0200
committerHendrik Leppkes <h.leppkes@gmail.com>2015-09-17 11:31:40 +0200
commit7c46f24bde12d13e3214852b87f8bb2a8bbf0ac8 (patch)
treecdf4e57e02057612d74f2285715f084b2e453e8f /libavcodec/d3d11va.h
parent695ff5dc6d9ed88a61a544146a6358ecc5259e6c (diff)
parente3d4784eb31b3ea4a97f2d4c698a75fab9bf3d86 (diff)
downloadffmpeg-7c46f24bde12d13e3214852b87f8bb2a8bbf0ac8.tar.gz
Merge commit 'e3d4784eb31b3ea4a97f2d4c698a75fab9bf3d86'
* commit 'e3d4784eb31b3ea4a97f2d4c698a75fab9bf3d86': d3d11va: WindowsPhone requires a mutex around ID3D11VideoContext Merged-by: Hendrik Leppkes <h.leppkes@gmail.com>
Diffstat (limited to 'libavcodec/d3d11va.h')
-rw-r--r--libavcodec/d3d11va.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/libavcodec/d3d11va.h b/libavcodec/d3d11va.h
index 3d810f5379..6816b6c1e6 100644
--- a/libavcodec/d3d11va.h
+++ b/libavcodec/d3d11va.h
@@ -53,8 +53,10 @@
* to the Direct3D11 FFmpeg HWAccel implementation.
*
* The application must make it available as AVCodecContext.hwaccel_context.
+ *
+ * Use av_d3d11va_alloc_context() exclusively to allocate an AVD3D11VAContext.
*/
-struct AVD3D11VAContext {
+typedef struct AVD3D11VAContext {
/**
* D3D11 decoder object
*/
@@ -89,7 +91,19 @@ struct AVD3D11VAContext {
* Private to the FFmpeg AVHWAccel implementation
*/
unsigned report_id;
-};
+
+ /**
+ * Mutex to access video_context
+ */
+ HANDLE context_mutex;
+} AVD3D11VAContext;
+
+/**
+ * Allocate an AVD3D11VAContext.
+ *
+ * @return Newly-allocated AVD3D11VAContext or NULL on failure.
+ */
+AVD3D11VAContext *av_d3d11va_alloc_context(void);
/**
* @}