]> git.sesse.net Git - ffmpeg/blobdiff - libavutil/hwcontext_vaapi.h
libavformat/avio: Add avio_get_dyn_buf function
[ffmpeg] / libavutil / hwcontext_vaapi.h
index 7fd1a36e8fbd0f4d8fcb4cf8ed32b0d46c2b6b38..da1d4fe6c2adcfe2eb37001289017bf1d753bafd 100644 (file)
  * with the data pointer set to a VASurfaceID.
  */
 
+enum {
+    /**
+     * The quirks field has been set by the user and should not be detected
+     * automatically by av_hwdevice_ctx_init().
+     */
+    AV_VAAPI_DRIVER_QUIRK_USER_SET = (1 << 0),
+    /**
+     * The driver does not destroy parameter buffers when they are used by
+     * vaRenderPicture().  Additional code will be required to destroy them
+     * separately afterwards.
+     */
+    AV_VAAPI_DRIVER_QUIRK_RENDER_PARAM_BUFFERS = (1 << 1),
+
+    /**
+     * The driver does not support the VASurfaceAttribMemoryType attribute,
+     * so the surface allocation code will not try to use it.
+     */
+    AV_VAAPI_DRIVER_QUIRK_ATTRIB_MEMTYPE = (1 << 2),
+};
+
 /**
  * VAAPI connection details.
  *
@@ -43,6 +63,14 @@ typedef struct AVVAAPIDeviceContext {
      * The VADisplay handle, to be filled by the user.
      */
     VADisplay display;
+    /**
+     * Driver quirks to apply - this is filled by av_hwdevice_ctx_init(),
+     * with reference to a table of known drivers, unless the
+     * AV_VAAPI_DRIVER_QUIRK_USER_SET bit is already present.  The user
+     * may need to refer to this field when performing any later
+     * operations using VAAPI with the same VADisplay.
+     */
+    unsigned int driver_quirks;
 } AVVAAPIDeviceContext;
 
 /**