summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorCarl-Anton Ingmarsson <ca.ingmarsson@gmail.com>2009-03-23 20:47:00 +0100
committerJan Schmidt <thaytan@noraisin.net>2009-06-20 15:21:20 +0100
commit24dfc72e89e73a7b6fa6015a1b9f61038a223c02 (patch)
tree4142e511b23bcdc9e2eb26824517bf637c970e5c /sys
parent46a7e8221ceab7e1a5073aeaf36994af9c29ffa3 (diff)
downloadgst-plugins-bad-24dfc72e89e73a7b6fa6015a1b9f61038a223c02.tar.gz
gst-plugins-bad-24dfc72e89e73a7b6fa6015a1b9f61038a223c02.tar.bz2
gst-plugins-bad-24dfc72e89e73a7b6fa6015a1b9f61038a223c02.zip
vdpau: add stubs for pushing VdpVideoSurfaces to the src pad
Diffstat (limited to 'sys')
-rw-r--r--sys/vdpau/gstvdpaudecoder.c21
-rw-r--r--sys/vdpau/gstvdpaudecoder.h2
2 files changed, 19 insertions, 4 deletions
diff --git a/sys/vdpau/gstvdpaudecoder.c b/sys/vdpau/gstvdpaudecoder.c
index 0ef69654..bea707f5 100644
--- a/sys/vdpau/gstvdpaudecoder.c
+++ b/sys/vdpau/gstvdpaudecoder.c
@@ -71,6 +71,19 @@ static void gst_vdpaudecoder_set_property (GObject * object, guint prop_id,
static void gst_vdpaudecoder_get_property (GObject * object, guint prop_id,
GValue * value, GParamSpec * pspec);
+static gboolean
+gst_vdpaudecoder_push_video_surface (GstVdpauDecoder * dec,
+ VdpVideoSurface * surface)
+{
+ switch (dec->format) {
+ case GST_MAKE_FOURCC ('Y', 'V', '1', '2'):
+ /* YV12 specific code */
+ break;
+ default:
+ break;
+ }
+}
+
typedef struct
{
VdpChromaType chroma_type;
@@ -163,8 +176,6 @@ gst_vdpaudecoder_get_vdpau_support (GstVdpauDecoder * dec)
"height", GST_TYPE_INT_RANGE, 1, max_h,
"framerate", GST_TYPE_FRACTION_RANGE, 0, 1, G_MAXINT, 1, NULL);
gst_caps_append (caps, format_caps);
- GST_DEBUG ("fourcc: %" GST_FOURCC_FORMAT "\n",
- GST_FOURCC_ARGS (formats[j].fourcc));
}
}
}
@@ -231,6 +242,7 @@ gst_vdpaudecoder_sink_set_caps (GstPad * pad, GstCaps * caps)
GstStructure *structure;
gint width, height;
gint framerate_numerator, framerate_denominator;
+ guint32 fourcc_format;
gboolean res;
structure = gst_caps_get_structure (caps, 0);
@@ -240,9 +252,9 @@ gst_vdpaudecoder_sink_set_caps (GstPad * pad, GstCaps * caps)
&framerate_numerator, &framerate_denominator);
src_caps = gst_pad_get_allowed_caps (dec->src);
- GST_DEBUG ("caps: %s\n\n", gst_caps_to_string (src_caps));
structure = gst_caps_get_structure (src_caps, 0);
+ gst_structure_get_fourcc (structure, "format", &fourcc_format);
gst_structure_set (structure,
"width", G_TYPE_INT, width,
"height", G_TYPE_INT, height,
@@ -255,11 +267,12 @@ gst_vdpaudecoder_sink_set_caps (GstPad * pad, GstCaps * caps)
res = gst_pad_set_caps (dec->src, new_caps);
gst_caps_unref (new_caps);
- GST_DEBUG ("caps: %s\n\n", gst_caps_to_string (gst_pad_get_caps (dec->src)));
if (!res)
return FALSE;
+ dec->format = fourcc_format;
+
return TRUE;
}
diff --git a/sys/vdpau/gstvdpaudecoder.h b/sys/vdpau/gstvdpaudecoder.h
index f713b0dd..7d59f2e2 100644
--- a/sys/vdpau/gstvdpaudecoder.h
+++ b/sys/vdpau/gstvdpaudecoder.h
@@ -54,6 +54,8 @@ struct _GstVdpauDecoder {
GstCaps *src_caps;
+ guint32 format;
+
gboolean silent;
};