summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Schleef <ds@schleef.org>2003-12-10 10:37:56 +0000
committerDavid Schleef <ds@schleef.org>2003-12-10 10:37:56 +0000
commit1c2aeb0087f21c8fdaa8fe9e9a200bf1a11c5c6f (patch)
tree21cc4b94c04a76f8ec76ec7b46a11740a90ac48a
parentc95476e06cc20c694366ae4d27bd7cab4f4a6cf8 (diff)
downloadgstreamer-plugins-bad-1c2aeb0087f21c8fdaa8fe9e9a200bf1a11c5c6f.tar.gz
Convert to new caps
Original commit message from CVS: Convert to new caps
-rw-r--r--sys/qcam/gstqcamsrc.c29
1 files changed, 11 insertions, 18 deletions
diff --git a/sys/qcam/gstqcamsrc.c b/sys/qcam/gstqcamsrc.c
index e53485a36..4cd68842d 100644
--- a/sys/qcam/gstqcamsrc.c
+++ b/sys/qcam/gstqcamsrc.c
@@ -55,17 +55,13 @@ static GstElementDetails gst_qcamsrc_details = GST_ELEMENT_DETAILS (
#define DEF_PORT 0x378
#define DEF_AUTOEXP AE_NONE
-GST_PAD_TEMPLATE_FACTORY (gst_qcamsrc_src_factory,
+static GstStaticPadTemplate gst_qcamsrc_src_factory =
+GST_STATIC_PAD_TEMPLATE (
"src",
GST_PAD_SRC,
GST_PAD_ALWAYS,
- gst_caps_new (
- "gstqcam_src",
- "video/x-raw-yuv",
- GST_VIDEO_YUV_PAD_TEMPLATE_PROPS (
- GST_PROPS_FOURCC (GST_STR_FOURCC ("I420")))
- )
-)
+ GST_STATIC_CAPS (GST_VIDEO_YUV_PAD_TEMPLATE_CAPS("I420"))
+);
#define GST_TYPE_AUTOEXP_MODE (gst_autoexp_mode_get_type())
static GType
@@ -151,7 +147,7 @@ gst_qcamsrc_base_init (gpointer g_class)
{
GstElementClass *element_class = GST_ELEMENT_CLASS (g_class);
- gst_element_class_add_pad_template (element_class, GST_PAD_TEMPLATE_GET (gst_qcamsrc_src_factory));
+ gst_element_class_add_pad_template (element_class, gst_static_pad_template_get (&gst_qcamsrc_src_factory));
gst_element_class_set_details (element_class, &gst_qcamsrc_details);
}
static void
@@ -209,7 +205,7 @@ static void
gst_qcamsrc_init (GstQCamSrc *qcamsrc)
{
qcamsrc->srcpad = gst_pad_new_from_template (
- GST_PAD_TEMPLATE_GET (gst_qcamsrc_src_factory), "src");
+ gst_static_pad_template_get (&gst_qcamsrc_src_factory), "src");
gst_element_add_pad(GST_ELEMENT(qcamsrc),qcamsrc->srcpad);
gst_pad_set_get_function (qcamsrc->srcpad,gst_qcamsrc_get);
@@ -253,14 +249,11 @@ gst_qcamsrc_get (GstPad *pad)
qc_set (qcamsrc->qcam);
if (!GST_PAD_CAPS (pad)) {
- gst_pad_try_set_caps (pad, GST_CAPS_NEW (
- "qcam_caps",
- "video/x-raw-yuv",
- "format", GST_PROPS_FOURCC (GST_STR_FOURCC ("I420")),
- "width", GST_PROPS_INT (qcamsrc->qcam->width / scale),
- "height", GST_PROPS_INT (qcamsrc->qcam->height / scale),
- "framerate", GST_PROPS_FLOAT (10.) /* bla? */
- ));
+ gst_pad_try_set_caps (pad, gst_caps2_new_simple("video/x-raw-yuv",
+ "format", GST_TYPE_FOURCC, "I420",
+ "width", G_TYPE_INT, qcamsrc->qcam->width / scale,
+ "height", G_TYPE_INT, qcamsrc->qcam->height / scale,
+ "framerate", G_TYPE_DOUBLE, 10., NULL));
}
scan = qc_scan (qcamsrc->qcam);