Changeset acb5da732a27b6c7e8d6e05c2e183d4ae49a9ea9
- 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
| r8e8e644 |
racb5da7 |
|
| 10 | 10 | xspf.c \ |
|---|
| 11 | 11 | xspf.h \ |
|---|
| | 12 | shoutcast.c \ |
|---|
| 12 | 13 | $(NULL) |
|---|
| 13 | 14 | |
|---|
| r2fc1756 |
racb5da7 |
|
| 91 | 91 | set_capability( "demux2", 10 ); |
|---|
| 92 | 92 | 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) ); |
|---|
| 93 | 98 | vlc_module_end(); |
|---|
| 94 | 99 | |
|---|
| r8e8e644 |
racb5da7 |
|
| 48 | 48 | |
|---|
| 49 | 49 | int E_(xspf_import_Activate) ( vlc_object_t * ); |
|---|
| | 50 | |
|---|
| | 51 | int E_(Import_Shoutcast) ( vlc_object_t * ); |
|---|
| | 52 | void E_(Close_Shoutcast) ( vlc_object_t * ); |
|---|
| r2fc1756 |
racb5da7 |
|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Sigmund Augdal Helberg <dnumgis@videolan.org> |
|---|
| | 8 | * Antoine Cellerier <dionoea -@T- videolan -d.t- org> |
|---|
| 8 | 9 | * |
|---|
| 9 | 10 | * This program is free software; you can redistribute it and/or modify |
|---|
| … | … | |
| 49 | 50 | |
|---|
| 50 | 51 | #define MAX_LINE_LENGTH 256 |
|---|
| 51 | | |
|---|
| | 52 | #define SHOUTCAST_BASE_URL "http/shout-winamp://www.shoutcast.com/sbin/newxml.phtml" |
|---|
| 52 | 53 | |
|---|
| 53 | 54 | /***************************************************************************** |
|---|
| … | … | |
| 58 | 59 | static int Open ( vlc_object_t * ); |
|---|
| 59 | 60 | 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.") |
|---|
| 65 | 61 | |
|---|
| 66 | 62 | vlc_module_begin(); |
|---|
| … | … | |
| 70 | 66 | set_subcategory( SUBCAT_PLAYLIST_SD ); |
|---|
| 71 | 67 | |
|---|
| 72 | | add_integer( "shoutcast-limit", 1000, NULL, LIMIT_TEXT, |
|---|
| 73 | | LIMIT_LONGTEXT, VLC_TRUE ); |
|---|
| | 68 | add_suppressed_integer( "shoutcast-limit" ); |
|---|
| 74 | 69 | |
|---|
| 75 | 70 | set_capability( "services_discovery", 0 ); |
|---|
| … | … | |
| 128 | 123 | } |
|---|
| 129 | 124 | |
|---|
| 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=" |
|---|
| 132 | 125 | psz_shoutcast_url = (char *)malloc( strlen( SHOUTCAST_BASE_URL ) + 20 ); |
|---|
| 133 | 126 | psz_shoutcast_title = (char *)malloc( 6 + 20 ); |
|---|
| 134 | 127 | |
|---|
| 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 ); |
|---|
| 137 | 130 | |
|---|
| 138 | 131 | p_view = playlist_ViewFind( p_playlist, VIEW_CATEGORY ); |
|---|