summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiguel Freitas <miguelfreitas@users.sourceforge.net>2003-11-15 13:01:00 +0000
committerMiguel Freitas <miguelfreitas@users.sourceforge.net>2003-11-15 13:01:00 +0000
commit570fd9006dcf6f9aaa460e79b93b7ce37f7c6d7b (patch)
treeed387d71185404d03367e64a52093b0e6369ed67
parentbb62a769e4a50cef3023408bf9a527e63b7d884d (diff)
downloadxine-lib-570fd9006dcf6f9aaa460e79b93b7ce37f7c6d7b.tar.gz
xine-lib-570fd9006dcf6f9aaa460e79b93b7ce37f7c6d7b.tar.bz2
more helper functions cleanup (stream info, meta info)
CVS patchset: 5731 CVS date: 2003/11/15 13:01:00
-rw-r--r--src/dxr3/dxr3_decode_video.c12
-rw-r--r--src/input/input_cdda.c22
-rw-r--r--src/input/input_dvd.c7
-rw-r--r--src/input/input_http.c4
-rw-r--r--src/input/input_pvr.c6
-rw-r--r--src/input/net_buf_ctrl.c16
-rw-r--r--src/input/vcd/xineplug_inp_vcd.c16
-rw-r--r--src/liba52/xine_decoder.c26
-rw-r--r--src/libfaad/xine_decoder.c12
-rw-r--r--src/libffmpeg/xine_decoder.c200
-rw-r--r--src/liblpcm/xine_decoder.c8
-rw-r--r--src/libmad/xine_decoder.c20
-rw-r--r--src/libmpeg2/decode.c44
-rw-r--r--src/libmpeg2new/xine_decoder.c6
-rw-r--r--src/libreal/audio_decoder.c17
-rw-r--r--src/libreal/xine_decoder.c11
-rw-r--r--src/libspeex/xine_decoder.c9
-rw-r--r--src/libsputext/demux_sputext.c6
-rw-r--r--src/libvorbis/xine_decoder.c11
-rw-r--r--src/libw32dll/qt_decoder.c21
-rw-r--r--src/libw32dll/w32codec.c132
-rw-r--r--src/libxineadec/28k8.c6
-rw-r--r--src/libxineadec/adpcm.c42
-rw-r--r--src/libxineadec/fooaudio.c4
-rw-r--r--src/libxineadec/gsm610.c4
-rw-r--r--src/libxineadec/interplayaudio.c5
-rw-r--r--src/libxineadec/logpcm.c8
-rw-r--r--src/libxineadec/nsf.c5
-rw-r--r--src/libxineadec/pcm.c2
-rw-r--r--src/libxineadec/roqaudio.c6
-rw-r--r--src/libxinevdec/cinepak.c4
-rw-r--r--src/libxinevdec/cyuv.c4
-rw-r--r--src/libxinevdec/fli.c4
-rw-r--r--src/libxinevdec/foovideo.c4
-rw-r--r--src/libxinevdec/idcinvideo.c4
-rw-r--r--src/libxinevdec/image.c4
-rw-r--r--src/libxinevdec/interplayvideo.c6
-rw-r--r--src/libxinevdec/msrle.c4
-rw-r--r--src/libxinevdec/msvc.c4
-rw-r--r--src/libxinevdec/qtrle.c4
-rw-r--r--src/libxinevdec/qtrpza.c4
-rw-r--r--src/libxinevdec/qtsmc.c4
-rw-r--r--src/libxinevdec/rgb.c4
-rw-r--r--src/libxinevdec/roqvideo.c4
-rw-r--r--src/libxinevdec/svq1.c4
-rw-r--r--src/libxinevdec/wc3video.c4
-rw-r--r--src/libxinevdec/yuv.c12
-rw-r--r--src/xine-engine/info_helper.c13
-rw-r--r--src/xine-engine/info_helper.h10
-rw-r--r--src/xine-engine/xine.c8
50 files changed, 393 insertions, 404 deletions
diff --git a/src/dxr3/dxr3_decode_video.c b/src/dxr3/dxr3_decode_video.c
index 668a38f46..01a427e83 100644
--- a/src/dxr3/dxr3_decode_video.c
+++ b/src/dxr3/dxr3_decode_video.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: dxr3_decode_video.c,v 1.42 2003/10/23 20:12:34 mroi Exp $
+ * $Id: dxr3_decode_video.c,v 1.43 2003/11/15 13:01:02 miguelfreitas Exp $
*/
/* dxr3 video decoder plugin.
@@ -605,7 +605,7 @@ static void dxr3_flush(video_decoder_t *this_gen)
dxr3_decoder_t *this = (dxr3_decoder_t *)this_gen;
if (this->sequence_open && ++this->sequence_open > 5 &&
- this->stream->stream_info[XINE_STREAM_INFO_VIDEO_HAS_STILL]) {
+ xine_get_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_HAS_STILL)) {
/* The dxr3 needs a sequence end code for still menus to work correctly
* (the highlights won't move without), but some dvds have stills
* with no sequence end code. Since it is very likely that flush() is called
@@ -716,9 +716,9 @@ static void parse_mpeg_header(dxr3_decoder_t *this, uint8_t * buffer)
}
/* update stream metadata */
- this->stream->stream_info[XINE_STREAM_INFO_VIDEO_WIDTH] = this->width;
- this->stream->stream_info[XINE_STREAM_INFO_VIDEO_HEIGHT] = this->height;
- this->stream->stream_info[XINE_STREAM_INFO_VIDEO_RATIO] = 10000 * this->ratio;
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_WIDTH, this->width);
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_HEIGHT, this->height);
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_RATIO, 10000 * this->ratio);
this->last_width = this->width;
this->last_height = this->height;
@@ -763,7 +763,7 @@ static int get_duration(dxr3_decoder_t *this)
}
/* update stream metadata */
- this->stream->stream_info[XINE_STREAM_INFO_FRAME_DURATION] = duration;
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_FRAME_DURATION, duration);
if (this->correct_durations && duration) {
/* we set an initial average frame duration here */
diff --git a/src/input/input_cdda.c b/src/input/input_cdda.c
index f24950896..b98659819 100644
--- a/src/input/input_cdda.c
+++ b/src/input/input_cdda.c
@@ -20,7 +20,7 @@
* Compact Disc Digital Audio (CDDA) Input Plugin
* by Mike Melanson (melanson@pcisys.net)
*
- * $Id: input_cdda.c,v 1.36 2003/10/31 17:28:05 mroi Exp $
+ * $Id: input_cdda.c,v 1.37 2003/11/15 13:01:04 miguelfreitas Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -2406,9 +2406,7 @@ static int cdda_plugin_open (input_plugin_t *this_gen ) {
printf("Disc Title: %s\n", this->cddb.disc_title);
#endif
- if(this->stream->meta_info[XINE_META_INFO_ALBUM])
- free(this->stream->meta_info[XINE_META_INFO_ALBUM]);
- this->stream->meta_info[XINE_META_INFO_ALBUM] = strdup(this->cddb.disc_title);
+ xine_set_meta_info(this->stream, XINE_META_INFO_ALBUM, this->cddb.disc_title);
}
if(this->cddb.track[this->track].title) {
@@ -2416,9 +2414,7 @@ static int cdda_plugin_open (input_plugin_t *this_gen ) {
printf("Track %d Title: %s\n", this->track+1, this->cddb.track[this->track].title);
#endif
- if(this->stream->meta_info[XINE_META_INFO_TITLE])
- free(this->stream->meta_info[XINE_META_INFO_TITLE]);
- this->stream->meta_info[XINE_META_INFO_TITLE] = strdup(this->cddb.track[this->track].title);
+ xine_set_meta_info(this->stream, XINE_META_INFO_TITLE, this->cddb.track[this->track].title);
}
if(this->cddb.disc_artist) {
@@ -2426,9 +2422,7 @@ static int cdda_plugin_open (input_plugin_t *this_gen ) {
printf("Disc Artist: %s\n", this->cddb.disc_artist);
#endif
- if(this->stream->meta_info[XINE_META_INFO_ARTIST])
- free(this->stream->meta_info[XINE_META_INFO_ARTIST]);
- this->stream->meta_info[XINE_META_INFO_ARTIST] = strdup(this->cddb.disc_artist);
+ xine_set_meta_info(this->stream, XINE_META_INFO_ARTIST, this->cddb.disc_artist);
}
if(this->cddb.disc_category) {
@@ -2436,9 +2430,7 @@ static int cdda_plugin_open (input_plugin_t *this_gen ) {
printf("Disc Category: %s\n", this->cddb.disc_category);
#endif
- if(this->stream->meta_info[XINE_META_INFO_GENRE])
- free(this->stream->meta_info[XINE_META_INFO_GENRE]);
- this->stream->meta_info[XINE_META_INFO_GENRE] = strdup(this->cddb.disc_category);
+ xine_set_meta_info(this->stream, XINE_META_INFO_GENRE, this->cddb.disc_category);
}
if(this->cddb.disc_year) {
@@ -2446,9 +2438,7 @@ static int cdda_plugin_open (input_plugin_t *this_gen ) {
printf("Disc Year: %s\n", this->cddb.disc_year);
#endif
- if(this->stream->meta_info[XINE_META_INFO_YEAR])
- free(this->stream->meta_info[XINE_META_INFO_YEAR]);
- this->stream->meta_info[XINE_META_INFO_YEAR] = strdup(this->cddb.disc_year);
+ xine_set_meta_info(this->stream, XINE_META_INFO_YEAR, this->cddb.disc_year);
}
free_cdrom_toc(toc);
diff --git a/src/input/input_dvd.c b/src/input/input_dvd.c
index dff92f57f..792575fd8 100644
--- a/src/input/input_dvd.c
+++ b/src/input/input_dvd.c
@@ -18,7 +18,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: input_dvd.c,v 1.171 2003/11/11 18:44:53 f1rmb Exp $
+ * $Id: input_dvd.c,v 1.172 2003/11/15 13:01:07 miguelfreitas Exp $
*
*/
@@ -861,7 +861,7 @@ static void xine_dvd_send_button_update(dvd_input_plugin_t *this, int mode) {
int32_t button;
int32_t show;
- if (!this || !this->stream || this->stream->stream_info[XINE_STREAM_INFO_IGNORE_SPU])
+ if (!this || !this->stream || xine_get_stream_info(this->stream,XINE_STREAM_INFO_IGNORE_SPU))
return;
if (!this->stream->spu_decoder_plugin ||
@@ -1727,6 +1727,9 @@ static void *init_class (xine_t *xine, void *data) {
/*
* $Log: input_dvd.c,v $
+ * Revision 1.172 2003/11/15 13:01:07 miguelfreitas
+ * more helper functions cleanup (stream info, meta info)
+ *
* Revision 1.171 2003/11/11 18:44:53 f1rmb
* rename internal API function (_x_<function>).
*
diff --git a/src/input/input_http.c b/src/input/input_http.c
index daf40c664..91efc53d2 100644
--- a/src/input/input_http.c
+++ b/src/input/input_http.c
@@ -19,7 +19,7 @@
*
* input plugin for http network streams
*
- * $Id: input_http.c,v 1.70 2003/11/14 23:00:41 f1rmb Exp $
+ * $Id: input_http.c,v 1.71 2003/11/15 13:01:08 miguelfreitas Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -360,7 +360,7 @@ static void http_plugin_read_metainf (input_plugin_t *this_gen) {
xine_set_meta_info(this->stream, XINE_META_INFO_TITLE, songtitle);
/* prepares the event */
- radio = this->stream->meta_info [XINE_META_INFO_ALBUM];
+ radio = xine_get_meta_info(this->stream, XINE_META_INFO_ALBUM);
if (radio) {
strcpy(data.str, radio); /* WARNING: the data.str is char[256] */
diff --git a/src/input/input_pvr.c b/src/input/input_pvr.c
index 6c3fd0c0f..076c5cc60 100644
--- a/src/input/input_pvr.c
+++ b/src/input/input_pvr.c
@@ -38,7 +38,7 @@
* usage:
* xine pvr:/<prefix_to_tmp_files>\!<prefix_to_saved_files>\!<max_page_age>
*
- * $Id: input_pvr.c,v 1.34 2003/11/11 18:44:54 f1rmb Exp $
+ * $Id: input_pvr.c,v 1.35 2003/11/15 13:01:09 miguelfreitas Exp $
*/
/**************************************************************************
@@ -1235,14 +1235,14 @@ static buf_element_t *pvr_plugin_read_block (input_plugin_t *this_gen, fifo_buff
if( this->pvr_play_paused )
speed = XINE_SPEED_PAUSE;
- if( this->pvr_playing && this->stream->stream_info[XINE_STREAM_INFO_IGNORE_VIDEO] ) {
+ if( this->pvr_playing && xine_get_stream_info(this->stream, XINE_STREAM_INFO_IGNORE_VIDEO) ) {
/* video decoding has being disabled. avoid tweaking the clock */
this->pvr_playing = 0;
this->scr_tunning = 0;
pvrscr_speed_tunning(this->scr, 1.0 );
this->want_data = 0;
pthread_cond_signal (&this->wake_pvr);
- } else if ( !this->pvr_playing && !this->stream->stream_info[XINE_STREAM_INFO_IGNORE_VIDEO] ) {
+ } else if ( !this->pvr_playing && !xine_get_stream_info(this->stream,XINE_STREAM_INFO_IGNORE_VIDEO) ) {
this->pvr_playing = 1;
this->play_blk = this->rec_blk;
}
diff --git a/src/input/net_buf_ctrl.c b/src/input/net_buf_ctrl.c
index cc8135dc0..967468fd3 100644
--- a/src/input/net_buf_ctrl.c
+++ b/src/input/net_buf_ctrl.c
@@ -154,10 +154,10 @@ static void nbc_compute_fifo_length(nbc_t *this,
int64_t video_br, audio_br;
int has_video, has_audio;
- has_video = this->stream->stream_info[XINE_STREAM_INFO_HAS_VIDEO];
- has_audio = this->stream->stream_info[XINE_STREAM_INFO_HAS_AUDIO];
- video_br = this->stream->stream_info[XINE_STREAM_INFO_VIDEO_BITRATE];
- audio_br = this->stream->stream_info[XINE_STREAM_INFO_AUDIO_BITRATE];
+ has_video = xine_get_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO);
+ has_audio = xine_get_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO);
+ video_br = xine_get_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_BITRATE);
+ audio_br = xine_get_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_BITRATE);
fifo_free = fifo->buffer_pool_num_free;
fifo_fill = fifo->fifo_size;
@@ -277,8 +277,8 @@ static void nbc_put_cb (fifo_buffer_t *fifo,
if (this->buffering) {
- has_video = this->stream->stream_info[XINE_STREAM_INFO_HAS_VIDEO];
- has_audio = this->stream->stream_info[XINE_STREAM_INFO_HAS_AUDIO];
+ has_video = xine_get_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO);
+ has_audio = xine_get_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO);
/* restart playing if high_water_mark is reached by all fifos
* do not restart if has_video and has_audio are false to avoid
* a yoyo effect at the beginning of the stream when these values
@@ -399,8 +399,8 @@ static void nbc_get_cb (fifo_buffer_t *fifo,
if (!this->buffering) {
/* start buffering if one fifo is empty
*/
- int has_video = this->stream->stream_info[XINE_STREAM_INFO_HAS_VIDEO];
- int has_audio = this->stream->stream_info[XINE_STREAM_INFO_HAS_AUDIO];
+ int has_video = xine_get_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO);
+ int has_audio = xine_get_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO);
if (fifo->fifo_size == 0 &&
(((fifo == this->video_fifo) && has_video) ||
((fifo == this->audio_fifo) && has_audio))) {
diff --git a/src/input/vcd/xineplug_inp_vcd.c b/src/input/vcd/xineplug_inp_vcd.c
index 537c14875..cba0bf170 100644
--- a/src/input/vcd/xineplug_inp_vcd.c
+++ b/src/input/vcd/xineplug_inp_vcd.c
@@ -1,5 +1,5 @@
/*
- $Id: xineplug_inp_vcd.c,v 1.7 2003/11/11 18:44:54 f1rmb Exp $
+ $Id: xineplug_inp_vcd.c,v 1.8 2003/11/15 13:01:10 miguelfreitas Exp $
Copyright (C) 2002,2003 Rocky Bernstein <rocky@panix.com>
@@ -180,15 +180,13 @@ static void
meta_info_assign(int field, xine_stream_t *stream, const char * info)
{
if (NULL != info) {
- if (stream->meta_info[field])
- free(stream->meta_info[field]);
dbg_print(INPUT_DBG_META, "meta[%d]: %s\n", field, info);
- stream->meta_info[field] = strdup(info);
+ xine_set_meta_info(stream, field, info);
}
}
#define stream_info_assign(field, stream, info) \
- stream->stream_info[field] = info;
+ xine_set_stream_info(stream, field, info);
/* Set stream information. */
static void
@@ -1241,14 +1239,6 @@ vcd_plugin_dispose(input_plugin_t *this_gen)
*/
dbg_print((INPUT_DBG_CALL|INPUT_DBG_EXT), "called\n");
-#if 0
- /*FIXME - this causes termination to in waits and adds sleeps. Why? */
- free(my_vcd.stream->meta_info[XINE_META_INFO_ALBUM]);
- free(my_vcd.stream->meta_info[XINE_META_INFO_ARTIST]);
- free(my_vcd.stream->meta_info[XINE_META_INFO_COMMENT]);
- free(my_vcd.stream->meta_info[XINE_META_INFO_GENRE]);
- free(my_vcd.stream->meta_info[XINE_META_INFO_TITLE]);
-#endif
my_vcd.stream = NULL;
#if 0
diff --git a/src/liba52/xine_decoder.c b/src/liba52/xine_decoder.c
index 061e76414..ba5e92efe 100644
--- a/src/liba52/xine_decoder.c
+++ b/src/liba52/xine_decoder.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine_decoder.c,v 1.60 2003/11/04 00:45:24 jcdutton Exp $
+ * $Id: xine_decoder.c,v 1.61 2003/11/15 13:01:11 miguelfreitas Exp $
*
* stuff needed to turn liba52 into a xine decoder plugin
*/
@@ -520,35 +520,35 @@ static void a52dec_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) {
#endif
this->frame_todo = this->frame_length - 17;
this->sync_state = 2;
- if (!this->stream->meta_info[XINE_META_INFO_AUDIOCODEC] ||
+ if (!xine_get_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC) ||
a52_flags_old != this->a52_flags ||
a52_sample_rate_old != this->a52_sample_rate ||
a52_bit_rate_old != this->a52_bit_rate) {
if (((this->a52_flags & A52_CHANNEL_MASK) == A52_3F2R) && (this->a52_flags & A52_LFE))
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC] = strdup ("A/52 5.1");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC, "A/52 5.1");
else if ((((this->a52_flags & A52_CHANNEL_MASK) == A52_2F2R) && (this->a52_flags & A52_LFE)) ||
(((this->a52_flags & A52_CHANNEL_MASK) == A52_3F1R) && (this->a52_flags & A52_LFE)))
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC] = strdup ("A/52 4.1");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC, "A/52 4.1");
else if ((this->a52_flags & A52_CHANNEL_MASK) == A52_3F2R)
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC] = strdup ("A/52 5.0");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC, "A/52 5.0");
else if (((this->a52_flags & A52_CHANNEL_MASK) == A52_2F2R) ||
((this->a52_flags & A52_CHANNEL_MASK) == A52_3F1R))
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC] = strdup ("A/52 4.0");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC, "A/52 4.0");
else if (((this->a52_flags & A52_CHANNEL_MASK) == A52_2F1R) ||
((this->a52_flags & A52_CHANNEL_MASK) == A52_3F))
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC] = strdup ("A/52 3.0");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC, "A/52 3.0");
else if ((this->a52_flags & A52_CHANNEL_MASK) == A52_STEREO)
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC] = strdup ("A/52 2.0 (stereo)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC, "A/52 2.0 (stereo)");
else if ((this->a52_flags & A52_CHANNEL_MASK) == A52_DOLBY)
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC] = strdup ("A/52 2.0 (dolby)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC, "A/52 2.0 (dolby)");
else if ((this->a52_flags & A52_CHANNEL_MASK) == A52_MONO)
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC] = strdup ("A/52 1.0");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC, "A/52 1.0");
else
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC] = strdup ("A/52");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC, "A/52");
- this->stream->stream_info[XINE_STREAM_INFO_AUDIO_BITRATE] = this->a52_bit_rate;
- this->stream->stream_info[XINE_STREAM_INFO_AUDIO_SAMPLERATE] = this->a52_sample_rate;
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_BITRATE, this->a52_bit_rate);
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE, this->a52_sample_rate);
}
}
break;
diff --git a/src/libfaad/xine_decoder.c b/src/libfaad/xine_decoder.c
index 83ba7a31c..78fecf230 100644
--- a/src/libfaad/xine_decoder.c
+++ b/src/libfaad/xine_decoder.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine_decoder.c,v 1.16 2003/01/08 01:02:29 miguelfreitas Exp $
+ * $Id: xine_decoder.c,v 1.17 2003/11/15 13:01:11 miguelfreitas Exp $
*
*/
@@ -82,7 +82,7 @@ static int faad_open_dec( faad_decoder_t *this ) {
xine_log (this->stream->xine, XINE_LOG_MSG,
"libfaad: libfaad faacDecOpen() failed.\n" );
this->faac_failed++;
- this->stream->stream_info[XINE_STREAM_INFO_AUDIO_HANDLED] = 0;
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_HANDLED, 0);
return 1;
}
@@ -196,7 +196,7 @@ static void faad_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) {
"libfaad: libfaad faacDecInit2() failed.\n" );
this->faac_failed++;
this->faac_dec = NULL;
- this->stream->stream_info[XINE_STREAM_INFO_AUDIO_HANDLED] = 0;
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_HANDLED, 0);
return;
}
#ifdef LOG
@@ -224,8 +224,8 @@ static void faad_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) {
this->faac_failed = 0;
/* stream/meta info */
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC] =
- strdup("AAC (libfaad)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ "AAC (libfaad)");
} else {
@@ -263,7 +263,7 @@ static void faad_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) {
this->faac_failed++;
faacDecClose(this->faac_dec);
this->faac_dec = NULL;
- this->stream->stream_info[XINE_STREAM_INFO_AUDIO_HANDLED] = 0;
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_HANDLED, 0);
return;
}
#ifdef LOG
diff --git a/src/libffmpeg/xine_decoder.c b/src/libffmpeg/xine_decoder.c
index dfc8c0b10..3c10c143c 100644
--- a/src/libffmpeg/xine_decoder.c
+++ b/src/libffmpeg/xine_decoder.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine_decoder.c,v 1.133 2003/10/30 06:00:19 tmmm Exp $
+ * $Id: xine_decoder.c,v 1.134 2003/11/15 13:01:12 miguelfreitas Exp $
*
* xine decoder plugin using ffmpeg
*
@@ -226,7 +226,7 @@ static void init_video_codec (ff_video_decoder_t *this, xine_bmiheader *bih) {
this->context->opaque = this;
this->context->width = this->bih.biWidth;
this->context->height = this->bih.biHeight;
- this->context->codec_tag = this->stream->stream_info[XINE_STREAM_INFO_VIDEO_FOURCC];
+ this->context->codec_tag = xine_get_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_FOURCC);
/* some decoders (eg. dv) do not know the pix_fmt until they decode the
* first frame. setting to -1 avoid enabling DR1 for them.
*/
@@ -259,15 +259,15 @@ static void init_video_codec (ff_video_decoder_t *this, xine_bmiheader *bih) {
printf ("ffmpeg: couldn't open decoder\n");
free(this->context);
this->context = NULL;
- this->stream->stream_info[XINE_STREAM_INFO_VIDEO_HANDLED] = 0;
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_HANDLED, 0);
return;
}
this->decoder_ok = 1;
- this->stream->stream_info[XINE_STREAM_INFO_VIDEO_WIDTH] = this->context->width;
- this->stream->stream_info[XINE_STREAM_INFO_VIDEO_HEIGHT] = this->context->height;
- this->stream->stream_info[XINE_STREAM_INFO_FRAME_DURATION] = this->video_step;
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_WIDTH, this->context->width);
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_HEIGHT, this->context->height);
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_FRAME_DURATION, this->video_step);
this->stream->video_out->open (this->stream->video_out, this->stream);
@@ -490,8 +490,8 @@ static void find_sequence_header (ff_video_decoder_t *this,
this->video_step = 0;
}
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC]
- = strdup ("mpeg-1 (ffmpeg)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ "mpeg-1 (ffmpeg)");
/*
* init codec
@@ -780,152 +780,152 @@ static void ff_decode_data (video_decoder_t *this_gen, buf_element_t *buf) {
switch (codec_type) {
case BUF_VIDEO_MSMPEG4_V1:
this->codec = avcodec_find_decoder (CODEC_ID_MSMPEG4V1);
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC]
- = strdup ("Microsoft MPEG-4 v1 (ffmpeg)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ "Microsoft MPEG-4 v1 (ffmpeg)");
break;
case BUF_VIDEO_MSMPEG4_V2:
this->codec = avcodec_find_decoder (CODEC_ID_MSMPEG4V2);
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC]
- = strdup ("Microsoft MPEG-4 v2 (ffmpeg)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ "Microsoft MPEG-4 v2 (ffmpeg)");
break;
case BUF_VIDEO_MSMPEG4_V3:
this->codec = avcodec_find_decoder (CODEC_ID_MSMPEG4V3);
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC]
- = strdup ("Microsoft MPEG-4 v3 (ffmpeg)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ "Microsoft MPEG-4 v3 (ffmpeg)");
break;
case BUF_VIDEO_WMV7:
this->codec = avcodec_find_decoder (CODEC_ID_WMV1);
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC]
- = strdup ("MS Windows Media Video 7 (ffmpeg)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ "MS Windows Media Video 7 (ffmpeg)");
break;
case BUF_VIDEO_WMV8:
this->codec = avcodec_find_decoder (CODEC_ID_WMV2);
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC]
- = strdup ("MS Windows Media Video 8 (ffmpeg)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ "MS Windows Media Video 8 (ffmpeg)");
break;
case BUF_VIDEO_MPEG4 :
case BUF_VIDEO_XVID :
case BUF_VIDEO_DIVX5 :
this->codec = avcodec_find_decoder (CODEC_ID_MPEG4);
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC]
- = strdup ("ISO MPEG-4 (ffmpeg)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ "ISO MPEG-4 (ffmpeg)");
break;
case BUF_VIDEO_JPEG:
case BUF_VIDEO_MJPEG:
this->codec = avcodec_find_decoder (CODEC_ID_MJPEG);
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC]
- = strdup ("Motion JPEG (ffmpeg)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ "Motion JPEG (ffmpeg)");
break;
case BUF_VIDEO_I263:
this->codec = avcodec_find_decoder (CODEC_ID_H263I);
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC]
- = strdup ("ITU H.263 (ffmpeg)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ "ITU H.263 (ffmpeg)");
break;
case BUF_VIDEO_H263:
this->codec = avcodec_find_decoder (CODEC_ID_H263);
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC]
- = strdup ("H.263 (ffmpeg)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ "H.263 (ffmpeg)");
break;
case BUF_VIDEO_RV10:
this->codec = avcodec_find_decoder (CODEC_ID_RV10);
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC]
- = strdup ("Real Video 1.0 (ffmpeg)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ "Real Video 1.0 (ffmpeg)");
break;
case BUF_VIDEO_IV31:
this->codec = avcodec_find_decoder (CODEC_ID_INDEO3);
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC]
- = strdup ("Indeo Video 3.1 (ffmpeg)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ "Indeo Video 3.1 (ffmpeg)");
break;
case BUF_VIDEO_IV32:
this->codec = avcodec_find_decoder (CODEC_ID_INDEO3);
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC]
- = strdup ("Indeo Video 3.2 (ffmpeg)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ "Indeo Video 3.2 (ffmpeg)");
break;
case BUF_VIDEO_SORENSON_V1:
this->codec = avcodec_find_decoder (CODEC_ID_SVQ1);
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC]
- = strdup ("Sorenson Video 1 (ffmpeg)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ "Sorenson Video 1 (ffmpeg)");
break;
case BUF_VIDEO_SORENSON_V3:
this->codec = avcodec_find_decoder (CODEC_ID_SVQ3);
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC]
- = strdup ("Sorenson Video 3 (ffmpeg)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ "Sorenson Video 3 (ffmpeg)");
break;
case BUF_VIDEO_DV:
this->codec = avcodec_find_decoder (CODEC_ID_DVVIDEO);
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC]
- = strdup ("DV (ffmpeg)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ "DV (ffmpeg)");
break;
case BUF_VIDEO_HUFFYUV:
this->codec = avcodec_find_decoder (CODEC_ID_HUFFYUV);
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC]
- = strdup ("HuffYUV (ffmpeg)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ "HuffYUV (ffmpeg)");
break;
case BUF_VIDEO_VP31:
this->codec = avcodec_find_decoder (CODEC_ID_VP3);
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC]
- = strdup ("On2 VP3.1 (ffmpeg)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ "On2 VP3.1 (ffmpeg)");
break;
case BUF_VIDEO_4XM:
this->codec = avcodec_find_decoder (CODEC_ID_4XM);
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC]
- = strdup ("4XM (ffmpeg)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ "4XM (ffmpeg)");
break;
case BUF_VIDEO_CINEPAK:
this->codec = avcodec_find_decoder (CODEC_ID_CINEPAK);
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC]
- = strdup ("Cinepak (ffmpeg)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ "Cinepak (ffmpeg)");
break;
case BUF_VIDEO_MSVC:
this->codec = avcodec_find_decoder (CODEC_ID_MSVIDEO1);
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC]
- = strdup ("Microsoft Video 1 (ffmpeg)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ "Microsoft Video 1 (ffmpeg)");
break;
case BUF_VIDEO_MSRLE:
this->codec = avcodec_find_decoder (CODEC_ID_MSRLE);
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC]
- = strdup ("Microsoft RLE (ffmpeg)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ "Microsoft RLE (ffmpeg)");
break;
case BUF_VIDEO_RPZA:
this->codec = avcodec_find_decoder (CODEC_ID_RPZA);
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC]
- = strdup ("Apple Quicktime Video/RPZA (ffmpeg)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ "Apple Quicktime Video/RPZA (ffmpeg)");
break;
case BUF_VIDEO_CYUV:
this->codec = avcodec_find_decoder (CODEC_ID_CYUV);
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC]
- = strdup ("Creative YUV (ffmpeg)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ "Creative YUV (ffmpeg)");
break;
case BUF_VIDEO_ROQ:
this->codec = avcodec_find_decoder (CODEC_ID_ROQ);
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC]
- = strdup ("Id Software RoQ (ffmpeg)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ "Id Software RoQ (ffmpeg)");
break;
case BUF_VIDEO_IDCIN:
this->codec = avcodec_find_decoder (CODEC_ID_IDCIN);
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC]
- = strdup ("Id Software CIN (ffmpeg)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ "Id Software CIN (ffmpeg)");
break;
case BUF_VIDEO_WC3:
this->codec = avcodec_find_decoder (CODEC_ID_XAN_WC3);
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC]
- = strdup ("Xan (ffmpeg)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ "Xan (ffmpeg)");
break;
case BUF_VIDEO_VQA:
this->codec = avcodec_find_decoder (CODEC_ID_WS_VQA);
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC]
- = strdup ("Westwood Studios VQA (ffmpeg)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ "Westwood Studios VQA (ffmpeg)");
break;
case BUF_VIDEO_INTERPLAY:
this->codec = avcodec_find_decoder (CODEC_ID_INTERPLAY_VIDEO);
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC]
- = strdup ("Interplay MVE (ffmpeg)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ "Interplay MVE (ffmpeg)");
break;
default:
printf ("ffmpeg: unknown video format (buftype: 0x%08X)\n",
buf->type & 0xFFFF0000);
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC]
- = strdup ("unknown (ffmpeg)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ "unknown (ffmpeg)");
}
if (!this->codec) {
@@ -1388,88 +1388,88 @@ static void ff_audio_decode_data (audio_decoder_t *this_gen, buf_element_t *buf)
switch (codec_type) {
case BUF_AUDIO_WMAV1:
this->codec = avcodec_find_decoder (CODEC_ID_WMAV1);
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC]
- = strdup ("MS Windows Media Audio 1 (ffmpeg)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ "MS Windows Media Audio 1 (ffmpeg)");
break;
case BUF_AUDIO_WMAV2:
this->codec = avcodec_find_decoder (CODEC_ID_WMAV2);
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC]
- = strdup ("MS Windows Media Audio 2 (ffmpeg)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ "MS Windows Media Audio 2 (ffmpeg)");
break;
case BUF_AUDIO_DV:
this->codec = avcodec_find_decoder (CODEC_ID_DVAUDIO);
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC]
- = strdup ("DV Audio (ffmpeg)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ "DV Audio (ffmpeg)");
break;
case BUF_AUDIO_14_4:
this->codec = avcodec_find_decoder (CODEC_ID_RA_144);
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC]
- = strdup ("Real 14.4 (ffmpeg)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ "Real 14.4 (ffmpeg)");
break;
case BUF_AUDIO_28_8:
this->codec = avcodec_find_decoder (CODEC_ID_RA_288);
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC]
- = strdup ("Real 28.8 (ffmpeg)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ "Real 28.8 (ffmpeg)");
break;
case BUF_AUDIO_MPEG:
this->codec = avcodec_find_decoder (CODEC_ID_MP3LAME);
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC]
- = strdup ("MP3 (ffmpeg)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ "MP3 (ffmpeg)");
break;
case BUF_AUDIO_MSADPCM:
this->codec = avcodec_find_decoder (CODEC_ID_ADPCM_MS);
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC]
- = strdup ("MS ADPCM (ffmpeg)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ "MS ADPCM (ffmpeg)");
break;
case BUF_AUDIO_QTIMAADPCM:
this->codec = avcodec_find_decoder (CODEC_ID_ADPCM_IMA_QT);
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC]
- = strdup ("QT IMA ADPCM (ffmpeg)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ "QT IMA ADPCM (ffmpeg)");
break;
case BUF_AUDIO_MSIMAADPCM:
this->codec = avcodec_find_decoder (CODEC_ID_ADPCM_IMA_WAV);
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC]
- = strdup ("MS IMA ADPCM (ffmpeg)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ "MS IMA ADPCM (ffmpeg)");
break;
case BUF_AUDIO_DK3ADPCM:
this->codec = avcodec_find_decoder (CODEC_ID_ADPCM_IMA_DK3);
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC]
- = strdup ("Duck DK3 ADPCM (ffmpeg)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ "Duck DK3 ADPCM (ffmpeg)");
break;
case BUF_AUDIO_DK4ADPCM:
this->codec = avcodec_find_decoder (CODEC_ID_ADPCM_IMA_DK4);
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC]
- = strdup ("Duck DK4 ADPCM (ffmpeg)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ "Duck DK4 ADPCM (ffmpeg)");
break;
case BUF_AUDIO_VQA_IMA:
this->codec = avcodec_find_decoder (CODEC_ID_ADPCM_IMA_WS);
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC]
- = strdup ("Westwood Studios IMA (ffmpeg)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ "Westwood Studios IMA (ffmpeg)");
break;
case BUF_AUDIO_XA_ADPCM:
this->codec = avcodec_find_decoder (CODEC_ID_ADPCM_XA);
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC]
- = strdup ("CD-ROM/XA ADPCM (ffmpeg)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ "CD-ROM/XA ADPCM (ffmpeg)");
break;
case BUF_AUDIO_MULAW:
this->codec = avcodec_find_decoder (CODEC_ID_PCM_MULAW);
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC]
- = strdup ("mu-law logarithmic PCM (ffmpeg)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ "mu-law logarithmic PCM (ffmpeg)");
break;
case BUF_AUDIO_ALAW:
this->codec = avcodec_find_decoder (CODEC_ID_PCM_ALAW);
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC]
- = strdup ("A-law logarithmic PCM (ffmpeg)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ "A-law logarithmic PCM (ffmpeg)");
break;
case BUF_AUDIO_ROQ:
this->codec = avcodec_find_decoder (CODEC_ID_ROQ_DPCM);
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC]
- = strdup ("RoQ DPCM (ffmpeg)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ "RoQ DPCM (ffmpeg)");
break;
case BUF_AUDIO_INTERPLAY:
this->codec = avcodec_find_decoder (CODEC_ID_INTERPLAY_DPCM);
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC]
- = strdup ("Interplay DPCM (ffmpeg)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ "Interplay DPCM (ffmpeg)");
break;
}
diff --git a/src/liblpcm/xine_decoder.c b/src/liblpcm/xine_decoder.c
index a363f9e24..366516787 100644
--- a/src/liblpcm/xine_decoder.c
+++ b/src/liblpcm/xine_decoder.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine_decoder.c,v 1.44 2003/09/01 13:19:29 jcdutton Exp $
+ * $Id: xine_decoder.c,v 1.45 2003/11/15 13:01:12 miguelfreitas Exp $
*
* 31-8-2001 Added LPCM rate sensing.
* (c) 2001 James Courtier-Dutton James@superbug.demon.co.uk
@@ -131,9 +131,9 @@ static void lpcm_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) {
this->ao_cap_mode) ;
/* stream/meta info */
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC] = strdup("Linear PCM");
- this->stream->stream_info[XINE_STREAM_INFO_AUDIO_BITRATE] =
- this->bits_per_sample * this->rate * this->number_of_channels;
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC, "Linear PCM");
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_BITRATE,
+ this->bits_per_sample * this->rate * this->number_of_channels);
}
if (!this->output_open || (buf->decoder_flags & BUF_FLAG_HEADER) )
diff --git a/src/libmad/xine_decoder.c b/src/libmad/xine_decoder.c
index a4f30eee3..5a9ce9014 100644
--- a/src/libmad/xine_decoder.c
+++ b/src/libmad/xine_decoder.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine_decoder.c,v 1.41 2003/01/31 18:29:47 miguelfreitas Exp $
+ * $Id: xine_decoder.c,v 1.42 2003/11/15 13:01:13 miguelfreitas Exp $
*
* stuff needed to turn libmad into a xine decoder plugin
*/
@@ -194,23 +194,23 @@ static void mad_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) {
mode);
#endif
- this->xstream->stream_info[XINE_STREAM_INFO_AUDIO_BITRATE] = this->frame.header.bitrate;
+ xine_set_stream_info(this->xstream, XINE_STREAM_INFO_AUDIO_BITRATE, this->frame.header.bitrate);
switch (this->frame.header.layer) {
case MAD_LAYER_I:
- this->xstream->meta_info[XINE_META_INFO_AUDIOCODEC]
- = strdup ("MPEG audio layer 1");
+ xine_set_meta_info(this->xstream, XINE_META_INFO_AUDIOCODEC,
+ "MPEG audio layer 1");
break;
case MAD_LAYER_II:
- this->xstream->meta_info[XINE_META_INFO_AUDIOCODEC]
- = strdup ("MPEG audio layer 2");
+ xine_set_meta_info(this->xstream, XINE_META_INFO_AUDIOCODEC,
+ "MPEG audio layer 2");
break;
case MAD_LAYER_III:
- this->xstream->meta_info[XINE_META_INFO_AUDIOCODEC]
- = strdup ("MPEG audio layer 3");
+ xine_set_meta_info(this->xstream, XINE_META_INFO_AUDIOCODEC,
+ "MPEG audio layer 3");
break;
default:
- this->xstream->meta_info[XINE_META_INFO_AUDIOCODEC]
- = strdup ("MPEG audio");
+ xine_set_meta_info(this->xstream, XINE_META_INFO_AUDIOCODEC,
+ "MPEG audio");
}
if (this->output_open) {
diff --git a/src/libmpeg2/decode.c b/src/libmpeg2/decode.c
index 2861985da..d53443da4 100644
--- a/src/libmpeg2/decode.c
+++ b/src/libmpeg2/decode.c
@@ -201,43 +201,43 @@ static void remember_metainfo (mpeg2dec_t *mpeg2dec) {
picture_t * picture = mpeg2dec->picture;
- mpeg2dec->stream->stream_info[XINE_STREAM_INFO_VIDEO_WIDTH] = picture->frame_width;
- mpeg2dec->stream->stream_info[XINE_STREAM_INFO_VIDEO_HEIGHT] = picture->frame_height;
- mpeg2dec->stream->stream_info[XINE_STREAM_INFO_VIDEO_RATIO] =
- ((double)10000 * get_aspect_ratio(mpeg2dec));
+ xine_set_stream_info(mpeg2dec->stream, XINE_STREAM_INFO_VIDEO_WIDTH, picture->frame_width);
+ xine_set_stream_info(mpeg2dec->stream, XINE_STREAM_INFO_VIDEO_HEIGHT, picture->frame_height);
+ xine_set_stream_info(mpeg2dec->stream, XINE_STREAM_INFO_VIDEO_RATIO,
+ ((double)10000 * get_aspect_ratio(mpeg2dec)));
switch (mpeg2dec->picture->frame_rate_code) {
case 1: /* 23.976 fps */
- mpeg2dec->stream->stream_info[XINE_STREAM_INFO_FRAME_DURATION] = 3913;
+ xine_set_stream_info(mpeg2dec->stream, XINE_STREAM_INFO_FRAME_DURATION, 3913);
break;
case 2: /* 24 fps */
- mpeg2dec->stream->stream_info[XINE_STREAM_INFO_FRAME_DURATION] = 3750;
+ xine_set_stream_info(mpeg2dec->stream, XINE_STREAM_INFO_FRAME_DURATION, 3750);
break;
case 3: /* 25 fps */
- mpeg2dec->stream->stream_info[XINE_STREAM_INFO_FRAME_DURATION] = 3600;
+ xine_set_stream_info(mpeg2dec->stream, XINE_STREAM_INFO_FRAME_DURATION, 3600);
break;
case 4: /* 29.97 fps */
- mpeg2dec->stream->stream_info[XINE_STREAM_INFO_FRAME_DURATION] = 3003;
+ xine_set_stream_info(mpeg2dec->stream, XINE_STREAM_INFO_FRAME_DURATION, 3003);
break;
case 5: /* 30 fps */
- mpeg2dec->stream->stream_info[XINE_STREAM_INFO_FRAME_DURATION] = 3000;
+ xine_set_stream_info(mpeg2dec->stream, XINE_STREAM_INFO_FRAME_DURATION, 3000);
break;
case 6: /* 50 fps */
- mpeg2dec->stream->stream_info[XINE_STREAM_INFO_FRAME_DURATION] = 1800;
+ xine_set_stream_info(mpeg2dec->stream, XINE_STREAM_INFO_FRAME_DURATION, 1800);
break;
case 7: /* 59.94 fps */
- mpeg2dec->stream->stream_info[XINE_STREAM_INFO_FRAME_DURATION] = 1525;
+ xine_set_stream_info(mpeg2dec->stream, XINE_STREAM_INFO_FRAME_DURATION, 1525);
break;
case 8: /* 60 fps */
- mpeg2dec->stream->stream_info[XINE_STREAM_INFO_FRAME_DURATION] = 1509;
+ xine_set_stream_info(mpeg2dec->stream, XINE_STREAM_INFO_FRAME_DURATION, 1509);
break;
default:
/* printf ("invalid/unknown frame rate code : %d \n",
frame->frame_rate_code); */
- mpeg2dec->stream->stream_info[XINE_STREAM_INFO_FRAME_DURATION] = 3000;
+ xine_set_stream_info(mpeg2dec->stream, XINE_STREAM_INFO_FRAME_DURATION, 3000);
}
- mpeg2dec->stream->meta_info[XINE_META_INFO_VIDEOCODEC] = strdup ("MPEG");
+ xine_set_meta_info(mpeg2dec->stream, XINE_META_INFO_VIDEOCODEC, "MPEG");
}
@@ -432,10 +432,10 @@ static inline int parse_chunk (mpeg2dec_t * mpeg2dec, int code,
data.pan_scan = mpeg2dec->force_pan_scan;
xine_event_send(mpeg2dec->stream, &event);
- mpeg2dec->stream->stream_info[XINE_STREAM_INFO_VIDEO_WIDTH]
- = picture->coded_picture_width;
- mpeg2dec->stream->stream_info[XINE_STREAM_INFO_VIDEO_HEIGHT]
- = picture->coded_picture_height;
+ xine_set_stream_info(mpeg2dec->stream,XINE_STREAM_INFO_VIDEO_WIDTH,
+ picture->coded_picture_width);
+ xine_set_stream_info(mpeg2dec->stream,XINE_STREAM_INFO_VIDEO_HEIGHT,
+ picture->coded_picture_height);
if (picture->forward_reference_frame &&
picture->forward_reference_frame != picture->current_frame &&
@@ -861,10 +861,10 @@ void mpeg2_find_sequence_header (mpeg2dec_t * mpeg2dec,
data.pan_scan = mpeg2dec->force_pan_scan;
xine_event_send(mpeg2dec->stream, &event);
- mpeg2dec->stream->stream_info[XINE_STREAM_INFO_VIDEO_WIDTH]
- = picture->coded_picture_width;
- mpeg2dec->stream->stream_info[XINE_STREAM_INFO_VIDEO_HEIGHT]
- = picture->coded_picture_height;
+ xine_set_stream_info(mpeg2dec->stream, XINE_STREAM_INFO_VIDEO_WIDTH,
+ picture->coded_picture_width);
+ xine_set_stream_info(mpeg2dec->stream, XINE_STREAM_INFO_VIDEO_HEIGHT,
+ picture->coded_picture_height);
}
} else if (code == 0xb5) { /* extension_start_code */
if (mpeg2_header_extension (picture, mpeg2dec->chunk_buffer)) {
diff --git a/src/libmpeg2new/xine_decoder.c b/src/libmpeg2new/xine_decoder.c
index 110d2eb6d..625354060 100644
--- a/src/libmpeg2new/xine_decoder.c
+++ b/src/libmpeg2new/xine_decoder.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine_decoder.c,v 1.12 2003/10/23 20:12:33 mroi Exp $
+ * $Id: xine_decoder.c,v 1.13 2003/11/15 13:01:14 miguelfreitas Exp $
*
* stuff needed to turn libmpeg2 into a xine decoder plugin
*/
@@ -156,9 +156,9 @@ static void mpeg2_video_decode_data (video_decoder_t *this_gen, buf_element_t *b
this->stream->stream_info[XINE_STREAM_INFO_VIDEO_RATIO] = (int)(10000*this->ratio);
if (info->sequence->flags & SEQ_FLAG_MPEG2) {
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC] = strdup ("MPEG 2 (libmpeg2new)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC, "MPEG 2 (libmpeg2new)");
} else {
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC] = strdup ("MPEG 1 (libmpeg2new)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC, "MPEG 1 (libmpeg2new)");
}
break;
diff --git a/src/libreal/audio_decoder.c b/src/libreal/audio_decoder.c
index 7c16a11f3..f03036740 100644
--- a/src/libreal/audio_decoder.c
+++ b/src/libreal/audio_decoder.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: audio_decoder.c,v 1.28 2003/11/11 18:44:54 f1rmb Exp $
+ * $Id: audio_decoder.c,v 1.29 2003/11/15 13:01:14 miguelfreitas Exp $
*
* thin layer to use real binary-only codecs in xine
*
@@ -247,38 +247,33 @@ static int init_codec (realdec_decoder_t *this, buf_element_t *buf) {
if (!load_syms_linux (this, "cook.so.6.0"))
return 0;
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC]
- = strdup ("Cook");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC, "Cook");
break;
case BUF_AUDIO_ATRK:
if (!load_syms_linux (this, "atrc.so.6.0"))
return 0;
this->block_align = 384;
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC]
- = strdup ("Atrac");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC, "Atrac");
break;
case BUF_AUDIO_14_4:
if (!load_syms_linux (this, "14_4.so.6.0"))
return 0;
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC]
- = strdup ("Real 14.4");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC, "Real 14.4");
break;
case BUF_AUDIO_28_8:
if (!load_syms_linux (this, "28_8.so.6.0"))
return 0;
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC]
- = strdup ("Real 28.8");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC, "Real 28.8");
break;
case BUF_AUDIO_SIPRO:
if (!load_syms_linux (this, "sipr.so.6.0"))
return 0;
/* this->block_align = 19; */
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC]
- = strdup ("Sipro");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC, "Sipro");
break;
default:
diff --git a/src/libreal/xine_decoder.c b/src/libreal/xine_decoder.c
index 77dcc3f76..f46693213 100644
--- a/src/libreal/xine_decoder.c
+++ b/src/libreal/xine_decoder.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine_decoder.c,v 1.51 2003/11/11 18:44:54 f1rmb Exp $
+ * $Id: xine_decoder.c,v 1.52 2003/11/15 13:01:15 miguelfreitas Exp $
*
* thin layer to use real binary-only codecs in xine
*
@@ -165,20 +165,17 @@ static int init_codec (realdec_decoder_t *this, buf_element_t *buf) {
case BUF_VIDEO_RV20:
if (!load_syms_linux (this, "drv2.so.6.0"))
return 0;
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC]
- = strdup ("Real Video 2.0");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC, "Real Video 2.0");
break;
case BUF_VIDEO_RV30:
if (!load_syms_linux (this, "drv3.so.6.0"))
return 0;
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC]
- = strdup ("Real Video 3.0");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC, "Real Video 3.0");
break;
case BUF_VIDEO_RV40:
if (!load_syms_linux(this, "drv4.so.6.0"))
return 0;
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC]
- = strdup ("Real Video 4.0");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC, "Real Video 4.0");
break;
default:
printf ("libreal: error, i don't handle buf type 0x%08x\n",
diff --git a/src/libspeex/xine_decoder.c b/src/libspeex/xine_decoder.c
index 5f3584d22..2d6343487 100644
--- a/src/libspeex/xine_decoder.c
+++ b/src/libspeex/xine_decoder.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine_decoder.c,v 1.1 2003/05/25 13:39:14 guenter Exp $
+ * $Id: xine_decoder.c,v 1.2 2003/11/15 13:01:15 miguelfreitas Exp $
*
* (ogg/)speex audio decoder plugin (libspeex wrapper) for xine
*/
@@ -117,7 +117,7 @@ void read_metadata (speex_decoder_t *this, char * comments, int length)
int len, i, nb_fields;
char * end;
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC] = strdup ("speex");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC, "speex");
if (length < 8) {
printf ("libspeex: invalid/corrupted comments\n");
@@ -184,8 +184,9 @@ void read_metadata (speex_decoder_t *this, char * comments, int length)
meta_info = xine_xmalloc (len - keylen);
memcpy (meta_info, c + keylen, len - keylen);
- this->stream->meta_info[speex_comment_keys[i].xine_metainfo_index] =
- meta_info;
+ xine_set_meta_info(this->stream, speex_comment_keys[i].xine_metainfo_index],
+ meta_info);
+ free( meta_info );
}
}
diff --git a/src/libsputext/demux_sputext.c b/src/libsputext/demux_sputext.c
index 824159792..9391f20a8 100644
--- a/src/libsputext/demux_sputext.c
+++ b/src/libsputext/demux_sputext.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: demux_sputext.c,v 1.26 2003/11/11 18:44:54 f1rmb Exp $
+ * $Id: demux_sputext.c,v 1.27 2003/11/15 13:01:15 miguelfreitas Exp $
*
* code based on old libsputext/xine_decoder.c
*
@@ -893,8 +893,8 @@ static void demux_sputext_send_headers(demux_plugin_t *this_gen) {
lprintf("demux_sputext: send_headers() called\n");
_x_demux_control_start(this->stream);
- this->stream->stream_info[XINE_STREAM_INFO_HAS_VIDEO] = 0;
- this->stream->stream_info[XINE_STREAM_INFO_HAS_AUDIO] = 0;
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 0);
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 0);
/* enable the SPU channel */
buf = this->stream->video_fifo->buffer_pool_alloc(this->stream->video_fifo);
diff --git a/src/libvorbis/xine_decoder.c b/src/libvorbis/xine_decoder.c
index 616ef6e48..2dc57f989 100644
--- a/src/libvorbis/xine_decoder.c
+++ b/src/libvorbis/xine_decoder.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine_decoder.c,v 1.27 2003/05/01 20:36:07 heinchen Exp $
+ * $Id: xine_decoder.c,v 1.28 2003/11/15 13:01:18 miguelfreitas Exp $
*
* (ogg/)vorbis audio decoder plugin (libvorbis wrapper) for xine
*/
@@ -121,15 +121,15 @@ static void get_metadata (vorbis_decoder_t *this) {
i, vorbis_comment_keys[i].xine_metainfo_index);
#endif
- this->stream->meta_info[vorbis_comment_keys[i].xine_metainfo_index]
- = strdup (comment + strlen(vorbis_comment_keys[i].key));
+ xine_set_meta_info(this->stream, vorbis_comment_keys[i].xine_metainfo_index,
+ = comment + strlen(vorbis_comment_keys[i].key));
}
}
++ptr;
}
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC] = strdup ("vorbis");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC, "vorbis");
}
static void vorbis_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) {
@@ -194,7 +194,8 @@ static void vorbis_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) {
this->vi.rate,
mode) ;
- this->stream->stream_info[XINE_STREAM_INFO_AUDIO_BITRATE]=this->vi.bitrate_nominal;
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_BITRATE,
+ this->vi.bitrate_nominal);
}
diff --git a/src/libw32dll/qt_decoder.c b/src/libw32dll/qt_decoder.c
index febd3ea44..d0f0918d6 100644
--- a/src/libw32dll/qt_decoder.c
+++ b/src/libw32dll/qt_decoder.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: qt_decoder.c,v 1.24 2003/11/13 15:23:01 andruil Exp $
+ * $Id: qt_decoder.c,v 1.25 2003/11/15 13:01:18 miguelfreitas Exp $
*
* quicktime video/audio decoder plugin, using win32 dlls
* most of this code comes directly from MPlayer
@@ -323,18 +323,18 @@ static void qta_init_driver (qta_decoder_t *this, buf_element_t *buf) {
switch (buf->type) {
case BUF_AUDIO_QDESIGN1:
this->InputFormatInfo.format = FOUR_CHAR_CODE('Q','D','M','C');
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC] =
- strdup("QDesign Music Codec v1 (QT DLL)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ "QDesign Music Codec v1 (QT DLL)");
break;
case BUF_AUDIO_QDESIGN2:
this->InputFormatInfo.format = FOUR_CHAR_CODE('Q','D','M','2');
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC] =
- strdup("QDesign Music Codec v2 (QT DLL)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ "QDesign Music Codec v2 (QT DLL)");
break;
case BUF_AUDIO_QCLP:
this->InputFormatInfo.format = FOUR_CHAR_CODE('Q','c','l','p');
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC] =
- strdup("Qualcomm Purevoice Codec (QT DLL)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ "Qualcomm Purevoice Codec (QT DLL)");
break;
default:
printf ("qt_audio: fourcc for buftype %08x ?\n", buf->type);
@@ -485,7 +485,7 @@ static void qta_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) {
}
if (!this->codec_initialized)
- this->stream->stream_info[XINE_STREAM_INFO_AUDIO_HANDLED] = 0;
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_HANDLED, 0);
}
} else if( this->codec_initialized ) {
@@ -1025,8 +1025,7 @@ static void qtv_decode_data (video_decoder_t *this_gen, buf_element_t *buf) {
this->ratio = (double)this->bih.biWidth / (double)this->bih.biHeight;
/* video decoder only handles SVQ3 at this point */
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC] =
- strdup("Sorenson Video 3 (QT DLL)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC, "Sorenson Video 3 (QT DLL)");
} else if (buf->decoder_flags & BUF_FLAG_SPECIAL) {
#ifdef LOG
@@ -1043,7 +1042,7 @@ static void qtv_decode_data (video_decoder_t *this_gen, buf_element_t *buf) {
qtv_init_driver (this, buf);
}
if (!this->codec_initialized)
- this->stream->stream_info[XINE_STREAM_INFO_VIDEO_HANDLED] = 0;
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_HANDLED, 0);
}
} else if (this->codec_initialized) {
diff --git a/src/libw32dll/w32codec.c b/src/libw32dll/w32codec.c
index 464d6c1c2..4dbb560a6 100644
--- a/src/libw32dll/w32codec.c
+++ b/src/libw32dll/w32codec.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: w32codec.c,v 1.128 2003/11/11 18:44:55 f1rmb Exp $
+ * $Id: w32codec.c,v 1.129 2003/11/15 13:01:19 miguelfreitas Exp $
*
* routines for using w32 codecs
* DirectShow support by Miguel Freitas (Nov/2001)
@@ -322,8 +322,8 @@ static char* get_vids_codec_name(w32v_decoder_t *this,
this->yuv_supported=1;
this->driver_type = DRIVER_DS;
this->guid=&msmpeg4_clsid;
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC]
- = strdup ("MS MPEG-4 V1/V2 (win32)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ "MS MPEG-4 V1/V2 (win32)");
return "mpg4ds32.ax";
case BUF_VIDEO_MSMPEG4_V3:
@@ -331,45 +331,45 @@ static char* get_vids_codec_name(w32v_decoder_t *this,
this->yuv_supported=1;
this->yuv_hack_needed=1;
this->flipped=1;
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC]
- = strdup ("MS MPEG-4 V3 (win32)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ "MS MPEG-4 V3 (win32)");
return "divxc32.dll";
case BUF_VIDEO_IV50:
/* Video in Indeo Video 5 format */
this->yuv_supported=1; /* YUV pic is upside-down :( */
this->flipped=0;
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC]
- = strdup ("Indeo Video 5 (win32)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ "Indeo Video 5 (win32)");
return "ir50_32.dll";
case BUF_VIDEO_IV41:
/* Video in Indeo Video 4.1 format */
this->flipped=1;
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC]
- = strdup ("Indeo Video 4.1 (win32)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ "Indeo Video 4.1 (win32)");
return "ir41_32.dll";
case BUF_VIDEO_IV32:
/* Video in Indeo Video 3.2 format */
this->flipped=1;
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC]
- = strdup ("Indeo Video 3.2 (win32)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ "Indeo Video 3.2 (win32)");
return "ir32_32.dll";
case BUF_VIDEO_IV31:
/* Video in Indeo Video 3.1 format */
this->flipped=1;
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC]
- = strdup ("Indeo Video 3.1 (win32)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ "Indeo Video 3.1 (win32)");
return "ir32_32.dll";
case BUF_VIDEO_CINEPAK:
/* Video in Cinepak format */
this->flipped=1;
this->yuv_supported=0;
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC]
- = strdup ("Cinepak (win32)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ "Cinepak (win32)");
return "iccvid.dll";
/*** Only 16bit .DLL available (can't load under linux) ***
@@ -381,16 +381,16 @@ static char* get_vids_codec_name(w32v_decoder_t *this,
case BUF_VIDEO_ATIVCR2:
/* Video in ATI VCR2 format */
this->yuv_supported=1;
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC]
- = strdup ("ATI VCR2 (win32)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ "ATI VCR2 (win32)");
return "ativcr2.dll";
case BUF_VIDEO_I263:
/* Video in I263 format */
this->flipped=1;
this->yuv_supported=1;
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC]
- = strdup ("I263 (win32)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ "I263 (win32)");
return "i263_32.drv";
case BUF_VIDEO_MSVC:
@@ -398,8 +398,8 @@ static char* get_vids_codec_name(w32v_decoder_t *this,
/* note: can't play streams with 8bpp */
this->flipped=1;
this->yuv_supported=0;
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC]
- = strdup ("MS Windows Video 1 (win32)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ "MS Windows Video 1 (win32)");
return "msvidc32.dll";
case BUF_VIDEO_DV:
@@ -407,67 +407,67 @@ static char* get_vids_codec_name(w32v_decoder_t *this,
this->yuv_supported=1;
this->driver_type = DRIVER_DS;
this->guid=&dvsd_clsid;
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC]
- = strdup ("Sony DV (win32)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ "Sony DV (win32)");
return "qdv.dll";
case BUF_VIDEO_WMV7:
this->yuv_supported=1;
this->driver_type = DRIVER_DS;
this->guid=&wmv1_clsid;
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC]
- = strdup ("MS WMV 7 (win32)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ "MS WMV 7 (win32)");
return "wmvds32.ax";
case BUF_VIDEO_WMV8:
this->yuv_supported=1;
this->driver_type = DRIVER_DS;
this->guid=&wmv2_clsid;
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC]
- = strdup ("MS WMV 8 (win32)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ "MS WMV 8 (win32)");
return "wmv8ds32.ax";
case BUF_VIDEO_WMV9:
this->yuv_supported=1;
this->driver_type = DRIVER_DMO;
this->guid=&wmv3_clsid;
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC]
- = strdup ("MS WMV 9 (win32)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ "MS WMV 9 (win32)");
return "wmv9dmod.dll";
case BUF_VIDEO_VP31:
this->yuv_supported=1;
this->ex_functions=1;
this->flipped=1;
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC]
- = strdup ("On2 VP3.1 (win32)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ "On2 VP3.1 (win32)");
return "vp31vfw.dll";
case BUF_VIDEO_VP4:
this->yuv_supported=1;
this->ex_functions=1;
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC]
- = strdup ("On2 VP4 (win32)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ "On2 VP4 (win32)");
return "vp4vfw.dll";
case BUF_VIDEO_MSS1:
this->driver_type = DRIVER_DS;
this->guid=&mss1_clsid;
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC]
- = strdup ("Windows Screen Video (win32)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ "Windows Screen Video (win32)");
return "msscds32.ax";
case BUF_VIDEO_TSCC:
this->flipped=1;
this->yuv_supported=0;
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC]
- = strdup ("TechSmith Screen Capture Codec (win32)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ "TechSmith Screen Capture Codec (win32)");
return "tsccvid.dll";
case BUF_VIDEO_UCOD:
this->yuv_supported=1;
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC]
- = strdup ("ClearVideo (win32)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ "ClearVideo (win32)");
return "clrviddd.dll";
}
@@ -719,9 +719,9 @@ static void w32v_decode_data (video_decoder_t *this_gen, buf_element_t *buf) {
this->ratio = (double)this->bih->biWidth/(double)this->bih->biHeight;
- this->stream->stream_info[XINE_STREAM_INFO_VIDEO_WIDTH] = this->bih->biWidth;
- this->stream->stream_info[XINE_STREAM_INFO_VIDEO_HEIGHT] = this->bih->biHeight;
- this->stream->stream_info[XINE_STREAM_INFO_FRAME_DURATION] = this->video_step;
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_WIDTH, this->bih->biWidth);
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_HEIGHT, this->bih->biHeight);
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_FRAME_DURATION, this->video_step);
#ifdef LOG
printf ("w32codec: video_step is %lld\n", this->video_step);
@@ -1011,60 +1011,60 @@ static char* get_auds_codec_name(w32a_decoder_t *this, int buf_type) {
switch (buf_type) {
case BUF_AUDIO_WMAV1:
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC]
- = strdup ("Windows Media Audio v1 (win32)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ "Windows Media Audio v1 (win32)");
return "divxa32.acm";
case BUF_AUDIO_WMAV2:
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC]
- = strdup ("Windows Media Audio v2 (win32)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ "Windows Media Audio v2 (win32)");
return "divxa32.acm";
case BUF_AUDIO_WMAV3:
this->driver_type = DRIVER_DMO;
this->guid=&wma3_clsid;
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC]
- = strdup ("Windows Media Audio v3 (win32)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ "Windows Media Audio v3 (win32)");
return "wma9dmod.dll";
case BUF_AUDIO_WMAV:
this->driver_type = DRIVER_DMO;
this->guid=&wmav_clsid;
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC]
- = strdup ("Windows Media Audio Voice (win32)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ "Windows Media Audio Voice (win32)");
return "wmspdmod.dll";
case BUF_AUDIO_MSADPCM:
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC]
- = strdup ("MS ADPCM (win32)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ "MS ADPCM (win32)");
return "msadp32.acm";
case BUF_AUDIO_MSIMAADPCM:
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC]
- = strdup ("MS IMA ADPCM (win32)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ "MS IMA ADPCM (win32)");
return "imaadp32.acm";
case BUF_AUDIO_MSGSM:
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC]
- = strdup ("MS GSM (win32)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ "MS GSM (win32)");
return "msgsm32.acm";
case BUF_AUDIO_IMC:
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC]
- = strdup ("Intel Music Coder (win32)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ "Intel Music Coder (win32)");
return "imc32.acm";
case BUF_AUDIO_LH:
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC]
- = strdup ("Lernout & Hauspie (win32)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ "Lernout & Hauspie (win32)");
return "lhacm.acm";
case BUF_AUDIO_VOXWARE:
this->driver_type = DRIVER_DS;
this->guid=&CLSID_Voxware;
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC]
- = strdup ("Voxware Metasound (win32)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ "Voxware Metasound (win32)");
return "voxmsdec.ax";
case BUF_AUDIO_ACELPNET:
this->driver_type = DRIVER_DS;
this->guid=&CLSID_Acelp;
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC]
- = strdup ("ACELP.net (win32)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ "ACELP.net (win32)");
return "acelpdec.ax";
case BUF_AUDIO_VIVOG723:
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC]
- = strdup ("Vivo G.723/Siren Audio Codec (win32)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ "Vivo G.723/Siren Audio Codec (win32)");
return "vivog723.acm";
}
printf ("w32codec: this didn't happen: unknown audio buf type %08x\n",
diff --git a/src/libxineadec/28k8.c b/src/libxineadec/28k8.c
index c43288937..c64ec6a45 100644
--- a/src/libxineadec/28k8.c
+++ b/src/libxineadec/28k8.c
@@ -22,7 +22,7 @@
* Based on public domain source code from:
* http://www.honeypot.net/audio/
*
- * $Id: 28k8.c,v 1.2 2003/05/08 19:45:08 esnel Exp $
+ * $Id: 28k8.c,v 1.3 2003/11/15 13:01:19 miguelfreitas Exp $
*/
#include <stdio.h>
@@ -410,10 +410,10 @@ static void ra28k8_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) {
} else if (buf->decoder_flags & BUF_FLAG_HEADER) {
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC] = strdup ("Real 28.8");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC, "Real 28.8");
this->decoder_ok = 1;
if (!this->decoder_ok)
- this->stream->stream_info[XINE_STREAM_INFO_AUDIO_HANDLED] = 0;
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_HANDLED, 0);
} else if (this->decoder_ok ) {
audio_buffer_t *audio_buffer;
diff --git a/src/libxineadec/adpcm.c b/src/libxineadec/adpcm.c
index 4678adf51..e2bcb462c 100644
--- a/src/libxineadec/adpcm.c
+++ b/src/libxineadec/adpcm.c
@@ -31,7 +31,7 @@
* this is also useful for extracting streams from Playstation discs
*
*
- * $Id: adpcm.c,v 1.31 2003/06/06 14:29:41 mroi Exp $
+ * $Id: adpcm.c,v 1.32 2003/11/15 13:01:19 miguelfreitas Exp $
*/
#include <stdio.h>
@@ -1409,53 +1409,53 @@ static void adpcm_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) {
switch (buf->type & 0xFFFF0000) {
case BUF_AUDIO_MSADPCM:
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC] =
- strdup("Microsoft ADPCM");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ "Microsoft ADPCM");
break;
case BUF_AUDIO_MSIMAADPCM:
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC] =
- strdup("Microsoft IMA ADPCM");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ "Microsoft IMA ADPCM");
break;
case BUF_AUDIO_QTIMAADPCM:
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC] =
- strdup("QT IMA ADPCM");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ "QT IMA ADPCM");
break;
case BUF_AUDIO_DK3ADPCM:
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC] =
- strdup("Duck DK3 ADPCM");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ "Duck DK3 ADPCM");
break;
case BUF_AUDIO_DK4ADPCM:
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC] =
- strdup("Duck DK4 ADPCM");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ "Duck DK4 ADPCM");
break;
case BUF_AUDIO_SMJPEG_IMA:
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC] =
- strdup("SMJPEG IMA ADPCM");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ "SMJPEG IMA ADPCM");
break;
case BUF_AUDIO_VQA_IMA:
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC] =
- strdup("VQA IMA ADPCM");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ "VQA IMA ADPCM");
break;
case BUF_AUDIO_EA_ADPCM:
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC] =
- strdup("EA ADPCM");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ "EA ADPCM");
break;
case BUF_AUDIO_DIALOGIC_IMA:
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC] =
- strdup("Dialogic IMA ADPCM");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ "Dialogic IMA ADPCM");
break;
case BUF_AUDIO_XA_ADPCM:
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC] =
- strdup("CD-ROM/XA ADPCM");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ "CD-ROM/XA ADPCM");
break;
}
diff --git a/src/libxineadec/fooaudio.c b/src/libxineadec/fooaudio.c
index b40dd26f5..c94073fd8 100644
--- a/src/libxineadec/fooaudio.c
+++ b/src/libxineadec/fooaudio.c
@@ -21,7 +21,7 @@
* player. It really works too! It will output a continuous sine wave in
* place of the data it should actually send.
*
- * $Id: fooaudio.c,v 1.6 2003/01/08 01:02:31 miguelfreitas Exp $
+ * $Id: fooaudio.c,v 1.7 2003/11/15 13:01:20 miguelfreitas Exp $
*/
#include <stdio.h>
@@ -98,7 +98,7 @@ static void fooaudio_decode_data (audio_decoder_t *this_gen, buf_element_t *buf)
this->size = 0;
/* take this opportunity to initialize stream/meta information */
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC] = strdup("fooaudio");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC, "fooaudio");
/* peform any other required initialization */
this->last_pts = -1;
diff --git a/src/libxineadec/gsm610.c b/src/libxineadec/gsm610.c
index 2a4b5f619..e4c037aa7 100644
--- a/src/libxineadec/gsm610.c
+++ b/src/libxineadec/gsm610.c
@@ -44,7 +44,7 @@
* Carsten Bormann
* --------------------------------------------------------------------
*
- * $Id: gsm610.c,v 1.8 2003/01/08 01:02:31 miguelfreitas Exp $
+ * $Id: gsm610.c,v 1.9 2003/11/15 13:01:20 miguelfreitas Exp $
*
*/
@@ -109,7 +109,7 @@ static void gsm610_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) {
this->size = 0;
/* stream/meta info */
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC] = strdup("GSM 6.10");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC, "GSM 6.10");
return;
}
diff --git a/src/libxineadec/interplayaudio.c b/src/libxineadec/interplayaudio.c
index 71cfa0bc5..e1057766f 100644
--- a/src/libxineadec/interplayaudio.c
+++ b/src/libxineadec/interplayaudio.c
@@ -21,7 +21,7 @@
* For more information regarding the Interplay MVE file format, visit:
* http://www.pcisys.net/~melanson/codecs/
*
- * $Id: interplayaudio.c,v 1.2 2003/01/08 01:02:31 miguelfreitas Exp $
+ * $Id: interplayaudio.c,v 1.3 2003/11/15 13:01:20 miguelfreitas Exp $
*/
#include <stdio.h>
@@ -137,7 +137,8 @@ static void interplay_decode_data (audio_decoder_t *this_gen, buf_element_t *buf
this->size = 0;
/* take this opportunity to initialize stream/meta information */
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC] = strdup("Interplay MVE DPCM");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ "Interplay MVE DPCM");
return;
}
diff --git a/src/libxineadec/logpcm.c b/src/libxineadec/logpcm.c
index 3ff15fb0b..4cf95f28f 100644
--- a/src/libxineadec/logpcm.c
+++ b/src/libxineadec/logpcm.c
@@ -30,7 +30,7 @@
* http://sox.sourceforge.net/
* which listed the code as being lifted from Sun Microsystems.
*
- * $Id: logpcm.c,v 1.12 2003/01/08 01:02:31 miguelfreitas Exp $
+ * $Id: logpcm.c,v 1.13 2003/11/15 13:01:21 miguelfreitas Exp $
*
*/
@@ -160,9 +160,9 @@ static void logpcm_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) {
this->size = 0;
/* stream/meta info */
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC] =
- (buf->type == BUF_AUDIO_MULAW) ? strdup("mu-law log PCM") :
- strdup("A-law log PCM");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ (buf->type == BUF_AUDIO_MULAW) ? "mu-law log PCM" :
+ "A-law log PCM" );
/* pre-calculate the possible log values */
if (buf->type == BUF_AUDIO_MULAW)
diff --git a/src/libxineadec/nsf.c b/src/libxineadec/nsf.c
index d3692cab6..9c65d2157 100644
--- a/src/libxineadec/nsf.c
+++ b/src/libxineadec/nsf.c
@@ -20,7 +20,7 @@
* NSF Audio "Decoder" using the Nosefart NSF engine by Matt Conte
* http://www.baisoku.org/
*
- * $Id: nsf.c,v 1.2 2003/01/08 07:36:21 tmmm Exp $
+ * $Id: nsf.c,v 1.3 2003/11/15 13:01:21 miguelfreitas Exp $
*/
#include <stdio.h>
@@ -86,7 +86,8 @@ static void nsf_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) {
this->channels = buf->decoder_info[3];
/* take this opportunity to initialize stream/meta information */
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC] = strdup("NES Music (Nosefart)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ "NES Music (Nosefart)");
this->song_number = buf->content[4];
/* allocate a buffer for the file */
diff --git a/src/libxineadec/pcm.c b/src/libxineadec/pcm.c
index 58b57bd57..122f6c855 100644
--- a/src/libxineadec/pcm.c
+++ b/src/libxineadec/pcm.c
@@ -74,7 +74,7 @@ static void pcm_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) {\
buf->decoder_flags, buf->decoder_info[1], buf->decoder_info[0]);
#endif
- if (this->stream->stream_info[XINE_STREAM_INFO_AUDIO_MODE] == 0) {
+ if (xine_get_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_MODE) == 0) {
#ifdef LOG
printf(__FILE__ ": Someone changed the audio mode. Closing device\r");
#endif
diff --git a/src/libxineadec/roqaudio.c b/src/libxineadec/roqaudio.c
index bf9e3a508..6ed30c42e 100644
--- a/src/libxineadec/roqaudio.c
+++ b/src/libxineadec/roqaudio.c
@@ -21,7 +21,7 @@
* For more information regarding the RoQ file format, visit:
* http://www.csse.monash.edu.au/~timf/
*
- * $Id: roqaudio.c,v 1.15 2003/01/08 01:02:31 miguelfreitas Exp $
+ * $Id: roqaudio.c,v 1.16 2003/11/15 13:01:22 miguelfreitas Exp $
*
*/
@@ -83,8 +83,8 @@ static void roqaudio_decode_data (audio_decoder_t *this_gen, buf_element_t *buf)
this->size = 0;
/* stream/meta info */
- this->stream->meta_info[XINE_META_INFO_AUDIOCODEC] =
- strdup("RoQ DPCM Audio");
+ xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ "RoQ DPCM Audio");
return;
}
diff --git a/src/libxinevdec/cinepak.c b/src/libxinevdec/cinepak.c
index 0ab0b184c..b1de77eff 100644
--- a/src/libxinevdec/cinepak.c
+++ b/src/libxinevdec/cinepak.c
@@ -22,7 +22,7 @@
* based on overview of Cinepak algorithm and example decoder
* by Tim Ferguson: http://www.csse.monash.edu.au/~timf/
*
- * $Id: cinepak.c,v 1.31 2003/10/23 20:12:34 mroi Exp $
+ * $Id: cinepak.c,v 1.32 2003/11/15 13:01:22 miguelfreitas Exp $
*/
#include <stdlib.h>
@@ -421,7 +421,7 @@ static void cvid_decode_data (video_decoder_t *this_gen, buf_element_t *buf) {
this->decoder_ok = 1;
/* stream/meta info */
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC] = strdup("Cinepak");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC, "Cinepak");
} else if (this->decoder_ok) {
diff --git a/src/libxinevdec/cyuv.c b/src/libxinevdec/cyuv.c
index e322f445e..d4603ae53 100644
--- a/src/libxinevdec/cyuv.c
+++ b/src/libxinevdec/cyuv.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: cyuv.c,v 1.19 2003/10/23 20:12:34 mroi Exp $
+ * $Id: cyuv.c,v 1.20 2003/11/15 13:01:22 miguelfreitas Exp $
*/
/* And this is the header that came with the CYUV decoder: */
@@ -163,7 +163,7 @@ static void cyuv_decode_data (video_decoder_t *this_gen,
this->skipframes = 0;
this->video_step = buf->decoder_info[1];
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC] = strdup("Creative YUV");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC, "Creative YUV");
return;
}
diff --git a/src/libxinevdec/fli.c b/src/libxinevdec/fli.c
index ca295b4de..a40a2786b 100644
--- a/src/libxinevdec/fli.c
+++ b/src/libxinevdec/fli.c
@@ -23,7 +23,7 @@
* avoid when implementing a FLI decoder, visit:
* http://www.pcisys.net/~melanson/codecs/
*
- * $Id: fli.c,v 1.21 2003/10/23 20:12:34 mroi Exp $
+ * $Id: fli.c,v 1.22 2003/11/15 13:01:22 miguelfreitas Exp $
*/
#include <stdio.h>
@@ -454,7 +454,7 @@ static void fli_decode_data (video_decoder_t *this_gen,
this->decoder_ok = 1;
/* load the stream/meta info */
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC] = strdup("FLI/FLC Video");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC, "FLI/FLC Video");
return;
} else if (this->decoder_ok) {
diff --git a/src/libxinevdec/foovideo.c b/src/libxinevdec/foovideo.c
index 1528e4113..9ab2a5651 100644
--- a/src/libxinevdec/foovideo.c
+++ b/src/libxinevdec/foovideo.c
@@ -23,7 +23,7 @@
* value from the last frame. This creates a slowly rotating solid color
* frame when the frames are played in succession.
*
- * $Id: foovideo.c,v 1.16 2003/10/23 20:12:34 mroi Exp $
+ * $Id: foovideo.c,v 1.17 2003/11/15 13:01:23 miguelfreitas Exp $
*/
#include <stdio.h>
@@ -111,7 +111,7 @@ static void foovideo_decode_data (video_decoder_t *this_gen,
this->size = 0;
/* take this opportunity to load the stream/meta info */
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC] = strdup("foovideo");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC, "foovideo");
/* do anything else relating to initializing this decoder */
this->current_yuv_byte = 0;
diff --git a/src/libxinevdec/idcinvideo.c b/src/libxinevdec/idcinvideo.c
index 8d60a1d34..605986e12 100644
--- a/src/libxinevdec/idcinvideo.c
+++ b/src/libxinevdec/idcinvideo.c
@@ -21,7 +21,7 @@
* the Id CIN format, visit:
* http://www.csse.monash.edu.au/~timf/
*
- * $Id: idcinvideo.c,v 1.16 2003/10/24 02:57:58 tmmm Exp $
+ * $Id: idcinvideo.c,v 1.17 2003/11/15 13:01:23 miguelfreitas Exp $
*/
#include <stdio.h>
@@ -267,7 +267,7 @@ static void idcinvideo_decode_data (video_decoder_t *this_gen,
this->decoder_ok = 1;
/* load the stream/meta info */
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC] = strdup("Id CIN Video");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC, "Id CIN Video");
return;
} else if (this->decoder_ok) {
diff --git a/src/libxinevdec/image.c b/src/libxinevdec/image.c
index 42e5a785c..23712f793 100644
--- a/src/libxinevdec/image.c
+++ b/src/libxinevdec/image.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: image.c,v 1.7 2003/10/23 20:12:34 mroi Exp $
+ * $Id: image.c,v 1.8 2003/11/15 13:01:23 miguelfreitas Exp $
*
* a image video decoder
*/
@@ -266,7 +266,7 @@ static void end_callback(png_structp png_ptr, png_infop info) {
*out = le2me_16(*out);
}
}
- this->stream->stream_info[XINE_STREAM_INFO_FRAME_DURATION] = img->duration;
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_FRAME_DURATION, img->duration);
img->draw(img, this->stream);
img->free(img);
}
diff --git a/src/libxinevdec/interplayvideo.c b/src/libxinevdec/interplayvideo.c
index 390de4d06..570877414 100644
--- a/src/libxinevdec/interplayvideo.c
+++ b/src/libxinevdec/interplayvideo.c
@@ -21,7 +21,7 @@
* For more information regarding the Interplay MVE format, visit:
* http://www.pcisys.net/~melanson/codecs/
*
- * $Id: interplayvideo.c,v 1.5 2003/10/23 20:12:34 mroi Exp $
+ * $Id: interplayvideo.c,v 1.6 2003/11/15 13:01:23 miguelfreitas Exp $
*/
#include <stdio.h>
@@ -1177,8 +1177,8 @@ static void interplay_decode_data (video_decoder_t *this_gen,
this->current_planes = 1;
/* take this opportunity to load the stream/meta info */
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC] =
- strdup("Interplay MVE Video");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ "Interplay MVE Video");
this->decoder_ok = 1;
diff --git a/src/libxinevdec/msrle.c b/src/libxinevdec/msrle.c
index 8cf86b41e..3f6e7eed4 100644
--- a/src/libxinevdec/msrle.c
+++ b/src/libxinevdec/msrle.c
@@ -21,7 +21,7 @@
* For more information on the MS RLE format, visit:
* http://www.pcisys.net/~melanson/codecs/
*
- * $Id: msrle.c,v 1.19 2003/10/23 20:12:34 mroi Exp $
+ * $Id: msrle.c,v 1.20 2003/11/15 13:01:24 miguelfreitas Exp $
*/
#include <stdio.h>
@@ -227,7 +227,7 @@ static void msrle_decode_data (video_decoder_t *this_gen,
this->decoder_ok = 1;
/* load the stream/meta info */
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC] = strdup("Microsoft RLE");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC, "Microsoft RLE");
return;
} else if (this->decoder_ok) {
diff --git a/src/libxinevdec/msvc.c b/src/libxinevdec/msvc.c
index 46b95a5f3..4beee4021 100644
--- a/src/libxinevdec/msvc.c
+++ b/src/libxinevdec/msvc.c
@@ -22,7 +22,7 @@
* based on overview of Microsoft Video-1 algorithm
* by Mike Melanson: http://www.pcisys.net/~melanson/codecs/video1.txt
*
- * $Id: msvc.c,v 1.24 2003/10/23 20:12:34 mroi Exp $
+ * $Id: msvc.c,v 1.25 2003/11/15 13:01:24 miguelfreitas Exp $
*/
#include <stdlib.h>
@@ -256,7 +256,7 @@ static void msvc_decode_data (video_decoder_t *this_gen, buf_element_t *buf) {
this->decoder_ok = 1;
/* load the stream/meta info */
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC] = strdup("Microsoft Video-1");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC, "Microsoft Video-1");
} else if (this->decoder_ok && !(buf->decoder_flags & BUF_FLAG_SPECIAL)) {
diff --git a/src/libxinevdec/qtrle.c b/src/libxinevdec/qtrle.c
index e55b81140..b227184a9 100644
--- a/src/libxinevdec/qtrle.c
+++ b/src/libxinevdec/qtrle.c
@@ -21,7 +21,7 @@
* For more information on the QT RLE format, visit:
* http://www.pcisys.net/~melanson/codecs/
*
- * $Id: qtrle.c,v 1.14 2003/10/23 20:12:34 mroi Exp $
+ * $Id: qtrle.c,v 1.15 2003/11/15 13:01:25 miguelfreitas Exp $
*/
#include <stdio.h>
@@ -862,7 +862,7 @@ static void qtrle_decode_data (video_decoder_t *this_gen,
/* load the stream/meta info */
sprintf(codec_name, "%d bpp Quicktime Animation (RLE)", this->depth & 0x1F);
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC] = strdup(codec_name);
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC, codec_name);
return;
} else if (this->decoder_ok) {
diff --git a/src/libxinevdec/qtrpza.c b/src/libxinevdec/qtrpza.c
index 11b3ddaf7..d2249bec5 100644
--- a/src/libxinevdec/qtrpza.c
+++ b/src/libxinevdec/qtrpza.c
@@ -21,7 +21,7 @@
* For more information about the RPZA format, visit:
* http://www.pcisys.net/~melanson/codecs/
*
- * $Id: qtrpza.c,v 1.17 2003/10/23 20:12:34 mroi Exp $
+ * $Id: qtrpza.c,v 1.18 2003/11/15 13:01:25 miguelfreitas Exp $
*/
#include <stdio.h>
@@ -321,7 +321,7 @@ static void qtrpza_decode_data (video_decoder_t *this_gen,
this->decoder_ok = 1;
/* load the stream/meta info */
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC] = strdup("Quicktime Video (RPZA)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC, "Quicktime Video (RPZA)");
return;
} else if (this->decoder_ok) {
diff --git a/src/libxinevdec/qtsmc.c b/src/libxinevdec/qtsmc.c
index df770f08f..b33ebaa01 100644
--- a/src/libxinevdec/qtsmc.c
+++ b/src/libxinevdec/qtsmc.c
@@ -23,7 +23,7 @@
* For more information on the SMC format, visit:
* http://www.pcisys.net/~melanson/codecs/
*
- * $Id: qtsmc.c,v 1.17 2003/10/23 20:12:34 mroi Exp $
+ * $Id: qtsmc.c,v 1.18 2003/11/15 13:01:25 miguelfreitas Exp $
*/
#include <stdio.h>
@@ -553,7 +553,7 @@ static void qtsmc_decode_data (video_decoder_t *this_gen,
this->decoder_ok = 1;
/* load the stream/meta info */
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC] = strdup("Quicktime Graphics (SMC)");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC, "Quicktime Graphics (SMC)");
return;
} else if (this->decoder_ok) {
diff --git a/src/libxinevdec/rgb.c b/src/libxinevdec/rgb.c
index b2fbffa9a..7e53860ce 100644
--- a/src/libxinevdec/rgb.c
+++ b/src/libxinevdec/rgb.c
@@ -21,7 +21,7 @@
* Actually, this decoder just converts a raw RGB image to a YUY2 map
* suitable for display under xine.
*
- * $Id: rgb.c,v 1.20 2003/10/23 20:12:34 mroi Exp $
+ * $Id: rgb.c,v 1.21 2003/11/15 13:01:26 miguelfreitas Exp $
*/
#include <stdio.h>
@@ -125,7 +125,7 @@ static void rgb_decode_data (video_decoder_t *this_gen,
this->decoder_ok = 1;
/* load the stream/meta info */
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC] = strdup("Raw RGB");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC, "Raw RGB");
return;
} else if (this->decoder_ok) {
diff --git a/src/libxinevdec/roqvideo.c b/src/libxinevdec/roqvideo.c
index d505606f1..111d3503b 100644
--- a/src/libxinevdec/roqvideo.c
+++ b/src/libxinevdec/roqvideo.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: roqvideo.c,v 1.21 2003/10/24 02:57:58 tmmm Exp $
+ * $Id: roqvideo.c,v 1.22 2003/11/15 13:01:26 miguelfreitas Exp $
*/
/* And this is the header that came with the RoQ video decoder: */
@@ -427,7 +427,7 @@ static void roqvideo_decode_data (video_decoder_t *this_gen,
memset(this->v[1], 0x80, this->c_size);
/* load the stream/meta info */
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC] = strdup("RoQ VQ Video");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC, "RoQ VQ Video");
return;
}
diff --git a/src/libxinevdec/svq1.c b/src/libxinevdec/svq1.c
index fe5eb2999..f032b590c 100644
--- a/src/libxinevdec/svq1.c
+++ b/src/libxinevdec/svq1.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: svq1.c,v 1.26 2003/10/23 20:12:34 mroi Exp $
+ * $Id: svq1.c,v 1.27 2003/11/15 13:01:26 miguelfreitas Exp $
*/
#include <stdio.h>
@@ -1340,7 +1340,7 @@ static void svq1dec_decode_data (video_decoder_t *this_gen, buf_element_t *buf)
this->decoder_ok = 1;
/* load the stream/meta info */
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC] = strdup("Sorenson Video 1");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC, "Sorenson Video 1");
} else if (this->decoder_ok) {
diff --git a/src/libxinevdec/wc3video.c b/src/libxinevdec/wc3video.c
index 14c2a746e..93290cf02 100644
--- a/src/libxinevdec/wc3video.c
+++ b/src/libxinevdec/wc3video.c
@@ -22,7 +22,7 @@
* For more information on the WC3 Movie format, visit:
* http://www.pcisys.net/~melanson/codecs/
*
- * $Id: wc3video.c,v 1.15 2003/10/23 20:12:34 mroi Exp $
+ * $Id: wc3video.c,v 1.16 2003/11/15 13:01:27 miguelfreitas Exp $
*/
#include <stdio.h>
@@ -387,7 +387,7 @@ static void wc3video_decode_data (video_decoder_t *this_gen,
this->decoder_ok = 1;
/* load the stream/meta info */
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC] = strdup("Wing Commander III Video");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC, "Wing Commander III Video");
return;
} else if (this->decoder_ok) {
diff --git a/src/libxinevdec/yuv.c b/src/libxinevdec/yuv.c
index eeb732169..9d52cfdcb 100644
--- a/src/libxinevdec/yuv.c
+++ b/src/libxinevdec/yuv.c
@@ -21,7 +21,7 @@
* Actually, this decoder just reorganizes chunks of raw YUV data in such
* a way that xine can display them.
*
- * $Id: yuv.c,v 1.23 2003/10/23 20:12:34 mroi Exp $
+ * $Id: yuv.c,v 1.24 2003/11/15 13:01:27 miguelfreitas Exp $
*/
#include <stdio.h>
@@ -118,24 +118,24 @@ static void yuv_decode_data (video_decoder_t *this_gen,
switch (buf->type) {
case BUF_VIDEO_YV12:
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC] = strdup("Raw YV12");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC, "Raw YV12");
break;
case BUF_VIDEO_YVU9:
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC] = strdup("Raw YVU9");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC, "Raw YVU9");
break;
case BUF_VIDEO_GREY:
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC] = strdup("Greyscale YUV");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC, "Greyscale YUV");
break;
case BUF_VIDEO_I420:
- this->stream->meta_info[XINE_META_INFO_VIDEOCODEC] = strdup("Raw I420");
+ xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC, "Raw I420");
break;
}
- this->stream->stream_info[XINE_STREAM_INFO_FRAME_DURATION] = this->video_step;
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_FRAME_DURATION, this->video_step);
return;
} else if (this->decoder_ok && !(buf->decoder_flags & BUF_FLAG_SPECIAL)) {
diff --git a/src/xine-engine/info_helper.c b/src/xine-engine/info_helper.c
index 91631a946..36d083dc4 100644
--- a/src/xine-engine/info_helper.c
+++ b/src/xine-engine/info_helper.c
@@ -70,10 +70,16 @@ void xine_set_stream_info(xine_stream_t *stream, int info, int value) {
stream->stream_info [info] = value;
}
+void xine_clear_meta_info(xine_stream_t *stream, int info) {
+ if(meta_valid(info) && stream->meta_info [info]) {
+ free(stream->meta_info [info]);
+ stream->meta_info [info] = NULL;
+ }
+}
+
void xine_set_meta_info(xine_stream_t *stream, int info, const char *str) {
if(str && meta_valid(info)) {
- if (stream->meta_info [info])
- free(stream->meta_info [info]);
+ xine_clear_meta_info(stream, info);
stream->meta_info [info] = strdup(str);
chomp(stream->meta_info [info]);
}
@@ -84,8 +90,7 @@ void xine_set_metan_info(xine_stream_t *stream, int info, const char *buf,
if(meta_valid(info)) {
char *tmp;
- if (stream->meta_info [info])
- free(stream->meta_info [info]);
+ xine_clear_meta_info(stream, info);
if(len) {
tmp = malloc(len + 1);
diff --git a/src/xine-engine/info_helper.h b/src/xine-engine/info_helper.h
index 20fcd8fda..f7598d661 100644
--- a/src/xine-engine/info_helper.h
+++ b/src/xine-engine/info_helper.h
@@ -62,4 +62,14 @@ void xine_set_meta_info(xine_stream_t *stream, int info, const char *str);
*/
void xine_set_metan_info(xine_stream_t *stream, int info, const char *buf, int len);
+/*
+ * clear a stream meta info
+ *
+ * params :
+ * *stream the xine stream
+ * info meta info id (see xine.h, XINE_META_INFO_*)
+ *
+ */
+void xine_clear_meta_info(xine_stream_t *stream, int info);
+
#endif /* INFO_HELPER_H */
diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c
index a8cd857ad..dfbaf865d 100644
--- a/src/xine-engine/xine.c
+++ b/src/xine-engine/xine.c
@@ -17,7 +17,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: xine.c,v 1.262 2003/11/11 18:45:01 f1rmb Exp $
+ * $Id: xine.c,v 1.263 2003/11/15 13:01:01 miguelfreitas Exp $
*/
/*
@@ -273,9 +273,7 @@ static void xine_close_internal (xine_stream_t *stream) {
for (i=0; i<XINE_STREAM_INFO_MAX; i++) {
stream->stream_info[i] = 0;
- if (stream->meta_info[i])
- free (stream->meta_info[i]);
- stream->meta_info[i] = NULL;
+ xine_clear_meta_info(stream, i);
}
}
@@ -406,7 +404,6 @@ xine_stream_t *xine_stream_new (xine_t *this,
pthread_mutex_init (&stream->demux_lock, NULL);
pthread_mutex_init (&stream->frontend_lock, NULL);
pthread_mutex_init (&stream->event_queues_lock, NULL);
- pthread_mutex_init (&stream->osd_lock, NULL);
pthread_mutex_init (&stream->counter_lock, NULL);
pthread_cond_init (&stream->counter_changed, NULL);
pthread_mutex_init (&stream->first_frame_lock, NULL);
@@ -1089,7 +1086,6 @@ void xine_dispose (xine_stream_t *stream) {
pthread_mutex_destroy (&stream->frontend_lock);
pthread_mutex_destroy (&stream->counter_lock);
- pthread_mutex_destroy (&stream->osd_lock);
pthread_mutex_destroy (&stream->event_queues_lock);
pthread_mutex_destroy (&stream->current_extra_info_lock);
pthread_cond_destroy (&stream->counter_changed);