summaryrefslogtreecommitdiff
path: root/sys/vdpau
diff options
context:
space:
mode:
Diffstat (limited to 'sys/vdpau')
-rw-r--r--sys/vdpau/gstvdpdecoder.c10
-rw-r--r--sys/vdpau/gstvdpvideomemory.h2
2 files changed, 9 insertions, 3 deletions
diff --git a/sys/vdpau/gstvdpdecoder.c b/sys/vdpau/gstvdpdecoder.c
index 5837da90e..e135cd391 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 aaf874454..afe7491a0 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 *