[vlc-commits] vdpau: add a helper function to get the vdp_t from the decoder device

Steve Lhomme git at videolan.org
Tue Oct 22 09:02:07 CEST 2019


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon Oct 21 08:40:02 2019 +0200| [b0860001818840bfd4b4ac60a4c3b2ad0d66015e] | committer: Steve Lhomme

vdpau: add a helper function to get the vdp_t from the decoder device

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b0860001818840bfd4b4ac60a4c3b2ad0d66015e
---

 modules/hw/vdpau/vlc_vdpau.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/modules/hw/vdpau/vlc_vdpau.h b/modules/hw/vdpau/vlc_vdpau.h
index d0e8bde787..ba5d1443bf 100644
--- a/modules/hw/vdpau/vlc_vdpau.h
+++ b/modules/hw/vdpau/vlc_vdpau.h
@@ -21,6 +21,7 @@
 #ifndef VLC_VDPAU_H
 # include <stdint.h>
 # include <vdpau/vdpau.h>
+#include <vlc_codec.h>
 
 typedef struct vdp_s vdp_t;
 
@@ -274,6 +275,13 @@ typedef struct vlc_vdp_video_field
     float sharpen;
 } vlc_vdp_video_field_t;
 
+static inline vdp_t *GetVDPAUOpaqueDevice(vlc_decoder_device *device)
+{
+    if (device == NULL || device->type != VLC_DECODER_DEVICE_VDPAU)
+        return NULL;
+    return device->opaque;
+}
+
 /**
  * Attaches a VDPAU video surface as context of a VLC picture.
  */



More information about the vlc-commits mailing list