[vlc-devel] [PATCH] Open Sound Control support using liblo
Nicholas J Humfrey
njh at aelius.com
Mon Dec 22 01:11:10 CET 2008
Rémi, thank you very much for going through my code so thoroughly.
I have made a few changes and improvements to the patch and uploaded
it to the same location:
However there are still a couple of things to resolve.
> 1/ "char* psz_from = lo_address_get_url(lo_message_get_source(msg));"
> In the documentation you have:
> "char* lo_address_get_url( lo_address a )
> Return a URL representing an OSC address.
> Returned value must be free'd."
> So your code leaks memory.
Oops, sorry. I have fixed that now.
> 2/ "static vlc_object_t *osc_global_this;"
> I don't like the use of a static variable. If you can fix this ?
I don't like it either! Meant to ask when I submitted the patch what
the best way round that is. The problem is that the ErrorHandler
callback doesn't doesn't have a user_data parameter, so there is no
way to pass a vlc_object to the msg_Err() function. Suggestions?
> 3/ "psz_port = var_CreateGetString( p_intf, "osc-port" );
> if (strlen(psz_port) == 0)"
> In case of a problem, var_CreateGetString can return NULL, so strlen
> segfault here. "if( psz_port && *psz_port == '\0' )" may be better.
Thanks, changed applied.
> 4/ "lo_server_recv_noblock( p_sys->p_server, i_poll_delay );"
> If you can wait properly that's better.
I am working on getting a new function added to liblo to make this
> On 14 Dec 2008, at 01:08, Nicholas J Humfrey wrote:
>> I have written a patch against git-master which adds limited OSC
>> support to VLC:
>> I have also added some documentation to the wiki:
>> OSC is an asynchronous protocol and there is still no standard way
>> of implementing replies to queries. So I chose to implement a small
>> set of messages that do not need two way communication:
>> /deck/load (s)
More information about the vlc-devel