]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/vdpau.h
Merge commit '470c9db11ff2c3249e995e7ba68e87bb81bf778c'
[ffmpeg] / libavcodec / vdpau.h
index d686ef45dab581cd9e92990e88899665601696be..a42ca013f203767a8701ded487c2d0f98b6552ed 100644 (file)
@@ -157,7 +157,7 @@ void av_vdpau_hwaccel_set_render2(AVVDPAUContext *, AVVDPAU_Render2);
  * display preemption).
  *
  * @note get_format() must return AV_PIX_FMT_VDPAU if this function completes
- * succesfully.
+ * successfully.
  *
  * @param avctx decoding context whose get_format() callback is invoked
  * @param device VDPAU device handle to use for hardware acceleration
@@ -169,6 +169,26 @@ void av_vdpau_hwaccel_set_render2(AVVDPAUContext *, AVVDPAU_Render2);
 int av_vdpau_bind_context(AVCodecContext *avctx, VdpDevice device,
                           VdpGetProcAddress *get_proc_address, unsigned flags);
 
+/**
+ * Gets the parameters to create an adequate VDPAU video surface for the codec
+ * context using VDPAU hardware decoding acceleration.
+ *
+ * @note Behavior is undefined if the context was not successfully bound to a
+ * VDPAU device using av_vdpau_bind_context().
+ *
+ * @param avctx the codec context being used for decoding the stream
+ * @param type storage space for the VDPAU video surface chroma type
+ *              (or NULL to ignore)
+ * @param width storage space for the VDPAU video surface pixel width
+ *              (or NULL to ignore)
+ * @param height storage space for the VDPAU video surface pixel height
+ *              (or NULL to ignore)
+ *
+ * @return 0 on success, a negative AVERROR code on failure.
+ */
+int av_vdpau_get_surface_parameters(AVCodecContext *avctx, VdpChromaType *type,
+                                    uint32_t *width, uint32_t *height);
+
 /**
  * Allocate an AVVDPAUContext.
  *