Changeset ca86dc6059876337bd75bb2548461e7f5cdbfbd6
- Timestamp:
- 06/29/03 21:15:04
(5 years ago)
- Author:
- Laurent Aimar <fenrir@videolan.org>
- git-committer:
- Laurent Aimar <fenrir@videolan.org> 1056914104 +0000
- git-parent:
[86ed538b360ef509f35d4006f5a810548ee6b439]
- git-author:
- Laurent Aimar <fenrir@videolan.org> 1056914104 +0000
- Message:
- m3u: remove useless debug messages, fix element insertion.
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r7f81995 |
rca86dc6 |
|
| 3 | 3 | ***************************************************************************** |
|---|
| 4 | 4 | * Copyright (C) 2001 VideoLAN |
|---|
| 5 | | * $Id: m3u.c,v 1.21 2003/06/28 19:19:55 fenrir Exp $ |
|---|
| | 5 | * $Id: m3u.c,v 1.22 2003/06/29 19:15:04 fenrir Exp $ |
|---|
| 6 | 6 | * |
|---|
| 7 | 7 | * Authors: Sigmund Augdal <sigmunau@idi.ntnu.no> |
|---|
| … | … | |
| 376 | 376 | if( strstr ( psz_bol, "<Name>" ) ) |
|---|
| 377 | 377 | { |
|---|
| 378 | | msg_Dbg( p_input, "###########<Name>"); |
|---|
| 379 | 378 | /* We have a name */ |
|---|
| 380 | 379 | while ( *psz_bol && |
|---|
| … | … | |
| 402 | 401 | else if( strstr( psz_bol, "</entry>" ) || strstr( psz_bol, "</Entry>" )) |
|---|
| 403 | 402 | { |
|---|
| 404 | | msg_Dbg( p_input, "###########<Entry>"); |
|---|
| 405 | 403 | *pb_next = VLC_TRUE; |
|---|
| 406 | 404 | return 0; |
|---|
| … | … | |
| 438 | 436 | if ( !*psz_bol ) return 0; |
|---|
| 439 | 437 | |
|---|
| 440 | | msg_Dbg( p_input, "############Line=%s", psz_bol ); |
|---|
| 441 | 438 | /* |
|---|
| 442 | 439 | * From now on, we know we've got a meaningful line |
|---|
| … | … | |
| 526 | 523 | static void ProcessLine ( input_thread_t *p_input, playlist_t *p_playlist, |
|---|
| 527 | 524 | char *psz_line, |
|---|
| 528 | | char **ppsz_uri, char **ppsz_name ) |
|---|
| | 525 | char **ppsz_uri, char **ppsz_name, |
|---|
| | 526 | int *pi_position ) |
|---|
| 529 | 527 | { |
|---|
| 530 | 528 | char psz_data[MAX_LINE]; |
|---|
| 531 | 529 | vlc_bool_t b_next; |
|---|
| 532 | | |
|---|
| 533 | | msg_Dbg( p_input, "ProcessLine(0): name=%s uri=%s ", *ppsz_name, *ppsz_uri ); |
|---|
| 534 | 530 | |
|---|
| 535 | 531 | switch( ParseLine( p_input, psz_line, psz_data, &b_next ) ) |
|---|
| … | … | |
| 553 | 549 | break; |
|---|
| 554 | 550 | } |
|---|
| 555 | | msg_Dbg( p_input, "name=%s uri=%s next=%d", *ppsz_name, *ppsz_uri, b_next ); |
|---|
| | 551 | |
|---|
| 556 | 552 | if( b_next && *ppsz_uri ) |
|---|
| 557 | 553 | { |
|---|
| … | … | |
| 559 | 555 | *ppsz_name ? *ppsz_name : *ppsz_uri, |
|---|
| 560 | 556 | *ppsz_uri, |
|---|
| 561 | | PLAYLIST_INSERT, PLAYLIST_END ); |
|---|
| | 557 | PLAYLIST_INSERT, *pi_position ); |
|---|
| | 558 | (*pi_position)++; |
|---|
| 562 | 559 | if( *ppsz_name ) |
|---|
| 563 | 560 | { |
|---|
| … | … | |
| 568 | 565 | *ppsz_uri = NULL; |
|---|
| 569 | 566 | } |
|---|
| 570 | | msg_Dbg( p_input, "ProcessLine(1:: name=%s uri=%s ", *ppsz_name, *ppsz_uri ); |
|---|
| 571 | 567 | } |
|---|
| 572 | 568 | |
|---|
| … | … | |
| 591 | 587 | char *psz_uri = NULL; |
|---|
| 592 | 588 | |
|---|
| | 589 | int i_position; |
|---|
| | 590 | |
|---|
| 593 | 591 | p_playlist = (playlist_t *) vlc_object_find( p_input, VLC_OBJECT_PLAYLIST, |
|---|
| 594 | 592 | FIND_ANYWHERE ); |
|---|
| … | … | |
| 600 | 598 | |
|---|
| 601 | 599 | p_playlist->pp_items[p_playlist->i_index]->b_autodeletion = VLC_TRUE; |
|---|
| | 600 | i_position = p_playlist->i_index + 1; |
|---|
| 602 | 601 | |
|---|
| 603 | 602 | /* Depending on wether we are dealing with an m3u/asf file, the end of |
|---|
| … | … | |
| 647 | 646 | i_linepos = 0; |
|---|
| 648 | 647 | |
|---|
| 649 | | ProcessLine( p_input, p_playlist, psz_line, &psz_uri, &psz_name ); |
|---|
| | 648 | ProcessLine( p_input, p_playlist, psz_line, &psz_uri, &psz_name, &i_position ); |
|---|
| 650 | 649 | } |
|---|
| 651 | 650 | |
|---|
| … | … | |
| 657 | 656 | psz_line[i_linepos] = '\0'; |
|---|
| 658 | 657 | |
|---|
| 659 | | ProcessLine( p_input, p_playlist, psz_line, &psz_uri, &psz_name ); |
|---|
| | 658 | ProcessLine( p_input, p_playlist, psz_line, &psz_uri, &psz_name, &i_position ); |
|---|
| 660 | 659 | /* is there a pendding uri without b_next */ |
|---|
| 661 | 660 | if( psz_uri ) |
|---|
| 662 | 661 | { |
|---|
| 663 | | playlist_Add( p_playlist, psz_uri, PLAYLIST_INSERT, PLAYLIST_END ); |
|---|
| | 662 | playlist_Add( p_playlist, psz_uri, PLAYLIST_INSERT, i_position ); |
|---|
| 664 | 663 | } |
|---|
| 665 | 664 | } |
|---|