Changeset ace4087ec6c9171876a9b24e820d50f0b4624f6a
- Timestamp:
- 16/09/06 21:21:10
(2 years ago)
- Author:
- Clément Stenac <zorglub@videolan.org>
- git-committer:
- Clément Stenac <zorglub@videolan.org> 1158434470 +0000
- git-parent:
[aba3de3334cfc9baba3ad296278e8071637b1d78]
- git-author:
- Clément Stenac <zorglub@videolan.org> 1158434470 +0000
- Message:
Fix shoutcast handling and remove broken progress detection
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r6a42cf3 |
race4087 |
|
| 155 | 155 | break; |
|---|
| 156 | 156 | } |
|---|
| | 157 | vlc_input_item_AddOption( p_sys->p_input, "no-playlist-autostart" ); |
|---|
| 157 | 158 | p_sys->p_input->b_prefers_tree = VLC_TRUE; |
|---|
| 158 | 159 | p_sys->p_node_cat = playlist_NodeAddInput( p_playlist, p_sys->p_input, |
|---|
| … | … | |
| 199 | 200 | static void Run( services_discovery_t *p_sd ) |
|---|
| 200 | 201 | { |
|---|
| 201 | | services_discovery_sys_t *p_sys = p_sd->p_sys; |
|---|
| | 202 | services_discovery_sys_t *p_sys = p_sd->p_sys; |
|---|
| 202 | 203 | int i_id = input_Read( p_sd, p_sys->p_input, VLC_FALSE ); |
|---|
| 203 | | int i_dialog_id; |
|---|
| 204 | | |
|---|
| 205 | | i_dialog_id = intf_UserProgress( p_sd, "Shoutcast" , |
|---|
| 206 | | _("Connecting...") , 0.0, 0 ); |
|---|
| 207 | | |
|---|
| 208 | | p_sys->b_dialog = VLC_TRUE; |
|---|
| 209 | 204 | while( !p_sd->b_die ) |
|---|
| 210 | 205 | { |
|---|
| 211 | | input_thread_t *p_input = (input_thread_t *)vlc_object_get( p_sd, |
|---|
| 212 | | i_id ); |
|---|
| 213 | | |
|---|
| 214 | | /* The Shoutcast server does not return a content-length so we |
|---|
| 215 | | * can't know where we are. Use the number of inserted items |
|---|
| 216 | | * as a hint */ |
|---|
| 217 | | if( p_input != NULL ) |
|---|
| 218 | | { |
|---|
| 219 | | int i_state = var_GetInteger( p_input, "state" ); |
|---|
| 220 | | if( i_state == PLAYING_S ) |
|---|
| 221 | | { |
|---|
| 222 | | float f_pos = (float)(p_sys->p_node_cat->i_children)* 2 *100.0 / |
|---|
| 223 | | 260 /* gruiiik FIXME */; |
|---|
| 224 | | intf_ProgressUpdate( p_sd, i_dialog_id, "Downloading", |
|---|
| 225 | | f_pos, 0 ); |
|---|
| 226 | | } |
|---|
| 227 | | vlc_object_release( p_input ); |
|---|
| 228 | | } |
|---|
| 229 | | else if( p_sys->b_dialog ) |
|---|
| 230 | | { |
|---|
| 231 | | p_sys->b_dialog = VLC_FALSE; |
|---|
| 232 | | intf_UserHide( p_sd, i_dialog_id ); |
|---|
| 233 | | } |
|---|
| 234 | | msleep( 10000 ); |
|---|
| 235 | | } |
|---|
| 236 | | } |
|---|
| | 206 | msleep( 10*INTF_IDLE_SLEEP ); |
|---|
| | 207 | } |
|---|
| | 208 | } |
|---|