Changeset acb5da732a27b6c7e8d6e05c2e183d4ae49a9ea9

Show
Ignore:
Timestamp:
22/04/06 18:39:04 (3 years ago)
Author:
Antoine Cellerier <dionoea@videolan.org>
git-committer:
Antoine Cellerier <dionoea@videolan.org> 1145723944 +0000
git-parent:

[fea437ab11391c5c5a2290fb65b90fde4f967548]

git-author:
Antoine Cellerier <dionoea@videolan.org> 1145723944 +0000
Message:

Change shoutcast service discovery module and write a new demux to be compatible with the new winamp 5.2 format. See trac ticket for detailed info. I'd appreciate if people could test this and proof read the code since we'll have to include this in 0.8.5 which is due to be released soon.

Ref #640.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/demux/playlist/Modules.am

    r8e8e644 racb5da7  
    1010    xspf.c \ 
    1111    xspf.h \ 
     12    shoutcast.c \ 
    1213    $(NULL) 
    1314 
  • modules/demux/playlist/playlist.c

    r2fc1756 racb5da7  
    9191        set_capability( "demux2", 10 ); 
    9292        set_callbacks( E_(xspf_import_Activate), NULL ); 
     93    add_submodule(); 
     94        set_description( _("New winamp 5.2 shoutcast import") ); 
     95        add_shortcut( "shout-winamp" ); 
     96        set_capability( "demux2", 10 ); 
     97        set_callbacks( E_(Import_Shoutcast), E_(Close_Shoutcast) ); 
    9398vlc_module_end(); 
    9499 
  • modules/demux/playlist/playlist.h

    r8e8e644 racb5da7  
    4848 
    4949int E_(xspf_import_Activate) ( vlc_object_t * ); 
     50 
     51int E_(Import_Shoutcast) ( vlc_object_t * ); 
     52void E_(Close_Shoutcast) ( vlc_object_t * ); 
  • modules/services_discovery/shout.c

    r2fc1756 racb5da7  
    66 * 
    77 * Authors: Sigmund Augdal Helberg <dnumgis@videolan.org> 
     8 *          Antoine Cellerier <dionoea -@T- videolan -d.t- org> 
    89 * 
    910 * This program is free software; you can redistribute it and/or modify 
     
    4950 
    5051#define MAX_LINE_LENGTH 256 
    51  
     52#define SHOUTCAST_BASE_URL "http/shout-winamp://www.shoutcast.com/sbin/newxml.phtml" 
    5253 
    5354/***************************************************************************** 
     
    5859    static int  Open ( vlc_object_t * ); 
    5960    static void Close( vlc_object_t * ); 
    60  
    61 #define LIMIT_TEXT N_("Number of streams") 
    62 /// \bug [String] -which would be listed + to list 
    63 #define LIMIT_LONGTEXT N_("Maximum number of Shoutcast radio streams which " \ 
    64                           "would be listed.") 
    6561 
    6662vlc_module_begin(); 
     
    7066    set_subcategory( SUBCAT_PLAYLIST_SD ); 
    7167 
    72     add_integer( "shoutcast-limit", 1000, NULL, LIMIT_TEXT, 
    73                     LIMIT_LONGTEXT, VLC_TRUE ); 
     68    add_suppressed_integer( "shoutcast-limit" ); 
    7469 
    7570    set_capability( "services_discovery", 0 ); 
     
    128123    } 
    129124 
    130     p_sys->i_limit = config_GetInt( p_this->p_libvlc, "shoutcast-limit" ); 
    131     #define SHOUTCAST_BASE_URL "http/shout-b4s://www.shoutcast.com/sbin/xmllister.phtml?service=vlc&no_compress=1&limit=" 
    132125    psz_shoutcast_url = (char *)malloc( strlen( SHOUTCAST_BASE_URL ) + 20 ); 
    133126    psz_shoutcast_title = (char *)malloc( 6 + 20 ); 
    134127 
    135     sprintf( psz_shoutcast_url, SHOUTCAST_BASE_URL "%d", p_sys->i_limit ); 
    136     sprintf( psz_shoutcast_title, "Top %d", p_sys->i_limit ); 
     128    sprintf( psz_shoutcast_url, SHOUTCAST_BASE_URL ); 
     129    sprintf( psz_shoutcast_title, "Shoutcast", p_sys->i_limit ); 
    137130 
    138131    p_view = playlist_ViewFind( p_playlist, VIEW_CATEGORY );