summaryrefslogtreecommitdiffstats
path: root/sys/oss
diff options
context:
space:
mode:
authorRonald S. Bultje <rbultje@ronald.bitfreak.net>2003-07-06 20:49:52 +0000
committerRonald S. Bultje <rbultje@ronald.bitfreak.net>2003-07-06 20:49:52 +0000
commit292fec2a0bd1f221a46ad69c5100995d04c01057 (patch)
tree658db299e0e03b2454ff840730569d79539e67c4 /sys/oss
parenta8183e9a3fa87cf4247c7df16207f440ea4069c0 (diff)
New mimetypes gone into effect today - this commit changes all old mimetypes over to the new mimetypes spec as descri...
Original commit message from CVS: New mimetypes gone into effect today - this commit changes all old mimetypes over to the new mimetypes spec as described in the previous commit's document. Note: some plugins will break, some pipelines will break, expect HEAD to be broken or at least not 100% working for a few days, but don't forget to report bugs
Diffstat (limited to 'sys/oss')
-rw-r--r--sys/oss/gstossgst.c48
-rw-r--r--sys/oss/gstosssink.c4
-rw-r--r--sys/oss/gstosssrc.c20
3 files changed, 49 insertions, 23 deletions
diff --git a/sys/oss/gstossgst.c b/sys/oss/gstossgst.c
index 71feae36..070c693a 100644
--- a/sys/oss/gstossgst.c
+++ b/sys/oss/gstossgst.c
@@ -79,10 +79,8 @@ ossgst_src_factory (void)
GST_PAD_ALWAYS,
gst_caps_new (
"ossgst_src",
- "audio/raw",
+ "audio/x-raw-int",
gst_props_new (
- "format", GST_PROPS_STRING ("int"),
- "law", GST_PROPS_INT (0),
"endianness", GST_PROPS_INT (G_BYTE_ORDER),
"signed", GST_PROPS_LIST (
GST_PROPS_BOOLEAN (FALSE),
@@ -99,7 +97,21 @@ ossgst_src_factory (void)
"rate", GST_PROPS_INT_RANGE (8000, 48000),
"channels", GST_PROPS_INT_RANGE (1, 2),
NULL)),
- NULL);
+ gst_caps_new (
+ "ossgst_src",
+ "audio/x-mulaw",
+ gst_props_new (
+ "rate", GST_PROPS_INT_RANGE (8000, 48000),
+ "channels", GST_PROPS_INT_RANGE (1, 2),
+ NULL)),
+ gst_caps_new (
+ "ossgst_src",
+ "audio/x-alaw",
+ gst_props_new (
+ "rate", GST_PROPS_INT_RANGE (8000, 48000),
+ "channels", GST_PROPS_INT_RANGE (1, 2),
+ NULL)),
+ NULL);
}
@@ -224,12 +236,12 @@ gst_ossgst_format_to_caps (gint format, gint stereo, gint rate)
}
if (supported) {
- caps = gst_caps_new (
+ switch (law) {
+ case 0:
+ caps = gst_caps_new (
"ossgst_caps",
- "audio/raw",
+ "audio/x-raw-int",
gst_props_new (
- "format", GST_PROPS_STRING ("int"),
- "law", GST_PROPS_INT (law),
"endianness", GST_PROPS_INT (endianness),
"signed", GST_PROPS_BOOLEAN (is_signed),
"width", GST_PROPS_INT (width),
@@ -237,6 +249,26 @@ gst_ossgst_format_to_caps (gint format, gint stereo, gint rate)
"rate", GST_PROPS_INT (rate),
"channels", GST_PROPS_INT (stereo?2:1),
NULL));
+ break;
+ case 1:
+ caps = gst_caps_new (
+ "ossgst_caps",
+ "audio/x-mulaw",
+ gst_props_new (
+ "rate", GST_PROPS_INT (rate),
+ "channels", GST_PROPS_INT (stereo?2:1),
+ NULL));
+ break;
+ case 2:
+ caps = gst_caps_new (
+ "ossgst_caps",
+ "audio/x-alaw",
+ gst_props_new (
+ "rate", GST_PROPS_INT (rate),
+ "channels", GST_PROPS_INT (stereo?2:1),
+ NULL));
+ break;
+ }
}
else {
g_warning ("gstossgst: program tried to use unsupported format %x\n", format);
diff --git a/sys/oss/gstosssink.c b/sys/oss/gstosssink.c
index 340fb4e6..904d1919 100644
--- a/sys/oss/gstosssink.c
+++ b/sys/oss/gstosssink.c
@@ -93,9 +93,7 @@ GST_PAD_TEMPLATE_FACTORY (osssink_sink_factory,
GST_PAD_ALWAYS,
GST_CAPS_NEW (
"osssink_sink",
- "audio/raw",
- "format", GST_PROPS_STRING ("int"), /* hack */
- "law", GST_PROPS_INT (0),
+ "audio/x-raw-int",
"endianness", GST_PROPS_INT (G_BYTE_ORDER),
"signed", GST_PROPS_LIST (
GST_PROPS_BOOLEAN (FALSE),
diff --git a/sys/oss/gstosssrc.c b/sys/oss/gstosssrc.c
index 046e8cc2..9eb24aaf 100644
--- a/sys/oss/gstosssrc.c
+++ b/sys/oss/gstosssrc.c
@@ -67,9 +67,7 @@ GST_PAD_TEMPLATE_FACTORY (osssrc_src_factory,
GST_PAD_ALWAYS,
GST_CAPS_NEW (
"osssrc_src",
- "audio/raw",
- "format", GST_PROPS_STRING ("int"),
- "law", GST_PROPS_INT (0),
+ "audio/x-raw-int",
"endianness", GST_PROPS_INT (G_BYTE_ORDER),
"signed", GST_PROPS_LIST (
GST_PROPS_BOOLEAN (TRUE),
@@ -265,15 +263,13 @@ gst_osssrc_negotiate (GstPad *pad)
if (gst_pad_try_set_caps (src->srcpad,
GST_CAPS_NEW (
"oss_src",
- "audio/raw",
- "format", GST_PROPS_STRING ("int"),
- "law", GST_PROPS_INT (src->common.law),
- "endianness", GST_PROPS_INT (src->common.endianness),
- "signed", GST_PROPS_BOOLEAN (src->common.sign),
- "width", GST_PROPS_INT (src->common.width),
- "depth", GST_PROPS_INT (src->common.depth),
- "rate", GST_PROPS_INT (src->common.rate),
- "channels", GST_PROPS_INT (src->common.channels)
+ "audio/x-raw-int",
+ "endianness", GST_PROPS_INT (src->common.endianness),
+ "signed", GST_PROPS_BOOLEAN (src->common.sign),
+ "width", GST_PROPS_INT (src->common.width),
+ "depth", GST_PROPS_INT (src->common.depth),
+ "rate", GST_PROPS_INT (src->common.rate),
+ "channels", GST_PROPS_INT (src->common.channels)
)) <= 0)
{
return FALSE;