summaryrefslogtreecommitdiff
path: root/libavcodec/d3d11va.h
diff options
context:
space:
mode:
authorSteve Lhomme <robux4@gmail.com>2015-09-16 13:27:42 +0200
committerVittorio Giovara <vittorio.giovara@gmail.com>2015-09-17 10:33:21 +0200
commite3d4784eb31b3ea4a97f2d4c698a75fab9bf3d86 (patch)
tree55fc7a458eefd08ec3248463e868bc7ee030eec0 /libavcodec/d3d11va.h
parent781a25e9c419dd66063597cc5d70e8919de60561 (diff)
d3d11va: WindowsPhone requires a mutex around ID3D11VideoContext
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 f5777c26dd..9264ec6ed4 100644
--- a/libavcodec/d3d11va.h
+++ b/libavcodec/d3d11va.h
@@ -53,8 +53,10 @@
* to the Direct3D11 Libav 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 Libav 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);
/**
* @}