[Nice] complete example
Youness Alaoui
youness.alaoui at collabora.co.uk
Fri Feb 1 16:37:55 PST 2013
On 02/01/2013 02:07 AM, Rohan Garg wrote:
> Hey everyone :)
> I went over the program a bit, and I'm attaching a patch that fixes a
> couple of issues, just minor stuff regarding the thread_mainloop and
> making the code a wee bit more async.
>
> There also seems to be a bug on line 241 of the original code where it
> only stops at \0 , I believe that should be \n. When using \0 the
> program simply crashes at " remote_candidates =
> g_slist_reverse(remote_candidates); " in parse_remote_data.
>
>
> On Fri, Feb 1, 2013 at 6:05 AM, Youness Alaoui
>> I have a plan of adding a new API call for transforming the candidates into SDP
>> and to parse candidates from SDP. I think it will help people, and I think it
>> would be a good idea to port your code to it.
>> I'll let you know tomorrow what I find!
>>
> Could you explain this a bit on the list in another thread? :)
sdp = nice_agent_generate_local_sdp(agent);
// send SDP to the remote peer (string single containing ufrag, password,
// and candidates for all streams and components)
...
// Receive remote SDP
nice_agent_parse_remote_sdp(agent, sdp);
// ^^ Parses SDP and sets credentials and remote candidates on all streams and
components.
>
> Regards
> Rohan Garg
>
>> Thanks,
>> Youness.
>>
>>
>> On 01/31/2013 07:30 PM, Bryce Allen wrote:
>>> I expanded my nicetest.c into a complete example, using a simple
>>> serialization format and copying/pasting the data between clients. It's
>>> inspired by icedemo from pjnath, but I didn't find having separate
>>> commands for each phase useful for testing and it made reading the code
>>> more difficult, so I just have three phases:
>>>
>>> 1) gather candidates, print serialized local data
>>> 2) prompt user for remote data, parse and set when entered
>>> 3) if successful, prompt for data to send to remote end
>>>
>>> I'm probably missing some failure cases and some error checking, but it
>>> seems like it could be a useful addition to the main distribution after
>>> a fixup. I can re-license under LGPL/MPL if needed.
>>>
>>> Also please let me know if I'm doing anything fundamentally wrong here.
>>> I'm using pretty much the same flow for a real application, with
>>> condition variables to synchronize instead busy waiting.
>>>
>>> Thanks,
>>> Bryce
>>>
>>>
>>>
>>> _______________________________________________
>>> nice mailing list
>>> nice at lists.freedesktop.org
>>> http://lists.freedesktop.org/mailman/listinfo/nice
>>>
>>
>>
>>
>> _______________________________________________
>> nice mailing list
>> nice at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/nice
>>
>>
>>
>> _______________________________________________
>> nice mailing list
>> nice at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/nice
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 263 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freedesktop.org/archives/nice/attachments/20130201/1b40ff27/attachment.pgp>
More information about the nice
mailing list