From 37352509ebf6975978ceebc08a1ea70f700b1b67 Mon Sep 17 00:00:00 2001 From: Sreerenj Balachandran Date: Wed, 8 May 2013 12:45:20 +0300 Subject: [PATCH] vdpau: Add VdpVideoSurface caps feature --- sys/vdpau/gstvdpdecoder.c | 10 +++++++--- sys/vdpau/gstvdpvideomemory.h | 2 ++ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/sys/vdpau/gstvdpdecoder.c b/sys/vdpau/gstvdpdecoder.c index 5837da90e0..e135cd3913 100644 --- a/sys/vdpau/gstvdpdecoder.c +++ b/sys/vdpau/gstvdpdecoder.c @@ -342,9 +342,13 @@ gst_vdp_decoder_class_init (GstVdpDecoderClass * klass) video_decoder_class->decide_allocation = gst_vdp_decoder_decide_allocation; GST_FIXME ("Actually create srcpad template from hw capabilities"); - src_caps = gst_caps_from_string ("video/x-raw,format={ YV12 }"); - src_template = gst_pad_template_new (GST_VIDEO_DECODER_SRC_NAME, - GST_PAD_SRC, GST_PAD_ALWAYS, src_caps); + src_caps = + gst_caps_from_string (GST_VIDEO_CAPS_MAKE_WITH_FEATURES + (GST_CAPS_FEATURE_MEMORY_VDPAU, + "{ YV12 }") ";" GST_VIDEO_CAPS_MAKE ("{ YV12 }")); + src_template = + gst_pad_template_new (GST_VIDEO_DECODER_SRC_NAME, GST_PAD_SRC, + GST_PAD_ALWAYS, src_caps); gst_element_class_add_pad_template (element_class, src_template); diff --git a/sys/vdpau/gstvdpvideomemory.h b/sys/vdpau/gstvdpvideomemory.h index aaf8744543..afe7491a06 100644 --- a/sys/vdpau/gstvdpvideomemory.h +++ b/sys/vdpau/gstvdpvideomemory.h @@ -75,6 +75,8 @@ struct _GstVdpVideoMemory #define GST_VDP_VIDEO_MEMORY_ALLOCATOR "VdpVideoMemory" +#define GST_CAPS_FEATURE_MEMORY_VDPAU "memory:VdpVideoSurface" + void gst_vdp_video_memory_init (void); GstMemory *