[vlc-devel] [PATCH] [WIP] Partial UPnP rewrite
Jean-Baptiste Kempf
jb at videolan.org
Tue Mar 10 21:37:25 CET 2015
On 10 Mar, Hugo Beauzée-Luyssen wrote :
> modules/services_discovery/upnp.cpp | 1229 ++++++++++++-----------------------
> modules/services_discovery/upnp.hpp | 181 ++----
> 2 files changed, 487 insertions(+), 923 deletions(-)
It's almost a rewrite, no?
> -static int Open( vlc_object_t* );
> -static void Close( vlc_object_t* );
> +namespace SD
> +{
> + static int Open( vlc_object_t* );
> + static void Close( vlc_object_t* );
> +}
> +
> +namespace Access
> +{
> + static int Open( vlc_object_t* );
> + static void Close( vlc_object_t* );
> +}
That is elegant :)
> + p_sys->p_server_list = new(std::nothrow) SD::MediaServerList( p_sd );
> + if ( unlikely( p_sys->p_server_list == NULL ) )
> + {
> + return VLC_ENOMEM;
> + }
Can this happen?
> + /* Search for media servers */
> + int i_res = UpnpSearchAsync( p_sys->p_upnp->handle(), 5,
> + MEDIA_SERVER_DEVICE_TYPE, p_sys->p_server_list );
Search is in the Open?
> diff --git a/modules/services_discovery/upnp.hpp b/modules/services_discovery/upnp.hpp
> index 23fe4db..971b709 100644
> --- a/modules/services_discovery/upnp.hpp
> +++ b/modules/services_discovery/upnp.hpp
Do we need a .hpp ?
With my kindest regards,
--
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device
More information about the vlc-devel
mailing list