From: Wim T. <wt...@us...> - 2002-01-13 22:27:59
|
Update of /cvsroot/gstreamer/gst-plugins/ext/xmms In directory usw-pr-cvs1:/tmp/cvs-serv5981/ext/xmms Modified Files: gstxmmseffect.c gstxmmsinput.c Log Message: Bring the plugins in sync with the new core capsnego system. Added some features, enhancements... Index: gstxmmseffect.c =================================================================== RCS file: /cvsroot/gstreamer/gst-plugins/ext/xmms/gstxmmseffect.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- gstxmmseffect.c 2001/12/23 15:46:54 1.1 +++ gstxmmseffect.c 2002/01/13 22:27:23 1.2 @@ -147,8 +147,8 @@ gobject_class->get_property = gst_xmms_effect_get_property; } -static void -gst_xmms_effect_newcaps (GstPad *pad, GstCaps *caps) +static GstPadConnectReturn +gst_xmms_effect_sinkconnect (GstPad *pad, GstCaps *caps) { GstXmmsEffect *xmms_effect = (GstXmmsEffect *) gst_pad_get_parent (pad); gboolean sign; @@ -191,7 +191,9 @@ xmms_effect->rate = gst_caps_get_int (caps, "rate"); xmms_effect->channels = gst_caps_get_int (caps, "channels"); - gst_pad_set_caps (xmms_effect->srcpad, gst_caps_copy (caps)); + gst_pad_try_set_caps (xmms_effect->srcpad, gst_caps_copy (caps)); + + return GST_PAD_CONNECT_OK; } /* This function is responsible for initializing a specific instance of @@ -204,7 +206,7 @@ GST_PADTEMPLATE_GET (gst_xmms_sink_factory), "sink"); gst_element_add_pad (GST_ELEMENT (xmms_effect), xmms_effect->sinkpad); gst_pad_set_chain_function (xmms_effect->sinkpad, gst_xmms_effect_chain); - gst_pad_set_newcaps_function (xmms_effect->sinkpad, gst_xmms_effect_newcaps); + gst_pad_set_connect_function (xmms_effect->sinkpad, gst_xmms_effect_sinkconnect); xmms_effect->srcpad = gst_pad_new_from_template ( GST_PADTEMPLATE_GET (gst_xmms_src_factory), "src"); Index: gstxmmsinput.c =================================================================== RCS file: /cvsroot/gstreamer/gst-plugins/ext/xmms/gstxmmsinput.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- gstxmmsinput.c 2001/12/23 23:00:59 1.2 +++ gstxmmsinput.c 2002/01/13 22:27:23 1.3 @@ -113,11 +113,10 @@ break; } - gst_pad_set_caps (xmms_input->srcpad, - gst_caps_new ( + gst_pad_try_set_caps (xmms_input->srcpad, + GST_CAPS_NEW ( "xmms_input_src_caps", "audio/raw", - gst_props_new ( "format", GST_PROPS_STRING ("int"), "law", GST_PROPS_INT (0), "endianness", GST_PROPS_INT (endianness), @@ -125,8 +124,8 @@ "width", GST_PROPS_INT (width), "depth", GST_PROPS_INT (width), "rate", GST_PROPS_INT (rate), - "channels", GST_PROPS_INT (nch), - NULL))); + "channels", GST_PROPS_INT (nch) + )); return 1; } |