diff options
author | Ronald S. Bultje <rbultje@ronald.bitfreak.net> | 2003-07-06 20:49:52 +0000 |
---|---|---|
committer | Ronald S. Bultje <rbultje@ronald.bitfreak.net> | 2003-07-06 20:49:52 +0000 |
commit | 292fec2a0bd1f221a46ad69c5100995d04c01057 (patch) | |
tree | 658db299e0e03b2454ff840730569d79539e67c4 /ext/esd | |
parent | a8183e9a3fa87cf4247c7df16207f440ea4069c0 (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 'ext/esd')
-rw-r--r-- | ext/esd/esdmon.c | 46 | ||||
-rw-r--r-- | ext/esd/esdsink.c | 46 |
2 files changed, 47 insertions, 45 deletions
diff --git a/ext/esd/esdmon.c b/ext/esd/esdmon.c index 569942db..851ffd8c 100644 --- a/ext/esd/esdmon.c +++ b/ext/esd/esdmon.c @@ -103,30 +103,27 @@ GST_PAD_TEMPLATE_FACTORY (src_factory, GST_PAD_SRC, /* type of the pad */ GST_PAD_ALWAYS, /* ALWAYS/SOMETIMES */ GST_CAPS_NEW ( - "esdmon_src8", /* the name of the caps */ - "audio/raw", /* the mime type of the caps */ + "esdmon_src", /* the name of the caps */ + "audio/x-raw-int", /* the mime type of the caps */ /* Properties follow: */ - "format", GST_PROPS_STRING ("int"), - "law", GST_PROPS_INT (0), "endianness", GST_PROPS_INT (G_BYTE_ORDER), - "signed", GST_PROPS_BOOLEAN (TRUE), - "width", GST_PROPS_INT (8), - "depth", GST_PROPS_INT (8), + "signed", GST_PROPS_LIST ( + GST_PROPS_BOOLEAN (TRUE), + GST_PROPS_BOOLEAN (FALSE) + ), + "width", GST_PROPS_LIST ( + GST_PROPS_INT (8), + GST_PROPS_INT (16) + ), + "depth", GST_PROPS_LIST ( + GST_PROPS_INT (8), + GST_PROPS_INT (16) + ), "rate", GST_PROPS_INT_RANGE (8000, 96000), - "channels", GST_PROPS_LIST (GST_PROPS_INT (1), GST_PROPS_INT (2)) - ), - GST_CAPS_NEW ( - "esdmon_src16", /* the name of the caps */ - "audio/raw", /* the mime type of the caps */ - /* Properties follow: */ - "format", GST_PROPS_STRING ("int"), - "law", GST_PROPS_INT (0), - "endianness", GST_PROPS_INT (G_BYTE_ORDER), - "signed", GST_PROPS_BOOLEAN (TRUE), - "width", GST_PROPS_INT (16), - "depth", GST_PROPS_INT (16), - "rate", GST_PROPS_INT_RANGE (8000, 96000), - "channels", GST_PROPS_LIST (GST_PROPS_INT (1), GST_PROPS_INT (2)) + "channels", GST_PROPS_LIST ( + GST_PROPS_INT (1), + GST_PROPS_INT (2) + ) ) ); @@ -298,15 +295,14 @@ gst_esdmon_get (GstPad *pad) return NULL; } if (!GST_PAD_CAPS (pad)) { + gint sign = (esdmon->depth == 8 ? FALSE : TRUE); /* set caps on src pad */ if (gst_pad_try_set_caps (esdmon->srcpad, GST_CAPS_NEW ( "oss_src", - "audio/raw", - "format", GST_PROPS_STRING ("int"), - "law", GST_PROPS_INT (0), /*FIXME */ + "audio/x-raw-int", "endianness", GST_PROPS_INT (G_BYTE_ORDER), /*FIXME */ - "signed", GST_PROPS_BOOLEAN (TRUE), /*FIXME */ + "signed", GST_PROPS_BOOLEAN (sign), /*FIXME */ "width", GST_PROPS_INT (esdmon->depth), "depth", GST_PROPS_INT (esdmon->depth), "rate", GST_PROPS_INT (esdmon->frequency), diff --git a/ext/esd/esdsink.c b/ext/esd/esdsink.c index 120a2a5f..54cb2833 100644 --- a/ext/esd/esdsink.c +++ b/ext/esd/esdsink.c @@ -55,29 +55,27 @@ GST_PAD_TEMPLATE_FACTORY (sink_factory, GST_PAD_SINK, /* type of the pad */ GST_PAD_ALWAYS, /* ALWAYS/SOMETIMES */ GST_CAPS_NEW ( - "esdsink_sink8", /* the name of the caps */ - "audio/raw", /* the mime type of the caps */ + "esdsink_sink", /* the name of the caps */ + "audio/x-raw-int", /* the mime type of the caps */ /* Properties follow: */ - "format", GST_PROPS_STRING ("int"), - "law", GST_PROPS_INT (0), "endianness", GST_PROPS_INT (G_BYTE_ORDER), - "width", GST_PROPS_INT (8), - "depth", GST_PROPS_INT (8), + "signed", GST_PROPS_LIST ( + GST_PROPS_BOOLEAN (TRUE), + GST_PROPS_BOOLEAN (FALSE) + ), + "width", GST_PROPS_LIST ( + GST_PROPS_INT (8), + GST_PROPS_INT (16) + ), + "depth", GST_PROPS_LIST ( + GST_PROPS_INT (8), + GST_PROPS_INT (16) + ), "rate", GST_PROPS_INT_RANGE (8000, 96000), - "channels", GST_PROPS_LIST (GST_PROPS_INT (1), GST_PROPS_INT (2)) - ), - GST_CAPS_NEW ( - "esdsink_sink16", /* the name of the caps */ - "audio/raw", /* the mime type of the caps */ - /* Properties follow: */ - "format", GST_PROPS_STRING ("int"), - "law", GST_PROPS_INT (0), - "endianness", GST_PROPS_INT (G_BYTE_ORDER), - "signed", GST_PROPS_BOOLEAN (TRUE), - "width", GST_PROPS_INT (16), - "depth", GST_PROPS_INT (16), - "rate", GST_PROPS_INT_RANGE (8000, 96000), - "channels", GST_PROPS_LIST (GST_PROPS_INT (1), GST_PROPS_INT (2)) + "channels", GST_PROPS_LIST ( + GST_PROPS_INT (1), + GST_PROPS_INT (2) + ) ) ); @@ -173,6 +171,7 @@ static GstPadLinkReturn gst_esdsink_sinkconnect (GstPad *pad, GstCaps *caps) { GstEsdsink *esdsink; + gboolean sign; esdsink = GST_ESDSINK (gst_pad_get_parent (pad)); @@ -180,9 +179,16 @@ gst_esdsink_sinkconnect (GstPad *pad, GstCaps *caps) return GST_PAD_LINK_DELAYED; gst_caps_get_int (caps, "depth", &esdsink->depth); + gst_caps_get_int (caps, "signed", &sign); gst_caps_get_int (caps, "channels", &esdsink->channels); gst_caps_get_int (caps, "rate", &esdsink->frequency); + /* only u8/s16 */ + if ((sign == FALSE && esdsink->depth != 8) || + (sign == TRUE && esdsink->depth != 16)) { + return GST_PAD_LINK_REFUSED; + } + gst_esdsink_close_audio (esdsink); if (gst_esdsink_open_audio (esdsink)) { esdsink->negotiated = TRUE; |