[vlc-devel] commit: luasd: use a configuration chain to pass parameters to SD ( Fabio Ritrovato )
git version control
git at videolan.org
Thu Feb 4 17:24:35 CET 2010
vlc | branch: master | Fabio Ritrovato <exsephiroth87 at gmail.com> | Wed Feb 3 23:42:16 2010 +0100| [0a69bbfd9e69bed4760995eccf99552a68a7e193] | committer: Rémi Denis-Courmont
luasd: use a configuration chain to pass parameters to SD
Signed-off-by: Rémi Denis-Courmont <remi at remlab.net>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0a69bbfd9e69bed4760995eccf99552a68a7e193
---
include/vlc_services_discovery.h | 2 ++
modules/gui/qt4/components/playlist/selector.cpp | 2 +-
src/playlist/services_discovery.c | 11 +++++++----
3 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/include/vlc_services_discovery.h b/include/vlc_services_discovery.h
index 7094def..d10ead9 100644
--- a/include/vlc_services_discovery.h
+++ b/include/vlc_services_discovery.h
@@ -48,6 +48,8 @@ struct services_discovery_t
vlc_event_manager_t event_manager; /* Accessed through Setters for non class function */
+ config_chain_t *p_cfg;
+
services_discovery_sys_t *p_sys;
};
diff --git a/modules/gui/qt4/components/playlist/selector.cpp b/modules/gui/qt4/components/playlist/selector.cpp
index 09305f6..4c4d8d7 100644
--- a/modules/gui/qt4/components/playlist/selector.cpp
+++ b/modules/gui/qt4/components/playlist/selector.cpp
@@ -173,7 +173,7 @@ void PLSelector::setSource( QTreeWidgetItem *item )
if( i_type == SD_TYPE )
{
- pl_item = playlist_ChildSearchName( THEPL->p_root, qtu( item->data(0, LONGNAME_ROLE ).toString() ) );
+ pl_item = playlist_ChildSearchName( THEPL->p_root, qtu( item->data(0, NAME_ROLE ).toString() ) );
if( item->data( 0, SPECIAL_ROLE ).toInt() == IS_PODCAST )
{
if( pl_item && !sd_loaded )
diff --git a/src/playlist/services_discovery.c b/src/playlist/services_discovery.c
index a0e5a74..e565e80 100644
--- a/src/playlist/services_discovery.c
+++ b/src/playlist/services_discovery.c
@@ -280,10 +280,13 @@ int playlist_ServicesDiscoveryAdd( playlist_t *p_playlist, const char *psz_modul
if( !p_sd )
return VLC_ENOMEM;
- module_t *m = module_find_by_shortcut( psz_module );
+ char *psz_name = NULL;
+ config_ChainCreate( &psz_name, &p_sd->p_cfg, psz_module );
+
+ module_t *m = module_find_by_shortcut( psz_name );
if( !m )
{
- msg_Err( p_playlist, "No such module: %s", psz_module );
+ msg_Err( p_playlist, "No such module: %s", psz_name );
vlc_sd_Destroy( p_sd );
return VLC_EGENERIC;
}
@@ -300,7 +303,7 @@ int playlist_ServicesDiscoveryAdd( playlist_t *p_playlist, const char *psz_modul
playlist_item_t *p_node;
PL_LOCK;
- p_node = playlist_NodeCreate( p_playlist, module_get_name( m, true ),
+ p_node = playlist_NodeCreate( p_playlist, psz_module,
p_playlist->p_root, 0, NULL );
PL_UNLOCK;
module_release( m );
@@ -313,7 +316,7 @@ int playlist_ServicesDiscoveryAdd( playlist_t *p_playlist, const char *psz_modul
vlc_ServicesDiscoveryItemRemoved,
playlist_sd_item_removed, p_node );
- if( !vlc_sd_Start( p_sd, psz_module ) )
+ if( !vlc_sd_Start( p_sd, psz_name ) )
{
vlc_sd_Destroy( p_sd );
free( p_sds );
More information about the vlc-devel
mailing list