Changeset 5dc722b5545a43b46db156ab1031da89c512e4ab
- Timestamp:
- 11/01/04 01:45:06 (5 years ago)
- git-parent:
- Files:
-
- configure.ac (modified) (3 diffs)
- include/vlc_common.h (modified) (2 diffs)
- include/vlc_playlist.h (modified) (3 diffs)
- modules/demux/playlist/Modules.am (added)
- modules/demux/playlist/m3u.c (added)
- modules/demux/playlist/old.c (added)
- modules/demux/playlist/playlist.c (added)
- modules/gui/wxwindows/playlist.cpp (modified) (10 diffs)
- modules/gui/wxwindows/preferences.cpp (modified) (2 diffs)
- modules/gui/wxwindows/wxwindows.h (modified) (3 diffs)
- modules/misc/playlist/export.c (added)
- modules/misc/playlist/m3u.c (added)
- modules/misc/playlist/native.c (added)
- modules/misc/playlist/old.c (added)
- src/playlist/group.c (modified) (2 diffs)
- src/playlist/item-ext.c (modified) (2 diffs)
- src/playlist/loadsave.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
configure.ac
r88066e9 r5dc722b 1 1 dnl Autoconf settings for vlc 2 dnl $Id: configure.ac,v 1.14 8 2004/01/09 18:32:03 gbazinExp $2 dnl $Id: configure.ac,v 1.149 2004/01/11 00:45:06 zorglub Exp $ 3 3 4 4 AC_INIT(vlc,0.7.1-cvs) … … 3587 3587 modules/demux/mp4/Makefile 3588 3588 modules/demux/mpeg/Makefile 3589 modules/demux/playlist/Makefile 3589 3590 modules/demux/util/Makefile 3590 3591 modules/gui/Makefile … … 3607 3608 modules/misc/network/Makefile 3608 3609 modules/misc/testsuite/Makefile 3610 modules/misc/playlist/Makefile 3609 3611 modules/mux/Makefile 3610 3612 modules/mux/mpeg/Makefile include/vlc_common.h
r88066e9 r5dc722b 4 4 ***************************************************************************** 5 5 * Copyright (C) 1998, 1999, 2000 VideoLAN 6 * $Id: vlc_common.h,v 1.10 1 2004/01/09 18:32:03 gbazinExp $6 * $Id: vlc_common.h,v 1.102 2004/01/11 00:45:06 zorglub Exp $ 7 7 * 8 8 * Authors: Samuel Hocevar <sam@via.ecp.fr> … … 193 193 typedef struct item_info_t item_info_t; 194 194 typedef struct item_info_category_t item_info_category_t; 195 typedef struct playlist_export_t playlist_export_t; 195 196 196 197 /* Modules */ include/vlc_playlist.h
r7678195 r5dc722b 3 3 ***************************************************************************** 4 4 * Copyright (C) 1999-2004 VideoLAN 5 * $Id: vlc_playlist.h,v 1.2 3 2004/01/10 14:24:33 hartmanExp $5 * $Id: vlc_playlist.h,v 1.24 2004/01/11 00:45:06 zorglub Exp $ 6 6 * 7 7 * Authors: Samuel Hocevar <sam@zoy.org> … … 55 55 int i_infos; /**< Number of infos in the category */ 56 56 item_info_t **pp_infos; /**< Pointer to an array of infos */ 57 }; 58 59 /** 60 * playlist export helper structure 61 */ 62 struct playlist_export_t 63 { 64 char *psz_filename; 65 FILE *p_file; 57 66 }; 58 67 … … 210 219 211 220 /* Load/Save */ 212 VLC_EXPORT( int, playlist_ LoadFile, ( playlist_t *, const char * ) );213 VLC_EXPORT( int, playlist_ SaveFile, ( playlist_t*, const char * ) );221 VLC_EXPORT( int, playlist_Import, ( playlist_t *, const char * ) ); 222 VLC_EXPORT( int, playlist_Export, ( playlist_t *, const char *, const char * ) ); 214 223 215 224 /** modules/gui/wxwindows/playlist.cpp
r0ce68cc r5dc722b 3 3 ***************************************************************************** 4 4 * Copyright (C) 2000-2004 VideoLAN 5 * $Id: playlist.cpp,v 1.3 5 2004/01/10 03:36:03 hartmanExp $5 * $Id: playlist.cpp,v 1.36 2004/01/11 00:45:06 zorglub Exp $ 6 6 * 7 7 * Authors: Olivier Teuli� <ipkiss@via.ecp.fr> … … 87 87 88 88 /* controls */ 89 ListView_Event 89 ListView_Event, 90 91 Browse_Event, /* For export playlist */ 90 92 }; 91 93 … … 153 155 EVT_BUTTON( wxID_OK, NewGroup::OnOk) 154 156 EVT_BUTTON( wxID_CANCEL, NewGroup::OnCancel) 157 END_EVENT_TABLE() 158 159 160 /* Event Table for the ExportPlaylist class */ 161 BEGIN_EVENT_TABLE(ExportPlaylist, wxDialog) 162 EVT_BUTTON( wxID_OK, ExportPlaylist::OnOk) 163 EVT_BUTTON( wxID_CANCEL, ExportPlaylist::OnCancel) 164 EVT_BUTTON( Browse_Event, ExportPlaylist::OnBrowse) 155 165 END_EVENT_TABLE() 156 166 … … 409 419 return; 410 420 } 411 if( i < 0 || i > p_playlist->i_size)421 if( i < 0 || i >= p_playlist->i_size || !p_playlist->pp_items[i] ) 412 422 { 413 423 vlc_object_release(p_playlist); … … 416 426 listview->SetItem( i, 0, wxL2U(p_playlist->pp_items[i]->psz_name) ); 417 427 listview->SetItem( i, 1, wxL2U( playlist_GetInfo( p_playlist, i, 418 "General" , "Author" ) ) ); 428 _("General") , _("Author") ) ) ); 429 char *psz_group = playlist_FindGroup(p_playlist,p_playlist-> 430 pp_items[i]->i_group); 419 431 listview->SetItem( i, 2, 420 wxL2U(playlist_FindGroup(p_playlist,p_playlist-> 421 pp_items[i]->i_group) ) ); 432 wxL2U( psz_group ? psz_group : _("Normal") ) ); 422 433 423 434 if( p_playlist->pp_items[i]->b_enabled == VLC_FALSE ) … … 578 589 void Playlist::OnSave( wxCommandEvent& WXUNUSED(event) ) 579 590 { 580 playlist_t *p_playlist = 581 (playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, 582 FIND_ANYWHERE ); 583 if( p_playlist == NULL ) 584 { 585 return; 586 } 587 588 wxFileDialog dialog( this, wxU(_("Save playlist")), 589 wxT(""), wxT(""), wxT("*"), wxSAVE ); 590 591 if( dialog.ShowModal() == wxID_OK ) 592 { 593 playlist_SaveFile( p_playlist, dialog.GetPath().mb_str() ); 594 } 595 596 vlc_object_release( p_playlist ); 591 ExportPlaylist *exp_pl = new ExportPlaylist( p_intf, this); 592 exp_pl->ShowModal(); 593 delete exp_pl; 597 594 } 598 595 … … 612 609 if( dialog.ShowModal() == wxID_OK ) 613 610 { 614 playlist_ LoadFile( p_playlist, dialog.GetPath().mb_str() );611 playlist_Import( p_playlist, dialog.GetPath().mb_str() ); 615 612 } 616 613 … … 1154 1151 1155 1152 /*************************************************************************** 1156 * NewGroup 1153 * NewGroup Class 1157 1154 ***************************************************************************/ 1158 1155 NewGroup::NewGroup( intf_thread_t *_p_intf, wxWindow *_p_parent ): … … 1219 1216 psz_name = NULL; 1220 1217 } 1221 }1222 1223 vlc_object_release( p_playlist ); 1218 vlc_object_release( p_playlist ); 1219 } 1220 1224 1221 EndModal( wxID_OK ); 1225 1222 } … … 1229 1226 EndModal( wxID_CANCEL ); 1230 1227 } 1228 1229 1230 1231 /*************************************************************************** 1232 * Export playlist class 1233 ***************************************************************************/ 1234 ExportPlaylist::ExportPlaylist( intf_thread_t *_p_intf, wxWindow *_p_parent ): 1235 wxDialog( _p_parent, -1, wxU(_("Export playlist")), wxDefaultPosition, 1236 wxDefaultSize, wxDEFAULT_FRAME_STYLE ) 1237 { 1238 vlc_list_t *p_list; 1239 module_t *p_module; 1240 1241 /* Initializations */ 1242 p_intf = _p_intf; 1243 SetIcon( *p_intf->p_sys->p_icon ); 1244 1245 /* Create a panel to put everything in*/ 1246 wxPanel *panel = new wxPanel( this, -1 ); 1247 panel->SetAutoLayout( TRUE ); 1248 1249 /* Create the file box */ 1250 wxStaticBox *file_box = new wxStaticBox( panel, -1, 1251 wxU(_("File to save to")) ); 1252 wxStaticBoxSizer *file_sizer = new wxStaticBoxSizer( file_box, 1253 wxHORIZONTAL ); 1254 1255 file_text = new wxTextCtrl(panel, -1, wxU(""),wxDefaultPosition, 1256 wxSize(250,-1),wxTE_PROCESS_ENTER); 1257 1258 file_text->SetToolTip( wxU(_("Enter the name of the file to export " 1259 "the playlist to.")) ); 1260 1261 wxButton *file_button = new wxButton( panel, Browse_Event, 1262 wxU(_("Browse")) ); 1263 1264 file_sizer->Add( file_text, 0, wxALL | wxALIGN_CENTER , 5 ); 1265 file_sizer->Add( file_button, 0, wxALL | wxALIGN_CENTER , 5 ); 1266 1267 /* Create the type box */ 1268 wxStaticBox *type_box = new wxStaticBox( panel, -1, 1269 wxU(_("Select export type")) ); 1270 1271 wxStaticBoxSizer *type_sizer = new wxStaticBoxSizer( type_box, 1272 wxHORIZONTAL ); 1273 1274 type_combo = new wxComboBox( panel, -1, wxT(""), wxDefaultPosition, 1275 wxSize(250, -1), 0, NULL ); 1276 1277 type_sizer->Add( type_combo, 0, wxALL | wxALIGN_CENTER, 5 ); 1278 type_sizer->Layout(); 1279 1280 1281 1282 wxButton *ok_button = new wxButton(panel, wxID_OK, wxU(_("OK")) ); 1283 ok_button->SetDefault(); 1284 wxButton *cancel_button = new wxButton( panel, wxID_CANCEL, 1285 wxU(_("Cancel")) ); 1286 1287 wxBoxSizer *button_sizer = new wxBoxSizer( wxHORIZONTAL ); 1288 1289 button_sizer->Add( ok_button, 0, wxALL, 5 ); 1290 button_sizer->Add( cancel_button, 0, wxALL, 5 ); 1291 button_sizer->Layout(); 1292 1293 wxBoxSizer *panel_sizer = new wxBoxSizer( wxVERTICAL ); 1294 panel_sizer->Add( file_sizer, 0, wxEXPAND | wxALL, 5 ); 1295 panel_sizer->Add( type_sizer, 0, wxEXPAND | wxALL, 5 ); 1296 panel_sizer->Add( button_sizer, 0, wxEXPAND | wxALL, 5 ); 1297 panel_sizer->Layout(); 1298 1299 panel->SetSizerAndFit( panel_sizer ); 1300 1301 wxBoxSizer *main_sizer = new wxBoxSizer( wxVERTICAL ); 1302 main_sizer->Add( panel, 1, wxEXPAND, 0 ); 1303 main_sizer->Layout(); 1304 SetSizerAndFit( main_sizer ); 1305 1306 /* build a list of available modules */ 1307 p_list = vlc_list_find( p_intf, VLC_OBJECT_MODULE, FIND_ANYWHERE ); 1308 for( int i_index = 0; i_index < p_list->i_count; i_index++ ) 1309 { 1310 p_module = (module_t *)p_list->p_values[i_index].p_object ; 1311 if( !strcmp( p_module->psz_capability, "playlist export" ) ) 1312 { 1313 type_combo->Append( wxU(p_module->psz_longname), 1314 p_module->pp_shortcuts[1] ? 1315 p_module->pp_shortcuts[1] : 1316 p_module->psz_object_name ); 1317 } 1318 } 1319 vlc_list_release( p_list ); 1320 } 1321 1322 1323 ExportPlaylist::~ExportPlaylist() 1324 { 1325 } 1326 1327 void ExportPlaylist::OnOk( wxCommandEvent& WXUNUSED(event) ) 1328 { 1329 playlist_t * p_playlist = 1330 (playlist_t *)vlc_object_find( p_intf, VLC_OBJECT_PLAYLIST, 1331 FIND_ANYWHERE ); 1332 1333 if( p_playlist ) 1334 { 1335 char *psz_type = (char *)type_combo->GetClientData( 1336 type_combo->GetSelection() ); 1337 if( file_text->GetValue().mb_str() && psz_type ) 1338 { 1339 playlist_Export( p_playlist, file_text->GetValue().mb_str(), 1340 psz_type ); 1341 } 1342 } 1343 1344 vlc_object_release( p_playlist ); 1345 EndModal( wxID_OK ); 1346 } 1347 1348 void ExportPlaylist::OnCancel( wxCommandEvent& WXUNUSED(event) ) 1349 { 1350 EndModal( wxID_CANCEL ); 1351 } 1352 1353 void ExportPlaylist::OnBrowse( wxCommandEvent& WXUNUSED(event) ) 1354 { 1355 wxFileDialog dialog( this, wxU(_("Save playlist")), 1356 wxT(""), wxT(""), wxT("*"), wxSAVE ); 1357 1358 if( dialog.ShowModal() == wxID_OK ) 1359 { 1360 file_text->SetValue( dialog.GetPath() ); 1361 } 1362 } modules/gui/wxwindows/preferences.cpp
r4219568 r5dc722b 3 3 ***************************************************************************** 4 4 * Copyright (C) 2000-2001 VideoLAN 5 * $Id: preferences.cpp,v 1.4 4 2003/12/22 02:24:52 samExp $5 * $Id: preferences.cpp,v 1.45 2004/01/11 00:45:06 zorglub Exp $ 6 6 * 7 7 * Authors: Gildas Bazin <gbazin@netcourrier.com> … … 329 329 return i_type == 1 ? VIDEO_FILTER_TITLE : VIDEO_FILTER_HELP; 330 330 331 return " ";331 return " "; 332 332 } 333 333 modules/gui/wxwindows/wxwindows.h
r1595dc2 r5dc722b 3 3 ***************************************************************************** 4 4 * Copyright (C) 1999, 2000 VideoLAN 5 * $Id: wxwindows.h,v 1.8 3 2004/01/05 13:00:39zorglub Exp $5 * $Id: wxwindows.h,v 1.84 2004/01/11 00:45:06 zorglub Exp $ 6 6 * 7 7 * Authors: Gildas Bazin <gbazin@netcourrier.com> … … 741 741 class ItemInfoDialog; 742 742 class NewGroup; 743 class ExportPlaylist; 743 744 class Playlist: public wxFrame 744 745 { … … 842 843 }; 843 844 845 class ExportPlaylist: public wxDialog 846 { 847 public: 848 /* Constructor */ 849 ExportPlaylist(intf_thread_t *p_intf, wxWindow *p_parent ); 850 virtual ~ExportPlaylist(); 851 852 private: 853 /* Event handlers (these functions should _not_ be virtual) */ 854 void OnOk( wxCommandEvent& event ); 855 void OnCancel( wxCommandEvent& event ); 856 void OnBrowse( wxCommandEvent& event ); 857 858 DECLARE_EVENT_TABLE(); 859 intf_thread_t *p_intf; 860 wxTextCtrl *file_text; 861 wxComboBox *type_combo; 862 }; 844 863 845 864 /* ItemInfo Dialog */ src/playlist/group.c
r982c016 r5dc722b 3 3 ***************************************************************************** 4 4 * Copyright (C) 1999-2004 VideoLAN 5 * $Id: group.c,v 1. 6 2004/01/06 08:50:20zorglub Exp $5 * $Id: group.c,v 1.7 2004/01/11 00:45:06 zorglub Exp $ 6 6 * 7 7 * Authors: Cl�nt Stenac <zorglub@videolan.org> … … 120 120 { 121 121 int i; 122 for( i=0 ; i< =p_playlist->i_groups; i++ )122 for( i=0 ; i< p_playlist->i_groups; i++ ) 123 123 { 124 124 if( p_playlist->pp_groups[i]->i_id == i_id ) src/playlist/item-ext.c
r7678195 r5dc722b 3 3 ***************************************************************************** 4 4 * Copyright (C) 1999-2004 VideoLAN 5 * $Id: item-ext.c,v 1. 7 2004/01/10 14:24:33 hartmanExp $5 * $Id: item-ext.c,v 1.8 2004/01/11 00:45:06 zorglub Exp $ 6 6 * 7 7 * Authors: Samuel Hocevar <sam@zoy.org> … … 388 388 playlist_Delete( p_playlist, 0 ); 389 389 } 390 391 p_playlist->i_index = -1; 392 p_playlist->i_size = 0; 393 p_playlist->pp_items = NULL; 394 395 p_playlist->i_groups = 0; 396 p_playlist->pp_groups = NULL; 397 390 398 return 0; 391 399 } src/playlist/loadsave.c
r982c016 r5dc722b 3 3 ***************************************************************************** 4 4 * Copyright (C) 1999-2004 VideoLAN 5 * $Id: loadsave.c,v 1. 3 2004/01/06 08:50:20zorglub Exp $5 * $Id: loadsave.c,v 1.4 2004/01/11 00:45:06 zorglub Exp $ 6 6 * 7 7 * Authors: Samuel Hocevar <sam@zoy.org> … … 34 34 #include "vlc_playlist.h" 35 35 36 #define PLAYLIST_FILE_HEADER_0_5 "# vlc playlist file version 0.5" 37 #define PLAYLIST_FILE_HEADER_0_6 "# vlc playlist file version 0.6" 36 #define PLAYLIST_FILE_HEADER "# vlc playlist file version 0.5" 38 37 39 38 40 39 /***************************************************************************** 41 * playlist_ LoadFile: load a playlist file.40 * playlist_Import: load a playlist file. 42 41 ****************************************************************************/ 43 int playlist_ LoadFile( playlist_t * p_playlist, const char *psz_filename )42 int playlist_Import( playlist_t * p_playlist, const char *psz_filename ) 44 43 { 45 FILE *file; 46 char line[1024]; 47 int i_current_status; 48 int i_format; 49 int i; 44 playlist_item_t *p_item; 45 char *psz_uri; 46 int i_id; 50 47 51 msg_Dbg( p_playlist, " opening playlist file %s", psz_filename);48 msg_Dbg( p_playlist, "clearing playlist"); 52 49 53 file = fopen( psz_filename, "rt" ); 54 if( !file ) 50 /* Create our "fake" playlist item */ 51 playlist_Clear( p_playlist ); 52 53 54 psz_uri = (char *)malloc(sizeof(char)*strlen(psz_filename) + 17 ); 55 sprintf( psz_uri, "file/playlist://%s", psz_filename); 56 57 i_id = playlist_Add( p_playlist, psz_uri, psz_uri, 58 PLAYLIST_INSERT | PLAYLIST_GO , PLAYLIST_END); 59 60 p_item = playlist_GetItemById( p_playlist, i_id ); 61 p_item->b_autodeletion = VLC_TRUE; 62 63 //p_playlist->i_index = 0; 64 65 /* 66 * if( p_item ) 55 67 { 56 msg_Err( p_playlist, "playlist file %s does not exist", psz_filename ); 57 return -1; 68 p_playlist->p_input = input_CreateThread( p_playlist, p_item ); 58 69 } 59 fseek( file, 0L, SEEK_SET );70 */ 60 71 61 /* check the file is not empty */ 62 if ( ! fgets( line, 1024, file ) ) 63 { 64 msg_Err( p_playlist, "playlist file %s is empty", psz_filename ); 65 fclose( file ); 66 return -1; 67 } 68 69 /* get rid of line feed */ 70 if( line[strlen(line)-1] == '\n' || line[strlen(line)-1] == '\r' ) 71 { 72 line[strlen(line)-1] = (char)0; 73 if( line[strlen(line)-1] == '\r' ) line[strlen(line)-1] = (char)0; 74 } 75 /* check the file format is valid */ 76 if ( !strcmp ( line , PLAYLIST_FILE_HEADER_0_5 ) ) 77 { 78 i_format = 5; 79 } 80 else if( !strcmp ( line , PLAYLIST_FILE_HEADER_0_6 ) ) 81 { 82 i_format = 6; 83 } 84 else 85 { 86 msg_Err( p_playlist, "playlist file %s format is unsupported" 87 , psz_filename ); 88 fclose( file ); 89 return -1; 90 } 91 92 /* stop playing */ 93 i_current_status = p_playlist->i_status; 94 if ( p_playlist->i_status != PLAYLIST_STOPPED ) 95 { 96 playlist_Stop ( p_playlist ); 97 } 98 99 /* delete current content of the playlist */ 100 for( i = p_playlist->i_size - 1; i >= 0; i-- ) 101 { 102 playlist_Delete ( p_playlist , i ); 103 } 104 105 /* simply add each line */ 106 while( fgets( line, 1024, file ) ) 107 { 108 /* ignore comments or empty lines */ 109 if( (line[0] == '#') || (line[0] == '\r') || (line[0] == '\n') 110 || (line[0] == (char)0) ) 111 continue; 112 113 /* get rid of line feed */ 114 if( line[strlen(line)-1] == '\n' || line[strlen(line)-1] == '\r' ) 115 { 116 line[strlen(line)-1] = (char)0; 117 if( line[strlen(line)-1] == '\r' ) line[strlen(line)-1] = (char)0; 118 } 119 if( i_format == 5 ) 120 { 121 playlist_Add ( p_playlist , (char *)&line , (char *)&line, 122 PLAYLIST_APPEND , PLAYLIST_END ); 123 } 124 else 125 { 126 msg_Warn( p_playlist, "Not supported yet"); 127 } 128 } 129 130 /* start playing */ 131 if ( i_current_status != PLAYLIST_STOPPED ) 132 { 133 playlist_Play ( p_playlist ); 134 } 135 136 fclose( file ); 137 138 return 0; 72 return VLC_SUCCESS; 139 73 } 140 74 … … 142 76 * playlist_SaveFile: Save a playlist in a file. 143 77 *****************************************************************************/ 144 int playlist_SaveFile( playlist_t * p_playlist, const char * psz_filename ) 78 int playlist_Export( playlist_t * p_playlist, const char *psz_filename , 79 const char *psz_type) 145 80 { 146 FILE *file; 147 int i; 81 extern int errno; 82 module_t *p_module; 83 playlist_export_t *p_export; 148 84 85 msg_Info( p_playlist, "Saving playlist to file %s", psz_filename ); 86 87 /* Prepare the playlist_export_t structure */ 88 p_export = (playlist_export_t *)malloc( sizeof(playlist_export_t) ); 89 if( !p_export) 90 { 91 msg_Err( p_playlist, "Out of memory"); 92 return VLC_ENOMEM; 93 } 94 p_export->p_file = fopen( psz_filename, "wt" ); 95 if( !p_export->p_file ) 96 { 97 msg_Err( p_playlist , "Could not create playlist file %s (%s)" 98 , psz_filename, strerror(errno) ); 99 return -1; 100 } 101 102 p_playlist->p_private = (void *)p_export; 103 /* Lock the playlist */ 149 104 vlc_mutex_lock( &p_playlist->object_lock ); 150 105 151 msg_Dbg( p_playlist, "saving playlist file %s", psz_filename ); 106 /* And call the module ! All work is done now */ 107 p_module = module_Need( p_playlist, "playlist export", psz_type); 108 if( !p_module ) 109 { 110 msg_Warn( p_playlist, "Failed to export playlist" ); 111 vlc_mutex_unlock( &p_playlist->object_lock ); 112 return VLC_ENOOBJ; 113 } 114 module_Unneed( p_playlist , p_module ); 152 115 153 file = fopen( psz_filename, "wt" ); 154 if( !file ) 155 { 156 msg_Err( p_playlist , "could not create playlist file %s" 157 , psz_filename ); 158 return -1; 159 } 160 /* Save is done in 0_5 mode at the moment*/ 161 162 fprintf( file , PLAYLIST_FILE_HEADER_0_5 "\n" ); 163 164 for ( i = 0 ; i < p_playlist->i_size ; i++ ) 165 { 166 fprintf( file , p_playlist->pp_items[i]->psz_uri ); 167 fprintf( file , "\n" ); 168 } 169 #if 0 170 fprintf( file, PLAYLIST_FILE_HEADER_0_6 "\n" ); 171 172 for ( i=0 ; i< p_playlist->i_size ; i++ ) 173 { 174 fprintf( file, p_playlist->pp_items[i]->psz_uri ); 175 fprintf( file, "||" ); 176 fprintf( file, p_playlist->pp_items[i]->psz_name ); 177 fprintf( file, "||" ); 178 fprintf( file, "%i",p_playlist->pp_items[i]->b_enabled = VLC_TRUE ? 179 1:0 ); 180 fprintf( file, "||" ); 181 fprintf( file, "%i", p_playlist->pp_items[i]->i_group ); 182 fprintf( file, "||" ); 183 fprintf( file, p_playlist->pp_items[i]->psz_author ); 184 fprintf( file , "\n" ); 185 } 186 #endif 187 fclose( file ); 116 fclose( p_export->p_file ); 188 117 189 118 vlc_mutex_unlock( &p_playlist->object_lock ); 190 119 191 return 0;120 return VLC_SUCCESS; 192 121 }
