]> git.sesse.net Git - vlc/blobdiff - modules/services_discovery/shout.c
threads: Make sure we don't re-create a thread if the object has already one.
[vlc] / modules / services_discovery / shout.c
index bef740ed4a88280dc6e538009ae6de6e1bced1d1..afffb57dd743c8ec86a90b9af0f6b59907cbbdc7 100644 (file)
@@ -31,7 +31,8 @@
 # include "config.h"
 #endif
 
-#include <vlc/vlc.h>
+#include <vlc_common.h>
+#include <vlc_plugin.h>
 #include <vlc_services_discovery.h>
 
 /*****************************************************************************
@@ -54,7 +55,7 @@ struct shout_item_t
 #define endItem( ) { NULL, NULL, { NULL }, NULL }
 #define item( title, url ) { url, title, { NULL }, NULL }
 #define itemWithOption( title, url, option ) { url, title, { option, NULL }, NULL }
-#define itemWithChildren( title, children ) { "vlc:skip", title, { NULL }, children }
+#define itemWithChildren( title, children ) { "vlc://nop", title, { NULL }, children }
 
 /* WARN: We support only two levels */
 
@@ -71,7 +72,7 @@ static const struct shout_item_t p_frenchtv[] = {
 static const struct shout_item_t p_items[] = {
     item(            N_("Shoutcast Radio"), "http/shout-winamp://www.shoutcast.com/sbin/newxml.phtml" ),
     item(            N_("Shoutcast TV"),    "http/shout-winamp://www.shoutcast.com/sbin/newtvlister.phtml?alltv=1" ),
-    itemWithOption ( N_("Freebox TV"),      "http://mafreebox.freebox.fr/freeboxtv/playlist.m3u", "m3u-extvlcopt=1" ),
+    item(            N_("Freebox TV"),      "http://mafreebox.freebox.fr/freeboxtv/playlist.m3u" ),
     itemWithChildren(N_("French TV"),        p_frenchtv ),
     endItem()
 };
@@ -106,28 +107,28 @@ vlc_module_begin();
     add_obsolete_integer( "shoutcast-limit" );
 
         set_shortname( "Shoutcast");
-        set_description( _("Shoutcast radio listings") );
+        set_description( N_("Shoutcast radio listings") );
         set_capability( "services_discovery", 0 );
         set_callbacks( OpenShoutRadio, Close );
         add_shortcut( "shoutcast" );
 
     add_submodule();
         set_shortname( "ShoutcastTV" );
-        set_description( _("Shoutcast TV listings") );
+        set_description( N_("Shoutcast TV listings") );
         set_capability( "services_discovery", 0 );
         set_callbacks( OpenShoutTV, Close );
         add_shortcut( "shoutcasttv" );
 
     add_submodule();
         set_shortname( "frenchtv");
-        set_description( _("French TV") );
+        set_description( N_("French TV") );
         set_capability( "services_discovery", 0 );
         set_callbacks( OpenFrenchTV, Close );
         add_shortcut( "frenchtv" );
 
     add_submodule();
         set_shortname( "Freebox");
-        set_description( _("Freebox TV listing (French ISP free.fr services)") );
+        set_description( N_("Freebox TV listing (French ISP free.fr services)") );
         set_capability( "services_discovery", 0 );
         set_callbacks( OpenFreebox, Close );
         add_shortcut( "freebox" );
@@ -200,7 +201,7 @@ static void AddSubitemsOfShoutItemURL( services_discovery_t *p_sd,
     /* Read every subitems, and add them in ItemAdded */
     vlc_event_attach( &p_input->event_manager, vlc_InputItemSubItemAdded,
                       ItemAdded, &category );
-    input_Read( p_sd, p_input, VLC_TRUE );
+    input_Read( p_sd, p_input, true );
     vlc_event_detach( &p_input->event_manager, vlc_InputItemSubItemAdded,
                       ItemAdded, &category );
 
@@ -244,4 +245,5 @@ static void Run( services_discovery_t *p_sd )
  *****************************************************************************/
 static void Close( vlc_object_t *p_this )
 {
+    VLC_UNUSED(p_this);
 }