From: Wim T. <wt...@us...> - 2002-01-13 22:27:59
|
Update of /cvsroot/gstreamer/gst-plugins/ext/rtp In directory usw-pr-cvs1:/tmp/cvs-serv5981/ext/rtp Modified Files: gstrtprecv.c gstrtpsend.c Log Message: Bring the plugins in sync with the new core capsnego system. Added some features, enhancements... Index: gstrtprecv.c =================================================================== RCS file: /cvsroot/gstreamer/gst-plugins/ext/rtp/gstrtprecv.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- gstrtprecv.c 2001/12/30 02:33:41 1.5 +++ gstrtprecv.c 2002/01/13 22:27:23 1.6 @@ -227,7 +227,7 @@ break; case ARG_CAPS: caps = GST_CAPS (g_value_get_pointer (value)); - gst_pad_set_caps (rtprecv->srcpad, caps); + gst_pad_try_set_caps (rtprecv->srcpad, caps); break; case ARG_SOCKET_CLOSED: /* wtay: add something suitable here */ @@ -236,7 +236,7 @@ caps = mediatype_to_caps (g_value_get_pointer (value), &rtprecv->payload_type, &rtprecv->mtu); if( caps != NULL ) { - gst_pad_set_caps (rtprecv->srcpad, caps); + gst_pad_try_set_caps (rtprecv->srcpad, caps); } break; default: Index: gstrtpsend.c =================================================================== RCS file: /cvsroot/gstreamer/gst-plugins/ext/rtp/gstrtpsend.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- gstrtpsend.c 2001/12/30 01:22:01 1.4 +++ gstrtpsend.c 2002/01/13 22:27:23 1.5 @@ -94,7 +94,7 @@ static void gst_rtpsend_get_property (GObject * object, guint prop_id, GValue * value, GParamSpec * pspec); -static void gst_rtpsend_newcaps (GstPad * pad, GstCaps * caps); +static GstPadConnectReturn gst_rtpsend_sinkconnect (GstPad * pad, GstCaps * caps); static GstElementStateReturn gst_rtpsend_change_state (GstElement * element); static GstElementClass *parent_class = NULL; @@ -178,7 +178,7 @@ rtpsend->sinkpad = gst_pad_new_from_template (GST_PADTEMPLATE_GET (sink_factory), "sink"); gst_element_add_pad (GST_ELEMENT (rtpsend), rtpsend->sinkpad); gst_pad_set_chain_function (rtpsend->sinkpad, gst_rtpsend_chain); - gst_pad_set_newcaps_function (rtpsend->sinkpad, gst_rtpsend_newcaps); + gst_pad_set_connect_function (rtpsend->sinkpad, gst_rtpsend_sinkconnect); rtpsend->payload_type = PAYLOAD_GSM; @@ -193,8 +193,8 @@ gst_clock_register (rtpsend->clock, GST_OBJECT (rtpsend)); } -static void -gst_rtpsend_newcaps (GstPad * pad, GstCaps * caps) +static GstPadConnectReturn +gst_rtpsend_sinkconnect (GstPad * pad, GstCaps * caps) { GstRtpSend *rtpsend; const gchar *mime = gst_caps_get_mime (caps); @@ -241,6 +241,8 @@ /* Emit a signal */ g_signal_emit (rtpsend, gstrtpsend_signals[NEW_CAPS], 0, caps); + + return GST_PAD_CONNECT_OK; } |