Commit 85c7ea2e authored by Clément Stenac's avatar Clément Stenac

* ALL: playlist API changes

What may be broken (untested):
------------------------------
   - Theora and Speex decoders
   - some interfaces
   - VCDX and CDDAX access

The problems shouldn't hopefully excess compilation glitches.
(removal of AddExt, of psz_author, and prototype of Add)

Additionnaly, interfaces that do not support item-change will have
update problems.

* Updated modules list
parent 1595dc25
List of vlc plugins (221) List of vlc plugins (221)
$Id: LIST,v 1.18 2003/12/06 22:47:37 jpsaman Exp $ $Id: LIST,v 1.19 2004/01/05 13:07:02 zorglub Exp $
* a52: A/52 basic parser/packetizer * a52: A/52 basic parser/packetizer
...@@ -31,6 +31,8 @@ $Id: LIST,v 1.18 2003/12/06 22:47:37 jpsaman Exp $ ...@@ -31,6 +31,8 @@ $Id: LIST,v 1.18 2003/12/06 22:47:37 jpsaman Exp $
* access_output_udp: UDP Network access_output module * access_output_udp: UDP Network access_output module
* access_tcp: TCP Network access module
* access_udp: UDP Network access module * access_udp: UDP Network access module
* adjust: Contrast/Hue/saturation/Brightness adjust module * adjust: Contrast/Hue/saturation/Brightness adjust module
...@@ -93,6 +95,8 @@ $Id: LIST,v 1.18 2003/12/06 22:47:37 jpsaman Exp $ ...@@ -93,6 +95,8 @@ $Id: LIST,v 1.18 2003/12/06 22:47:37 jpsaman Exp $
* dts: DTS basic parser/packetizer * dts: DTS basic parser/packetizer
* dtssys: raw DTS stream input module
* dtstospdif: Audio converter that encapsulates DTS into S/PDIF * dtstospdif: Audio converter that encapsulates DTS into S/PDIF
* dummy: dummy audio output, video output, interface and input modules. * dummy: dummy audio output, video output, interface and input modules.
...@@ -178,18 +182,18 @@ $Id: LIST,v 1.18 2003/12/06 22:47:37 jpsaman Exp $ ...@@ -178,18 +182,18 @@ $Id: LIST,v 1.18 2003/12/06 22:47:37 jpsaman Exp $
* i420_rgb_mmx: MMX accelerated version of i420_rgb. * i420_rgb_mmx: MMX accelerated version of i420_rgb.
* i420_ymga_mmx: MMX accelerated version of i420_ymga
* i420_ymga: YUV to YUC conversion functions * i420_ymga: YUV to YUC conversion functions
* i420_yuy2_mmx: MMX accelerated version of i420_yuy2. * i420_ymga_mmx: MMX accelerated version of i420_ymga
* i420_yuy2: planar 4:2:0 YUV to packed YUV conversion functions. * i420_yuy2: planar 4:2:0 YUV to packed YUV conversion functions.
* i422_yuy2_mmx: MMX accelerated version of i422_yuy2. * i420_yuy2_mmx: MMX accelerated version of i420_yuy2.
* i422_yuy2: planar 4:2:2 YUV to packed YUV conversion functions. * i422_yuy2: planar 4:2:2 YUV to packed YUV conversion functions.
* i422_yuy2_mmx: MMX accelerated version of i422_yuy2.
* id3: ID3 tag skipper * id3: ID3 tag skipper
* id3tag: ID3 tag parser/skipper using libid3tag * id3tag: ID3 tag parser/skipper using libid3tag
...@@ -226,14 +230,14 @@ $Id: LIST,v 1.18 2003/12/06 22:47:37 jpsaman Exp $ ...@@ -226,14 +230,14 @@ $Id: LIST,v 1.18 2003/12/06 22:47:37 jpsaman Exp $
* memcpy3dn: 3D Now! accelerated version of memcpy. * memcpy3dn: 3D Now! accelerated version of memcpy.
* memcpyaltivec: Altivec accelerated version of memcpy.
* memcpy: memory chunk copying module. * memcpy: memory chunk copying module.
* memcpymmxext: MMX EXT accelerated version of memcpy. * memcpyaltivec: Altivec accelerated version of memcpy.
* memcpymmx: MMX accelerated version of memcpy. * memcpymmx: MMX accelerated version of memcpy.
* memcpymmxext: MMX EXT accelerated version of memcpy.
* mga: video output module for Matrox cards using the Linux mga kernel driver. * mga: video output module for Matrox cards using the Linux mga kernel driver.
* mkv: Matroska demuxer * mkv: Matroska demuxer
...@@ -250,6 +254,8 @@ $Id: LIST,v 1.18 2003/12/06 22:47:37 jpsaman Exp $ ...@@ -250,6 +254,8 @@ $Id: LIST,v 1.18 2003/12/06 22:47:37 jpsaman Exp $
* mpgatofixed32: MPEG-1 & 2 audio layer I,II,III audio decoder using MAD * mpgatofixed32: MPEG-1 & 2 audio layer I,II,III audio decoder using MAD
* mpgv: MPEG-I/II Vido demuxer
* mux_asf: ASF muxer * mux_asf: ASF muxer
* mux_avi: AVI muxer * mux_avi: AVI muxer
...@@ -262,10 +268,10 @@ $Id: LIST,v 1.18 2003/12/06 22:47:37 jpsaman Exp $ ...@@ -262,10 +268,10 @@ $Id: LIST,v 1.18 2003/12/06 22:47:37 jpsaman Exp $
* mux_ps: MPEG program stream muxer * mux_ps: MPEG program stream muxer
* mux_ts_dvbpsi: MPEG transport stream muxer using libdvbpsi
* mux_ts: MPEG transport stream muxer * mux_ts: MPEG transport stream muxer
* mux_ts_dvbpsi: MPEG transport stream muxer using libdvbpsi
* ncurses: interface module using the ncurses library. * ncurses: interface module using the ncurses library.
* ntservice: run VLC as a NT service * ntservice: run VLC as a NT service
...@@ -288,21 +294,21 @@ $Id: LIST,v 1.18 2003/12/06 22:47:37 jpsaman Exp $ ...@@ -288,21 +294,21 @@ $Id: LIST,v 1.18 2003/12/06 22:47:37 jpsaman Exp $
* postprocessing_c: Video Postprocessing module * postprocessing_c: Video Postprocessing module
* postprocessing_mmxext: Video Postprocessing module using MMX_EXT
* postprocessing_mmx: Video Postprocessing module using MMX * postprocessing_mmx: Video Postprocessing module using MMX
* postprocessing_mmxext: Video Postprocessing module using MMX_EXT
* ps: input module for MPEG PS decapsulation. * ps: input module for MPEG PS decapsulation.
* pvr: input module to read from a PVR card * pvr: input module to read from a PVR card
* qnx: QNX RTOS plugin * qnx: QNX RTOS plugin
* qte_main: QT Embedded wrapper for gte_main * qt: interface module using the Qt widget set.
* qte: video output module for Qt Embedded. * qte: video output module for Qt Embedded.
* qt: interface module using the Qt widget set. * qte_main: QT Embedded wrapper for gte_main
* quicktime: Quicktime decoder that uses the QT library * quicktime: Quicktime decoder that uses the QT library
...@@ -348,10 +354,10 @@ $Id: LIST,v 1.18 2003/12/06 22:47:37 jpsaman Exp $ ...@@ -348,10 +354,10 @@ $Id: LIST,v 1.18 2003/12/06 22:47:37 jpsaman Exp $
* stream_out_gather: stream out module gathering inputs for seemless transitions * stream_out_gather: stream out module gathering inputs for seemless transitions
* stream_out_standard: standard stream output module
* stream_out_rtp: output using the RTP protocol * stream_out_rtp: output using the RTP protocol
* stream_out_standard: standard stream output module
* stream_out_transcode: audio & video transcoder using ffmpeg * stream_out_transcode: audio & video transcoder using ffmpeg
* stream_out_transrate: audio & video transrater using ffmpeg * stream_out_transrate: audio & video transrater using ffmpeg
...@@ -383,10 +389,10 @@ $Id: LIST,v 1.18 2003/12/06 22:47:37 jpsaman Exp $ ...@@ -383,10 +389,10 @@ $Id: LIST,v 1.18 2003/12/06 22:47:37 jpsaman Exp $
* trivial_resampler: Simple audio resampler * trivial_resampler: Simple audio resampler
* ts_dvbpsi: same as ts using libdvbpsi
* ts: input module for MPEG TS decapsulation. * ts: input module for MPEG TS decapsulation.
* ts_dvbpsi: same as ts using libdvbpsi
* u8tofixed32: unsigned 8 bits to fixed 32 bits audio converter * u8tofixed32: unsigned 8 bits to fixed 32 bits audio converter
* u8tofloat32: unsigned 8 bits to float 32 bits audio converter * u8tofloat32: unsigned 8 bits to float 32 bits audio converter
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* cddax.c : CD digital audio input module for vlc using libcdio * cddax.c : CD digital audio input module for vlc using libcdio
***************************************************************************** *****************************************************************************
* Copyright (C) 2000,2003 VideoLAN * Copyright (C) 2000,2003 VideoLAN
* $Id: access.c,v 1.19 2003/12/28 20:50:20 asmax Exp $ * $Id: access.c,v 1.20 2004/01/05 13:07:02 zorglub Exp $
* *
* Authors: Rocky Bernstein <rocky@panix.com> * Authors: Rocky Bernstein <rocky@panix.com>
* Laurent Aimar <fenrir@via.ecp.fr> * Laurent Aimar <fenrir@via.ecp.fr>
...@@ -314,16 +314,21 @@ static void CDDASeek( input_thread_t * p_input, off_t i_off ) ...@@ -314,16 +314,21 @@ static void CDDASeek( input_thread_t * p_input, off_t i_off )
if ( str ) { \ if ( str ) { \
dbg_print( INPUT_DBG_META, "field %s: %s\n", title, str); \ dbg_print( INPUT_DBG_META, "field %s: %s\n", title, str); \
input_AddInfo( p_cat, _(title), "%s", str ); \ input_AddInfo( p_cat, _(title), "%s", str ); \
playlist_AddInfo( p_playlist, -1, p_cat->psz_name, \
_(title), "%s" , str ); \
} }
static void InformationCreate( input_thread_t *p_input ) static void InformationCreate( input_thread_t *p_input )
{ {
cdda_data_t *p_cdda = (cdda_data_t *) p_input->p_access_data; cdda_data_t *p_cdda = (cdda_data_t *) p_input->p_access_data;
playlist_t *p_playlist = vlc_object_find( p_input, VLC_OBJECT_PLAYLIST,
FIND_PARENT );
input_info_category_t *p_cat; input_info_category_t *p_cat;
p_cat = input_InfoCategory( p_input, "General" ); p_cat = input_InfoCategory( p_input, "General" );
#ifdef HAVE_LIBCDDB #ifdef HAVE_LIBCDDB
if (p_cdda->i_cddb_enabled) { if (p_cdda->i_cddb_enabled) {
...@@ -363,6 +368,7 @@ static void InformationCreate( input_thread_t *p_input ) ...@@ -363,6 +368,7 @@ static void InformationCreate( input_thread_t *p_input )
input_AddInfo( p_cat, _("Duration"), "%s", input_AddInfo( p_cat, _("Duration"), "%s",
secstotimestr( psz_buffer, i_duration ) ); secstotimestr( psz_buffer, i_duration ) );
} }
if( p_playlist ) vlc_object_release( p_playlist );
} }
...@@ -655,21 +661,17 @@ CDDACreatePlayListItem(const input_thread_t *p_input, cdda_data_t *p_cdda, ...@@ -655,21 +661,17 @@ CDDACreatePlayListItem(const input_thread_t *p_input, cdda_data_t *p_cdda,
dbg_print( INPUT_DBG_META, "mrl: %s, title: %s, duration, %ld, pos %d", dbg_print( INPUT_DBG_META, "mrl: %s, title: %s, duration, %ld, pos %d",
psz_mrl, p_title, (long int) i_duration, i_pos ); psz_mrl, p_title, (long int) i_duration, i_pos );
playlist_Add( p_playlist, psz_mrl, p_title, playlist_operation, i_pos );
playlist_AddExt( p_playlist, psz_mrl, p_title, i_duration * 1000000, /* XXX Set the duration ! */
0, 0, playlist_operation, i_pos );
p_author = p_author =
CDDAFormatStr( p_input, p_cdda, CDDAFormatStr( p_input, p_cdda,
config_GetPsz( p_input, MODULE_STRING "-author-format" ), config_GetPsz( p_input, MODULE_STRING "-author-format" ),
psz_mrl, i_track ); psz_mrl, i_track );
/* FIXME: This is horrible, but until the playlist interface is fixed up
something like this has to be done for the "Author" field.
*/
if( i_pos == PLAYLIST_END ) i_pos = p_playlist->i_size - 1; if( i_pos == PLAYLIST_END ) i_pos = p_playlist->i_size - 1;
free(p_playlist->pp_items[i_pos]->psz_author); playlist_AddInfo( p_playlist, i_pos, _("General"),_("Author"),p_author);
p_playlist->pp_items[i_pos]->psz_author = strdup(p_author);
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* http.c: HTTP access plug-in * http.c: HTTP access plug-in
***************************************************************************** *****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN * Copyright (C) 2001, 2002 VideoLAN
* $Id: http.c,v 1.49 2004/01/03 18:41:36 rocky Exp $ * $Id: http.c,v 1.50 2004/01/05 13:07:02 zorglub Exp $
* *
* Authors: Christophe Massiot <massiot@via.ecp.fr> * Authors: Christophe Massiot <massiot@via.ecp.fr>
* *
...@@ -350,7 +350,7 @@ static int HTTPConnect( input_thread_t * p_input, off_t i_tell ) ...@@ -350,7 +350,7 @@ static int HTTPConnect( input_thread_t * p_input, off_t i_tell )
i_code, psz_answer, psz_value ); i_code, psz_answer, psz_value );
p_playlist->pp_items[p_playlist->i_index]->b_autodeletion p_playlist->pp_items[p_playlist->i_index]->b_autodeletion
= VLC_TRUE; = VLC_TRUE;
playlist_Add( p_playlist, psz_value, NULL, 0, playlist_Add( p_playlist, psz_value, psz_value,
PLAYLIST_INSERT | PLAYLIST_GO, PLAYLIST_INSERT | PLAYLIST_GO,
p_playlist->i_index + 1 ); p_playlist->i_index + 1 );
vlc_object_release( p_playlist ); vlc_object_release( p_playlist );
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* slp.c: SLP access plugin * slp.c: SLP access plugin
***************************************************************************** *****************************************************************************
* Copyright (C) 2001, 2002 VideoLAN * Copyright (C) 2001, 2002 VideoLAN
* $Id: slp.c,v 1.17 2003/10/29 17:32:54 zorglub Exp $ * $Id: slp.c,v 1.18 2004/01/05 13:07:02 zorglub Exp $
* *
* Authors: Loc Minier <lool@videolan.org> * Authors: Loc Minier <lool@videolan.org>
* *
...@@ -187,14 +187,13 @@ static SLPBoolean SrvUrlCallback( SLPHandle slph_slp, ...@@ -187,14 +187,13 @@ static SLPBoolean SrvUrlCallback( SLPHandle slph_slp,
p_playlist_item->psz_name = NULL; p_playlist_item->psz_name = NULL;
p_playlist_item->psz_uri = strdup( psz_s ); p_playlist_item->psz_uri = strdup( psz_s );
p_playlist_item->i_type = 0;
p_playlist_item->i_status = 0; p_playlist_item->i_status = 0;
p_playlist_item->b_autodeletion = VLC_FALSE; p_playlist_item->b_autodeletion = VLC_FALSE;
p_playlist_item->i_options = 0; p_playlist_item->i_duration = -1;
p_playlist_item->ppsz_options = 0;
p_playlist_item->psz_author = NULL;
p_playlist_item->i_group = i_group; p_playlist_item->i_group = i_group;
p_playlist_item->b_enabled = VLC_TRUE; p_playlist_item->b_enabled = VLC_TRUE;
p_playlist_item->pp_categories = NULL;
p_playlist_item->i_categories = NULL;
/* search the description of the stream */ /* search the description of the stream */
if( SLPOpen( config_GetPsz( p_input, "slp-lang" ), if( SLPOpen( config_GetPsz( p_input, "slp-lang" ),
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
* to go here. * to go here.
***************************************************************************** *****************************************************************************
* Copyright (C) 2000, 2003, 2004 VideoLAN * Copyright (C) 2000, 2003, 2004 VideoLAN
* $Id: access.c,v 1.14 2004/01/03 20:43:24 rocky Exp $ * $Id: access.c,v 1.15 2004/01/05 13:07:02 zorglub Exp $
* *
* Authors: Rocky Bernstein <rocky@panix.com> * Authors: Rocky Bernstein <rocky@panix.com>
* Johan Bilien <jobi@via.ecp.fr> * Johan Bilien <jobi@via.ecp.fr>
...@@ -980,11 +980,15 @@ VCDUpdateVar( input_thread_t *p_input, int i_num, int i_action, ...@@ -980,11 +980,15 @@ VCDUpdateVar( input_thread_t *p_input, int i_num, int i_action,
if ( str ) { \ if ( str ) { \
dbg_print( INPUT_DBG_META, "field: %s: %s\n", title, str); \ dbg_print( INPUT_DBG_META, "field: %s: %s\n", title, str); \
input_AddInfo( p_cat, _(title), "%s", str ); \ input_AddInfo( p_cat, _(title), "%s", str ); \
playlist_AddInfo( p_playlist, -1, p_cat->psz_name, _(title), \
"%s",str );
} }
#define meta_info_add_num(title, num) \ #define meta_info_add_num(title, num) \
dbg_print( INPUT_DBG_META, "field %s: %d\n", title, num); \ dbg_print( INPUT_DBG_META, "field %s: %d\n", title, num); \
input_AddInfo( p_cat, _(title), "%d", num ); \ input_AddInfo( p_cat, _(title), "%d", num ); \
playlist_AddInfo( p_playlist, -1, p_cat->psz_name, _(title), \
"%d",num );
static void InformationCreate( input_thread_t *p_input ) static void InformationCreate( input_thread_t *p_input )
{ {
...@@ -992,7 +996,12 @@ static void InformationCreate( input_thread_t *p_input ) ...@@ -992,7 +996,12 @@ static void InformationCreate( input_thread_t *p_input )
unsigned int i_nb = vcdinfo_get_num_entries(p_vcd->vcd); unsigned int i_nb = vcdinfo_get_num_entries(p_vcd->vcd);
unsigned int last_entry = 0; unsigned int last_entry = 0;
input_info_category_t *p_cat; input_info_category_t *p_cat;
<<<<<<< access.c
playlist_item_t *p_playlist = vlc_object_find( p_input, VLC_OBJECT_PLAYLIST,
FIND_PARENT );
=======
track_t i_track; track_t i_track;
>>>>>>> 1.14
p_cat = input_InfoCategory( p_input, "General" ); p_cat = input_InfoCategory( p_input, "General" );
...@@ -1024,6 +1033,9 @@ static void InformationCreate( input_thread_t *p_input ) ...@@ -1024,6 +1033,9 @@ static void InformationCreate( input_thread_t *p_input )
meta_info_add_num( _("Tracks"), meta_info_add_num( _("Tracks"),
vcdinfo_get_num_tracks(p_vcd->vcd)); vcdinfo_get_num_tracks(p_vcd->vcd));
<<<<<<< access.c
if( p_playlist) vlc_object_release( p_playlist );
=======
/* Spit out track information. Could also include MSF info. /* Spit out track information. Could also include MSF info.
*/ */
...@@ -1047,6 +1059,7 @@ static void InformationCreate( input_thread_t *p_input ) ...@@ -1047,6 +1059,7 @@ static void InformationCreate( input_thread_t *p_input )
last_entry++ ) ; last_entry++ ) ;
meta_info_add_num( _("Last Entry Point"), last_entry-1 ); meta_info_add_num( _("Last Entry Point"), last_entry-1 );
} }
>>>>>>> 1.14
} }
#define add_format_str_info(val) \ #define add_format_str_info(val) \
...@@ -1275,8 +1288,7 @@ VCDCreatePlayListItem(const input_thread_t *p_input, ...@@ -1275,8 +1288,7 @@ VCDCreatePlayListItem(const input_thread_t *p_input,
config_GetPsz( p_input, MODULE_STRING "-title-format" ), config_GetPsz( p_input, MODULE_STRING "-title-format" ),
psz_mrl, itemid ); psz_mrl, itemid );
playlist_AddExt( p_playlist, psz_mrl, p_title, i_duration, playlist_Add( p_playlist, psz_mrl, p_title, playlist_operation, i_pos );
0, 0, playlist_operation, i_pos );
p_author = p_author =
VCDFormatStr( p_input, p_vcd, VCDFormatStr( p_input, p_vcd,
...@@ -1287,8 +1299,7 @@ VCDCreatePlayListItem(const input_thread_t *p_input, ...@@ -1287,8 +1299,7 @@ VCDCreatePlayListItem(const input_thread_t *p_input,
something like this has to be done for the "Author" field. something like this has to be done for the "Author" field.
*/ */
if( i_pos == PLAYLIST_END ) i_pos = p_playlist->i_size - 1; if( i_pos == PLAYLIST_END ) i_pos = p_playlist->i_size - 1;
free(p_playlist->pp_items[i_pos]->psz_author); playlist_AddInfo(p_playlist, i_pos, _("General"), _("Author"), "%s",p_author);
p_playlist->pp_items[i_pos]->psz_author = strdup(p_author);
} }
static int static int
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* speex.c: speex decoder/packetizer/encoder module making use of libspeex. * speex.c: speex decoder/packetizer/encoder module making use of libspeex.
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: speex.c,v 1.8 2003/12/22 02:24:51 sam Exp $ * $Id: speex.c,v 1.9 2004/01/05 13:07:02 zorglub Exp $
* *
* Authors: Gildas Bazin <gbazin@netcourrier.com> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* *
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
*****************************************************************************/ *****************************************************************************/
#include <vlc/vlc.h> #include <vlc/vlc.h>
#include <vlc/decoder.h> #include <vlc/decoder.h>
#include "vlc_playlist.h"
#include <ogg/ogg.h> #include <ogg/ogg.h>
#include <speex.h> #include <speex.h>
...@@ -461,6 +462,8 @@ static void ParseSpeexComments( decoder_t *p_dec, ogg_packet *p_oggpacket ) ...@@ -461,6 +462,8 @@ static void ParseSpeexComments( decoder_t *p_dec, ogg_packet *p_oggpacket )
input_info_category_t *p_cat = input_info_category_t *p_cat =
input_InfoCategory( p_input, _("Speex comment") ); input_InfoCategory( p_input, _("Speex comment") );
playlist_t *p_playlist = vlc_object_find( p_dec, VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE );
char *p_buf = (char *)p_oggpacket->packet; char *p_buf = (char *)p_oggpacket->packet;
SpeexMode *p_mode; SpeexMode *p_mode;
...@@ -469,6 +472,8 @@ static void ParseSpeexComments( decoder_t *p_dec, ogg_packet *p_oggpacket ) ...@@ -469,6 +472,8 @@ static void ParseSpeexComments( decoder_t *p_dec, ogg_packet *p_oggpacket )
p_mode = speex_mode_list[p_sys->p_header->mode]; p_mode = speex_mode_list[p_sys->p_header->mode];
input_AddInfo( p_cat, _("Mode"), "%s%s", input_AddInfo( p_cat, _("Mode"), "%s%s",
p_mode->modeName, p_sys->p_header->vbr ? " VBR" : "" ); p_mode->modeName, p_sys->p_header->vbr ? " VBR" : "" );
playlist_AddInfo( p_playlist, -1, _("Speex comment") , _("Mode"), "%s%s",
p_mode->modeName, p_sys->p_header->vbr ? " VBR" : "" );
if( p_oggpacket->bytes < 8 ) if( p_oggpacket->bytes < 8 )
{ {
...@@ -484,6 +489,9 @@ static void ParseSpeexComments( decoder_t *p_dec, ogg_packet *p_oggpacket ) ...@@ -484,6 +489,9 @@ static void ParseSpeexComments( decoder_t *p_dec, ogg_packet *p_oggpacket )
} }
input_AddInfo( p_cat, p_buf, "" ); input_AddInfo( p_cat, p_buf, "" );
playlist_AddInfo( p_playlist, -1, _("Speex comment") , p_buf , "" );
if( p_playlist ) vlc_object_release( p_playlist );
/* TODO: finish comments parsing */ /* TODO: finish comments parsing */
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* theora.c: theora decoder module making use of libtheora. * theora.c: theora decoder module making use of libtheora.
***************************************************************************** *****************************************************************************
* Copyright (C) 1999-2001 VideoLAN * Copyright (C) 1999-2001 VideoLAN
* $Id: theora.c,v 1.21 2003/12/22 02:24:51 sam Exp $ * $Id: theora.c,v 1.22 2004/01/05 13:07:02 zorglub Exp $
* *
* Authors: Gildas Bazin <gbazin@netcourrier.com> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* *
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include <vlc/vlc.h> #include <vlc/vlc.h>
#include <vlc/decoder.h> #include <vlc/decoder.h>
#include "input_ext-plugins.h" #include "input_ext-plugins.h"
#include "vlc_playlist.h"
#include <ogg/ogg.h> #include <ogg/ogg.h>
...@@ -337,6 +338,8 @@ static void ParseTheoraComments( decoder_t *p_dec ) ...@@ -337,6 +338,8 @@ static void ParseTheoraComments( decoder_t *p_dec )
input_thread_t *p_input = (input_thread_t *)p_dec->p_parent; input_thread_t *p_input = (input_thread_t *)p_dec->p_parent;
input_info_category_t *p_cat = input_info_category_t *p_cat =
input_InfoCategory( p_input, _("Theora comment") ); input_InfoCategory( p_input, _("Theora comment") );
playlist_t *p_playlist = vlc_object_find( p_dec, VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE );
int i = 0; int i = 0;
char *psz_name, *psz_value, *psz_comment; char *psz_name, *psz_value, *psz_comment;
while ( i < p_dec->p_sys->tc.comments ) while ( i < p_dec->p_sys->tc.comments )
...@@ -354,10 +357,13 @@ static void ParseTheoraComments( decoder_t *p_dec ) ...@@ -354,10 +357,13 @@ static void ParseTheoraComments( decoder_t *p_dec )
*psz_value = '\0'; *psz_value = '\0';
psz_value++; psz_value++;
input_AddInfo( p_cat, psz_name, psz_value ); input_AddInfo( p_cat, psz_name, psz_value );
playlist_AddInfo( p_playlist, -1, _("Theora comment") ,
psz_name, psz_value );
} }
free( psz_comment ); free( psz_comment );
i++; i++;
} }
if( p_playlist) vlc_object_release( p_playlist );
} }
/***************************************************************************** /*****************************************************************************
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vorbis.c: vorbis decoder/encoder/packetizer module making use of libvorbis. * vorbis.c: vorbis decoder/encoder/packetizer module making use of libvorbis.
***************************************************************************** *****************************************************************************
* Copyright (C) 2001-2003 VideoLAN * Copyright (C) 2001-2003 VideoLAN
* $Id: vorbis.c,v 1.28 2003/12/22 02:24:51 sam Exp $ * $Id: vorbis.c,v 1.29 2004/01/05 13:07:02 zorglub Exp $
* *
* Authors: Gildas Bazin <gbazin@netcourrier.com> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* *
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
*****************************************************************************/ *****************************************************************************/
#include <vlc/vlc.h> #include <vlc/vlc.h>
#include <vlc/decoder.h> #include <vlc/decoder.h>
#include "vlc_playlist.h"
#include <ogg/ogg.h> #include <ogg/ogg.h>
...@@ -453,6 +454,8 @@ static void ParseVorbisComments( decoder_t *p_dec ) ...@@ -453,6 +454,8 @@ static void ParseVorbisComments( decoder_t *p_dec )
input_thread_t *p_input = (input_thread_t *)p_dec->p_parent; input_thread_t *p_input = (input_thread_t *)p_dec->p_parent;
input_info_category_t *p_cat = input_info_category_t *p_cat =
input_InfoCategory( p_input, _("Vorbis comment") ); input_InfoCategory( p_input, _("Vorbis comment") );
playlist_t *p_playlist = vlc_object_find( p_dec, VLC_OBJECT_PLAYLIST,
FIND_ANYWHERE );
int i = 0; int i = 0;
char *psz_name, *psz_value, *psz_comment; char *psz_name, *psz_value, *psz_comment;
while ( i < p_dec->p_sys->vc.comments ) while ( i < p_dec->p_sys->vc.comments )
...@@ -470,10 +473,13 @@ static void ParseVorbisComments( decoder_t *p_dec ) ...@@ -470,10 +473,13 @@ static void ParseVorbisComments( decoder_t *p_dec )
*psz_value = '\0'; *psz_value = '\0';
psz_value++; psz_value++;
input_AddInfo( p_cat, psz_name, psz_value ); input_AddInfo( p_cat, psz_name, psz_value );
playlist_AddInfo( p_playlist, -1, _("Vorbis comment") ,
psz_name, psz_value );
} }
free( psz_comment ); free( psz_comment );
i++; i++;
} }
if( p_playlist ) vlc_object_release( p_playlist );
} }
/***************************************************************************** /*****************************************************************************
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* corba.c : CORBA (ORBit) remote control plugin for vlc * corba.c : CORBA (ORBit) remote control plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: corba.c,v 1.2 2003/07/23 01:13:47 gbazin Exp $ * $Id: corba.c,v 1.3 2004/01/05 13:07:02 zorglub Exp $
* *
* Authors: Olivier Aubert <oaubert at lisi dot univ-lyon1 dot fr> * Authors: Olivier Aubert <oaubert at lisi dot univ-lyon1 dot fr>
* *
...@@ -560,7 +560,7 @@ impl_VLC_MediaControl_add_to_playlist(impl_POA_VLC_MediaControl * servant, ...@@ -560,7 +560,7 @@ impl_VLC_MediaControl_add_to_playlist(impl_POA_VLC_MediaControl * servant,
return; return;
} }
playlist_Add (p_playlist, psz_file, 0, 0, PLAYLIST_REPLACE, 0); playlist_Add (p_playlist, psz_file, psz_file , PLAYLIST_REPLACE, 0);
vlc_object_release( p_playlist ); vlc_object_release( p_playlist );
return; return;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* http.c : http mini-server ;) * http.c : http mini-server ;)
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: http.c,v 1.41 2003/12/21 23:32:58 sam Exp $ * $Id: http.c,v 1.42 2004/01/05 13:07:02 zorglub Exp $
* *
* Authors: Gildas Bazin <gbazin@netcourrier.com> * Authors: Gildas Bazin <gbazin@netcourrier.com>
* Laurent Aimar <fenrir@via.ecp.fr> * Laurent Aimar <fenrir@via.ecp.fr>
...@@ -2948,20 +2948,15 @@ playlist_item_t * parse_MRL( char *psz ) ...@@ -2948,20 +2948,15 @@ playlist_item_t * parse_MRL( char *psz )
p_item->psz_name = mrl; p_item->psz_name = mrl;
p_item->psz_uri = strdup( mrl ); p_item->psz_uri = strdup( mrl );
p_item->psz_author = strdup( "" );
p_item->i_duration = -1; p_item->i_duration = -1;
p_item->i_type = 0;
p_item->i_status = 0; p_item->i_status = 0;
p_item->b_autodeletion = VLC_FALSE; p_item->b_autodeletion = VLC_FALSE;
p_item->b_enabled = VLC_TRUE; p_item->b_enabled = VLC_TRUE;
p_item->i_group = PLAYLIST_TYPE_MANUAL; p_item->i_group = PLAYLIST_TYPE_MANUAL;
p_item->ppsz_options = NULL; for( i = 0 ; i< i_options ; i++ )
p_item->i_options = i_options;
if( i_options )
{ {
p_item->ppsz_options = ppsz_options; playlist_AddItemOption( p_item, ppsz_options[i] );
} }
return p_item; return p_item;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* rc.c : remote control stdin/stdout plugin for vlc * rc.c : remote control stdin/stdout plugin for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: rc.c,v 1.40 2003/12/22 14:32:55 sam Exp $ * $Id: rc.c,v 1.41 2004/01/05 13:07:02 zorglub Exp $
* *
* Author: Peter Surda <shurdeek@panorama.sth.ac.at> * Author: Peter Surda <shurdeek@panorama.sth.ac.at>
* *
...@@ -655,7 +655,7 @@ static int Playlist( vlc_object_t *p_this, char const *psz_cmd, ...@@ -655,7 +655,7 @@ static int Playlist( vlc_object_t *p_this, char const *psz_cmd,
else if( !strcmp( psz_cmd, "add" ) ) else if( !strcmp( psz_cmd, "add" ) )
{ {
printf( "trying to add %s to playlist\n", newval.psz_string ); printf( "trying to add %s to playlist\n", newval.psz_string );
playlist_Add( p_playlist, newval.psz_string, NULL, 0, playlist_Add( p_playlist, newval.psz_string, newval.psz_string,
PLAYLIST_GO|PLAYLIST_APPEND, PLAYLIST_END ); PLAYLIST_GO|PLAYLIST_APPEND, PLAYLIST_END );
} }
else if( !strcmp( psz_cmd, "playlist" ) ) else if( !strcmp( psz_cmd, "playlist" ) )
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* m3u.c: a meta demux to parse pls, m3u, asx et b4s playlists * m3u.c: a meta demux to parse pls, m3u, asx et b4s playlists
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: m3u.c,v 1.24 2003/08/14 13:02:55 sigmunau Exp $ * $Id: m3u.c,v 1.25 2004/01/05 13:07:02 zorglub Exp $
* *
* Authors: Sigmund Augdal <sigmunau@idi.ntnu.no> * Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
* Gildas Bazin <gbazin@netcourrier.com> * Gildas Bazin <gbazin@netcourrier.com>
...@@ -551,9 +551,9 @@ static void ProcessLine ( input_thread_t *p_input, playlist_t *p_playlist, ...@@ -551,9 +551,9 @@ static void ProcessLine ( input_thread_t *p_input, playlist_t *p_playlist,
if( b_next && *ppsz_uri ) if( b_next && *ppsz_uri )
{ {
playlist_AddExt( p_playlist, *ppsz_uri, playlist_Add( p_playlist, *ppsz_uri,
*ppsz_name ? *ppsz_name : *ppsz_uri, -1, *ppsz_name ? *ppsz_name : *ppsz_uri,
0, 0, PLAYLIST_INSERT, *pi_position ); PLAYLIST_INSERT, *pi_position );
(*pi_position)++; (*pi_position)++;
if( *ppsz_name ) if( *ppsz_name )
{ {
...@@ -660,7 +660,7 @@ static int Demux ( input_thread_t *p_input ) ...@@ -660,7 +660,7 @@ static int Demux ( input_thread_t *p_input )
/* is there a pendding uri without b_next */ /* is there a pendding uri without b_next */
if( psz_uri ) if( psz_uri )
{ {
playlist_Add( p_playlist, psz_uri, 0, 0, playlist_Add( p_playlist, psz_uri, psz_uri,
PLAYLIST_INSERT, i_position ); PLAYLIST_INSERT, i_position );
} }
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* mkv.cpp : matroska demuxer * mkv.cpp : matroska demuxer
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: mkv.cpp,v 1.50 2003/12/22 02:24:52 sam Exp $ * $Id: mkv.cpp,v 1.51 2004/01/05 13:07:02 zorglub Exp $
* *
* Authors: Laurent Aimar <fenrir@via.ecp.fr> * Authors: Laurent Aimar <fenrir@via.ecp.fr>
* *
...@@ -2166,9 +2166,11 @@ static void InformationsCreate( input_thread_t *p_input ) ...@@ -2166,9 +2166,11 @@ static void InformationsCreate( input_thread_t *p_input )
{ {
demux_sys_t *p_sys = p_input->p_demux_data; demux_sys_t *p_sys = p_input->p_demux_data;
input_info_category_t *p_cat; input_info_category_t *p_cat;
playlist_t *p_playlist;
int i_track; int i_track;
p_cat = input_InfoCategory( p_input, "Matroska" ); p_cat = input_InfoCategory( p_input, "Matroska" );
p_playlist = (playlist_t*)vlc_object_find( p_input, VLC_OBJECT_PLAYLIST, FIND_PARENT );
if( p_sys->f_duration > 1000.1 ) if( p_sys->f_duration > 1000.1 )
{ {
char psz_buffer[MSTRTIME_MAX_SIZE]; char psz_buffer[MSTRTIME_MAX_SIZE];
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* mp4.c : MP4 file input module for vlc * mp4.c : MP4 file input module for vlc
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: mp4.c,v 1.47 2004/01/05 12:37:52 jlj Exp $ * $Id: mp4.c,v 1.48 2004/01/05 13:07:02 zorglub Exp $
* Authors: Laurent Aimar <fenrir@via.ecp.fr> * Authors: Laurent Aimar <fenrir@via.ecp.fr>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
...@@ -216,7 +216,7 @@ static int Open( vlc_object_t * p_this ) ...@@ -216,7 +216,7 @@ static int Open( vlc_object_t * p_this )
!strncmp( psz_ref, "rtsp://", 7 ) ) !strncmp( psz_ref, "rtsp://", 7 ) )
{ {
msg_Dbg( p_input, "adding ref = `%s'", psz_ref ); msg_Dbg( p_input, "adding ref = `%s'", psz_ref );
playlist_Add( p_playlist, psz_ref, 0, 0, playlist_Add( p_playlist, psz_ref, psz_ref,
PLAYLIST_APPEND, PLAYLIST_END ); PLAYLIST_APPEND, PLAYLIST_END );
} }
else else
...@@ -238,7 +238,7 @@ static int Open( vlc_object_t * p_this ) ...@@ -238,7 +238,7 @@ static int Open( vlc_object_t * p_this )
} }
strcat( psz_absolute, psz_ref ); strcat( psz_absolute, psz_ref );
msg_Dbg( p_input, "adding ref = `%s'", psz_absolute ); msg_Dbg( p_input, "adding ref = `%s'", psz_absolute );
playlist_Add( p_playlist, psz_absolute, 0, 0, playlist_Add( p_playlist, psz_absolute, psz_absolute,
PLAYLIST_APPEND, PLAYLIST_END ); PLAYLIST_APPEND, PLAYLIST_END );
} }
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* VlcWrapper.cpp: BeOS plugin for vlc (derived from MacOS X port) * VlcWrapper.cpp: BeOS plugin for vlc (derived from MacOS X port)
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: VlcWrapper.cpp,v 1.40 2003/12/04 10:25:47 gbazin Exp $ * $Id: VlcWrapper.cpp,v 1.41 2004/01/05 13:07:03 zorglub Exp $
* *
* Authors: Florian G. Pflug <fgp@phlo.org> * Authors: Florian G. Pflug <fgp@phlo.org>
* Jon Lech Johansen <jon-vl@nanocrew.net> * Jon Lech Johansen <jon-vl@nanocrew.net>
...@@ -365,7 +365,7 @@ void VlcWrapper::OpenFiles( BList* o_files, bool replace, int32 index ) ...@@ -365,7 +365,7 @@ void VlcWrapper::OpenFiles( BList* o_files, bool replace, int32 index )
if ( BString* o_file = (BString *)o_files->RemoveItem( i ) ) if ( BString* o_file = (BString *)o_files->RemoveItem( i ) )
{ {
playlist_Add( p_playlist, o_file->String(), playlist_Add( p_playlist, o_file->String(),
0, 0, mode, index ); o_file->String(), mode, index );
if ( mode == PLAYLIST_INSERT ) if ( mode == PLAYLIST_INSERT )
index++; index++;
delete o_file; delete o_file;
...@@ -388,7 +388,7 @@ void VlcWrapper::OpenDisc(BString o_type, BString o_device, int i_title, int i_c ...@@ -388,7 +388,7 @@ void VlcWrapper::OpenDisc(BString o_type, BString o_device, int i_title, int i_c
o_device.Prepend( "dvdplay:" ); o_device.Prepend( "dvdplay:" );
else else
o_device.Prepend( "dvdold:" ); o_device.Prepend( "dvdold:" );
playlist_Add( p_playlist, o_device.String(), 0, 0, playlist_Add( p_playlist, o_device.String(), o_device.String(),
PLAYLIST_APPEND | PLAYLIST_GO, PLAYLIST_END ); PLAYLIST_APPEND | PLAYLIST_GO, PLAYLIST_END );
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* gtk_open.c : functions to handle file/disc/network open widgets. * gtk_open.c : functions to handle file/disc/network open widgets.
***************************************************************************** *****************************************************************************
* Copyright (C) 2000, 2001, 2003 VideoLAN * Copyright (C) 2000, 2001, 2003 VideoLAN
* $Id: open.c,v 1.22 2003/12/22 14:32:56 sam Exp $ * $Id: open.c,v 1.23 2004/01/05 13:07:03 zorglub Exp $
* *
* Authors: Sam Hocevar <sam@zoy.org> * Authors: Sam Hocevar <sam@zoy.org>
* Stphane Borel <stef@via.ecp.fr> * Stphane Borel <stef@via.ecp.fr>
...@@ -650,7 +650,7 @@ void GtkOpenOk( GtkButton * button, gpointer user_data ) ...@@ -650,7 +650,7 @@ void GtkOpenOk( GtkButton * button, gpointer user_data )
psz_target = gtk_entry_get_text( GTK_ENTRY( lookup_widget( psz_target = gtk_entry_get_text( GTK_ENTRY( lookup_widget(
GTK_WIDGET(button), "entry_open" ) ) ); GTK_WIDGET(button), "entry_open" ) ) );
playlist_Add( p_playlist, (char*)psz_target, 0, 0, playlist_Add( p_playlist, (char*)psz_target, (char*)psz_target,
PLAYLIST_APPEND | PLAYLIST_GO, PLAYLIST_END ); PLAYLIST_APPEND | PLAYLIST_GO, PLAYLIST_END );
/* catch the GTK CList */ /* catch the GTK CList */
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* gtk_playlist.c : Interface for the playlist dialog * gtk_playlist.c : Interface for the playlist dialog
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: playlist.c,v 1.8 2003/12/22 14:32:56 sam Exp $ * $Id: playlist.c,v 1.9 2004/01/05 13:07:03 zorglub Exp $
* *
* Authors: Pierre Baillet <oct@zoy.org> * Authors: Pierre Baillet <oct@zoy.org>
* Stphane Borel <stef@via.ecp.fr> * Stphane Borel <stef@via.ecp.fr>
...@@ -622,7 +622,8 @@ int GtkAppendList( playlist_t * p_playlist, int i_pos, GList * p_list ) ...@@ -622,7 +622,8 @@ int GtkAppendList( playlist_t * p_playlist, int i_pos, GList * p_list )
/* ok; this is a really nasty trick to insert /* ok; this is a really nasty trick to insert
the item where they are suppose to go but, hey the item where they are suppose to go but, hey
this works :P (btw, you are really nasty too) */ this works :P (btw, you are really nasty too) */
g_list_nth_data( p_list, i_dummy ), 0, 0, g_list_nth_data( p_list, i_dummy ),
g_list_nth_data( p_list, i_dummy ),
i_dummy == 0 ? PLAYLIST_INSERT | PLAYLIST_GO : PLAYLIST_INSERT, i_dummy == 0 ? PLAYLIST_INSERT | PLAYLIST_GO : PLAYLIST_INSERT,
i_pos == PLAYLIST_END ? PLAYLIST_END : ( i_pos + i_dummy ) ); i_pos == PLAYLIST_END ? PLAYLIST_END : ( i_pos + i_dummy ) );
} }
......
...@@ -208,7 +208,7 @@ void KInterface::slotFileOpen() ...@@ -208,7 +208,7 @@ void KInterface::slotFileOpen()
if( p_playlist ) if( p_playlist )
{ {
fileOpenRecent->addURL( url ); fileOpenRecent->addURL( url );
playlist_Add( p_playlist, url.path(), 0, 0, playlist_Add( p_playlist, url.path(), url.path(),
PLAYLIST_APPEND | PLAYLIST_GO, PLAYLIST_END ); PLAYLIST_APPEND | PLAYLIST_GO, PLAYLIST_END );
vlc_object_release( p_playlist ); vlc_object_release( p_playlist );
} }
...@@ -536,7 +536,7 @@ void KInterface::slotOpenDisk() ...@@ -536,7 +536,7 @@ void KInterface::slotOpenDisk()
if( p_playlist ) if( p_playlist )
{ {
// add it to playlist // add it to playlist
playlist_Add( p_playlist, source.latin1(), 0, 0, playlist_Add( p_playlist, source.latin1(), source.latin1(),
PLAYLIST_APPEND | PLAYLIST_GO, PLAYLIST_END ); PLAYLIST_APPEND | PLAYLIST_GO, PLAYLIST_END );
vlc_object_release( p_playlist ); vlc_object_release( p_playlist );
} }
...@@ -562,7 +562,7 @@ void KInterface::slotOpenStream() ...@@ -562,7 +562,7 @@ void KInterface::slotOpenStream()
if( p_playlist ) if( p_playlist )
{ {
// add it to playlist // add it to playlist
playlist_Add( p_playlist, source.latin1(), 0, 0, playlist_Add( p_playlist, source.latin1(), source.latin1(),
PLAYLIST_APPEND | PLAYLIST_GO, PLAYLIST_END ); PLAYLIST_APPEND | PLAYLIST_GO, PLAYLIST_END );
vlc_object_release( p_playlist ); vlc_object_release( p_playlist );
} }
...@@ -664,7 +664,7 @@ void KInterface::dropEvent( QDropEvent *event ) ...@@ -664,7 +664,7 @@ void KInterface::dropEvent( QDropEvent *event )
if( !(*i).isEmpty() ) if( !(*i).isEmpty() )
{ {
fileOpenRecent->addURL( *i ); fileOpenRecent->addURL( *i );
playlist_Add( p_playlist, (*i).path(), 0, 0, playlist_Add( p_playlist, (*i).path(), (*i).path(),
PLAYLIST_APPEND | PLAYLIST_GO, PLAYLIST_END ); PLAYLIST_APPEND | PLAYLIST_GO, PLAYLIST_END );
} }
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* applescript.m: MacOS X AppleScript support * applescript.m: MacOS X AppleScript support
***************************************************************************** *****************************************************************************
* Copyright (C) 2002-2003 VideoLAN * Copyright (C) 2002-2003 VideoLAN
* $Id: applescript.m,v 1.4 2003/07/23 01:13:47 gbazin Exp $ * $Id: applescript.m,v 1.5 2004/01/05 13:07:03 zorglub Exp $
* *
* Authors: Derk-Jan Hartman <thedj@users.sourceforge.net> * Authors: Derk-Jan Hartman <thedj@users.sourceforge.net>
* *
...@@ -56,7 +56,8 @@ ...@@ -56,7 +56,8 @@
int i_mode = PLAYLIST_INSERT | PLAYLIST_GO; int i_mode = PLAYLIST_INSERT | PLAYLIST_GO;
playlist_Add( p_playlist, [o_urlString fileSystemRepresentation], playlist_Add( p_playlist, [o_urlString fileSystemRepresentation],
0, 0, i_mode, PLAYLIST_END ); [o_urlString fileSystemRepresentation],
i_mode, PLAYLIST_END );
o_url = [NSURL fileURLWithPath: o_urlString]; o_url = [NSURL fileURLWithPath: o_urlString];
if( o_url != nil ) if( o_url != nil )
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* playlist.m: MacOS X interface plugin * playlist.m: MacOS X interface plugin
***************************************************************************** *****************************************************************************
* Copyright (C) 2002-2003 VideoLAN * Copyright (C) 2002-2003 VideoLAN
* $Id: playlist.m,v 1.49 2003/12/15 14:25:43 hartman Exp $ * $Id: playlist.m,v 1.50 2004/01/05 13:07:03 zorglub Exp $
* *
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net> * Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Derk-Jan Hartman <thedj@users.sourceforge.net> * Derk-Jan Hartman <thedj@users.sourceforge.net>
...@@ -306,7 +306,7 @@ ...@@ -306,7 +306,7 @@
o_current_name = [NSString stringWithUTF8String: o_current_name = [NSString stringWithUTF8String:
p_playlist->pp_items[i_current]->psz_name]; p_playlist->pp_items[i_current]->psz_name];
o_current_author = [NSString stringWithUTF8String: o_current_author = [NSString stringWithUTF8String:
p_playlist->pp_items[i_current]->psz_author]; playlist_GetInfo(p_playlist, i_current ,_("General"),_("Author") )];
vlc_mutex_unlock( &p_playlist->object_lock ); vlc_mutex_unlock( &p_playlist->object_lock );
...@@ -394,9 +394,12 @@ ...@@ -394,9 +394,12 @@
} }
} }
playlist_AddExt( p_playlist, [o_url fileSystemRepresentation], [o_name UTF8String], -1, playlist_Add( p_playlist, [o_url fileSystemRepresentation],
[o_name UTF8String], i_mode,
i_position == -1 ? PLAYLIST_END : i_position + i_item);
/*-1,
(ppsz_options != NULL ) ? (const char **)ppsz_options : 0, i_total_options, (ppsz_options != NULL ) ? (const char **)ppsz_options : 0, i_total_options,
i_mode, i_position == -1 ? PLAYLIST_END : i_position + i_item); i_mode, i_position == -1 ? PLAYLIST_END : i_position + i_item);*/
/* clean up */ /* clean up */
for( j = 0; j < i_total_options; j++ ) for( j = 0; j < i_total_options; j++ )
...@@ -509,7 +512,7 @@ ...@@ -509,7 +512,7 @@
{ {
vlc_mutex_lock( &p_playlist->object_lock ); vlc_mutex_lock( &p_playlist->object_lock );
o_value = [NSString stringWithUTF8String: o_value = [NSString stringWithUTF8String:
p_playlist->pp_items[i_row]->psz_author]; playlist_GetInfo(p_playlist, i_row ,_("General"),_("Author") )];
vlc_mutex_unlock( &p_playlist->object_lock ); vlc_mutex_unlock( &p_playlist->object_lock );
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* pda_callbacks.c : Callbacks for the pda Linux Gtk+ plugin. * pda_callbacks.c : Callbacks for the pda Linux Gtk+ plugin.
***************************************************************************** *****************************************************************************
* Copyright (C) 2000, 2001 VideoLAN * Copyright (C) 2000, 2001 VideoLAN
* $Id: pda_callbacks.c,v 1.23 2003/12/07 18:58:38 jpsaman Exp $ * $Id: pda_callbacks.c,v 1.24 2004/01/05 13:07:03 zorglub Exp $
* *
* Authors: Jean-Paul Saman <jpsaman@wxs.nl> * Authors: Jean-Paul Saman <jpsaman@wxs.nl>
* *
...@@ -91,6 +91,7 @@ void PlaylistAddItem(GtkWidget *widget, gchar *name, char **ppsz_options, int i_ ...@@ -91,6 +91,7 @@ void PlaylistAddItem(GtkWidget *widget, gchar *name, char **ppsz_options, int i_
{ {
intf_thread_t *p_intf = GtkGetIntf( widget ); intf_thread_t *p_intf = GtkGetIntf( widget );
playlist_t *p_playlist; playlist_t *p_playlist;
int i , i_id , i_pos;
GtkTreeView *p_tvplaylist = NULL; GtkTreeView *p_tvplaylist = NULL;
p_playlist = (playlist_t *) p_playlist = (playlist_t *)
...@@ -132,8 +133,16 @@ void PlaylistAddItem(GtkWidget *widget, gchar *name, char **ppsz_options, int i_ ...@@ -132,8 +133,16 @@ void PlaylistAddItem(GtkWidget *widget, gchar *name, char **ppsz_options, int i_
else else
#endif #endif
{ {
playlist_Add( p_playlist, (const char*)name, (const char**)ppsz_options, i_size, i_id = playlist_Add( p_playlist, (const char*)name,
(const char*)name,
PLAYLIST_APPEND, PLAYLIST_END ); PLAYLIST_APPEND, PLAYLIST_END );
i_pos = playlist_GetPositionById( p_playlist, i_id );
for( i = 0 ; i< i_size ; i++ )
{
playlist_AddOption( p_playlist, i_pos , ppsz_options[i] );
}
} }
/* Cleanup memory */ /* Cleanup memory */
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* intf.cpp: Qt interface * intf.cpp: Qt interface
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 VideoLAN * Copyright (C) 1999, 2000 VideoLAN
* $Id: intf.cpp,v 1.5 2003/12/04 10:25:47 gbazin Exp $ * $Id: intf.cpp,v 1.6 2004/01/05 13:07:03 zorglub Exp $
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
* *
...@@ -299,7 +299,7 @@ void IntfWindow::FileOpen( void ) ...@@ -299,7 +299,7 @@ void IntfWindow::FileOpen( void )
return; return;
} }
playlist_Add( p_playlist, file.latin1(), 0, 0, playlist_Add( p_playlist, file.latin1(), file.latin1(),
PLAYLIST_APPEND | PLAYLIST_GO, PLAYLIST_END ); PLAYLIST_APPEND | PLAYLIST_GO, PLAYLIST_END );
vlc_object_release( p_playlist ); vlc_object_release( p_playlist );
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* vlcproc.cpp: VlcProc class * vlcproc.cpp: VlcProc class
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: vlcproc.cpp,v 1.52 2003/10/23 16:00:48 gbazin Exp $ * $Id: vlcproc.cpp,v 1.53 2004/01/05 13:07:03 zorglub Exp $
* *
* Authors: Olivier Teulire <ipkiss@via.ecp.fr> * Authors: Olivier Teulire <ipkiss@via.ecp.fr>
* Emmanuel Puig <karibu@via.ecp.fr> * Emmanuel Puig <karibu@via.ecp.fr>
...@@ -444,13 +444,13 @@ void VlcProc::DropFile( unsigned int param1, long param2 ) ...@@ -444,13 +444,13 @@ void VlcProc::DropFile( unsigned int param1, long param2 )
if( param2 == 0 ) if( param2 == 0 )
{ {
// Enqueue the item // Enqueue the item
playlist_Add( p_intf->p_sys->p_playlist, FileName, 0, 0, playlist_Add( p_intf->p_sys->p_playlist, FileName, FileName,
PLAYLIST_APPEND, PLAYLIST_END ); PLAYLIST_APPEND, PLAYLIST_END );
} }
else else
{ {
// Enqueue and play the item // Enqueue and play the item
playlist_Add( p_intf->p_sys->p_playlist, FileName, 0, 0, playlist_Add( p_intf->p_sys->p_playlist, FileName, FileName,
PLAYLIST_APPEND | PLAYLIST_GO, PLAYLIST_END ); PLAYLIST_APPEND | PLAYLIST_GO, PLAYLIST_END );
} }
} }
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* cmd_add_item.cpp * cmd_add_item.cpp
***************************************************************************** *****************************************************************************
* Copyright (C) 2003 VideoLAN * Copyright (C) 2003 VideoLAN
* $Id: cmd_add_item.cpp,v 1.1 2004/01/03 23:31:33 asmax Exp $ * $Id: cmd_add_item.cpp,v 1.2 2004/01/05 13:07:03 zorglub Exp $
* *
* Authors: Cyril Deguet <asmax@via.ecp.fr> * Authors: Cyril Deguet <asmax@via.ecp.fr>
* Olivier Teulire <ipkiss@via.ecp.fr> * Olivier Teulire <ipkiss@via.ecp.fr>
...@@ -37,13 +37,13 @@ void CmdAddItem::execute() ...@@ -37,13 +37,13 @@ void CmdAddItem::execute()
if( m_playNow ) if( m_playNow )
{ {
// Enqueue and play the item // Enqueue and play the item
playlist_Add( pPlaylist, m_name.c_str(), 0, 0, playlist_Add( pPlaylist, m_name.c_str(),m_name.c_str(),
PLAYLIST_APPEND | PLAYLIST_GO, PLAYLIST_END ); PLAYLIST_APPEND | PLAYLIST_GO, PLAYLIST_END );
} }
else else
{ {
// Enqueue the item only // Enqueue the item only
playlist_Add( pPlaylist, m_name.c_str(), 0, 0, playlist_Add( pPlaylist, m_name.c_str(), m_name.c_str(),
PLAYLIST_APPEND, PLAYLIST_END ); PLAYLIST_APPEND, PLAYLIST_END );
} }
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment