summaryrefslogtreecommitdiffstats
path: root/gst/law/alaw.c
diff options
context:
space:
mode:
authorDavid Schleef <ds@schleef.org>2003-12-22 01:47:09 +0000
committerDavid Schleef <ds@schleef.org>2003-12-22 01:47:09 +0000
commitce51f6173ca1c37d90f8e2e316d90316583d7755 (patch)
tree270b121765a11455f5bf8166b526d7ac336dc56c /gst/law/alaw.c
parentf43f0a9fd781bafab689e46bd936af9cb5ed2690 (diff)
Merge CAPS branch
Original commit message from CVS: Merge CAPS branch
Diffstat (limited to 'gst/law/alaw.c')
-rw-r--r--gst/law/alaw.c40
1 files changed, 16 insertions, 24 deletions
diff --git a/gst/law/alaw.c b/gst/law/alaw.c
index 70cb12da..be0559bb 100644
--- a/gst/law/alaw.c
+++ b/gst/law/alaw.c
@@ -7,31 +7,23 @@
static GstCaps*
alaw_factory (void)
{
- return
- gst_caps_new (
- "test_src",
- "audio/x-alaw",
- gst_props_new (
- "rate", GST_PROPS_INT_RANGE (8000, 192000),
- "channels", GST_PROPS_INT_RANGE (1, 2),
- NULL));
+ return gst_caps_new_simple ("audio/x-alaw",
+ "rate", GST_TYPE_INT_RANGE, 8000, 192000,
+ "channels", GST_TYPE_INT_RANGE, 1, 2,
+ NULL);
}
static GstCaps*
linear_factory (void)
{
- return
- gst_caps_new (
- "test_sink",
- "audio/x-raw-int",
- gst_props_new (
- "width", GST_PROPS_INT(16),
- "depth", GST_PROPS_INT(16),
- "endianness", GST_PROPS_INT(G_BYTE_ORDER),
- "signed", GST_PROPS_BOOLEAN(TRUE),
- "rate", GST_PROPS_INT_RANGE (8000, 192000),
- "channels", GST_PROPS_INT_RANGE (1, 2),
- NULL));
+ return gst_caps_new_simple ("audio/x-raw-int",
+ "width", G_TYPE_INT, 16,
+ "depth", G_TYPE_INT, 16,
+ "endianness", G_TYPE_INT, G_BYTE_ORDER,
+ "signed", G_TYPE_BOOLEAN, TRUE,
+ "rate", GST_TYPE_INT_RANGE, 8000, 192000,
+ "channels", GST_TYPE_INT_RANGE, 1, 2,
+ NULL);
}
GstPadTemplate *alawenc_src_template, *alawenc_sink_template;
@@ -45,11 +37,11 @@ plugin_init (GstPlugin *plugin)
alaw_caps = alaw_factory ();
linear_caps = linear_factory ();
- alawenc_src_template = gst_pad_template_new ("src",GST_PAD_SRC,GST_PAD_ALWAYS,alaw_caps, NULL);
- alawenc_sink_template = gst_pad_template_new ("sink",GST_PAD_SINK,GST_PAD_ALWAYS,linear_caps, NULL);
+ alawenc_src_template = gst_pad_template_new ("src",GST_PAD_SRC,GST_PAD_ALWAYS,alaw_caps);
+ alawenc_sink_template = gst_pad_template_new ("sink",GST_PAD_SINK,GST_PAD_ALWAYS,linear_caps);
- alawdec_src_template = gst_pad_template_new ("src",GST_PAD_SRC,GST_PAD_ALWAYS,linear_caps, NULL);
- alawdec_sink_template = gst_pad_template_new ("sink",GST_PAD_SINK,GST_PAD_ALWAYS,alaw_caps, NULL);
+ alawdec_src_template = gst_pad_template_new ("src",GST_PAD_SRC,GST_PAD_ALWAYS,linear_caps);
+ alawdec_sink_template = gst_pad_template_new ("sink",GST_PAD_SINK,GST_PAD_ALWAYS,alaw_caps);
if (!gst_element_register (plugin, "alawenc",
GST_RANK_NONE, GST_TYPE_ALAWENC) ||