]> git.sesse.net Git - vlc/commitdiff
shout: Enable deinterlace=On for freebox channels.
authorPierre d'Herbemont <pdherbemont@free.fr>
Sat, 17 Oct 2009 16:41:11 +0000 (18:41 +0200)
committerPierre d'Herbemont <pdherbemont@free.fr>
Sat, 17 Oct 2009 16:44:44 +0000 (18:44 +0200)
We could probably have deinterlace=Auto, as it seems to work reliably enough on freebox channels.

modules/services_discovery/shout.c

index 2103a4fda7bee4b6ba496a353b2eccb5b5ac04ef..2e5058f29bc1db90a1ce8f055824adb492b7e79c 100644 (file)
@@ -72,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" ),
-    item(            N_("Freebox TV"),      "http://mafreebox.freebox.fr/freeboxtv/playlist.m3u" ),
+    itemWithOption( N_("Freebox TV"),"http://mafreebox.freebox.fr/freeboxtv/playlist.m3u", "deinterlace=1"),
     itemWithChildren(N_("French TV"),        p_frenchtv ),
     endItem()
 };
@@ -85,6 +85,7 @@ static const struct shout_item_t p_items[] = {
 struct shout_category_t {
     services_discovery_t * p_sd;
     const char * psz_category;
+    const struct shout_item_t * p_parent;
 };
 
 /* Main functions */
@@ -175,9 +176,14 @@ static int Open( vlc_object_t *p_this, enum type_e i_type )
 static void ItemAdded( const vlc_event_t * p_event, void * user_data )
 {
     struct shout_category_t * params = user_data;
-    services_discovery_AddItem( params->p_sd,
-            p_event->u.input_item_subitem_added.p_new_child,
-            params->psz_category );
+    const struct shout_item_t * p_parent = params->p_parent;
+    input_item_t * p_input = p_event->u.input_item_subitem_added.p_new_child;
+
+    int i;
+    for( i = 0; p_parent->ppsz_options[i] != NULL; i++ )
+        input_item_AddOption( p_input, p_parent->ppsz_options[i], VLC_INPUT_OPTION_TRUSTED);
+
+    services_discovery_AddItem( params->p_sd, p_input, params->psz_category );
 }
 
 /*****************************************************************************
@@ -206,7 +212,7 @@ static void AddSubitemsOfShoutItemURL( services_discovery_t *p_sd,
                                        const struct shout_item_t * p_item,
                                        const char * psz_category )
 {
-    struct shout_category_t category = { p_sd, psz_category };
+    struct shout_category_t category = { p_sd, psz_category, p_item };
 
     /* Create the item */
     input_item_t *p_input = CreateInputItemFromShoutItem( p_sd, p_item );