Commit 85c7ea2e authored by zorglub's avatar zorglub

* 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
...@@ -92,6 +94,8 @@ $Id: LIST,v 1.18 2003/12/06 22:47:37 jpsaman Exp $ ...@@ -92,6 +94,8 @@ $Id: LIST,v 1.18 2003/12/06 22:47:37 jpsaman Exp $
* dshow: DirectShow access plugin for encoding cards under Windows * dshow: DirectShow access plugin for encoding cards under Windows
* 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
...@@ -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: YUV to YUC conversion functions
* i420_ymga_mmx: MMX accelerated version of i420_ymga * i420_ymga_mmx: MMX accelerated version of i420_ymga
* i420_ymga: YUV to YUC conversion functions * i420_yuy2: planar 4:2:0 YUV to packed YUV conversion functions.
* i420_yuy2_mmx: MMX accelerated version of i420_yuy2. * i420_yuy2_mmx: MMX accelerated version of i420_yuy2.
* i420_yuy2: planar 4:2:0 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. * i422_yuy2_mmx: MMX accelerated version of i422_yuy2.
* i422_yuy2: planar 4:2:2 YUV to packed YUV conversion functions.
* id3: ID3 tag skipper * id3: ID3 tag skipper
* id3tag: ID3 tag parser/skipper using libid3tag * id3tag: ID3 tag parser/skipper using libid3tag
...@@ -226,13 +230,13 @@ $Id: LIST,v 1.18 2003/12/06 22:47:37 jpsaman Exp $ ...@@ -226,13 +230,13 @@ $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.
...@@ -249,6 +253,8 @@ $Id: LIST,v 1.18 2003/12/06 22:47:37 jpsaman Exp $ ...@@ -249,6 +253,8 @@ $Id: LIST,v 1.18 2003/12/06 22:47:37 jpsaman Exp $
* mpga: MPEG-I/II Audio demuxer * mpga: MPEG-I/II Audio demuxer
* 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
...@@ -261,11 +267,11 @@ $Id: LIST,v 1.18 2003/12/06 22:47:37 jpsaman Exp $ ...@@ -261,11 +267,11 @@ $Id: LIST,v 1.18 2003/12/06 22:47:37 jpsaman Exp $
* mux_ogg: OGG muxer * mux_ogg: OGG muxer
* mux_ps: MPEG program stream muxer * mux_ps: MPEG program stream muxer
* mux_ts: MPEG transport stream muxer
* mux_ts_dvbpsi: MPEG transport stream muxer using libdvbpsi * mux_ts_dvbpsi: MPEG transport stream muxer using libdvbpsi
* mux_ts: MPEG transport stream muxer
* 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,9 +294,9 @@ $Id: LIST,v 1.18 2003/12/06 22:47:37 jpsaman Exp $ ...@@ -288,9 +294,9 @@ $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.
...@@ -298,11 +304,11 @@ $Id: LIST,v 1.18 2003/12/06 22:47:37 jpsaman Exp $ ...@@ -298,11 +304,11 @@ $Id: LIST,v 1.18 2003/12/06 22:47:37 jpsaman Exp $
* 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,9 +354,9 @@ $Id: LIST,v 1.18 2003/12/06 22:47:37 jpsaman Exp $ ...@@ -348,9 +354,9 @@ $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
...@@ -383,9 +389,9 @@ $Id: LIST,v 1.18 2003/12/06 22:47:37 jpsaman Exp $ ...@@ -383,9 +389,9 @@ $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
......
...@@ -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,15 +314,20 @@ static void CDDASeek( input_thread_t * p_input, off_t i_off ) ...@@ -314,15 +314,20 @@ 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,27 +661,23 @@ CDDACreatePlayListItem(const input_thread_t *p_input, cdda_data_t *p_cdda, ...@@ -655,27 +661,23 @@ 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);
} }
static int static int
CDDAFixupPlayList( input_thread_t *p_input, cdda_data_t *p_cdda, CDDAFixupPlayList( input_thread_t *p_input, cdda_data_t *p_cdda,
const char *psz_source, bool play_single_track) const char *psz_source, bool play_single_track)
{ {
int i; int i;
playlist_t * p_playlist; playlist_t * p_playlist;
......
...@@ -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>
...@@ -979,12 +979,16 @@ VCDUpdateVar( input_thread_t *p_input, int i_num, int i_action, ...@@ -979,12 +979,16 @@ VCDUpdateVar( input_thread_t *p_input, int i_num, int i_action,
#define meta_info_add_str(title, str) \ #define meta_info_add_str(title, str) \
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) \
...@@ -1272,23 +1285,21 @@ VCDCreatePlayListItem(const input_thread_t *p_input, ...@@ -1272,23 +1285,21 @@ VCDCreatePlayListItem(const input_thread_t *p_input,
p_title = p_title =
VCDFormatStr( p_input, p_vcd, VCDFormatStr( p_input, p_vcd,
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,
config_GetPsz( p_input, MODULE_STRING "-author-format" ), config_GetPsz( p_input, MODULE_STRING "-author-format" ),
psz_mrl, itemid ); psz_mrl, itemid );
/* FIXME: This is horrible, but until the playlist interface is fixed up /* FIXME: This is horrible, but until the playlist interface is fixed up
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