Hi, On 22 July 2009 fabien comte wrote: >I want to modify sofsip cli to work with multiple codecs : >G711 (both PCMU and PCMA) and G726. [...] >in ssc_media_gst_utils.c, gsdp_codec_factories_t >*gsdp_codec_factories_create(const char *codecname) -> >multiple codec are proposed but gsdp_codec_factories_create is >always called with "PCMU"
yes, you are correct. What is missing is a dynamic way to build the local SDP description of supported codecs. Currently this is fixed to PCMU in: ssc_media_gst.c:priv_static_capabilities_gst() ... where 'caps_sdp_str' is set to a fixed string. This should be replaced with a code that builds the SDP description based on what is supported by the available set of gstreamer components. If you need to add just one more codec, a simpler approach is to just modify the fixed capability SDP and add a new codec there. You will also need to extend: ssc_media_gst_utils.c:gsdp_codec_factories_create() A full implementation of this is available in telepathy-sofiasip. E.g. priv_update_local_sdp() in sip-media-stream.c, and priv_append_rtpmaps() in the same file: http://git.collabora.co.uk/?p=telepathy-sofiasip.git;a=blob;f=src/sip-media-stream.c;h=74dae6096ac3543127e27494b873c66414fd0250;hb=HEAD http://git.collabora.co.uk/?p=telepathy-sofiasip.git;a=summary As telepathy-sofiasip uses gstreamer via Telepathy (the gstreamer pipeline runs in a different process, "the stream engine", connected via DBus), the code looks a bit different, but the principles are the same. You can also take a look at the Telepathy stream-engine implementation to see how the actual gstreamer code looks like: http://git.collabora.co.uk/?p=telepathy-stream-engine.git;a=summary http://git.collabora.co.uk/?p=farsight2.git;a=summary ... farsight is a library used by telepathy-stream-engine. PS If you want to do a full featured SIP media implementation, I would recommend taking a look at Telepathy (i.e. just using the existing components), or at least Farsight (which encapsulates most of the low-level interactions with gstreamer). br, -- first.surn...@nokia.com (Kai Vehmanen) ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Sofia-sip-devel mailing list Sofia-sip-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel