summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Caujolle-Bert <f1rmb@users.sourceforge.net>2003-11-16 23:33:42 +0000
committerDaniel Caujolle-Bert <f1rmb@users.sourceforge.net>2003-11-16 23:33:42 +0000
commit847f0e85e8b0c8135294258a9507fba03cc1cc30 (patch)
tree0a74838023ea90c3bb53c7c4f737bab5dc84e427
parentb88ff04361ced758928d2ad8b87cb8986d044a35 (diff)
downloadxine-lib-847f0e85e8b0c8135294258a9507fba03cc1cc30.tar.gz
xine-lib-847f0e85e8b0c8135294258a9507fba03cc1cc30.tar.bz2
New stream/meta info (safe) stuff.
BIG NOTE: use helpers to access to these informations (get/set/reset): _x_{stream,meta}_info_{get,set,reset}() are for internal use, don't use *_public() ones from inside the beast ;-) Some wrongly names "xine_" fonction renaming. CVS patchset: 5757 CVS date: 2003/11/16 23:33:42
-rw-r--r--src/demuxers/demux_4xm.c16
-rw-r--r--src/demuxers/demux_ac3.c6
-rw-r--r--src/demuxers/demux_aiff.c12
-rw-r--r--src/demuxers/demux_asf.c35
-rw-r--r--src/demuxers/demux_aud.c12
-rw-r--r--src/demuxers/demux_avi.c14
-rw-r--r--src/demuxers/demux_cdda.c14
-rw-r--r--src/demuxers/demux_eawve.c12
-rw-r--r--src/demuxers/demux_elem.c6
-rw-r--r--src/demuxers/demux_film.c18
-rw-r--r--src/demuxers/demux_fli.c12
-rw-r--r--src/demuxers/demux_idcin.c16
-rw-r--r--src/demuxers/demux_image.c6
-rw-r--r--src/demuxers/demux_ipmovie.c10
-rw-r--r--src/demuxers/demux_mng.c10
-rw-r--r--src/demuxers/demux_mpeg.c8
-rw-r--r--src/demuxers/demux_mpeg_block.c8
-rw-r--r--src/demuxers/demux_mpeg_pes.c8
-rw-r--r--src/demuxers/demux_mpgaudio.c34
-rw-r--r--src/demuxers/demux_nsf.c20
-rw-r--r--src/demuxers/demux_nsv.c10
-rw-r--r--src/demuxers/demux_ogg.c54
-rw-r--r--src/demuxers/demux_pva.c6
-rw-r--r--src/demuxers/demux_qt.c48
-rw-r--r--src/demuxers/demux_rawdv.c10
-rw-r--r--src/demuxers/demux_real.c28
-rw-r--r--src/demuxers/demux_realaudio.c20
-rw-r--r--src/demuxers/demux_roq.c16
-rw-r--r--src/demuxers/demux_slave.c6
-rw-r--r--src/demuxers/demux_smjpeg.c16
-rw-r--r--src/demuxers/demux_snd.c12
-rw-r--r--src/demuxers/demux_str.c22
-rw-r--r--src/demuxers/demux_ts.c6
-rw-r--r--src/demuxers/demux_voc.c12
-rw-r--r--src/demuxers/demux_vox.c12
-rw-r--r--src/demuxers/demux_vqa.c16
-rw-r--r--src/demuxers/demux_wav.c12
-rw-r--r--src/demuxers/demux_wc3movie.c18
-rw-r--r--src/demuxers/demux_yuv4mpeg2.c10
-rw-r--r--src/demuxers/demux_yuv_frames.c6
-rw-r--r--src/dxr3/dxr3_decode_video.c12
-rw-r--r--src/input/input_cdda.c12
-rw-r--r--src/input/input_dvb.c4
-rw-r--r--src/input/input_dvd.c13
-rw-r--r--src/input/input_http.c14
-rw-r--r--src/input/input_pvr.c6
-rw-r--r--src/input/input_v4l.c28
-rw-r--r--src/input/net_buf_ctrl.c16
-rw-r--r--src/input/vcd/xineplug_inp_vcd.c6
-rw-r--r--src/liba52/xine_decoder.c26
-rw-r--r--src/libfaad/xine_decoder.c10
-rw-r--r--src/libffmpeg/xine_decoder.c112
-rw-r--r--src/libflac/demux_flac.c10
-rw-r--r--src/liblpcm/xine_decoder.c6
-rw-r--r--src/libmad/xine_decoder.c12
-rw-r--r--src/libmpeg2/decode.c38
-rw-r--r--src/libmpeg2new/xine_decoder.c16
-rw-r--r--src/libreal/audio_decoder.c14
-rw-r--r--src/libreal/xine_decoder.c20
-rw-r--r--src/libspeex/xine_decoder.c21
-rw-r--r--src/libsputext/demux_sputext.c6
-rw-r--r--src/libvorbis/xine_decoder.c8
-rw-r--r--src/libw32dll/qt_decoder.c14
-rw-r--r--src/libw32dll/w32codec.c74
-rw-r--r--src/libxineadec/28k8.c6
-rw-r--r--src/libxineadec/adpcm.c22
-rw-r--r--src/libxineadec/fooaudio.c4
-rw-r--r--src/libxineadec/gsm610.c4
-rw-r--r--src/libxineadec/interplayaudio.c4
-rw-r--r--src/libxineadec/logpcm.c4
-rw-r--r--src/libxineadec/nsf.c4
-rw-r--r--src/libxineadec/pcm.c2
-rw-r--r--src/libxineadec/roqaudio.c4
-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.c4
-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/audio_decoder.c10
-rw-r--r--src/xine-engine/audio_out.c24
-rw-r--r--src/xine-engine/configfile.c247
-rw-r--r--src/xine-engine/info_helper.c236
-rw-r--r--src/xine-engine/info_helper.h80
-rw-r--r--src/xine-engine/video_decoder.c16
-rw-r--r--src/xine-engine/video_out.c16
-rw-r--r--src/xine-engine/xine.c128
-rw-r--r--src/xine-engine/xine_interface.c39
-rw-r--r--src/xine-engine/xine_internal.h9
100 files changed, 1129 insertions, 921 deletions
diff --git a/src/demuxers/demux_4xm.c b/src/demuxers/demux_4xm.c
index 740a43dde..9bd2941ca 100644
--- a/src/demuxers/demux_4xm.c
+++ b/src/demuxers/demux_4xm.c
@@ -23,7 +23,7 @@
* For more information on the 4xm file format, visit:
* http://www.pcisys.net/~melanson/codecs/
*
- * $Id: demux_4xm.c,v 1.10 2003/11/16 14:34:09 tmmm Exp $
+ * $Id: demux_4xm.c,v 1.11 2003/11/16 23:33:42 f1rmb Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -380,19 +380,19 @@ static void demux_fourxm_send_headers(demux_plugin_t *this_gen) {
this->status = DEMUX_OK;
/* load stream information */
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 1);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 1);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_AUDIO,
(this->track_count > 0) ? 1 : 0);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_WIDTH,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_WIDTH,
this->bih.biWidth);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_HEIGHT,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_HEIGHT,
this->bih.biHeight);
if (this->track_count > 0) {
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_CHANNELS,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_CHANNELS,
this->tracks[0].channels);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE,
this->tracks[0].sample_rate);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_BITS,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_BITS,
this->tracks[0].bits);
}
diff --git a/src/demuxers/demux_ac3.c b/src/demuxers/demux_ac3.c
index 0142fac9d..992620d17 100644
--- a/src/demuxers/demux_ac3.c
+++ b/src/demuxers/demux_ac3.c
@@ -23,7 +23,7 @@
* This demuxer detects raw AC3 data in a file and shovels AC3 data
* directly to the AC3 decoder.
*
- * $Id: demux_ac3.c,v 1.13 2003/11/15 14:00:38 miguelfreitas Exp $
+ * $Id: demux_ac3.c,v 1.14 2003/11/16 23:33:43 f1rmb Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -230,8 +230,8 @@ static void demux_ac3_send_headers(demux_plugin_t *this_gen) {
this->status = DEMUX_OK;
/* load stream information */
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 0);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 0);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1);
/* send start buffers */
_x_demux_control_start(this->stream);
diff --git a/src/demuxers/demux_aiff.c b/src/demuxers/demux_aiff.c
index 24314f3fc..73af2fff6 100644
--- a/src/demuxers/demux_aiff.c
+++ b/src/demuxers/demux_aiff.c
@@ -21,7 +21,7 @@
/*
* AIFF File Demuxer by Mike Melanson (melanson@pcisys.net)
*
- * $Id: demux_aiff.c,v 1.36 2003/11/15 14:00:38 miguelfreitas Exp $
+ * $Id: demux_aiff.c,v 1.37 2003/11/16 23:33:43 f1rmb Exp $
*
*/
@@ -237,13 +237,13 @@ static void demux_aiff_send_headers(demux_plugin_t *this_gen) {
this->status = DEMUX_OK;
/* load stream information */
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 0);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_CHANNELS,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 0);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_CHANNELS,
this->audio_channels);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE,
this->audio_sample_rate);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_BITS,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_BITS,
this->audio_bits);
/* send start buffers */
diff --git a/src/demuxers/demux_asf.c b/src/demuxers/demux_asf.c
index 55e8419f7..7a7791825 100644
--- a/src/demuxers/demux_asf.c
+++ b/src/demuxers/demux_asf.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_asf.c,v 1.141 2003/11/15 14:00:39 miguelfreitas Exp $
+ * $Id: demux_asf.c,v 1.142 2003/11/16 23:33:43 f1rmb Exp $
*
* demultiplexer for asf streams
*
@@ -304,8 +304,7 @@ static void asf_send_audio_header (demux_asf_t *this, int stream) {
buf = this->audio_fifo->buffer_pool_alloc (this->audio_fifo);
memcpy (buf->content, this->wavex, this->wavex_size);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_FOURCC,
- wavex->wFormatTag);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_FOURCC, wavex->wFormatTag);
#ifdef LOG
printf ("demux_asf: wavex header is %d bytes long\n", this->wavex_size);
@@ -332,8 +331,7 @@ static void asf_send_video_header (demux_asf_t *this, int stream) {
buf_element_t *buf;
xine_bmiheader *bih = (xine_bmiheader *) this->bih;
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_FOURCC,
- bih->biCompression);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_FOURCC, bih->biCompression);
buf = this->video_fifo->buffer_pool_alloc (this->video_fifo);
buf->decoder_flags = BUF_FLAG_HEADER;
@@ -385,8 +383,7 @@ static int asf_read_header (demux_asf_t *this) {
else
this->rate = 0;
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_BITRATE,
- this->rate*8);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_BITRATE, this->rate*8);
get_le64(this); /* preroll in 1/1000 s*/
flags = get_le32(this); /* flags */
@@ -620,8 +617,8 @@ static int demux_asf_send_headers_common (demux_asf_t *this, int send_ctrl_start
uint32_t bitrate = 0;
/* will get overridden later */
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 0);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 0);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 0);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 0);
/*
* initialize asf engine
@@ -651,9 +648,9 @@ static int demux_asf_send_headers_common (demux_asf_t *this, int send_ctrl_start
_x_demux_control_start(this->stream);
}
- xine_set_meta_info(this->stream, XINE_META_INFO_TITLE, this->title);
- xine_set_meta_info(this->stream, XINE_META_INFO_ARTIST, this->author);
- xine_set_meta_info(this->stream, XINE_META_INFO_COMMENT, this->comment);
+ _x_meta_info_set(this->stream, XINE_META_INFO_TITLE, this->title);
+ _x_meta_info_set(this->stream, XINE_META_INFO_ARTIST, this->author);
+ _x_meta_info_set(this->stream, XINE_META_INFO_COMMENT, this->comment);
/* Choose the best audio and the best video stream.
@@ -672,8 +669,8 @@ static int demux_asf_send_headers_common (demux_asf_t *this, int send_ctrl_start
if ((buf_type == BUF_VIDEO_BASE) &&
(bitrate > max_vrate || this->video_stream_id == -1)) {
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 1);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_BITRATE,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 1);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_BITRATE,
bitrate);
max_vrate = bitrate;
@@ -682,8 +679,8 @@ static int demux_asf_send_headers_common (demux_asf_t *this, int send_ctrl_start
} else if ((buf_type == BUF_AUDIO_BASE) &&
(bitrate > max_arate || this->audio_stream_id == -1)) {
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_BITRATE,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_BITRATE,
bitrate);
max_arate = bitrate;
@@ -692,15 +689,15 @@ static int demux_asf_send_headers_common (demux_asf_t *this, int send_ctrl_start
}
}
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_BITRATE, bitrate);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_BITRATE, bitrate);
if (this->stream->xine->verbosity >= XINE_VERBOSITY_DEBUG)
printf("demux_asf: video stream_id: %d, audio stream_id: %d\n",
this->video_stream_id, this->audio_stream_id);
- if(xine_get_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO))
+ if(_x_stream_info_get(this->stream, XINE_STREAM_INFO_HAS_AUDIO))
asf_send_audio_header(this, this->audio_stream);
- if(xine_get_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO))
+ if(_x_stream_info_get(this->stream, XINE_STREAM_INFO_HAS_VIDEO))
asf_send_video_header(this, this->video_stream);
}
return 0;
diff --git a/src/demuxers/demux_aud.c b/src/demuxers/demux_aud.c
index 07be650e5..4b3691bf6 100644
--- a/src/demuxers/demux_aud.c
+++ b/src/demuxers/demux_aud.c
@@ -34,7 +34,7 @@
* data. This makes seeking conceptually impossible. Upshot: Random
* seeking is not supported.
*
- * $Id: demux_aud.c,v 1.14 2003/11/15 14:00:40 miguelfreitas Exp $
+ * $Id: demux_aud.c,v 1.15 2003/11/16 23:33:43 f1rmb Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -195,13 +195,13 @@ static void demux_aud_send_headers(demux_plugin_t *this_gen) {
this->status = DEMUX_OK;
/* load stream information */
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 0);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_CHANNELS,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 0);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_CHANNELS,
this->audio_channels);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE,
this->audio_samplerate);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_BITS,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_BITS,
this->audio_bits);
/* send start buffers */
diff --git a/src/demuxers/demux_avi.c b/src/demuxers/demux_avi.c
index b5f62157a..56d94e6e1 100644
--- a/src/demuxers/demux_avi.c
+++ b/src/demuxers/demux_avi.c
@@ -19,7 +19,7 @@
*/
/*
- * $Id: demux_avi.c,v 1.178 2003/11/16 00:59:24 tmattern Exp $
+ * $Id: demux_avi.c,v 1.179 2003/11/16 23:33:43 f1rmb Exp $
*
* demultiplexer for avi streams
*
@@ -1496,8 +1496,8 @@ static void demux_avi_send_headers (demux_plugin_t *this_gen) {
this->status = DEMUX_OK;
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_WIDTH, this->avi->width);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_HEIGHT, this->avi->height);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_WIDTH, this->avi->width);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_HEIGHT, this->avi->height);
if (this->stream->xine->verbosity >= XINE_VERBOSITY_DEBUG) {
for (i=0; i < this->avi->n_audio; i++)
@@ -1522,8 +1522,8 @@ static void demux_avi_send_headers (demux_plugin_t *this_gen) {
(int)this->avi->audio[i]->wavex->wFormatTag);
}
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 1);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO, !this->no_audio);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 1);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_AUDIO, !this->no_audio);
/*
* send start/header buffers
@@ -1547,7 +1547,7 @@ static void demux_avi_send_headers (demux_plugin_t *this_gen) {
} else
this->avi->video_type = _x_fourcc_to_buf_video(this->avi->compressor);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_FOURCC,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_FOURCC,
this->avi->compressor);
if (!this->avi->video_type) {
@@ -1593,7 +1593,7 @@ static void demux_avi_send_headers (demux_plugin_t *this_gen) {
}
if(this->avi->n_audio == 1)
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_FOURCC,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_FOURCC,
this->avi->audio[0]->wavex->wFormatTag);
}
diff --git a/src/demuxers/demux_cdda.c b/src/demuxers/demux_cdda.c
index ac6ac1c53..c771d93c6 100644
--- a/src/demuxers/demux_cdda.c
+++ b/src/demuxers/demux_cdda.c
@@ -24,7 +24,7 @@
* linear PCM "decoder" (which in turn sends them directly to the audio
* output target; this is a really fancy CD-playing architecture).
*
- * $Id: demux_cdda.c,v 1.16 2003/11/15 14:00:42 miguelfreitas Exp $
+ * $Id: demux_cdda.c,v 1.17 2003/11/16 23:33:43 f1rmb Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -112,13 +112,13 @@ static void demux_cdda_send_headers(demux_plugin_t *this_gen) {
this->status = DEMUX_OK;
/* load stream information */
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_SEEKABLE,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_SEEKABLE,
INPUT_IS_SEEKABLE(this->input));
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 0);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_CHANNELS, 2);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE, 44100);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_BITS, 16);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 0);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_CHANNELS, 2);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE, 44100);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_BITS, 16);
/* send start buffers */
_x_demux_control_start(this->stream);
diff --git a/src/demuxers/demux_eawve.c b/src/demuxers/demux_eawve.c
index 26a70da8b..7fff96bed 100644
--- a/src/demuxers/demux_eawve.c
+++ b/src/demuxers/demux_eawve.c
@@ -19,7 +19,7 @@
*/
/*
- * $Id: demux_eawve.c,v 1.24 2003/11/15 14:00:42 miguelfreitas Exp $
+ * $Id: demux_eawve.c,v 1.25 2003/11/16 23:33:43 f1rmb Exp $
*
* demux_eawve.c, Demuxer plugin for Electronic Arts' WVE file format
*
@@ -283,11 +283,11 @@ static void demux_eawve_send_headers(demux_plugin_t *this_gen){
this->status = DEMUX_OK;
/* load stream information */
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 0);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_CHANNELS, 2);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE, 22050);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_BITS, 16);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 0);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_CHANNELS, 2);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE, 22050);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_BITS, 16);
/* send start buffers */
_x_demux_control_start(this->stream);
diff --git a/src/demuxers/demux_elem.c b/src/demuxers/demux_elem.c
index 8e51f4534..147a712e6 100644
--- a/src/demuxers/demux_elem.c
+++ b/src/demuxers/demux_elem.c
@@ -19,7 +19,7 @@
*/
/*
- * $Id: demux_elem.c,v 1.78 2003/11/15 14:00:43 miguelfreitas Exp $
+ * $Id: demux_elem.c,v 1.79 2003/11/16 23:33:43 f1rmb Exp $
*
* demultiplexer for elementary mpeg streams
*/
@@ -132,8 +132,8 @@ static void demux_mpeg_elem_send_headers (demux_plugin_t *this_gen) {
this->status = DEMUX_OK;
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 1);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 0);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 1);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 0);
}
static int demux_mpeg_elem_seek (demux_plugin_t *this_gen,
diff --git a/src/demuxers/demux_film.c b/src/demuxers/demux_film.c
index 67504c0e5..b03ca5130 100644
--- a/src/demuxers/demux_film.c
+++ b/src/demuxers/demux_film.c
@@ -21,7 +21,7 @@
* For more information on the FILM file format, visit:
* http://www.pcisys.net/~melanson/codecs/
*
- * $Id: demux_film.c,v 1.69 2003/11/15 14:00:44 miguelfreitas Exp $
+ * $Id: demux_film.c,v 1.70 2003/11/16 23:33:43 f1rmb Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -662,18 +662,18 @@ static void demux_film_send_headers(demux_plugin_t *this_gen) {
this->status = DEMUX_OK;
/* load stream information */
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_VIDEO,
(this->video_type) ? 1 : 0);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_AUDIO,
(this->audio_type) ? 1 : 0);
- 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_VIDEO_FOURCC, this->video_codec);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_CHANNELS,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_WIDTH, this->bih.biWidth);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_HEIGHT, this->bih.biHeight);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_FOURCC, this->video_codec);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_CHANNELS,
this->audio_channels);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE,
this->sample_rate);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_BITS,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_BITS,
this->audio_bits);
/* send start buffers */
diff --git a/src/demuxers/demux_fli.c b/src/demuxers/demux_fli.c
index dfaaaf176..cec36f2ff 100644
--- a/src/demuxers/demux_fli.c
+++ b/src/demuxers/demux_fli.c
@@ -24,7 +24,7 @@
* avoid while programming a FLI decoder, visit:
* http://www.pcisys.net/~melanson/codecs/
*
- * $Id: demux_fli.c,v 1.47 2003/11/15 14:00:45 miguelfreitas Exp $
+ * $Id: demux_fli.c,v 1.48 2003/11/16 23:33:43 f1rmb Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -227,11 +227,11 @@ static void demux_fli_send_headers(demux_plugin_t *this_gen) {
this->status = DEMUX_OK;
/* load stream information */
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 1);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 0);
- 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_FRAME_DURATION,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 1);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 0);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_WIDTH, this->width);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_HEIGHT, this->height);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_FRAME_DURATION,
this->frame_pts_inc);
/* send start buffers */
diff --git a/src/demuxers/demux_idcin.c b/src/demuxers/demux_idcin.c
index bd7c10443..8f2da7dd4 100644
--- a/src/demuxers/demux_idcin.c
+++ b/src/demuxers/demux_idcin.c
@@ -65,7 +65,7 @@
* - if any bytes exceed 63, do not shift the bytes at all before
* transmitting them to the video decoder
*
- * $Id: demux_idcin.c,v 1.47 2003/11/15 14:00:46 miguelfreitas Exp $
+ * $Id: demux_idcin.c,v 1.48 2003/11/16 23:33:43 f1rmb Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -334,18 +334,18 @@ static int open_idcin_file(demux_idcin_t *this) {
return 0;
/* load stream information */
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 1);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 1);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_AUDIO,
(this->wave.nChannels) ? 1 : 0);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_WIDTH,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_WIDTH,
bih->biWidth);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_HEIGHT,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_HEIGHT,
bih->biHeight);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_CHANNELS,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_CHANNELS,
this->wave.nChannels);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE,
this->wave.nSamplesPerSec);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_BITS,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_BITS,
this->wave.wBitsPerSample);
this->filesize = this->input->get_length(this->input) -
diff --git a/src/demuxers/demux_image.c b/src/demuxers/demux_image.c
index 3b238b1dd..51fa41b73 100644
--- a/src/demuxers/demux_image.c
+++ b/src/demuxers/demux_image.c
@@ -19,7 +19,7 @@
*/
/*
- * $Id: demux_image.c,v 1.10 2003/11/15 14:00:47 miguelfreitas Exp $
+ * $Id: demux_image.c,v 1.11 2003/11/16 23:33:43 f1rmb Exp $
*
* image dummy demultiplexer
*/
@@ -90,8 +90,8 @@ static void demux_image_send_headers (demux_plugin_t *this_gen) {
this->status = DEMUX_OK;
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 1);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 0);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 1);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 0);
this->input->seek (this->input, 0, SEEK_SET);
}
diff --git a/src/demuxers/demux_ipmovie.c b/src/demuxers/demux_ipmovie.c
index a32a125de..b4652b29f 100644
--- a/src/demuxers/demux_ipmovie.c
+++ b/src/demuxers/demux_ipmovie.c
@@ -23,7 +23,7 @@
* For more information regarding the Interplay MVE file format, visit:
* http://www.pcisys.net/~melanson/codecs/
*
- * $Id: demux_ipmovie.c,v 1.18 2003/11/15 14:00:47 miguelfreitas Exp $
+ * $Id: demux_ipmovie.c,v 1.19 2003/11/16 23:33:43 f1rmb Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -568,10 +568,10 @@ static void demux_ipmovie_send_headers(demux_plugin_t *this_gen) {
this->status = DEMUX_OK;
/* load stream information */
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 1);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 0);
- 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);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 1);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 0);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_WIDTH, this->bih.biWidth);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_HEIGHT, this->bih.biHeight);
/* send start buffers */
_x_demux_control_start(this->stream);
diff --git a/src/demuxers/demux_mng.c b/src/demuxers/demux_mng.c
index cce22ba7a..201802cc7 100644
--- a/src/demuxers/demux_mng.c
+++ b/src/demuxers/demux_mng.c
@@ -19,7 +19,7 @@
*/
/*
- * $Id: demux_mng.c,v 1.14 2003/11/15 14:00:48 miguelfreitas Exp $
+ * $Id: demux_mng.c,v 1.15 2003/11/16 23:33:43 f1rmb Exp $
*
* demux_mng.c, Demuxer plugin for Multiple-image Network Graphics format
*
@@ -200,10 +200,10 @@ static void demux_mng_send_headers(demux_mng_t *this){
this->status = DEMUX_OK;
/* load stream information */
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 1);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 0);
- 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);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 1);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 0);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_WIDTH, this->bih.biWidth);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_HEIGHT, this->bih.biHeight);
/* send start buffers */
_x_demux_control_start(this->stream);
diff --git a/src/demuxers/demux_mpeg.c b/src/demuxers/demux_mpeg.c
index e69f1ecaa..2663fd074 100644
--- a/src/demuxers/demux_mpeg.c
+++ b/src/demuxers/demux_mpeg.c
@@ -19,7 +19,7 @@
*/
/*
- * $Id: demux_mpeg.c,v 1.128 2003/11/15 14:00:48 miguelfreitas Exp $
+ * $Id: demux_mpeg.c,v 1.129 2003/11/16 23:33:43 f1rmb Exp $
*
* demultiplexer for mpeg 1/2 program streams
* reads streams of variable blocksizes
@@ -890,8 +890,8 @@ static void demux_mpeg_send_headers (demux_plugin_t *this_gen) {
* send preview buffers for stream/meta_info
*/
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 1);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 1);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1);
this->preview_mode = 1;
@@ -912,7 +912,7 @@ static void demux_mpeg_send_headers (demux_plugin_t *this_gen) {
this->status = DEMUX_OK ;
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_BITRATE, this->rate * 50 * 8);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_BITRATE, this->rate * 50 * 8);
}
static int demux_mpeg_seek (demux_plugin_t *this_gen,
diff --git a/src/demuxers/demux_mpeg_block.c b/src/demuxers/demux_mpeg_block.c
index dd8342312..d444291dd 100644
--- a/src/demuxers/demux_mpeg_block.c
+++ b/src/demuxers/demux_mpeg_block.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_mpeg_block.c,v 1.200 2003/11/16 22:20:08 jcdutton Exp $
+ * $Id: demux_mpeg_block.c,v 1.201 2003/11/16 23:33:43 f1rmb Exp $
*
* demultiplexer for mpeg 1/2 program streams
* used with fixed blocksize devices (like dvd/vcd)
@@ -1275,9 +1275,9 @@ static void demux_mpeg_block_send_headers (demux_plugin_t *this_gen) {
this->status = DEMUX_OK;
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 1);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_BITRATE, this->rate * 50 * 8);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 1);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_BITRATE, this->rate * 50 * 8);
}
diff --git a/src/demuxers/demux_mpeg_pes.c b/src/demuxers/demux_mpeg_pes.c
index c2025213f..51706a7fe 100644
--- a/src/demuxers/demux_mpeg_pes.c
+++ b/src/demuxers/demux_mpeg_pes.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_mpeg_pes.c,v 1.16 2003/11/16 15:31:51 mroi Exp $
+ * $Id: demux_mpeg_pes.c,v 1.17 2003/11/16 23:33:43 f1rmb Exp $
*
* demultiplexer for mpeg 2 PES (Packetized Elementary Streams)
* reads streams of variable blocksizes
@@ -1233,9 +1233,9 @@ static void demux_mpeg_pes_send_headers (demux_plugin_t *this_gen) {
this->status = DEMUX_OK;
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 1);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_BITRATE, this->rate * 50 * 8);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 1);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_BITRATE, this->rate * 50 * 8);
}
diff --git a/src/demuxers/demux_mpgaudio.c b/src/demuxers/demux_mpgaudio.c
index 836d4aa95..076d4f396 100644
--- a/src/demuxers/demux_mpgaudio.c
+++ b/src/demuxers/demux_mpgaudio.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_mpgaudio.c,v 1.124 2003/11/15 14:00:52 miguelfreitas Exp $
+ * $Id: demux_mpgaudio.c,v 1.125 2003/11/16 23:33:43 f1rmb Exp $
*
* demultiplexer for mpeg audio (i.e. mp3) streams
*
@@ -528,10 +528,10 @@ static void read_id3_tags (demux_mpgaudio_t *this) {
if ( (tag.tag[0]=='T') && (tag.tag[1]=='A') && (tag.tag[2]=='G') ) {
lprintf("id3v1 tag found\n");
- xine_set_metan_info(this->stream, XINE_META_INFO_TITLE, tag.title, 30);
- xine_set_metan_info(this->stream, XINE_META_INFO_ARTIST, tag.artist, 30);
- xine_set_metan_info(this->stream, XINE_META_INFO_ALBUM, tag.album, 30);
- xine_set_metan_info(this->stream, XINE_META_INFO_COMMENT, tag.comment, 30);
+ _x_meta_info_n_set(this->stream, XINE_META_INFO_TITLE, tag.title, 30);
+ _x_meta_info_n_set(this->stream, XINE_META_INFO_ARTIST, tag.artist, 30);
+ _x_meta_info_n_set(this->stream, XINE_META_INFO_ALBUM, tag.album, 30);
+ _x_meta_info_n_set(this->stream, XINE_META_INFO_COMMENT, tag.comment, 30);
}
}
}
@@ -592,27 +592,27 @@ static int id3v22_interp_frame(demux_mpgaudio_t *this,
switch (frame_header->id) {
case (FOURCC_TAG(0, 'T', 'T', '1')):
- xine_set_meta_info(this->stream, XINE_META_INFO_GENRE, buf + 1);
+ _x_meta_info_set(this->stream, XINE_META_INFO_GENRE, buf + 1);
break;
case (FOURCC_TAG(0, 'T', 'T', '2')):
- xine_set_meta_info(this->stream, XINE_META_INFO_TITLE, buf + 1);
+ _x_meta_info_set(this->stream, XINE_META_INFO_TITLE, buf + 1);
break;
case (FOURCC_TAG(0, 'T', 'P', '1')):
- xine_set_meta_info(this->stream, XINE_META_INFO_ARTIST, buf + 1);
+ _x_meta_info_set(this->stream, XINE_META_INFO_ARTIST, buf + 1);
break;
case (FOURCC_TAG(0, 'T', 'A', 'L')):
- xine_set_meta_info(this->stream, XINE_META_INFO_ALBUM, buf + 1);
+ _x_meta_info_set(this->stream, XINE_META_INFO_ALBUM, buf + 1);
break;
case (FOURCC_TAG(0, 'T', 'Y', 'E')):
- xine_set_meta_info(this->stream, XINE_META_INFO_YEAR, buf + 1);
+ _x_meta_info_set(this->stream, XINE_META_INFO_YEAR, buf + 1);
break;
case (FOURCC_TAG(0, 'C', 'O', 'M')):
- xine_set_meta_info(this->stream, XINE_META_INFO_COMMENT, buf + 1 + 3);
+ _x_meta_info_set(this->stream, XINE_META_INFO_COMMENT, buf + 1 + 3);
break;
default:
@@ -805,8 +805,8 @@ static void demux_mpgaudio_send_headers (demux_plugin_t *this_gen) {
this->status = DEMUX_OK;
this->check_xing = 1;
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 0);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 0);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1);
/* read id3 info only from inputs with seeking and without "live" flag */
if ((this->input->get_capabilities(this->input) & (INPUT_CAP_SEEKABLE | INPUT_CAP_SLOW_SEEK)) == INPUT_CAP_SEEKABLE) {
@@ -835,16 +835,16 @@ static void demux_mpgaudio_send_headers (demux_plugin_t *this_gen) {
}
if (this->is_vbr)
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_BITRATE, this->abr);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_BITRATE, this->abr);
else
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_BITRATE, this->br);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_BITRATE, this->br);
if (this->cur_frame.samplerate) {
if (this->cur_frame.layer == 1)
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_FRAME_DURATION,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_FRAME_DURATION,
384000 / this->cur_frame.samplerate);
else
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_FRAME_DURATION,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_FRAME_DURATION,
1152000 / this->cur_frame.samplerate);
}
this->status = DEMUX_OK;
diff --git a/src/demuxers/demux_nsf.c b/src/demuxers/demux_nsf.c
index f632b37ff..36a56334c 100644
--- a/src/demuxers/demux_nsf.c
+++ b/src/demuxers/demux_nsf.c
@@ -30,7 +30,7 @@
* For more information regarding the NSF format, visit:
* http://www.tripoint.org/kevtris/nes/nsfspec.txt
*
- * $Id: demux_nsf.c,v 1.18 2003/11/15 14:00:53 miguelfreitas Exp $
+ * $Id: demux_nsf.c,v 1.19 2003/11/16 23:33:43 f1rmb Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -163,7 +163,7 @@ static int demux_nsf_send_chunk(demux_plugin_t *this_gen) {
sprintf(title, "%s, song %d/%d",
this->title, this->current_song, this->total_songs);
- xine_set_meta_info(this->stream, XINE_META_INFO_TITLE, title);
+ _x_meta_info_set(this->stream, XINE_META_INFO_TITLE, title);
_x_demux_control_newpts(this->stream, this->current_pts, 0);
@@ -195,19 +195,19 @@ static void demux_nsf_send_headers(demux_plugin_t *this_gen) {
this->status = DEMUX_OK;
/* load stream information */
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 0);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_CHANNELS,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 0);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_CHANNELS,
NSF_CHANNELS);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE,
NSF_SAMPLERATE);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_BITS,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_BITS,
NSF_BITS);
- xine_set_meta_info(this->stream, XINE_META_INFO_TITLE, this->title);
- xine_set_meta_info(this->stream, XINE_META_INFO_ARTIST, this->artist);
+ _x_meta_info_set(this->stream, XINE_META_INFO_TITLE, this->title);
+ _x_meta_info_set(this->stream, XINE_META_INFO_ARTIST, this->artist);
sprintf(copyright, "(C) %s", this->copyright);
- xine_set_meta_info(this->stream, XINE_META_INFO_COMMENT, copyright);
+ _x_meta_info_set(this->stream, XINE_META_INFO_COMMENT, copyright);
/* send start buffers */
_x_demux_control_start(this->stream);
diff --git a/src/demuxers/demux_nsv.c b/src/demuxers/demux_nsv.c
index b85861dee..97a47213d 100644
--- a/src/demuxers/demux_nsv.c
+++ b/src/demuxers/demux_nsv.c
@@ -23,7 +23,7 @@
* For more information regarding the NSV file format, visit:
* http://www.pcisys.net/~melanson/codecs/
*
- * $Id: demux_nsv.c,v 1.9 2003/11/15 14:00:54 miguelfreitas Exp $
+ * $Id: demux_nsv.c,v 1.10 2003/11/16 23:33:43 f1rmb Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -332,13 +332,13 @@ static void demux_nsv_send_headers(demux_plugin_t *this_gen) {
this->status = DEMUX_OK;
/* load stream information */
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_VIDEO,
(this->video_type) ? 1 : 0);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_AUDIO,
(this->audio_type) ? 1 : 0);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_WIDTH,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_WIDTH,
this->bih.biWidth);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_HEIGHT,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_HEIGHT,
this->bih.biHeight);
/* send start buffers */
diff --git a/src/demuxers/demux_ogg.c b/src/demuxers/demux_ogg.c
index 994ccc09f..6cda0b596 100644
--- a/src/demuxers/demux_ogg.c
+++ b/src/demuxers/demux_ogg.c
@@ -19,7 +19,7 @@
*/
/*
- * $Id: demux_ogg.c,v 1.115 2003/11/15 20:38:27 mroi Exp $
+ * $Id: demux_ogg.c,v 1.116 2003/11/16 23:33:43 f1rmb Exp $
*
* demultiplexer for ogg streams
*
@@ -232,7 +232,7 @@ static void get_stream_length (demux_ogg_t *this) {
while (!done) {
if (!read_ogg_packet (this)) {
if (this->time_length) {
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_BITRATE,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_BITRATE,
((int64_t) 8000*filelength)/this->time_length);
/*this is a fine place to compute avg_bitrate*/
this->avg_bitrate= 8000*filelength/this->time_length;
@@ -515,7 +515,7 @@ static void send_ogg_buf (demux_ogg_t *this,
comment=*ptr;
if ( !strncasecmp ("TITLE=", comment,6) ) {
this->title = strdup (comment + strlen ("TITLE=") );
- xine_set_meta_info(this->stream, XINE_META_INFO_TITLE, this->title);
+ _x_meta_info_set(this->stream, XINE_META_INFO_TITLE, this->title);
}
if ( !chapter_time && strlen(comment) == 22 &&
!strncasecmp ("CHAPTER" , comment, 7) &&
@@ -631,7 +631,7 @@ static void send_ogg_buf (demux_ogg_t *this,
} else {
title = this->title;
}
- xine_set_meta_info(this->stream, XINE_META_INFO_TITLE, title);
+ _x_meta_info_set(this->stream, XINE_META_INFO_TITLE, title);
lprintf("new TITLE: %s\n", title);
uevent.type = XINE_EVENT_UI_SET_TITLE;
@@ -752,9 +752,9 @@ static void demux_ogg_send_header (demux_ogg_t *this) {
vorbis_comment_init(&vc);
if (vorbis_synthesis_headerin(&vi, &vc, &op) >= 0) {
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_BITRATE,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_BITRATE,
vi.bitrate_nominal);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE,
vi.rate);
this->factor[stream_num] = 90000;
@@ -800,7 +800,7 @@ static void demux_ogg_send_header (demux_ogg_t *this) {
if (bitrate <= 1)
bitrate = 16000; /* assume 16 kbit */
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_BITRATE,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_BITRATE,
bitrate);
this->factor[stream_num] = 90000;
@@ -811,7 +811,7 @@ static void demux_ogg_send_header (demux_ogg_t *this) {
lprintf ("detected Speex stream,\trate %d\tbitrate %d\n",
header->rate, bitrate);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE,
header->rate);
this->preview_buffers[stream_num] += header->extra_headers;
@@ -892,11 +892,11 @@ static void demux_ogg_send_header (demux_ogg_t *this) {
* video metadata
*/
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_WIDTH,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_WIDTH,
locwidth);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_HEIGHT,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_HEIGHT,
locheight);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_FRAME_DURATION,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_FRAME_DURATION,
this->frame_duration);
this->avg_bitrate += 500000; /* FIXME */
@@ -988,13 +988,13 @@ static void demux_ogg_send_header (demux_ogg_t *this) {
* audio metadata
*/
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_CHANNELS,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_CHANNELS,
locchannels);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_BITS,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_BITS,
locbits_per_sample);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE,
locsamples_per_unit);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_BITRATE,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_BITRATE,
locavgbytespersec * 8);
} else /* no audio_fifo there */
@@ -1062,11 +1062,11 @@ static void demux_ogg_send_header (demux_ogg_t *this) {
* video metadata
*/
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_WIDTH,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_WIDTH,
bih.biWidth);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_HEIGHT,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_HEIGHT,
bih.biHeight);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_FRAME_DURATION,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_FRAME_DURATION,
this->frame_duration);
this->avg_bitrate += 500000; /* FIXME */
@@ -1145,18 +1145,18 @@ static void demux_ogg_send_header (demux_ogg_t *this) {
this->preview_buffers[stream_num]=3;
this->buf_types[stream_num] = BUF_VIDEO_THEORA;
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC, "theora");
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_WIDTH,
+ _x_meta_info_set(this->stream, XINE_META_INFO_VIDEOCODEC, "theora");
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_WIDTH,
this->t_info.frame_width);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_HEIGHT,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_HEIGHT,
this->t_info.frame_height);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_FRAME_DURATION,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_FRAME_DURATION,
((int64_t) 90000 * this->t_info.fps_denominator) /
this->t_info.fps_numerator);
/*currently aspect_nominator and -denumerator are 0?*/
if (this->t_info.aspect_denominator)
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_RATIO,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_RATIO,
((int64_t) this->t_info.aspect_numerator * 10000) /
this->t_info.aspect_denominator);
@@ -1175,7 +1175,7 @@ static void demux_ogg_send_header (demux_ogg_t *this) {
}
#else
this->buf_types[stream_num] = BUF_VIDEO_THEORA;
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC, "theora");
+ _x_meta_info_set(this->stream, XINE_META_INFO_VIDEOCODEC, "theora");
#endif
} else {
@@ -1433,11 +1433,11 @@ static void demux_ogg_send_headers (demux_plugin_t *this_gen) {
lprintf ("headers sent, avg bitrate is %lld\n", this->avg_bitrate);
}
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_VIDEO,
this->num_video_streams > 0);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_AUDIO,
this->num_audio_streams > 0);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_MAX_SPU_CHANNEL,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_MAX_SPU_CHANNEL,
this->num_spu_streams);
}
diff --git a/src/demuxers/demux_pva.c b/src/demuxers/demux_pva.c
index 82de70f42..a6040ca6d 100644
--- a/src/demuxers/demux_pva.c
+++ b/src/demuxers/demux_pva.c
@@ -23,7 +23,7 @@
* For more information regarding the PVA file format, refer to this PDF:
* http://www.technotrend.de/download/av_format_v1.pdf
*
- * $Id: demux_pva.c,v 1.14 2003/11/15 14:00:55 miguelfreitas Exp $
+ * $Id: demux_pva.c,v 1.15 2003/11/16 23:33:43 f1rmb Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -279,8 +279,8 @@ static void demux_pva_send_headers(demux_plugin_t *this_gen) {
this->status = DEMUX_OK;
/* load stream information */
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 1);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 1);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1);
/* send start buffers */
_x_demux_control_start(this->stream);
diff --git a/src/demuxers/demux_qt.c b/src/demuxers/demux_qt.c
index 3a4b11d7b..52cc1a28a 100644
--- a/src/demuxers/demux_qt.c
+++ b/src/demuxers/demux_qt.c
@@ -30,7 +30,7 @@
* build_frame_table
* free_qt_info
*
- * $Id: demux_qt.c,v 1.172 2003/11/15 14:00:56 miguelfreitas Exp $
+ * $Id: demux_qt.c,v 1.173 2003/11/16 23:33:43 f1rmb Exp $
*
*/
@@ -2162,7 +2162,7 @@ static int demux_qt_send_chunk(demux_plugin_t *this_gen) {
video_trak->properties->video.edit_list_compensation = 0;
}
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_FRAME_DURATION,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_FRAME_DURATION,
frame_duration);
debug_video_demux(" qt: sending off video frame %d from offset 0x%llX, %d bytes, media id %d, %lld pts\n",
@@ -2351,22 +2351,22 @@ static void demux_qt_send_headers(demux_plugin_t *this_gen) {
video_trak->properties->video.codec_fourcc )
video_trak->properties->video.codec_buftype = BUF_VIDEO_UNKNOWN;
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 1);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_WIDTH,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 1);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_WIDTH,
this->bih.biWidth);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_HEIGHT,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_HEIGHT,
this->bih.biHeight);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_FOURCC,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_FOURCC,
video_trak->properties->video.codec_fourcc);
} else {
memset(&this->bih, 0, sizeof(this->bih));
this->bih.biSize = sizeof(this->bih);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 0);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_WIDTH, 0);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_HEIGHT, 0);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_FOURCC, 0);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 0);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_WIDTH, 0);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_HEIGHT, 0);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_FOURCC, 0);
}
@@ -2379,35 +2379,35 @@ static void demux_qt_send_headers(demux_plugin_t *this_gen) {
audio_trak->properties->audio.codec_fourcc )
audio_trak->properties->audio.codec_buftype = BUF_AUDIO_UNKNOWN;
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_CHANNELS,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_CHANNELS,
audio_trak->properties->audio.channels);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE,
audio_trak->properties->audio.sample_rate);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_BITS,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_BITS,
audio_trak->properties->audio.bits);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_FOURCC,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_FOURCC,
audio_trak->properties->audio.codec_fourcc);
} else {
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 0);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_CHANNELS, 0);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE, 0);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_BITS, 0);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_FOURCC, 0);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 0);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_CHANNELS, 0);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE, 0);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_BITS, 0);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_FOURCC, 0);
}
/* copy over the meta information like artist and title */
if (this->qt->copyright)
- xine_set_meta_info(this->stream, XINE_META_INFO_ARTIST, this->qt->copyright);
+ _x_meta_info_set(this->stream, XINE_META_INFO_ARTIST, this->qt->copyright);
if (this->qt->name)
- xine_set_meta_info(this->stream, XINE_META_INFO_TITLE, this->qt->name);
+ _x_meta_info_set(this->stream, XINE_META_INFO_TITLE, this->qt->name);
else if (this->qt->description)
- xine_set_meta_info(this->stream, XINE_META_INFO_TITLE, this->qt->description);
+ _x_meta_info_set(this->stream, XINE_META_INFO_TITLE, this->qt->description);
if (this->qt->comment)
- xine_set_meta_info(this->stream, XINE_META_INFO_COMMENT, this->qt->comment);
+ _x_meta_info_set(this->stream, XINE_META_INFO_COMMENT, this->qt->comment);
/* send start buffers */
_x_demux_control_start(this->stream);
diff --git a/src/demuxers/demux_rawdv.c b/src/demuxers/demux_rawdv.c
index 5203c45ce..cee1b5c36 100644
--- a/src/demuxers/demux_rawdv.c
+++ b/src/demuxers/demux_rawdv.c
@@ -19,7 +19,7 @@
*/
/*
- * $Id: demux_rawdv.c,v 1.15 2003/11/15 20:43:11 mroi Exp $
+ * $Id: demux_rawdv.c,v 1.16 2003/11/16 23:33:43 f1rmb Exp $
*
* demultiplexer for raw dv streams
*/
@@ -188,7 +188,7 @@ static void demux_raw_dv_send_headers (demux_plugin_t *this_gen) {
this->duration = buf->decoder_info[1] = 3003;
bih->biWidth = 720;
bih->biHeight = 480;
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_BITRATE,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_BITRATE,
NTSC_FRAME_SIZE * NTSC_FRAME_RATE * 8);
} else {
/* PAL */
@@ -196,7 +196,7 @@ static void demux_raw_dv_send_headers (demux_plugin_t *this_gen) {
this->duration = buf->decoder_info[1] = 3600;
bih->biWidth = 720;
bih->biHeight = 576;
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_BITRATE,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_BITRATE,
PAL_FRAME_SIZE * PAL_FRAME_RATE * 8);
}
bih->biSize = sizeof(xine_bmiheader);
@@ -213,7 +213,7 @@ static void demux_raw_dv_send_headers (demux_plugin_t *this_gen) {
this->status = DEMUX_OK;
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 1);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 1);
if (this->audio_fifo) {
int done = 0;
@@ -277,7 +277,7 @@ static void demux_raw_dv_send_headers (demux_plugin_t *this_gen) {
abuf->decoder_info[2] = 16; /* Audio bits (ffmpeg upsamples 12 to 16bit) */
abuf->decoder_info[3] = 2; /* Audio bits (ffmpeg only supports 2 channels) */
this->audio_fifo->put (this->audio_fifo, abuf);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1);
}
}
diff --git a/src/demuxers/demux_real.c b/src/demuxers/demux_real.c
index 81fb0a48f..f0c613e8a 100644
--- a/src/demuxers/demux_real.c
+++ b/src/demuxers/demux_real.c
@@ -30,7 +30,7 @@
*
* Based on FFmpeg's libav/rm.c.
*
- * $Id: demux_real.c,v 1.71 2003/11/15 14:01:01 miguelfreitas Exp $
+ * $Id: demux_real.c,v 1.72 2003/11/16 23:33:43 f1rmb Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -389,7 +389,7 @@ static void real_parse_headers (demux_real_t *this) {
if (this->avg_bitrate<1)
this->avg_bitrate = 1;
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_BITRATE,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_BITRATE,
this->avg_bitrate);
} else if (chunk_type == MDPR_TAG) {
@@ -469,28 +469,28 @@ unknown:
/* load the title string */
field_size = BE_16(&chunk_buffer[stream_ptr]);
stream_ptr += 2;
- xine_set_metan_info(this->stream, XINE_META_INFO_TITLE,
+ _x_meta_info_n_set(this->stream, XINE_META_INFO_TITLE,
&chunk_buffer[stream_ptr], field_size);
stream_ptr += field_size;
/* load the author string */
field_size = BE_16(&chunk_buffer[stream_ptr]);
stream_ptr += 2;
- xine_set_metan_info(this->stream, XINE_META_INFO_ARTIST,
+ _x_meta_info_n_set(this->stream, XINE_META_INFO_ARTIST,
&chunk_buffer[stream_ptr], field_size);
stream_ptr += field_size;
/* load the copyright string as the year */
field_size = BE_16(&chunk_buffer[stream_ptr]);
stream_ptr += 2;
- xine_set_metan_info(this->stream, XINE_META_INFO_YEAR,
+ _x_meta_info_n_set(this->stream, XINE_META_INFO_YEAR,
&chunk_buffer[stream_ptr], field_size);
stream_ptr += field_size;
/* load the comment string */
field_size = BE_16(&chunk_buffer[stream_ptr]);
stream_ptr += 2;
- xine_set_metan_info(this->stream, XINE_META_INFO_COMMENT,
+ _x_meta_info_n_set(this->stream, XINE_META_INFO_COMMENT,
&chunk_buffer[stream_ptr], field_size);
stream_ptr += field_size;
}
@@ -652,10 +652,10 @@ unknown:
this->video_fifo->put (this->video_fifo, buf);
/* Set meta info */
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 1);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_FOURCC,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 1);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_FOURCC,
this->video_stream->fourcc);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_BITRATE,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_BITRATE,
this->video_stream->mdpr->avg_bit_rate);
}
@@ -682,10 +682,10 @@ unknown:
}
/* Set meta info */
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_FOURCC,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_FOURCC,
this->audio_stream->fourcc);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_BITRATE,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_BITRATE,
this->audio_stream->mdpr->avg_bit_rate);
}
}
@@ -1145,8 +1145,8 @@ static void demux_real_send_headers(demux_plugin_t *this_gen) {
this->input->seek (this->input, 0, SEEK_SET);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 0);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 0);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 0);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 0);
if( !this->reference_mode ) {
real_parse_headers (this);
diff --git a/src/demuxers/demux_realaudio.c b/src/demuxers/demux_realaudio.c
index ca03b1a5c..88bdfc9e8 100644
--- a/src/demuxers/demux_realaudio.c
+++ b/src/demuxers/demux_realaudio.c
@@ -22,7 +22,7 @@
* RealAudio File Demuxer by Mike Melanson (melanson@pcisys.net)
* improved by James Stembridge (jstembridge@users.sourceforge.net)
*
- * $Id: demux_realaudio.c,v 1.26 2003/11/15 14:01:02 miguelfreitas Exp $
+ * $Id: demux_realaudio.c,v 1.27 2003/11/16 23:33:43 f1rmb Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -159,7 +159,7 @@ static int open_ra_file(demux_ra_t *this) {
/* Read title */
len = audio_header[offset];
if(len && ((offset+len+2) < hdr_size)) {
- xine_set_metan_info(this->stream, XINE_META_INFO_TITLE,
+ _x_meta_info_n_set(this->stream, XINE_META_INFO_TITLE,
&audio_header[offset+1], len);
offset += len+1;
} else
@@ -168,7 +168,7 @@ static int open_ra_file(demux_ra_t *this) {
/* Author */
len = audio_header[offset];
if(len && ((offset+len+1) < hdr_size)) {
- xine_set_metan_info(this->stream, XINE_META_INFO_ARTIST,
+ _x_meta_info_n_set(this->stream, XINE_META_INFO_ARTIST,
&audio_header[offset+1], len);
offset += len+1;
} else
@@ -177,7 +177,7 @@ static int open_ra_file(demux_ra_t *this) {
/* Copyright/Date */
len = audio_header[offset];
if(len && ((offset+len) <= hdr_size)) {
- xine_set_metan_info(this->stream, XINE_META_INFO_YEAR,
+ _x_meta_info_n_set(this->stream, XINE_META_INFO_YEAR,
&audio_header[offset+1], len);
offset += len+1;
} else
@@ -194,7 +194,7 @@ static int open_ra_file(demux_ra_t *this) {
}
}
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_FOURCC, audio_fourcc);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_FOURCC, audio_fourcc);
this->audio_type = _x_formattag_to_buf_audio(audio_fourcc);
/* seek to start of data */
@@ -275,13 +275,13 @@ static void demux_ra_send_headers(demux_plugin_t *this_gen) {
this->status = DEMUX_OK;
/* load stream information */
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 0);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_CHANNELS,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 0);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_CHANNELS,
this->wave.nChannels);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE,
this->wave.nSamplesPerSec);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_BITS,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_BITS,
this->wave.wBitsPerSample);
/* send start buffers */
diff --git a/src/demuxers/demux_roq.c b/src/demuxers/demux_roq.c
index f86063f56..785fd78a4 100644
--- a/src/demuxers/demux_roq.c
+++ b/src/demuxers/demux_roq.c
@@ -23,7 +23,7 @@
* For more information regarding the RoQ file format, visit:
* http://www.csse.monash.edu.au/~timf/
*
- * $Id: demux_roq.c,v 1.46 2003/11/15 14:01:02 miguelfreitas Exp $
+ * $Id: demux_roq.c,v 1.47 2003/11/16 23:33:43 f1rmb Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -306,18 +306,18 @@ static void demux_roq_send_headers(demux_plugin_t *this_gen) {
this->status = DEMUX_OK;
/* load stream information */
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 1);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 1);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_AUDIO,
(this->wave.nChannels) ? 1 : 0);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_WIDTH,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_WIDTH,
this->bih.biWidth);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_HEIGHT,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_HEIGHT,
this->bih.biHeight);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_CHANNELS,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_CHANNELS,
this->wave.nChannels);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE,
RoQ_AUDIO_SAMPLE_RATE);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_BITS, 16);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_BITS, 16);
/* send start buffers */
_x_demux_control_start(this->stream);
diff --git a/src/demuxers/demux_slave.c b/src/demuxers/demux_slave.c
index 2013a3d94..c8c566225 100644
--- a/src/demuxers/demux_slave.c
+++ b/src/demuxers/demux_slave.c
@@ -21,7 +21,7 @@
*/
/*
- * $Id: demux_slave.c,v 1.8 2003/11/15 14:01:02 miguelfreitas Exp $
+ * $Id: demux_slave.c,v 1.9 2003/11/16 23:33:43 f1rmb Exp $
*
* demuxer for slave "protocol"
* master xine must be started with XINE_PARAM_BROADCASTER_PORT set, that is,
@@ -283,8 +283,8 @@ static void demux_slave_send_headers (demux_plugin_t *this_gen) {
this->status = DEMUX_OK;
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 1);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 1);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1);
this->last_vpts = 0;
this->send_newpts = 1;
diff --git a/src/demuxers/demux_smjpeg.c b/src/demuxers/demux_smjpeg.c
index dc2bb98f1..fea38c122 100644
--- a/src/demuxers/demux_smjpeg.c
+++ b/src/demuxers/demux_smjpeg.c
@@ -23,7 +23,7 @@
* For more information on the SMJPEG file format, visit:
* http://www.lokigames.com/development/smjpeg.php3
*
- * $Id: demux_smjpeg.c,v 1.45 2003/11/15 14:01:02 miguelfreitas Exp $
+ * $Id: demux_smjpeg.c,v 1.46 2003/11/16 23:33:43 f1rmb Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -312,18 +312,18 @@ static void demux_smjpeg_send_headers(demux_plugin_t *this_gen) {
this->status = DEMUX_OK;
/* load stream information */
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 1);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 1);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_AUDIO,
(this->audio_channels) ? 1 : 0);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_WIDTH,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_WIDTH,
this->bih.biWidth);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_HEIGHT,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_HEIGHT,
this->bih.biHeight);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_CHANNELS,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_CHANNELS,
this->audio_channels);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE,
this->audio_sample_rate);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_BITS,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_BITS,
this->audio_bits);
/* send start buffers */
diff --git a/src/demuxers/demux_snd.c b/src/demuxers/demux_snd.c
index fcc10e9ec..0ac0f4a8c 100644
--- a/src/demuxers/demux_snd.c
+++ b/src/demuxers/demux_snd.c
@@ -21,7 +21,7 @@
/*
* SND/AU File Demuxer by Mike Melanson (melanson@pcisys.net)
*
- * $Id: demux_snd.c,v 1.35 2003/11/15 14:01:03 miguelfreitas Exp $
+ * $Id: demux_snd.c,v 1.36 2003/11/16 23:33:43 f1rmb Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -208,13 +208,13 @@ static void demux_snd_send_headers(demux_plugin_t *this_gen) {
this->status = DEMUX_OK;
/* load stream information */
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 0);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_CHANNELS,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 0);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_CHANNELS,
this->audio_channels);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE,
this->audio_sample_rate);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_BITS,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_BITS,
this->audio_bits);
/* send start buffers */
diff --git a/src/demuxers/demux_str.c b/src/demuxers/demux_str.c
index 9589902cf..00003d69f 100644
--- a/src/demuxers/demux_str.c
+++ b/src/demuxers/demux_str.c
@@ -24,7 +24,7 @@
* This demuxer handles either raw STR files (which are just a concatenation
* of raw compact disc sectors) or STR files with RIFF headers.
*
- * $Id: demux_str.c,v 1.19 2003/11/15 14:01:03 miguelfreitas Exp $
+ * $Id: demux_str.c,v 1.20 2003/11/16 23:33:43 f1rmb Exp $
*/
/*
@@ -439,9 +439,9 @@ static void demux_str_send_headers(demux_plugin_t *this_gen) {
_x_demux_control_start(this->stream);
/* load stream information */
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_SEEKABLE, 1);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 0);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 0);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_SEEKABLE, 1);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 0);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 0);
for (channel = 0; channel < STR_MAX_CHANNELS; channel++) {
if (this->channel_type[channel] & CDXA_TYPE_VIDEO) {
@@ -449,11 +449,11 @@ static void demux_str_send_headers(demux_plugin_t *this_gen) {
/* FIXME: until I figure out how to comfortably let the user
* pick a video channel, just pick a single video channel */
video_channel = this->default_video_channel = channel;
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 1);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 1);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_WIDTH,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_WIDTH,
this->bih[channel].biWidth);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_HEIGHT,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_HEIGHT,
this->bih[channel].biHeight);
/* send init info to video decoder */
@@ -469,14 +469,14 @@ static void demux_str_send_headers(demux_plugin_t *this_gen) {
}
if (this->channel_type[channel] & CDXA_TYPE_AUDIO) {
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1);
audio_info = this->audio_info[channel];
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_CHANNELS,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_CHANNELS,
(audio_info & 0x01) ? 2 : 1);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE,
(audio_info & 0x04) ? 18900 : 37800);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_BITS, 16);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_BITS, 16);
/* send init info to the audio decoder */
if (this->audio_fifo) {
diff --git a/src/demuxers/demux_ts.c b/src/demuxers/demux_ts.c
index 3ca4dcf56..a3ca2781c 100644
--- a/src/demuxers/demux_ts.c
+++ b/src/demuxers/demux_ts.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_ts.c,v 1.95 2003/11/16 15:31:51 mroi Exp $
+ * $Id: demux_ts.c,v 1.96 2003/11/16 23:33:43 f1rmb Exp $
*
* Demultiplexer for MPEG2 Transport Streams.
*
@@ -1774,8 +1774,8 @@ static void demux_ts_send_headers (demux_plugin_t *this_gen) {
this->current_spu_channel = this->stream->spu_channel;
/* FIXME ? */
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 1);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 1);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1);
}
static int demux_ts_seek (demux_plugin_t *this_gen,
diff --git a/src/demuxers/demux_voc.c b/src/demuxers/demux_voc.c
index dee9d2654..6aea2940e 100644
--- a/src/demuxers/demux_voc.c
+++ b/src/demuxers/demux_voc.c
@@ -25,7 +25,7 @@
* It will only play that block if it is PCM data. More variations will be
* supported as they are encountered.
*
- * $Id: demux_voc.c,v 1.35 2003/11/15 14:01:04 miguelfreitas Exp $
+ * $Id: demux_voc.c,v 1.36 2003/11/16 23:33:44 f1rmb Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -202,13 +202,13 @@ static void demux_voc_send_headers(demux_plugin_t *this_gen) {
this->status = DEMUX_OK;
/* load stream information */
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 0);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_CHANNELS,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 0);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_CHANNELS,
this->audio_channels);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE,
this->audio_sample_rate);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_BITS,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_BITS,
this->audio_bits);
/* send start buffers */
diff --git a/src/demuxers/demux_vox.c b/src/demuxers/demux_vox.c
index 959a06e9f..4a57231e3 100644
--- a/src/demuxers/demux_vox.c
+++ b/src/demuxers/demux_vox.c
@@ -22,7 +22,7 @@
* VOX Demuxer by Mike Melanson (melanson@pcisys.net)
* This a demuxer for .vox files containing raw Dialogic ADPCM data.
*
- * $Id: demux_vox.c,v 1.10 2003/11/15 14:01:04 miguelfreitas Exp $
+ * $Id: demux_vox.c,v 1.11 2003/11/16 23:33:44 f1rmb Exp $
*
*/
@@ -110,12 +110,12 @@ static void demux_vox_send_headers(demux_plugin_t *this_gen) {
this->status = DEMUX_OK;
/* load stream information */
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 0);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_CHANNELS, 1);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 0);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_CHANNELS, 1);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE,
DIALOGIC_SAMPLERATE);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_BITS, 16);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_BITS, 16);
/* send start buffers */
_x_demux_control_start(this->stream);
diff --git a/src/demuxers/demux_vqa.c b/src/demuxers/demux_vqa.c
index 6271343ec..bd4ba6297 100644
--- a/src/demuxers/demux_vqa.c
+++ b/src/demuxers/demux_vqa.c
@@ -29,7 +29,7 @@
* block needs information from the previous audio block in order to be
* decoded, thus making random seeking difficult.
*
- * $Id: demux_vqa.c,v 1.37 2003/11/15 14:01:04 miguelfreitas Exp $
+ * $Id: demux_vqa.c,v 1.38 2003/11/16 23:33:44 f1rmb Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -250,18 +250,18 @@ static void demux_vqa_send_headers(demux_plugin_t *this_gen) {
this->status = DEMUX_OK;
/* load stream information */
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 1);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 1);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_AUDIO,
(this->wave.nChannels) ? 1 : 0);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_WIDTH,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_WIDTH,
bih->biWidth);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_HEIGHT,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_HEIGHT,
bih->biHeight);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_CHANNELS,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_CHANNELS,
this->wave.nChannels);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE,
this->wave.nSamplesPerSec);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_BITS,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_BITS,
this->wave.wBitsPerSample);
/* send start buffers */
diff --git a/src/demuxers/demux_wav.c b/src/demuxers/demux_wav.c
index bda28783c..326a9da45 100644
--- a/src/demuxers/demux_wav.c
+++ b/src/demuxers/demux_wav.c
@@ -22,7 +22,7 @@
* MS WAV File Demuxer by Mike Melanson (melanson@pcisys.net)
* based on WAV specs that are available far and wide
*
- * $Id: demux_wav.c,v 1.52 2003/11/15 14:01:05 miguelfreitas Exp $
+ * $Id: demux_wav.c,v 1.53 2003/11/16 23:33:44 f1rmb Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -268,13 +268,13 @@ static void demux_wav_send_headers(demux_plugin_t *this_gen) {
this->status = DEMUX_OK;
/* load stream information */
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 0);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_CHANNELS,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 0);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_CHANNELS,
this->wave->nChannels);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE,
this->wave->nSamplesPerSec);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_BITS,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_BITS,
this->wave->wBitsPerSample);
/* send start buffers */
diff --git a/src/demuxers/demux_wc3movie.c b/src/demuxers/demux_wc3movie.c
index de483b843..ff41cd7ae 100644
--- a/src/demuxers/demux_wc3movie.c
+++ b/src/demuxers/demux_wc3movie.c
@@ -24,7 +24,7 @@
* For more information on the MVE file format, visit:
* http://www.pcisys.net/~melanson/codecs/
*
- * $Id: demux_wc3movie.c,v 1.46 2003/11/15 14:01:05 miguelfreitas Exp $
+ * $Id: demux_wc3movie.c,v 1.47 2003/11/16 23:33:44 f1rmb Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -290,19 +290,19 @@ static void demux_mve_send_headers(demux_plugin_t *this_gen) {
this->status = DEMUX_OK;
/* load stream information */
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 1);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 1);
/* this is not strictly correct-- some WC3 MVE files do not contain
* audio, but I'm too lazy to check if that is the case */
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_WIDTH,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_WIDTH,
this->bih.biWidth);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_HEIGHT,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_HEIGHT,
this->bih.biHeight);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_CHANNELS,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_CHANNELS,
this->wave.nChannels);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE,
this->wave.nSamplesPerSec);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_BITS,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_BITS,
this->wave.wBitsPerSample);
/* send start buffers */
@@ -503,7 +503,7 @@ static int open_mve_file(demux_mve_t *this) {
this->data_size = this->input->get_length(this->input) - this->data_start;
this->video_pts = 0;
- xine_set_meta_info(this->stream, XINE_META_INFO_TITLE, title);
+ _x_meta_info_set(this->stream, XINE_META_INFO_TITLE, title);
return 1;
}
diff --git a/src/demuxers/demux_yuv4mpeg2.c b/src/demuxers/demux_yuv4mpeg2.c
index 02373bf2f..f8952f14d 100644
--- a/src/demuxers/demux_yuv4mpeg2.c
+++ b/src/demuxers/demux_yuv4mpeg2.c
@@ -24,7 +24,7 @@
* tools, visit:
* http://mjpeg.sourceforge.net/
*
- * $Id: demux_yuv4mpeg2.c,v 1.31 2003/11/15 14:01:05 miguelfreitas Exp $
+ * $Id: demux_yuv4mpeg2.c,v 1.32 2003/11/16 23:33:44 f1rmb Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -301,11 +301,11 @@ static void demux_yuv4mpeg2_send_headers(demux_plugin_t *this_gen) {
this->status = DEMUX_OK;
/* load stream information */
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 1);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 0);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_WIDTH,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 1);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 0);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_WIDTH,
this->bih.biWidth);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_HEIGHT,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_HEIGHT,
this->bih.biHeight);
/* send start buffers */
diff --git a/src/demuxers/demux_yuv_frames.c b/src/demuxers/demux_yuv_frames.c
index 73dd000a9..c8cd4ce8a 100644
--- a/src/demuxers/demux_yuv_frames.c
+++ b/src/demuxers/demux_yuv_frames.c
@@ -20,7 +20,7 @@
*/
/*
- * $Id: demux_yuv_frames.c,v 1.11 2003/11/15 14:01:05 miguelfreitas Exp $
+ * $Id: demux_yuv_frames.c,v 1.12 2003/11/16 23:33:44 f1rmb Exp $
*
* dummy demultiplexer for raw yuv frames (delivered by v4l)
*/
@@ -91,7 +91,7 @@ static int switch_buf(demux_yuv_frames_t *this , buf_element_t *buf){
result = 1; /* 1, we still should read audio */
break;
case BUF_AUDIO_RAWPCM:
- if (!xine_get_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO))
+ if (!_x_stream_info_get(this->stream, XINE_STREAM_INFO_HAS_VIDEO))
_x_demux_control_newpts(this->stream, buf->pts, 0);
this->audio_fifo->put(this->audio_fifo, buf);
break;
@@ -108,7 +108,7 @@ static int demux_yuv_frames_send_chunk (demux_plugin_t *this_gen){
buf_element_t *buf;
do {
- if ( xine_get_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO) )
+ if ( _x_stream_info_get(this->stream, XINE_STREAM_INFO_HAS_VIDEO) )
buf = this->input->read_block (this->input, this->video_fifo, 0);
else
buf = this->input->read_block (this->input, this->audio_fifo, 0);
diff --git a/src/dxr3/dxr3_decode_video.c b/src/dxr3/dxr3_decode_video.c
index 39d053f6d..e0db85f29 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.44 2003/11/15 20:43:11 mroi Exp $
+ * $Id: dxr3_decode_video.c,v 1.45 2003/11/16 23:33:44 f1rmb 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 &&
- xine_get_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_HAS_STILL)) {
+ _x_stream_info_get(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 */
- 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);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_WIDTH, this->width);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_HEIGHT, this->height);
+ _x_stream_info_set(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 */
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_FRAME_DURATION, duration);
+ _x_stream_info_set(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 b98659819..d8d7d2439 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.37 2003/11/15 13:01:04 miguelfreitas Exp $
+ * $Id: input_cdda.c,v 1.38 2003/11/16 23:33:44 f1rmb Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -2406,7 +2406,7 @@ static int cdda_plugin_open (input_plugin_t *this_gen ) {
printf("Disc Title: %s\n", this->cddb.disc_title);
#endif
- xine_set_meta_info(this->stream, XINE_META_INFO_ALBUM, this->cddb.disc_title);
+ _x_meta_info_set(this->stream, XINE_META_INFO_ALBUM, this->cddb.disc_title);
}
if(this->cddb.track[this->track].title) {
@@ -2414,7 +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
- xine_set_meta_info(this->stream, XINE_META_INFO_TITLE, this->cddb.track[this->track].title);
+ _x_meta_info_set(this->stream, XINE_META_INFO_TITLE, this->cddb.track[this->track].title);
}
if(this->cddb.disc_artist) {
@@ -2422,7 +2422,7 @@ static int cdda_plugin_open (input_plugin_t *this_gen ) {
printf("Disc Artist: %s\n", this->cddb.disc_artist);
#endif
- xine_set_meta_info(this->stream, XINE_META_INFO_ARTIST, this->cddb.disc_artist);
+ _x_meta_info_set(this->stream, XINE_META_INFO_ARTIST, this->cddb.disc_artist);
}
if(this->cddb.disc_category) {
@@ -2430,7 +2430,7 @@ static int cdda_plugin_open (input_plugin_t *this_gen ) {
printf("Disc Category: %s\n", this->cddb.disc_category);
#endif
- xine_set_meta_info(this->stream, XINE_META_INFO_GENRE, this->cddb.disc_category);
+ _x_meta_info_set(this->stream, XINE_META_INFO_GENRE, this->cddb.disc_category);
}
if(this->cddb.disc_year) {
@@ -2438,7 +2438,7 @@ static int cdda_plugin_open (input_plugin_t *this_gen ) {
printf("Disc Year: %s\n", this->cddb.disc_year);
#endif
- xine_set_meta_info(this->stream, XINE_META_INFO_YEAR, this->cddb.disc_year);
+ _x_meta_info_set(this->stream, XINE_META_INFO_YEAR, this->cddb.disc_year);
}
free_cdrom_toc(toc);
diff --git a/src/input/input_dvb.c b/src/input/input_dvb.c
index 551222b17..5aae8adc8 100644
--- a/src/input/input_dvb.c
+++ b/src/input/input_dvb.c
@@ -419,7 +419,7 @@ static void switch_channel (dvb_input_plugin_t *this) {
this->channels[this->channel].name);
ui_data.str_len = strlen (ui_data.str);
- xine_set_meta_info(this->stream, XINE_META_INFO_TITLE, ui_data.str);
+ _x_meta_info_set(this->stream, XINE_META_INFO_TITLE, ui_data.str);
event.type = XINE_EVENT_UI_SET_TITLE;
event.stream = this->stream;
@@ -955,7 +955,7 @@ static int dvb_plugin_open (input_plugin_t *this_gen) {
snprintf (str, 256, "%04d - %s", this->channel,
this->channels[this->channel].name);
- xine_set_meta_info(this->stream, XINE_META_INFO_TITLE, str);
+ _x_meta_info_set(this->stream, XINE_META_INFO_TITLE, str);
return 1;
}
diff --git a/src/input/input_dvd.c b/src/input/input_dvd.c
index 792575fd8..01f8ed89a 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.172 2003/11/15 13:01:07 miguelfreitas Exp $
+ * $Id: input_dvd.c,v 1.173 2003/11/16 23:33:44 f1rmb 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 || xine_get_stream_info(this->stream,XINE_STREAM_INFO_IGNORE_SPU))
+ if (!this || !this->stream || _x_stream_info_get(this->stream,XINE_STREAM_INFO_IGNORE_SPU))
return;
if (!this->stream->spu_decoder_plugin ||
@@ -1527,7 +1527,7 @@ static input_plugin_t *dvd_class_get_instance (input_class_t *class_gen, xine_st
this->input_plugin.input_class = class_gen;
this->stream = stream;
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_HAS_STILL, 1);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_HAS_STILL, 1);
this->dvdnav = NULL;
this->opened = 0;
@@ -1727,6 +1727,13 @@ static void *init_class (xine_t *xine, void *data) {
/*
* $Log: input_dvd.c,v $
+ * Revision 1.173 2003/11/16 23:33:44 f1rmb
+ * New stream/meta info (safe) stuff.
+ * BIG NOTE: use helpers to access to these informations (get/set/reset):
+ * _x_{stream,meta}_info_{get,set,reset}()
+ * are for internal use, don't use *_public() ones from inside the beast ;-)
+ * Some wrongly names "xine_" fonction renaming.
+ *
* Revision 1.172 2003/11/15 13:01:07 miguelfreitas
* more helper functions cleanup (stream info, meta info)
*
diff --git a/src/input/input_http.c b/src/input/input_http.c
index d0a52310a..176cee289 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.73 2003/11/16 15:32:10 mroi Exp $
+ * $Id: input_http.c,v 1.74 2003/11/16 23:33:44 f1rmb Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -358,10 +358,10 @@ static void http_plugin_read_metainf (input_plugin_t *this_gen) {
free(this->shoutcast_songtitle);
this->shoutcast_songtitle = strdup(songtitle);
- xine_set_meta_info(this->stream, XINE_META_INFO_TITLE, songtitle);
+ _x_meta_info_set(this->stream, XINE_META_INFO_TITLE, songtitle);
/* prepares the event */
- radio = xine_get_meta_info(this->stream, XINE_META_INFO_ALBUM);
+ radio = _x_meta_info_get(this->stream, XINE_META_INFO_ALBUM);
if (radio) {
strcpy(data.str, radio); /* WARNING: the data.str is char[256] */
@@ -496,20 +496,20 @@ static int read_shoutcast_header(http_input_plugin_t *this) {
lprintf ("input_http: shoutcast answer: >%s<\n", this->buf);
if (!strncasecmp(this->buf, "icy-name:", 9)) {
- xine_set_meta_info(this->stream, XINE_META_INFO_ALBUM,
+ _x_meta_info_set(this->stream, XINE_META_INFO_ALBUM,
(this->buf + 9 + (*(this->buf + 9) == ' ')));
- xine_set_meta_info(this->stream, XINE_META_INFO_TITLE,
+ _x_meta_info_set(this->stream, XINE_META_INFO_TITLE,
(this->buf + 9 + (*(this->buf + 9) == ' ')));
}
if (!strncasecmp(this->buf, "icy-genre:", 10)) {
- xine_set_meta_info(this->stream, XINE_META_INFO_GENRE,
+ _x_meta_info_set(this->stream, XINE_META_INFO_GENRE,
(this->buf + 10 + (*(this->buf + 10) == ' ')));
}
/* icy-notice1 is always the same */
if (!strncasecmp(this->buf, "icy-notice2:", 12)) {
- xine_set_meta_info(this->stream, XINE_META_INFO_COMMENT,
+ _x_meta_info_set(this->stream, XINE_META_INFO_COMMENT,
(this->buf + 12 + (*(this->buf + 12) == ' ')));
}
diff --git a/src/input/input_pvr.c b/src/input/input_pvr.c
index 076c5cc60..b54e696ba 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.35 2003/11/15 13:01:09 miguelfreitas Exp $
+ * $Id: input_pvr.c,v 1.36 2003/11/16 23:33:44 f1rmb 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 && xine_get_stream_info(this->stream, XINE_STREAM_INFO_IGNORE_VIDEO) ) {
+ if( this->pvr_playing && _x_stream_info_get(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 && !xine_get_stream_info(this->stream,XINE_STREAM_INFO_IGNORE_VIDEO) ) {
+ } else if ( !this->pvr_playing && !_x_stream_info_get(this->stream,XINE_STREAM_INFO_IGNORE_VIDEO) ) {
this->pvr_playing = 1;
this->play_blk = this->rec_blk;
}
diff --git a/src/input/input_v4l.c b/src/input/input_v4l.c
index 783c6a52b..e6a17f3dc 100644
--- a/src/input/input_v4l.c
+++ b/src/input/input_v4l.c
@@ -748,11 +748,11 @@ static int open_radio_capture_device(v4l_input_plugin_t *this)
if (set_input_source(this, this->tuner_name) > 0)
tuner_found = 1;
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_CHANNELS, periods);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_BITS, bits);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE, rate);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 0);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_CHANNELS, periods);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_BITS, bits);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE, rate);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 0);
/*
* Pre allocate some frames for audio and video. This way this hasn't to be
@@ -861,13 +861,13 @@ static int open_video_capture_device(v4l_input_plugin_t *this)
return 0;
}
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_WIDTH, resolutions[j].width);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_HEIGHT, resolutions[j].height);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_CHANNELS, periods);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_BITS, bits);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE, rate);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 1);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_WIDTH, resolutions[j].width);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_HEIGHT, resolutions[j].height);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_CHANNELS, periods);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_BITS, bits);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE, rate);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 1);
/*
* Pre allocate some frames for audio and video. This way this hasn't to be
@@ -1013,8 +1013,8 @@ static int open_video_capture_device(v4l_input_plugin_t *this)
}
/* Save dimensions */
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_WIDTH, resolutions[j].width);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_HEIGHT, resolutions[j].height);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_WIDTH, resolutions[j].width);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_HEIGHT, resolutions[j].height);
/* Using deinterlaceing is highly recommended. Setting to true */
this->old_interlace =
diff --git a/src/input/net_buf_ctrl.c b/src/input/net_buf_ctrl.c
index 967468fd3..b34c3d164 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 = 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);
+ has_video = _x_stream_info_get(this->stream, XINE_STREAM_INFO_HAS_VIDEO);
+ has_audio = _x_stream_info_get(this->stream, XINE_STREAM_INFO_HAS_AUDIO);
+ video_br = _x_stream_info_get(this->stream, XINE_STREAM_INFO_VIDEO_BITRATE);
+ audio_br = _x_stream_info_get(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 = xine_get_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO);
- has_audio = xine_get_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO);
+ has_video = _x_stream_info_get(this->stream, XINE_STREAM_INFO_HAS_VIDEO);
+ has_audio = _x_stream_info_get(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 = 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);
+ int has_video = _x_stream_info_get(this->stream, XINE_STREAM_INFO_HAS_VIDEO);
+ int has_audio = _x_stream_info_get(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 cba0bf170..4bc714ae3 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.8 2003/11/15 13:01:10 miguelfreitas Exp $
+ $Id: xineplug_inp_vcd.c,v 1.9 2003/11/16 23:33:44 f1rmb Exp $
Copyright (C) 2002,2003 Rocky Bernstein <rocky@panix.com>
@@ -181,12 +181,12 @@ meta_info_assign(int field, xine_stream_t *stream, const char * info)
{
if (NULL != info) {
dbg_print(INPUT_DBG_META, "meta[%d]: %s\n", field, info);
- xine_set_meta_info(stream, field, info);
+ _x_meta_info_set(stream, field, info);
}
}
#define stream_info_assign(field, stream, info) \
- xine_set_stream_info(stream, field, info);
+ _x_stream_info_set(stream, field, info);
/* Set stream information. */
static void
diff --git a/src/liba52/xine_decoder.c b/src/liba52/xine_decoder.c
index 4c65ee2cc..c5fcacc51 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.62 2003/11/16 12:12:09 mroi Exp $
+ * $Id: xine_decoder.c,v 1.63 2003/11/16 23:33:44 f1rmb Exp $
*
* stuff needed to turn liba52 into a xine decoder plugin
*/
@@ -521,35 +521,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 (!xine_get_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC) ||
+ if (!_x_meta_info_get(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))
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC, "A/52 5.1");
+ _x_meta_info_set(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)))
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC, "A/52 4.1");
+ _x_meta_info_set(this->stream, XINE_META_INFO_AUDIOCODEC, "A/52 4.1");
else if ((this->a52_flags & A52_CHANNEL_MASK) == A52_3F2R)
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC, "A/52 5.0");
+ _x_meta_info_set(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))
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC, "A/52 4.0");
+ _x_meta_info_set(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))
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC, "A/52 3.0");
+ _x_meta_info_set(this->stream, XINE_META_INFO_AUDIOCODEC, "A/52 3.0");
else if ((this->a52_flags & A52_CHANNEL_MASK) == A52_STEREO)
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC, "A/52 2.0 (stereo)");
+ _x_meta_info_set(this->stream, XINE_META_INFO_AUDIOCODEC, "A/52 2.0 (stereo)");
else if ((this->a52_flags & A52_CHANNEL_MASK) == A52_DOLBY)
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC, "A/52 2.0 (dolby)");
+ _x_meta_info_set(this->stream, XINE_META_INFO_AUDIOCODEC, "A/52 2.0 (dolby)");
else if ((this->a52_flags & A52_CHANNEL_MASK) == A52_MONO)
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC, "A/52 1.0");
+ _x_meta_info_set(this->stream, XINE_META_INFO_AUDIOCODEC, "A/52 1.0");
else
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC, "A/52");
+ _x_meta_info_set(this->stream, XINE_META_INFO_AUDIOCODEC, "A/52");
- 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);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_BITRATE, this->a52_bit_rate);
+ _x_stream_info_set(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 78fecf230..d299e55a3 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.17 2003/11/15 13:01:11 miguelfreitas Exp $
+ * $Id: xine_decoder.c,v 1.18 2003/11/16 23:33:44 f1rmb 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++;
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_HANDLED, 0);
+ _x_stream_info_set(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;
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_HANDLED, 0);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_HANDLED, 0);
return;
}
#ifdef LOG
@@ -224,7 +224,7 @@ static void faad_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) {
this->faac_failed = 0;
/* stream/meta info */
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ _x_meta_info_set(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;
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_HANDLED, 0);
+ _x_stream_info_set(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 196900e6c..cfb283e44 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.136 2003/11/16 14:32:11 tmmm Exp $
+ * $Id: xine_decoder.c,v 1.137 2003/11/16 23:33:44 f1rmb 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 = xine_get_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_FOURCC);
+ this->context->codec_tag = _x_stream_info_get(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;
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_HANDLED, 0);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_HANDLED, 0);
return;
}
this->decoder_ok = 1;
- 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);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_WIDTH, this->context->width);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_HEIGHT, this->context->height);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_FRAME_DURATION, this->video_step);
this->stream->video_out->open (this->stream->video_out, this->stream);
@@ -490,7 +490,7 @@ static void find_sequence_header (ff_video_decoder_t *this,
this->video_step = 0;
}
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_VIDEOCODEC,
"mpeg-1 (ffmpeg)");
/*
@@ -780,151 +780,151 @@ 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);
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ _x_meta_info_set(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);
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ _x_meta_info_set(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);
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_VIDEOCODEC,
"Microsoft MPEG-4 v3 (ffmpeg)");
break;
case BUF_VIDEO_WMV7:
this->codec = avcodec_find_decoder (CODEC_ID_WMV1);
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ _x_meta_info_set(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);
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ _x_meta_info_set(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);
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ _x_meta_info_set(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);
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_VIDEOCODEC,
"Motion JPEG (ffmpeg)");
break;
case BUF_VIDEO_I263:
this->codec = avcodec_find_decoder (CODEC_ID_H263I);
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_VIDEOCODEC,
"ITU H.263 (ffmpeg)");
break;
case BUF_VIDEO_H263:
this->codec = avcodec_find_decoder (CODEC_ID_H263);
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_VIDEOCODEC,
"H.263 (ffmpeg)");
break;
case BUF_VIDEO_RV10:
this->codec = avcodec_find_decoder (CODEC_ID_RV10);
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_VIDEOCODEC,
"Real Video 1.0 (ffmpeg)");
break;
case BUF_VIDEO_IV31:
this->codec = avcodec_find_decoder (CODEC_ID_INDEO3);
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_VIDEOCODEC,
"Indeo Video 3.1 (ffmpeg)");
break;
case BUF_VIDEO_IV32:
this->codec = avcodec_find_decoder (CODEC_ID_INDEO3);
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ _x_meta_info_set(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);
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_VIDEOCODEC,
"Sorenson Video 1 (ffmpeg)");
break;
case BUF_VIDEO_SORENSON_V3:
this->codec = avcodec_find_decoder (CODEC_ID_SVQ3);
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_VIDEOCODEC,
"Sorenson Video 3 (ffmpeg)");
break;
case BUF_VIDEO_DV:
this->codec = avcodec_find_decoder (CODEC_ID_DVVIDEO);
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_VIDEOCODEC,
"DV (ffmpeg)");
break;
case BUF_VIDEO_HUFFYUV:
this->codec = avcodec_find_decoder (CODEC_ID_HUFFYUV);
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_VIDEOCODEC,
"HuffYUV (ffmpeg)");
break;
case BUF_VIDEO_VP31:
this->codec = avcodec_find_decoder (CODEC_ID_VP3);
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_VIDEOCODEC,
"On2 VP3.1 (ffmpeg)");
break;
case BUF_VIDEO_4XM:
this->codec = avcodec_find_decoder (CODEC_ID_4XM);
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_VIDEOCODEC,
"4X Video (ffmpeg)");
break;
case BUF_VIDEO_CINEPAK:
this->codec = avcodec_find_decoder (CODEC_ID_CINEPAK);
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_VIDEOCODEC,
"Cinepak (ffmpeg)");
break;
case BUF_VIDEO_MSVC:
this->codec = avcodec_find_decoder (CODEC_ID_MSVIDEO1);
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_VIDEOCODEC,
"Microsoft Video 1 (ffmpeg)");
break;
case BUF_VIDEO_MSRLE:
this->codec = avcodec_find_decoder (CODEC_ID_MSRLE);
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_VIDEOCODEC,
"Microsoft RLE (ffmpeg)");
break;
case BUF_VIDEO_RPZA:
this->codec = avcodec_find_decoder (CODEC_ID_RPZA);
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_VIDEOCODEC,
"Apple Quicktime Video/RPZA (ffmpeg)");
break;
case BUF_VIDEO_CYUV:
this->codec = avcodec_find_decoder (CODEC_ID_CYUV);
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_VIDEOCODEC,
"Creative YUV (ffmpeg)");
break;
case BUF_VIDEO_ROQ:
this->codec = avcodec_find_decoder (CODEC_ID_ROQ);
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_VIDEOCODEC,
"Id Software RoQ (ffmpeg)");
break;
case BUF_VIDEO_IDCIN:
this->codec = avcodec_find_decoder (CODEC_ID_IDCIN);
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_VIDEOCODEC,
"Id Software CIN (ffmpeg)");
break;
case BUF_VIDEO_WC3:
this->codec = avcodec_find_decoder (CODEC_ID_XAN_WC3);
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_VIDEOCODEC,
"Xan (ffmpeg)");
break;
case BUF_VIDEO_VQA:
this->codec = avcodec_find_decoder (CODEC_ID_WS_VQA);
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_VIDEOCODEC,
"Westwood Studios VQA (ffmpeg)");
break;
case BUF_VIDEO_INTERPLAY:
this->codec = avcodec_find_decoder (CODEC_ID_INTERPLAY_VIDEO);
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_VIDEOCODEC,
"Interplay MVE (ffmpeg)");
break;
default:
printf ("ffmpeg: unknown video format (buftype: 0x%08X)\n",
buf->type & 0xFFFF0000);
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_VIDEOCODEC,
"unknown (ffmpeg)");
}
@@ -1389,92 +1389,92 @@ 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);
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ _x_meta_info_set(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);
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ _x_meta_info_set(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);
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_AUDIOCODEC,
"DV Audio (ffmpeg)");
break;
case BUF_AUDIO_14_4:
this->codec = avcodec_find_decoder (CODEC_ID_RA_144);
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ _x_meta_info_set(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);
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_AUDIOCODEC,
"Real 28.8 (ffmpeg)");
break;
case BUF_AUDIO_MPEG:
this->codec = avcodec_find_decoder (CODEC_ID_MP3LAME);
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_AUDIOCODEC,
"MP3 (ffmpeg)");
break;
case BUF_AUDIO_MSADPCM:
this->codec = avcodec_find_decoder (CODEC_ID_ADPCM_MS);
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_AUDIOCODEC,
"MS ADPCM (ffmpeg)");
break;
case BUF_AUDIO_QTIMAADPCM:
this->codec = avcodec_find_decoder (CODEC_ID_ADPCM_IMA_QT);
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ _x_meta_info_set(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);
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ _x_meta_info_set(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);
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ _x_meta_info_set(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);
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ _x_meta_info_set(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);
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ _x_meta_info_set(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);
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_AUDIOCODEC,
"CD-ROM/XA ADPCM (ffmpeg)");
break;
case BUF_AUDIO_4X_ADPCM:
this->codec = avcodec_find_decoder (CODEC_ID_ADPCM_4XM);
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_AUDIOCODEC,
"4X ADPCM (ffmpeg)");
break;
case BUF_AUDIO_MULAW:
this->codec = avcodec_find_decoder (CODEC_ID_PCM_MULAW);
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ _x_meta_info_set(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);
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ _x_meta_info_set(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);
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_AUDIOCODEC,
"RoQ DPCM (ffmpeg)");
break;
case BUF_AUDIO_INTERPLAY:
this->codec = avcodec_find_decoder (CODEC_ID_INTERPLAY_DPCM);
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_AUDIOCODEC,
"Interplay DPCM (ffmpeg)");
break;
}
@@ -1493,7 +1493,7 @@ static void ff_audio_decode_data (audio_decoder_t *this_gen, buf_element_t *buf)
this->context->block_align = audio_header->nBlockAlign;
this->context->bit_rate = audio_header->nAvgBytesPerSec * 8;
this->context->codec_id = this->codec->id;
- this->context->codec_tag = xine_get_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_FOURCC);
+ this->context->codec_tag = _x_stream_info_get(this->stream, XINE_STREAM_INFO_AUDIO_FOURCC);
if( audio_header->cbSize > 0 ) {
this->context->extradata = malloc(audio_header->cbSize);
this->context->extradata_size = audio_header->cbSize;
@@ -1510,7 +1510,7 @@ static void ff_audio_decode_data (audio_decoder_t *this_gen, buf_element_t *buf)
if (avcodec_open (this->context, this->codec) < 0) {
printf ("ffmpeg: couldn't open decoder\n");
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_HANDLED, 0);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_HANDLED, 0);
return;
}
diff --git a/src/libflac/demux_flac.c b/src/libflac/demux_flac.c
index bf83cd00f..a329fad2b 100644
--- a/src/libflac/demux_flac.c
+++ b/src/libflac/demux_flac.c
@@ -362,11 +362,11 @@ demux_flac_send_headers (demux_plugin_t *this_gen) {
this->status = DEMUX_OK;
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 0);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_CHANNELS, this->channels);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE, this->sample_rate);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_BITS, this->bits_per_sample);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 0);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_CHANNELS, this->channels);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE, this->sample_rate);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_BITS, this->bits_per_sample);
_x_demux_control_start (this->stream);
diff --git a/src/liblpcm/xine_decoder.c b/src/liblpcm/xine_decoder.c
index 366516787..fc8edaea9 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.45 2003/11/15 13:01:12 miguelfreitas Exp $
+ * $Id: xine_decoder.c,v 1.46 2003/11/16 23:33:45 f1rmb Exp $
*
* 31-8-2001 Added LPCM rate sensing.
* (c) 2001 James Courtier-Dutton James@superbug.demon.co.uk
@@ -131,8 +131,8 @@ static void lpcm_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) {
this->ao_cap_mode) ;
/* stream/meta info */
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC, "Linear PCM");
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_BITRATE,
+ _x_meta_info_set(this->stream, XINE_META_INFO_AUDIOCODEC, "Linear PCM");
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_BITRATE,
this->bits_per_sample * this->rate * this->number_of_channels);
}
diff --git a/src/libmad/xine_decoder.c b/src/libmad/xine_decoder.c
index 5a9ce9014..b9a77922c 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.42 2003/11/15 13:01:13 miguelfreitas Exp $
+ * $Id: xine_decoder.c,v 1.43 2003/11/16 23:33:45 f1rmb Exp $
*
* stuff needed to turn libmad into a xine decoder plugin
*/
@@ -194,22 +194,22 @@ static void mad_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) {
mode);
#endif
- xine_set_stream_info(this->xstream, XINE_STREAM_INFO_AUDIO_BITRATE, this->frame.header.bitrate);
+ _x_stream_info_set(this->xstream, XINE_STREAM_INFO_AUDIO_BITRATE, this->frame.header.bitrate);
switch (this->frame.header.layer) {
case MAD_LAYER_I:
- xine_set_meta_info(this->xstream, XINE_META_INFO_AUDIOCODEC,
+ _x_meta_info_set(this->xstream, XINE_META_INFO_AUDIOCODEC,
"MPEG audio layer 1");
break;
case MAD_LAYER_II:
- xine_set_meta_info(this->xstream, XINE_META_INFO_AUDIOCODEC,
+ _x_meta_info_set(this->xstream, XINE_META_INFO_AUDIOCODEC,
"MPEG audio layer 2");
break;
case MAD_LAYER_III:
- xine_set_meta_info(this->xstream, XINE_META_INFO_AUDIOCODEC,
+ _x_meta_info_set(this->xstream, XINE_META_INFO_AUDIOCODEC,
"MPEG audio layer 3");
break;
default:
- xine_set_meta_info(this->xstream, XINE_META_INFO_AUDIOCODEC,
+ _x_meta_info_set(this->xstream, XINE_META_INFO_AUDIOCODEC,
"MPEG audio");
}
diff --git a/src/libmpeg2/decode.c b/src/libmpeg2/decode.c
index 1a6dd23ab..df30fbd6e 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;
- 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,
+ _x_stream_info_set(mpeg2dec->stream, XINE_STREAM_INFO_VIDEO_WIDTH, picture->frame_width);
+ _x_stream_info_set(mpeg2dec->stream, XINE_STREAM_INFO_VIDEO_HEIGHT, picture->frame_height);
+ _x_stream_info_set(mpeg2dec->stream, XINE_STREAM_INFO_VIDEO_RATIO,
((double)10000 * get_aspect_ratio(mpeg2dec)));
switch (mpeg2dec->picture->frame_rate_code) {
case 1: /* 23.976 fps */
- xine_set_stream_info(mpeg2dec->stream, XINE_STREAM_INFO_FRAME_DURATION, 3913);
+ _x_stream_info_set(mpeg2dec->stream, XINE_STREAM_INFO_FRAME_DURATION, 3913);
break;
case 2: /* 24 fps */
- xine_set_stream_info(mpeg2dec->stream, XINE_STREAM_INFO_FRAME_DURATION, 3750);
+ _x_stream_info_set(mpeg2dec->stream, XINE_STREAM_INFO_FRAME_DURATION, 3750);
break;
case 3: /* 25 fps */
- xine_set_stream_info(mpeg2dec->stream, XINE_STREAM_INFO_FRAME_DURATION, 3600);
+ _x_stream_info_set(mpeg2dec->stream, XINE_STREAM_INFO_FRAME_DURATION, 3600);
break;
case 4: /* 29.97 fps */
- xine_set_stream_info(mpeg2dec->stream, XINE_STREAM_INFO_FRAME_DURATION, 3003);
+ _x_stream_info_set(mpeg2dec->stream, XINE_STREAM_INFO_FRAME_DURATION, 3003);
break;
case 5: /* 30 fps */
- xine_set_stream_info(mpeg2dec->stream, XINE_STREAM_INFO_FRAME_DURATION, 3000);
+ _x_stream_info_set(mpeg2dec->stream, XINE_STREAM_INFO_FRAME_DURATION, 3000);
break;
case 6: /* 50 fps */
- xine_set_stream_info(mpeg2dec->stream, XINE_STREAM_INFO_FRAME_DURATION, 1800);
+ _x_stream_info_set(mpeg2dec->stream, XINE_STREAM_INFO_FRAME_DURATION, 1800);
break;
case 7: /* 59.94 fps */
- xine_set_stream_info(mpeg2dec->stream, XINE_STREAM_INFO_FRAME_DURATION, 1525);
+ _x_stream_info_set(mpeg2dec->stream, XINE_STREAM_INFO_FRAME_DURATION, 1525);
break;
case 8: /* 60 fps */
- xine_set_stream_info(mpeg2dec->stream, XINE_STREAM_INFO_FRAME_DURATION, 1509);
+ _x_stream_info_set(mpeg2dec->stream, XINE_STREAM_INFO_FRAME_DURATION, 1509);
break;
default:
/* printf ("invalid/unknown frame rate code : %d \n",
frame->frame_rate_code); */
- xine_set_stream_info(mpeg2dec->stream, XINE_STREAM_INFO_FRAME_DURATION, 3000);
+ _x_stream_info_set(mpeg2dec->stream, XINE_STREAM_INFO_FRAME_DURATION, 3000);
}
- xine_set_meta_info(mpeg2dec->stream, XINE_META_INFO_VIDEOCODEC, "MPEG");
+ _x_meta_info_set(mpeg2dec->stream, XINE_META_INFO_VIDEOCODEC, "MPEG");
}
@@ -432,9 +432,9 @@ static inline int parse_chunk (mpeg2dec_t * mpeg2dec, int code,
data.pan_scan = mpeg2dec->force_pan_scan;
xine_event_send(mpeg2dec->stream, &event);
- xine_set_stream_info(mpeg2dec->stream,XINE_STREAM_INFO_VIDEO_WIDTH,
+ _x_stream_info_set(mpeg2dec->stream,XINE_STREAM_INFO_VIDEO_WIDTH,
picture->coded_picture_width);
- xine_set_stream_info(mpeg2dec->stream,XINE_STREAM_INFO_VIDEO_HEIGHT,
+ _x_stream_info_set(mpeg2dec->stream,XINE_STREAM_INFO_VIDEO_HEIGHT,
picture->coded_picture_height);
if (picture->forward_reference_frame &&
@@ -861,9 +861,9 @@ void mpeg2_find_sequence_header (mpeg2dec_t * mpeg2dec,
data.pan_scan = mpeg2dec->force_pan_scan;
xine_event_send(mpeg2dec->stream, &event);
- xine_set_stream_info(mpeg2dec->stream, XINE_STREAM_INFO_VIDEO_WIDTH,
+ _x_stream_info_set(mpeg2dec->stream, XINE_STREAM_INFO_VIDEO_WIDTH,
picture->coded_picture_width);
- xine_set_stream_info(mpeg2dec->stream, XINE_STREAM_INFO_VIDEO_HEIGHT,
+ _x_stream_info_set(mpeg2dec->stream, XINE_STREAM_INFO_VIDEO_HEIGHT,
picture->coded_picture_height);
}
} else if (code == 0xb5) { /* extension_start_code */
@@ -910,9 +910,9 @@ static void process_userdata(mpeg2dec_t *mpeg2dec, uint8_t *buffer)
data.pan_scan = mpeg2dec->force_pan_scan;
xine_event_send(mpeg2dec->stream, &event);
- xine_set_stream_info(mpeg2dec->stream, XINE_STREAM_INFO_VIDEO_WIDTH,
+ _x_stream_info_set(mpeg2dec->stream, XINE_STREAM_INFO_VIDEO_WIDTH,
mpeg2dec->picture->coded_picture_width);
- xine_set_stream_info(mpeg2dec->stream, XINE_STREAM_INFO_VIDEO_HEIGHT,
+ _x_stream_info_set(mpeg2dec->stream, XINE_STREAM_INFO_VIDEO_HEIGHT,
mpeg2dec->picture->coded_picture_height);
}
diff --git a/src/libmpeg2new/xine_decoder.c b/src/libmpeg2new/xine_decoder.c
index 12f1efac8..7a9bfd77c 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.14 2003/11/15 14:54:30 miguelfreitas Exp $
+ * $Id: xine_decoder.c,v 1.15 2003/11/16 23:33:45 f1rmb Exp $
*
* stuff needed to turn libmpeg2 into a xine decoder plugin
*/
@@ -133,10 +133,10 @@ static void mpeg2_video_decode_data (video_decoder_t *this_gen, buf_element_t *b
case STATE_SEQUENCE:
/* might set nb fbuf, convert format, stride */
/* might set fbufs */
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_BITRATE, info->sequence->byte_rate * 8);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_WIDTH, info->sequence->picture_width);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_HEIGHT, info->sequence->picture_height);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_FRAME_DURATION, info->sequence->frame_period / 300);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_BITRATE, info->sequence->byte_rate * 8);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_WIDTH, info->sequence->picture_width);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_HEIGHT, info->sequence->picture_height);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_FRAME_DURATION, info->sequence->frame_period / 300);
if (this->force_aspect) info->sequence->pixel_width = this->force_aspect;
switch (info->sequence->pixel_width) {
case 3:
@@ -153,12 +153,12 @@ static void mpeg2_video_decode_data (video_decoder_t *this_gen, buf_element_t *b
this->ratio = (double)info->sequence->picture_width/(double)info->sequence->picture_height;
break;
}
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_RATIO, (int)(10000*this->ratio));
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_RATIO, (int)(10000*this->ratio));
if (info->sequence->flags & SEQ_FLAG_MPEG2) {
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC, "MPEG 2 (libmpeg2new)");
+ _x_meta_info_set(this->stream, XINE_META_INFO_VIDEOCODEC, "MPEG 2 (libmpeg2new)");
} else {
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC, "MPEG 1 (libmpeg2new)");
+ _x_meta_info_set(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 0fe0bef6a..c03e87d71 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.30 2003/11/15 14:54:31 miguelfreitas Exp $
+ * $Id: audio_decoder.c,v 1.31 2003/11/16 23:33:46 f1rmb Exp $
*
* thin layer to use real binary-only codecs in xine
*
@@ -247,33 +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;
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC, "Cook");
+ _x_meta_info_set(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;
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC, "Atrac");
+ _x_meta_info_set(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;
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC, "Real 14.4");
+ _x_meta_info_set(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;
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC, "Real 28.8");
+ _x_meta_info_set(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; */
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC, "Sipro");
+ _x_meta_info_set(this->stream, XINE_META_INFO_AUDIOCODEC, "Sipro");
break;
default:
@@ -406,7 +406,7 @@ static void realdec_decode_data (audio_decoder_t *this_gen, buf_element_t *buf)
this->decoder_ok = init_codec (this, buf) ;
if( !this->decoder_ok )
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_HANDLED, 0);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_HANDLED, 0);
} else if( this->decoder_ok ) {
diff --git a/src/libreal/xine_decoder.c b/src/libreal/xine_decoder.c
index 3034b8398..b6488bd77 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.53 2003/11/15 14:54:31 miguelfreitas Exp $
+ * $Id: xine_decoder.c,v 1.54 2003/11/16 23:33:46 f1rmb Exp $
*
* thin layer to use real binary-only codecs in xine
*
@@ -165,17 +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;
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC, "Real Video 2.0");
+ _x_meta_info_set(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;
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC, "Real Video 3.0");
+ _x_meta_info_set(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;
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC, "Real Video 4.0");
+ _x_meta_info_set(this->stream, XINE_META_INFO_VIDEOCODEC, "Real Video 4.0");
break;
default:
printf ("libreal: error, i don't handle buf type 0x%08x\n",
@@ -198,8 +198,8 @@ static int init_codec (realdec_decoder_t *this, buf_element_t *buf) {
this->width, this->width, this->height, this->height);
#endif
- 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);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_WIDTH, this->width);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_HEIGHT, this->height);
init_data.subformat = BE_32(&buf->content[26]);
init_data.format = BE_32(&buf->content[30]);
@@ -310,7 +310,7 @@ static void realdec_decode_data (video_decoder_t *this_gen, buf_element_t *buf)
this->decoder_ok = init_codec (this, buf);
if( !this->decoder_ok )
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_HANDLED, 0);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_HANDLED, 0);
} else if (this->decoder_ok && this->context) {
@@ -372,8 +372,8 @@ static void realdec_decode_data (video_decoder_t *this_gen, buf_element_t *buf)
this->frame_size = this->width * this->height;
- 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);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_WIDTH, this->width);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_HEIGHT, this->height);
}
img = this->stream->video_out->get_frame (this->stream->video_out,
@@ -400,7 +400,7 @@ static void realdec_decode_data (video_decoder_t *this_gen, buf_element_t *buf)
this->last_pts = this->pts;
img->duration = this->duration;
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_FRAME_DURATION, this->duration);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_FRAME_DURATION, this->duration);
img->bad_frame = 0;
#ifdef LOG
diff --git a/src/libspeex/xine_decoder.c b/src/libspeex/xine_decoder.c
index 513262ede..4f4f02bde 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.4 2003/11/15 21:48:06 siggi Exp $
+ * $Id: xine_decoder.c,v 1.5 2003/11/16 23:33:46 f1rmb 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;
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC, "speex");
+ _x_meta_info_set(this->stream, XINE_META_INFO_AUDIOCODEC, "speex");
if (length < 8) {
printf ("libspeex: invalid/corrupted comments\n");
@@ -174,20 +174,15 @@ void read_metadata (speex_decoder_t *this, char * comments, int length)
if ( !strncasecmp (speex_comment_keys[i].key, c,
strlen(speex_comment_keys[i].key)) ) {
int keylen = strlen(speex_comment_keys[i].key);
- char * meta_info;
+ char meta_info[(len - keylen) + 1];
#ifdef LOG
printf ("libspeex: known metadata %d %d\n",
i, speex_comment_keys[i].xine_metainfo_index);
#endif
- meta_info = xine_xmalloc (len - keylen);
- memcpy (meta_info, c + keylen, len - keylen);
-
- xine_set_meta_info(this->stream,
- speex_comment_keys[i].xine_metainfo_index,
- meta_info);
- free( meta_info );
+ snprintf(meta_info, (len - keylen), "%s", c + keylen);
+ _x_meta_info_set(this->stream, speex_comment_keys[i].xine_metainfo_index, meta_info);
}
}
@@ -242,7 +237,7 @@ static void speex_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) {
this->rate = spx_header->rate;
speex_decoder_ctl (this->st, SPEEX_SET_SAMPLING_RATE, &this->rate);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE,
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE,
this->rate);
this->channels = spx_header->nb_channels;
@@ -262,7 +257,7 @@ static void speex_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) {
speex_decoder_ctl (this->st, SPEEX_GET_BITRATE, &bitrate);
if (bitrate <= 1) bitrate = 16000; /* assume 16 kbit */
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_BITRATE, bitrate);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_BITRATE, bitrate);
this->header_count += spx_header->extra_headers;
this->expect_metadata = 1;
@@ -344,7 +339,7 @@ static void speex_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) {
speex_decoder_ctl (this->st, SPEEX_GET_BITRATE, &bitrate);
if (bitrate <= 1) bitrate = 16000; /* assume 16 kbit */
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_BITRATE, bitrate);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_BITRATE, bitrate);
/*PCM saturation (just in case)*/
for (i=0; i < this->frame_size * this->channels; i++)
diff --git a/src/libsputext/demux_sputext.c b/src/libsputext/demux_sputext.c
index edb20c31b..770368e5b 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.28 2003/11/15 14:54:31 miguelfreitas Exp $
+ * $Id: demux_sputext.c,v 1.29 2003/11/16 23:33:47 f1rmb 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);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 0);
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 0);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 0);
+ _x_stream_info_set(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 11bc9aa9e..13c49d3a8 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.29 2003/11/15 20:38:30 mroi Exp $
+ * $Id: xine_decoder.c,v 1.30 2003/11/16 23:33:47 f1rmb Exp $
*
* (ogg/)vorbis audio decoder plugin (libvorbis wrapper) for xine
*/
@@ -121,7 +121,7 @@ static void get_metadata (vorbis_decoder_t *this) {
i, vorbis_comment_keys[i].xine_metainfo_index);
#endif
- xine_set_meta_info(this->stream, vorbis_comment_keys[i].xine_metainfo_index,
+ _x_meta_info_set(this->stream, vorbis_comment_keys[i].xine_metainfo_index,
comment + strlen(vorbis_comment_keys[i].key));
}
@@ -129,7 +129,7 @@ static void get_metadata (vorbis_decoder_t *this) {
++ptr;
}
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC, "vorbis");
+ _x_meta_info_set(this->stream, XINE_META_INFO_AUDIOCODEC, "vorbis");
}
static void vorbis_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) {
@@ -194,7 +194,7 @@ static void vorbis_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) {
this->vi.rate,
mode) ;
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_BITRATE,
+ _x_stream_info_set(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 d0f0918d6..dfb577089 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.25 2003/11/15 13:01:18 miguelfreitas Exp $
+ * $Id: qt_decoder.c,v 1.26 2003/11/16 23:33:47 f1rmb Exp $
*
* quicktime video/audio decoder plugin, using win32 dlls
* most of this code comes directly from MPlayer
@@ -323,17 +323,17 @@ 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');
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ _x_meta_info_set(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');
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ _x_meta_info_set(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');
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_AUDIOCODEC,
"Qualcomm Purevoice Codec (QT DLL)");
break;
default:
@@ -485,7 +485,7 @@ static void qta_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) {
}
if (!this->codec_initialized)
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_HANDLED, 0);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_HANDLED, 0);
}
} else if( this->codec_initialized ) {
@@ -1025,7 +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 */
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC, "Sorenson Video 3 (QT DLL)");
+ _x_meta_info_set(this->stream, XINE_META_INFO_VIDEOCODEC, "Sorenson Video 3 (QT DLL)");
} else if (buf->decoder_flags & BUF_FLAG_SPECIAL) {
#ifdef LOG
@@ -1042,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)
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_HANDLED, 0);
+ _x_stream_info_set(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 e3490916f..355a0ce38 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.130 2003/11/15 14:54:31 miguelfreitas Exp $
+ * $Id: w32codec.c,v 1.131 2003/11/16 23:33:47 f1rmb Exp $
*
* routines for using w32 codecs
* DirectShow support by Miguel Freitas (Nov/2001)
@@ -322,7 +322,7 @@ static char* get_vids_codec_name(w32v_decoder_t *this,
this->yuv_supported=1;
this->driver_type = DRIVER_DS;
this->guid=&msmpeg4_clsid;
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_VIDEOCODEC,
"MS MPEG-4 V1/V2 (win32)");
return "mpg4ds32.ax";
@@ -331,7 +331,7 @@ static char* get_vids_codec_name(w32v_decoder_t *this,
this->yuv_supported=1;
this->yuv_hack_needed=1;
this->flipped=1;
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_VIDEOCODEC,
"MS MPEG-4 V3 (win32)");
return "divxc32.dll";
@@ -339,28 +339,28 @@ static char* get_vids_codec_name(w32v_decoder_t *this,
/* Video in Indeo Video 5 format */
this->yuv_supported=1; /* YUV pic is upside-down :( */
this->flipped=0;
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ _x_meta_info_set(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;
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ _x_meta_info_set(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;
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ _x_meta_info_set(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;
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_VIDEOCODEC,
"Indeo Video 3.1 (win32)");
return "ir32_32.dll";
@@ -368,7 +368,7 @@ static char* get_vids_codec_name(w32v_decoder_t *this,
/* Video in Cinepak format */
this->flipped=1;
this->yuv_supported=0;
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_VIDEOCODEC,
"Cinepak (win32)");
return "iccvid.dll";
@@ -381,7 +381,7 @@ static char* get_vids_codec_name(w32v_decoder_t *this,
case BUF_VIDEO_ATIVCR2:
/* Video in ATI VCR2 format */
this->yuv_supported=1;
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_VIDEOCODEC,
"ATI VCR2 (win32)");
return "ativcr2.dll";
@@ -389,7 +389,7 @@ static char* get_vids_codec_name(w32v_decoder_t *this,
/* Video in I263 format */
this->flipped=1;
this->yuv_supported=1;
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_VIDEOCODEC,
"I263 (win32)");
return "i263_32.drv";
@@ -398,7 +398,7 @@ static char* get_vids_codec_name(w32v_decoder_t *this,
/* note: can't play streams with 8bpp */
this->flipped=1;
this->yuv_supported=0;
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_VIDEOCODEC,
"MS Windows Video 1 (win32)");
return "msvidc32.dll";
@@ -407,7 +407,7 @@ static char* get_vids_codec_name(w32v_decoder_t *this,
this->yuv_supported=1;
this->driver_type = DRIVER_DS;
this->guid=&dvsd_clsid;
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_VIDEOCODEC,
"Sony DV (win32)");
return "qdv.dll";
@@ -415,7 +415,7 @@ static char* get_vids_codec_name(w32v_decoder_t *this,
this->yuv_supported=1;
this->driver_type = DRIVER_DS;
this->guid=&wmv1_clsid;
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_VIDEOCODEC,
"MS WMV 7 (win32)");
return "wmvds32.ax";
@@ -423,7 +423,7 @@ static char* get_vids_codec_name(w32v_decoder_t *this,
this->yuv_supported=1;
this->driver_type = DRIVER_DS;
this->guid=&wmv2_clsid;
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_VIDEOCODEC,
"MS WMV 8 (win32)");
return "wmv8ds32.ax";
@@ -431,7 +431,7 @@ static char* get_vids_codec_name(w32v_decoder_t *this,
this->yuv_supported=1;
this->driver_type = DRIVER_DMO;
this->guid=&wmv3_clsid;
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_VIDEOCODEC,
"MS WMV 9 (win32)");
return "wmv9dmod.dll";
@@ -439,34 +439,34 @@ static char* get_vids_codec_name(w32v_decoder_t *this,
this->yuv_supported=1;
this->ex_functions=1;
this->flipped=1;
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ _x_meta_info_set(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;
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ _x_meta_info_set(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;
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_VIDEOCODEC,
"Windows Screen Video (win32)");
return "msscds32.ax";
case BUF_VIDEO_TSCC:
this->flipped=1;
this->yuv_supported=0;
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_VIDEOCODEC,
"TechSmith Screen Capture Codec (win32)");
return "tsccvid.dll";
case BUF_VIDEO_UCOD:
this->yuv_supported=1;
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ _x_meta_info_set(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;
- 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);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_WIDTH, this->bih->biWidth);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_HEIGHT, this->bih->biHeight);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_FRAME_DURATION, this->video_step);
#ifdef LOG
printf ("w32codec: video_step is %lld\n", this->video_step);
@@ -739,7 +739,7 @@ static void w32v_decode_data (video_decoder_t *this_gen, buf_element_t *buf) {
xine_log (this->stream->xine, XINE_LOG_MSG,
"w32codec: decoder failed to start. Is '%s' installed?\n",
win32_codec_name );
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_HANDLED, 0);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_VIDEO_HANDLED, 0);
_x_message(this->stream, XINE_MSG_LIBRARY_LOAD_ERROR,
win32_codec_name, NULL);
}
@@ -1011,59 +1011,59 @@ static char* get_auds_codec_name(w32a_decoder_t *this, int buf_type) {
switch (buf_type) {
case BUF_AUDIO_WMAV1:
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_AUDIOCODEC,
"Windows Media Audio v1 (win32)");
return "divxa32.acm";
case BUF_AUDIO_WMAV2:
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ _x_meta_info_set(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;
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ _x_meta_info_set(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;
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_AUDIOCODEC,
"Windows Media Audio Voice (win32)");
return "wmspdmod.dll";
case BUF_AUDIO_MSADPCM:
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_AUDIOCODEC,
"MS ADPCM (win32)");
return "msadp32.acm";
case BUF_AUDIO_MSIMAADPCM:
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_AUDIOCODEC,
"MS IMA ADPCM (win32)");
return "imaadp32.acm";
case BUF_AUDIO_MSGSM:
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_AUDIOCODEC,
"MS GSM (win32)");
return "msgsm32.acm";
case BUF_AUDIO_IMC:
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_AUDIOCODEC,
"Intel Music Coder (win32)");
return "imc32.acm";
case BUF_AUDIO_LH:
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ _x_meta_info_set(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;
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ _x_meta_info_set(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;
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_AUDIOCODEC,
"ACELP.net (win32)");
return "acelpdec.ax";
case BUF_AUDIO_VIVOG723:
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_AUDIOCODEC,
"Vivo G.723/Siren Audio Codec (win32)");
return "vivog723.acm";
}
@@ -1406,7 +1406,7 @@ static void w32a_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) {
xine_log (this->stream->xine, XINE_LOG_MSG,
"w32codec: decoder failed to start. Is '%s' installed?\n",
win32_codec_name );
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_HANDLED, 0);
+ _x_stream_info_set(this->stream, XINE_STREAM_INFO_AUDIO_HANDLED, 0);
}
pthread_mutex_unlock(&win32_codec_mutex);
diff --git a/src/libxineadec/28k8.c b/src/libxineadec/28k8.c
index c64ec6a45..e8ae06f81 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.3 2003/11/15 13:01:19 miguelfreitas Exp $
+ * $Id: 28k8.c,v 1.4 2003/11/16 23:33:47 f1rmb 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) {
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC, "Real 28.8");
+ _x_meta_info_set(this->stream, XINE_META_INFO_AUDIOCODEC, "Real 28.8");
this->decoder_ok = 1;
if (!this->decoder_ok)
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_HANDLED, 0);
+ _x_stream_info_set(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 e2bcb462c..f395a7959 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.32 2003/11/15 13:01:19 miguelfreitas Exp $
+ * $Id: adpcm.c,v 1.33 2003/11/16 23:33:47 f1rmb Exp $
*/
#include <stdio.h>
@@ -1409,52 +1409,52 @@ static void adpcm_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) {
switch (buf->type & 0xFFFF0000) {
case BUF_AUDIO_MSADPCM:
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_AUDIOCODEC,
"Microsoft ADPCM");
break;
case BUF_AUDIO_MSIMAADPCM:
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_AUDIOCODEC,
"Microsoft IMA ADPCM");
break;
case BUF_AUDIO_QTIMAADPCM:
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_AUDIOCODEC,
"QT IMA ADPCM");
break;
case BUF_AUDIO_DK3ADPCM:
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_AUDIOCODEC,
"Duck DK3 ADPCM");
break;
case BUF_AUDIO_DK4ADPCM:
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_AUDIOCODEC,
"Duck DK4 ADPCM");
break;
case BUF_AUDIO_SMJPEG_IMA:
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_AUDIOCODEC,
"SMJPEG IMA ADPCM");
break;
case BUF_AUDIO_VQA_IMA:
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_AUDIOCODEC,
"VQA IMA ADPCM");
break;
case BUF_AUDIO_EA_ADPCM:
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_AUDIOCODEC,
"EA ADPCM");
break;
case BUF_AUDIO_DIALOGIC_IMA:
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_AUDIOCODEC,
"Dialogic IMA ADPCM");
break;
case BUF_AUDIO_XA_ADPCM:
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_AUDIOCODEC,
"CD-ROM/XA ADPCM");
break;
diff --git a/src/libxineadec/fooaudio.c b/src/libxineadec/fooaudio.c
index c94073fd8..40b143004 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.7 2003/11/15 13:01:20 miguelfreitas Exp $
+ * $Id: fooaudio.c,v 1.8 2003/11/16 23:33:47 f1rmb 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 */
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC, "fooaudio");
+ _x_meta_info_set(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 e4c037aa7..ac03d940c 100644
--- a/src/libxineadec/gsm610.c
+++ b/src/libxineadec/gsm610.c
@@ -44,7 +44,7 @@
* Carsten Bormann
* --------------------------------------------------------------------
*
- * $Id: gsm610.c,v 1.9 2003/11/15 13:01:20 miguelfreitas Exp $
+ * $Id: gsm610.c,v 1.10 2003/11/16 23:33:47 f1rmb 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 */
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC, "GSM 6.10");
+ _x_meta_info_set(this->stream, XINE_META_INFO_AUDIOCODEC, "GSM 6.10");
return;
}
diff --git a/src/libxineadec/interplayaudio.c b/src/libxineadec/interplayaudio.c
index e1057766f..41680ee98 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.3 2003/11/15 13:01:20 miguelfreitas Exp $
+ * $Id: interplayaudio.c,v 1.4 2003/11/16 23:33:47 f1rmb Exp $
*/
#include <stdio.h>
@@ -137,7 +137,7 @@ 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 */
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_AUDIOCODEC,
"Interplay MVE DPCM");
return;
diff --git a/src/libxineadec/logpcm.c b/src/libxineadec/logpcm.c
index 4cf95f28f..cc972eac6 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.13 2003/11/15 13:01:21 miguelfreitas Exp $
+ * $Id: logpcm.c,v 1.14 2003/11/16 23:33:47 f1rmb Exp $
*
*/
@@ -160,7 +160,7 @@ static void logpcm_decode_data (audio_decoder_t *this_gen, buf_element_t *buf) {
this->size = 0;
/* stream/meta info */
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_AUDIOCODEC,
(buf->type == BUF_AUDIO_MULAW) ? "mu-law log PCM" :
"A-law log PCM" );
diff --git a/src/libxineadec/nsf.c b/src/libxineadec/nsf.c
index 9c65d2157..aff552039 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.3 2003/11/15 13:01:21 miguelfreitas Exp $
+ * $Id: nsf.c,v 1.4 2003/11/16 23:33:47 f1rmb Exp $
*/
#include <stdio.h>
@@ -86,7 +86,7 @@ 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 */
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_AUDIOCODEC,
"NES Music (Nosefart)");
this->song_number = buf->content[4];
diff --git a/src/libxineadec/pcm.c b/src/libxineadec/pcm.c
index 122f6c855..554a2e6fc 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 (xine_get_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_MODE) == 0) {
+ if (_x_stream_info_get(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 6ed30c42e..e446c7051 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.16 2003/11/15 13:01:22 miguelfreitas Exp $
+ * $Id: roqaudio.c,v 1.17 2003/11/16 23:33:47 f1rmb Exp $
*
*/
@@ -83,7 +83,7 @@ static void roqaudio_decode_data (audio_decoder_t *this_gen, buf_element_t *buf)
this->size = 0;
/* stream/meta info */
- xine_set_meta_info(this->stream, XINE_META_INFO_AUDIOCODEC,
+ _x_meta_info_set(this->stream, XINE_META_INFO_AUDIOCODEC,
"RoQ DPCM Audio");
return;
diff --git a/src/libxinevdec/cinepak.c b/src/libxinevdec/cinepak.c
index b1de77eff..a814dc757 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.32 2003/11/15 13:01:22 miguelfreitas Exp $
+ * $Id: cinepak.c,v 1.33 2003/11/16 23:33:47 f1rmb 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 */
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC, "Cinepak");
+ _x_meta_info_set(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 d4603ae53..3e43ca579 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.20 2003/11/15 13:01:22 miguelfreitas Exp $
+ * $Id: cyuv.c,v 1.21 2003/11/16 23:33:48 f1rmb 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];
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC, "Creative YUV");
+ _x_meta_info_set(this->stream, XINE_META_INFO_VIDEOCODEC, "Creative YUV");
return;
}
diff --git a/src/libxinevdec/fli.c b/src/libxinevdec/fli.c
index a40a2786b..98e03190d 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.22 2003/11/15 13:01:22 miguelfreitas Exp $
+ * $Id: fli.c,v 1.23 2003/11/16 23:33:48 f1rmb 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 */
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC, "FLI/FLC Video");
+ _x_meta_info_set(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 9ab2a5651..5b3b25fd9 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.17 2003/11/15 13:01:23 miguelfreitas Exp $
+ * $Id: foovideo.c,v 1.18 2003/11/16 23:33:48 f1rmb 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 */
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC, "foovideo");
+ _x_meta_info_set(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 605986e12..7f01b73d8 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.17 2003/11/15 13:01:23 miguelfreitas Exp $
+ * $Id: idcinvideo.c,v 1.18 2003/11/16 23:33:48 f1rmb 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 */
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC, "Id CIN Video");
+ _x_meta_info_set(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 23712f793..f2b054b1f 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.8 2003/11/15 13:01:23 miguelfreitas Exp $
+ * $Id: image.c,v 1.9 2003/11/16 23:33:48 f1rmb Exp $
*
* a image video decoder
*/
@@ -266,7 +266,7 @@ static void end_callback(png_structp png_ptr, png_infop info) {
*out = le2me_16(*out);
}
}
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_FRAME_DURATION, img->duration);
+ _x_stream_info_set(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 570877414..261a69192 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.6 2003/11/15 13:01:23 miguelfreitas Exp $
+ * $Id: interplayvideo.c,v 1.7 2003/11/16 23:33:48 f1rmb Exp $
*/
#include <stdio.h>
@@ -1177,7 +1177,7 @@ static void interplay_decode_data (video_decoder_t *this_gen,
this->current_planes = 1;
/* take this opportunity to load the stream/meta info */
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC,
+ _x_meta_info_set(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 3f6e7eed4..a9398c85b 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.20 2003/11/15 13:01:24 miguelfreitas Exp $
+ * $Id: msrle.c,v 1.21 2003/11/16 23:33:48 f1rmb 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 */
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC, "Microsoft RLE");
+ _x_meta_info_set(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 4beee4021..d0b05b1e1 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.25 2003/11/15 13:01:24 miguelfreitas Exp $
+ * $Id: msvc.c,v 1.26 2003/11/16 23:33:48 f1rmb 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 */
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC, "Microsoft Video-1");
+ _x_meta_info_set(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 b227184a9..056056dc7 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.15 2003/11/15 13:01:25 miguelfreitas Exp $
+ * $Id: qtrle.c,v 1.16 2003/11/16 23:33:48 f1rmb 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);
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC, codec_name);
+ _x_meta_info_set(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 d2249bec5..3299d1e36 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.18 2003/11/15 13:01:25 miguelfreitas Exp $
+ * $Id: qtrpza.c,v 1.19 2003/11/16 23:33:48 f1rmb 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 */
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC, "Quicktime Video (RPZA)");
+ _x_meta_info_set(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 b33ebaa01..8bdf7b7bf 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.18 2003/11/15 13:01:25 miguelfreitas Exp $
+ * $Id: qtsmc.c,v 1.19 2003/11/16 23:33:48 f1rmb 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 */
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC, "Quicktime Graphics (SMC)");
+ _x_meta_info_set(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 7e53860ce..d1f224816 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.21 2003/11/15 13:01:26 miguelfreitas Exp $
+ * $Id: rgb.c,v 1.22 2003/11/16 23:33:48 f1rmb 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 */
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC, "Raw RGB");
+ _x_meta_info_set(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 111d3503b..88f895df5 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.22 2003/11/15 13:01:26 miguelfreitas Exp $
+ * $Id: roqvideo.c,v 1.23 2003/11/16 23:33:48 f1rmb 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 */
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC, "RoQ VQ Video");
+ _x_meta_info_set(this->stream, XINE_META_INFO_VIDEOCODEC, "RoQ VQ Video");
return;
}
diff --git a/src/libxinevdec/svq1.c b/src/libxinevdec/svq1.c
index f032b590c..48ecd4da6 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.27 2003/11/15 13:01:26 miguelfreitas Exp $
+ * $Id: svq1.c,v 1.28 2003/11/16 23:33:48 f1rmb 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 */
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC, "Sorenson Video 1");
+ _x_meta_info_set(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 93290cf02..66b7eda77 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.16 2003/11/15 13:01:27 miguelfreitas Exp $
+ * $Id: wc3video.c,v 1.17 2003/11/16 23:33:48 f1rmb 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 */
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC, "Wing Commander III Video");
+ _x_meta_info_set(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 9d52cfdcb..b2dc7ee01 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.24 2003/11/15 13:01:27 miguelfreitas Exp $
+ * $Id: yuv.c,v 1.25 2003/11/16 23:33:48 f1rmb 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:
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC, "Raw YV12");
+ _x_meta_info_set(this->stream, XINE_META_INFO_VIDEOCODEC, "Raw YV12");
break;
case BUF_VIDEO_YVU9:
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC, "Raw YVU9");
+ _x_meta_info_set(this->stream, XINE_META_INFO_VIDEOCODEC, "Raw YVU9");
break;
case BUF_VIDEO_GREY:
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC, "Greyscale YUV");
+ _x_meta_info_set(this->stream, XINE_META_INFO_VIDEOCODEC, "Greyscale YUV");
break;
case BUF_VIDEO_I420:
- xine_set_meta_info(this->stream, XINE_META_INFO_VIDEOCODEC, "Raw I420");
+ _x_meta_info_set(this->stream, XINE_META_INFO_VIDEOCODEC, "Raw I420");
break;
}
- xine_set_stream_info(this->stream, XINE_STREAM_INFO_FRAME_DURATION, this->video_step);
+ _x_stream_info_set(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/audio_decoder.c b/src/xine-engine/audio_decoder.c
index d90829636..344b7c793 100644
--- a/src/xine-engine/audio_decoder.c
+++ b/src/xine-engine/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.110 2003/11/16 15:41:15 mroi Exp $
+ * $Id: audio_decoder.c,v 1.111 2003/11/16 23:33:48 f1rmb Exp $
*
*
* functions that implement audio decoding
@@ -200,7 +200,7 @@ static void *audio_decoder_loop (void *stream_gen) {
default:
- if (stream->stream_info[XINE_STREAM_INFO_IGNORE_AUDIO])
+ if (_x_stream_info_get(stream, XINE_STREAM_INFO_IGNORE_AUDIO))
break;
xine_profiler_start_count (prof_audio_decode);
@@ -294,8 +294,8 @@ static void *audio_decoder_loop (void *stream_gen) {
stream->audio_decoder_streamtype = streamtype;
stream->audio_decoder_plugin = _x_get_audio_decoder (stream, streamtype);
- stream->stream_info[XINE_STREAM_INFO_AUDIO_HANDLED] =
- (stream->audio_decoder_plugin != NULL);
+ _x_stream_info_set(stream, XINE_STREAM_INFO_AUDIO_HANDLED,
+ (stream->audio_decoder_plugin != NULL));
}
if (audio_type != stream->audio_type) {
@@ -317,7 +317,7 @@ static void *audio_decoder_loop (void *stream_gen) {
stream->audio_decoder_plugin->decode_data (stream->audio_decoder_plugin, buf);
if (buf->type != buftype_unknown &&
- !stream->stream_info[XINE_STREAM_INFO_AUDIO_HANDLED]) {
+ !_x_stream_info_get(stream, XINE_STREAM_INFO_AUDIO_HANDLED)) {
xine_log (stream->xine, XINE_LOG_MSG,
"audio_decoder: no plugin available to handle '%s'\n",
_x_buf_audio_name( buf->type ) );
diff --git a/src/xine-engine/audio_out.c b/src/xine-engine/audio_out.c
index 21d243ccb..62140b326 100644
--- a/src/xine-engine/audio_out.c
+++ b/src/xine-engine/audio_out.c
@@ -17,7 +17,7 @@
* along with self program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*
- * $Id: audio_out.c,v 1.151 2003/11/16 15:41:15 mroi Exp $
+ * $Id: audio_out.c,v 1.152 2003/11/16 23:33:48 f1rmb Exp $
*
* 22-8-2001 James imported some useful AC3 sections from the previous alsa driver.
* (c) 2001 Andy Lo A Foe <andy@alsaplayer.org>
@@ -1276,30 +1276,30 @@ static int ao_open(xine_audio_port_t *this_gen, xine_stream_t *stream,
/*
* set metainfo
*/
- stream->stream_info[XINE_STREAM_INFO_AUDIO_MODE] = mode;
+ _x_stream_info_set(stream, XINE_STREAM_INFO_AUDIO_MODE, mode);
switch (mode) {
case AO_CAP_MODE_MONO:
- stream->stream_info[XINE_STREAM_INFO_AUDIO_CHANNELS] = 1;
+ _x_stream_info_set(stream, XINE_STREAM_INFO_AUDIO_CHANNELS, 1);
break;
case AO_CAP_MODE_STEREO:
- stream->stream_info[XINE_STREAM_INFO_AUDIO_CHANNELS] = 2;
+ _x_stream_info_set(stream, XINE_STREAM_INFO_AUDIO_CHANNELS, 2);
break;
case AO_CAP_MODE_4CHANNEL:
- stream->stream_info[XINE_STREAM_INFO_AUDIO_CHANNELS] = 4;
+ _x_stream_info_set(stream, XINE_STREAM_INFO_AUDIO_CHANNELS, 4);
break;
case AO_CAP_MODE_4_1CHANNEL:
case AO_CAP_MODE_5CHANNEL:
case AO_CAP_MODE_5_1CHANNEL:
- stream->stream_info[XINE_STREAM_INFO_AUDIO_CHANNELS] = 6;
+ _x_stream_info_set(stream, XINE_STREAM_INFO_AUDIO_CHANNELS, 6);
break;
case AO_CAP_MODE_A52:
case AO_CAP_MODE_AC5:
default:
- stream->stream_info[XINE_STREAM_INFO_AUDIO_CHANNELS] = 255; /* unknown */
+ _x_stream_info_set(stream, XINE_STREAM_INFO_AUDIO_CHANNELS, 255); /* unknown */
}
- stream->stream_info[XINE_STREAM_INFO_AUDIO_BITS] = bits;
- stream->stream_info[XINE_STREAM_INFO_AUDIO_SAMPLERATE] = rate;
+ _x_stream_info_set(stream, XINE_STREAM_INFO_AUDIO_BITS, bits);
+ _x_stream_info_set(stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE, rate);
stream->metronom->set_audio_rate(stream->metronom, this->audio_step);
@@ -1333,9 +1333,9 @@ static void ao_put_buffer (xine_audio_port_t *this_gen,
pts = buf->vpts;
if (stream) {
- buf->format.bits = stream->stream_info[XINE_STREAM_INFO_AUDIO_BITS];
- buf->format.rate = stream->stream_info[XINE_STREAM_INFO_AUDIO_SAMPLERATE];
- buf->format.mode = stream->stream_info[XINE_STREAM_INFO_AUDIO_MODE];
+ buf->format.bits = _x_stream_info_get(stream, XINE_STREAM_INFO_AUDIO_BITS);
+ buf->format.rate = _x_stream_info_get(stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE);
+ buf->format.mode = _x_stream_info_get(stream, XINE_STREAM_INFO_AUDIO_MODE);
_x_extra_info_merge( buf->extra_info, stream->audio_decoder_extra_info );
buf->vpts = stream->metronom->got_audio_samples(stream->metronom, pts, buf->num_frames);
}
diff --git a/src/xine-engine/configfile.c b/src/xine-engine/configfile.c
index f9bf84951..b171fd751 100644
--- a/src/xine-engine/configfile.c
+++ b/src/xine-engine/configfile.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: configfile.c,v 1.55 2003/11/11 18:45:00 f1rmb Exp $
+ * $Id: configfile.c,v 1.56 2003/11/16 23:33:48 f1rmb Exp $
*
* config object (was: file) management - implementation
*
@@ -145,7 +145,7 @@ static void config_insert(config_values_t *this, cfg_entry_t *new_entry) {
this->first = new_entry;
}
-static cfg_entry_t *xine_config_add (config_values_t *this, const char *key, int exp_level) {
+static cfg_entry_t *__config_add (config_values_t *this, const char *key, int exp_level) {
cfg_entry_t *entry;
@@ -158,15 +158,14 @@ static cfg_entry_t *xine_config_add (config_values_t *this, const char *key, int
entry->exp_level = exp_level;
config_insert(this, entry);
-#ifdef LOG
- printf ("configfile: add entry key=%s\n", key);
-#endif
+
+ lprintf ("configfile: add entry key=%s\n", key);
return entry;
}
-static void _xine_config_lookup_entry_int (config_values_t *this, const char *key,
- cfg_entry_t **entry, cfg_entry_t **prev) {
+static void __config_lookup_entry_int (config_values_t *this, const char *key,
+ cfg_entry_t **entry, cfg_entry_t **prev) {
*entry = this->first;
*prev = NULL;
@@ -181,41 +180,39 @@ static void _xine_config_lookup_entry_int (config_values_t *this, const char *ke
* external interface
*/
-static cfg_entry_t *_xine_config_lookup_entry(config_values_t *this, const char *key) {
+static cfg_entry_t *__config_lookup_entry(config_values_t *this, const char *key) {
cfg_entry_t *entry, *prev;
pthread_mutex_lock(&this->config_lock);
- _xine_config_lookup_entry_int(this, key, &entry, &prev);
+ __config_lookup_entry_int(this, key, &entry, &prev);
pthread_mutex_unlock(&this->config_lock);
return entry;
}
-static char *_xine_config_register_string (config_values_t *this,
- const char *key,
- const char *def_value,
- const char *description,
- const char *help,
- int exp_level,
- xine_config_cb_t changed_cb,
- void *cb_data) {
+static char *__config_register_string (config_values_t *this,
+ const char *key,
+ const char *def_value,
+ const char *description,
+ const char *help,
+ int exp_level,
+ xine_config_cb_t changed_cb,
+ void *cb_data) {
cfg_entry_t *entry, *prev;
XINE_ASSERT(key, "Register key is NULL. This is a required argument.");
XINE_ASSERT(def_value, "Default value is NULL. This is a required argument.");
-#ifdef LOG
- printf ("configfile: registering %s\n", key);
-#endif
+ lprintf ("configfile: registering %s\n", key);
/* make sure this entry exists, create it if not */
pthread_mutex_lock(&this->config_lock);
- _xine_config_lookup_entry_int(this, key, &entry, &prev);
+ __config_lookup_entry_int(this, key, &entry, &prev);
if (!entry) {
- entry = xine_config_add (this, key, exp_level);
+ entry = __config_add (this, key, exp_level);
entry->unknown_value = strdup(def_value);
} else {
if (!entry->next)
@@ -258,28 +255,26 @@ static char *_xine_config_register_string (config_values_t *this,
return entry->str_value;
}
-static int _xine_config_register_num (config_values_t *this,
- const char *key, int def_value,
- const char *description,
- const char *help,
- int exp_level,
- xine_config_cb_t changed_cb,
- void *cb_data) {
+static int __config_register_num (config_values_t *this,
+ const char *key, int def_value,
+ const char *description,
+ const char *help,
+ int exp_level,
+ xine_config_cb_t changed_cb,
+ void *cb_data) {
cfg_entry_t *entry, *prev;
XINE_ASSERT(key, "Register key is NULL. This is a required argument.");
-#ifdef LOG
- printf ("configfile: registering %s\n", key);
-#endif
+ lprintf ("configfile: registering %s\n", key);
/* make sure this entry exists, create it if not */
pthread_mutex_lock(&this->config_lock);
- _xine_config_lookup_entry_int(this, key, &entry, &prev);
+ __config_lookup_entry_int(this, key, &entry, &prev);
if (!entry) {
- entry = xine_config_add (this, key, exp_level);
+ entry = __config_add (this, key, exp_level);
entry->unknown_value = NULL;
} else {
if (!entry->next)
@@ -324,29 +319,27 @@ static int _xine_config_register_num (config_values_t *this,
return entry->num_value;
}
-static int _xine_config_register_bool (config_values_t *this,
- const char *key,
- int def_value,
- const char *description,
- const char *help,
- int exp_level,
- xine_config_cb_t changed_cb,
- void *cb_data) {
+static int __config_register_bool (config_values_t *this,
+ const char *key,
+ int def_value,
+ const char *description,
+ const char *help,
+ int exp_level,
+ xine_config_cb_t changed_cb,
+ void *cb_data) {
cfg_entry_t *entry, *prev;
XINE_ASSERT(key, "Register key is NULL. This is a required argument.");
-#ifdef LOG
- printf ("configfile: registering %s\n", key);
-#endif
+ lprintf ("configfile: registering %s\n", key);
/* make sure this entry exists, create it if not */
pthread_mutex_lock(&this->config_lock);
- _xine_config_lookup_entry_int(this, key, &entry, &prev);
+ __config_lookup_entry_int(this, key, &entry, &prev);
if (!entry) {
- entry = xine_config_add (this, key, exp_level);
+ entry = __config_add (this, key, exp_level);
entry->unknown_value = NULL;
} else {
if (!entry->next)
@@ -391,30 +384,28 @@ static int _xine_config_register_bool (config_values_t *this,
return entry->num_value;
}
-static int _xine_config_register_range (config_values_t *this,
- const char *key,
- int def_value,
- int min, int max,
- const char *description,
- const char *help,
- int exp_level,
- xine_config_cb_t changed_cb,
- void *cb_data) {
+static int __config_register_range (config_values_t *this,
+ const char *key,
+ int def_value,
+ int min, int max,
+ const char *description,
+ const char *help,
+ int exp_level,
+ xine_config_cb_t changed_cb,
+ void *cb_data) {
cfg_entry_t *entry, *prev;
XINE_ASSERT(key, "Register key is NULL. This is a required argument.");
-#ifdef LOG
- printf ("configfile: registering range %s\n", key);
-#endif
+ lprintf ("configfile: registering range %s\n", key);
/* make sure this entry exists, create it if not */
pthread_mutex_lock(&this->config_lock);
- _xine_config_lookup_entry_int(this, key, &entry, &prev);
+ __config_lookup_entry_int(this, key, &entry, &prev);
if (!entry) {
- entry = xine_config_add (this, key, exp_level);
+ entry = __config_add (this, key, exp_level);
entry->unknown_value = NULL;
} else {
if (!entry->next)
@@ -460,7 +451,7 @@ static int _xine_config_register_range (config_values_t *this,
return entry->num_value;
}
-static int xine_config_parse_enum (const char *str, char **values) {
+static int __config_parse_enum (const char *str, char **values) {
char **value;
int i;
@@ -471,10 +462,7 @@ static int xine_config_parse_enum (const char *str, char **values) {
while (*value) {
-#ifdef LOG
- printf ("configfile: parse enum, >%s< ?= >%s<\n",
- *value, str);
-#endif
+ lprintf ("configfile: parse enum, >%s< ?= >%s<\n", *value, str);
if (!strcmp (*value, str))
return i;
@@ -483,39 +471,34 @@ static int xine_config_parse_enum (const char *str, char **values) {
i++;
}
-#ifdef LOG
- printf ("configfile: warning, >%s< is not a valid enum here, using 0\n",
- str);
-#endif
+ lprintf ("configfile: warning, >%s< is not a valid enum here, using 0\n", str);
return 0;
}
-static int _xine_config_register_enum (config_values_t *this,
- const char *key,
- int def_value,
- char **values,
- const char *description,
- const char *help,
- int exp_level,
- xine_config_cb_t changed_cb,
- void *cb_data) {
+static int __config_register_enum (config_values_t *this,
+ const char *key,
+ int def_value,
+ char **values,
+ const char *description,
+ const char *help,
+ int exp_level,
+ xine_config_cb_t changed_cb,
+ void *cb_data) {
cfg_entry_t *entry, *prev;
XINE_ASSERT(key, "Register key is NULL. This is a required argument.");
XINE_ASSERT(values, "Argument 'values' is NULL. This is a required argument.");
-#ifdef LOG
- printf ("configfile: registering enum %s\n", key);
-#endif
+ lprintf ("configfile: registering enum %s\n", key);
/* make sure this entry exists, create it if not */
pthread_mutex_lock(&this->config_lock);
- _xine_config_lookup_entry_int(this, key, &entry, &prev);
+ __config_lookup_entry_int(this, key, &entry, &prev);
if (!entry) {
- entry = xine_config_add (this, key, exp_level);
+ entry = __config_add (this, key, exp_level);
entry->unknown_value = NULL;
} else {
if (!entry->next)
@@ -541,7 +524,7 @@ static int _xine_config_register_enum (config_values_t *this,
entry->type = CONFIG_TYPE_ENUM;
if (entry->unknown_value)
- entry->num_value = xine_config_parse_enum (entry->unknown_value, values);
+ entry->num_value = __config_parse_enum (entry->unknown_value, values);
else
entry->num_value = def_value;
@@ -561,7 +544,7 @@ static int _xine_config_register_enum (config_values_t *this,
return entry->num_value;
}
-static void xine_config_shallow_copy(xine_cfg_entry_t *dest, cfg_entry_t *src)
+static void __config_shallow_copy(xine_cfg_entry_t *dest, cfg_entry_t *src)
{
dest->key = src->key;
dest->type = src->type;
@@ -580,24 +563,19 @@ static void xine_config_shallow_copy(xine_cfg_entry_t *dest, cfg_entry_t *src)
dest->callback_data = src->callback_data;
}
-static void xine_config_update_num (config_values_t *this,
- const char *key, int value) {
-
+static void __config_update_num (config_values_t *this,
+ const char *key, int value) {
+
cfg_entry_t *entry;
entry = this->lookup_entry (this, key);
-#ifdef LOG
- printf ("configfile: updating %s to %d\n",
- key, value);
-#endif
+ lprintf ("configfile: updating %s to %d\n", key, value);
if (!entry) {
-#ifdef LOG
- printf ("configfile: WARNING! tried to update unknown key %s (to %d)\n",
- key, value);
-#endif
+ lprintf ("configfile: WARNING! tried to update unknown key %s (to %d)\n", key, value);
+
return;
}
@@ -614,7 +592,7 @@ static void xine_config_update_num (config_values_t *this,
if (entry->callback) {
xine_cfg_entry_t cb_entry;
- xine_config_shallow_copy(&cb_entry, entry);
+ __config_shallow_copy(&cb_entry, entry);
/* do not enter the callback from within a locked context */
pthread_mutex_unlock(&this->config_lock);
entry->callback (entry->callback_data, &cb_entry);
@@ -622,17 +600,14 @@ static void xine_config_update_num (config_values_t *this,
pthread_mutex_unlock(&this->config_lock);
}
-static void xine_config_update_string (config_values_t *this,
+static void __config_update_string (config_values_t *this,
const char *key,
const char *value) {
cfg_entry_t *entry;
char *str_free = NULL;
-#ifdef LOG
- printf ("configfile: updating %s to %s\n",
- key, value);
-#endif
+ lprintf ("configfile: updating %s to %s\n", key, value);
entry = this->lookup_entry (this, key);
@@ -658,7 +633,7 @@ static void xine_config_update_string (config_values_t *this,
if (entry->callback) {
xine_cfg_entry_t cb_entry;
- xine_config_shallow_copy(&cb_entry, entry);
+ __config_shallow_copy(&cb_entry, entry);
/* FIXME: find a solution which does not enter the callback with the lock acquired,
* but does also handle the char* leak- and race-free without unnecessary string copying */
entry->callback (entry->callback_data, &cb_entry);
@@ -676,10 +651,7 @@ void xine_config_load (xine_t *xine, const char *filename) {
config_values_t *this = xine->config;
FILE *f_config;
-#ifdef LOG
- printf ("configfile: reading from file '%s'\n",
- filename);
-#endif
+ lprintf ("configfile: reading from file '%s'\n", filename);
f_config = fopen (filename, "r");
@@ -711,9 +683,9 @@ void xine_config_load (xine_t *xine, const char *filename) {
*value = (char) 0;
value++;
- if (!(entry = _xine_config_lookup_entry(this, line))) {
+ if (!(entry = __config_lookup_entry(this, line))) {
pthread_mutex_lock(&this->config_lock);
- entry = xine_config_add (this, line, 50);
+ entry = __config_add (this, line, 50);
entry->unknown_value = strdup(value);
pthread_mutex_unlock(&this->config_lock);
} else {
@@ -722,10 +694,10 @@ void xine_config_load (xine_t *xine, const char *filename) {
case XINE_CONFIG_TYPE_ENUM:
case XINE_CONFIG_TYPE_NUM:
case XINE_CONFIG_TYPE_BOOL:
- xine_config_update_num (this, entry->key, atoi(value));
+ __config_update_num (this, entry->key, atoi(value));
break;
case XINE_CONFIG_TYPE_STRING:
- xine_config_update_string (this, entry->key, value);
+ __config_update_string (this, entry->key, value);
break;
case CONFIG_TYPE_UNKNOWN:
pthread_mutex_lock(&this->config_lock);
@@ -759,9 +731,8 @@ void xine_config_save (xine_t *xine, const char *filename) {
if (stat(temp, &backup_stat) != 0) {
char line[1024];
-#ifdef LOG
- printf("configfile: backing up configfile to %s\n", temp);
-#endif
+ lprintf("configfile: backing up configfile to %s\n", temp);
+
f_backup = fopen(temp, "w");
f_config = fopen(filename, "r");
@@ -795,9 +766,8 @@ void xine_config_save (xine_t *xine, const char *filename) {
return;
}
-#ifdef LOG
- printf ("configfile: writing config file to %s\n", filename);
-#endif
+ lprintf ("configfile: writing config file to %s\n", filename);
+
f_config = fopen(filename, "w");
if (f_config) {
@@ -814,9 +784,7 @@ void xine_config_save (xine_t *xine, const char *filename) {
while (entry) {
-#ifdef LOG
- printf ("configfile: saving key '%s'\n", entry->key);
-#endif
+ lprintf ("configfile: saving key '%s'\n", entry->key);
if (entry->description)
fprintf (f_config, "# %s\n", entry->description);
@@ -903,16 +871,14 @@ void xine_config_save (xine_t *xine, const char *filename) {
unlink(temp);
}
-static void xine_config_dispose (config_values_t *this) {
+static void __config_dispose (config_values_t *this) {
cfg_entry_t *entry, *last;
pthread_mutex_lock(&this->config_lock);
entry = this->first;
-#ifdef LOG
- printf ("configfile: dispose\n");
-#endif
+ lprintf ("configfile: dispose\n");
while (entry) {
last = entry;
@@ -937,15 +903,14 @@ static void xine_config_dispose (config_values_t *this) {
}
-static void xine_config_unregister_cb (config_values_t *this,
- const char *key) {
+static void __config_unregister_cb (config_values_t *this, const char *key) {
cfg_entry_t *entry;
XINE_ASSERT(key, "Register key is NULL. This is a required argument.");
XINE_ASSERT(this, "Argument 'this' is NULL. Cannot find key if this is not set.");
- entry = _xine_config_lookup_entry (this, key);
+ entry = __config_lookup_entry (this, key);
if (entry) {
pthread_mutex_lock(&this->config_lock);
entry->callback = NULL;
@@ -974,17 +939,17 @@ config_values_t *_x_config_init (void) {
pthread_mutex_init(&this->config_lock, NULL);
- this->register_string = _xine_config_register_string;
- this->register_range = _xine_config_register_range;
- this->register_enum = _xine_config_register_enum;
- this->register_num = _xine_config_register_num;
- this->register_bool = _xine_config_register_bool;
- this->update_num = xine_config_update_num;
- this->update_string = xine_config_update_string;
- this->parse_enum = xine_config_parse_enum;
- this->lookup_entry = _xine_config_lookup_entry;
- this->unregister_callback = xine_config_unregister_cb;
- this->dispose = xine_config_dispose;
+ this->register_string = __config_register_string;
+ this->register_range = __config_register_range;
+ this->register_enum = __config_register_enum;
+ this->register_num = __config_register_num;
+ this->register_bool = __config_register_bool;
+ this->update_num = __config_update_num;
+ this->update_string = __config_update_string;
+ this->parse_enum = __config_parse_enum;
+ this->lookup_entry = __config_lookup_entry;
+ this->unregister_callback = __config_unregister_cb;
+ this->dispose = __config_dispose;
return this;
}
@@ -993,9 +958,7 @@ int _x_config_change_opt(config_values_t *config, const char *opt) {
cfg_entry_t *entry;
int handled = 0;
-#ifdef LOG
- printf ("configfile: change_opt '%s'\n", opt);
-#endif
+ lprintf ("configfile: change_opt '%s'\n", opt);
if(config && opt) {
char *key, *value;
diff --git a/src/xine-engine/info_helper.c b/src/xine-engine/info_helper.c
index fe234916e..5221cd034 100644
--- a/src/xine-engine/info_helper.c
+++ b/src/xine-engine/info_helper.c
@@ -20,23 +20,114 @@
* stream metainfo helper functions
* hide some xine engine details from demuxers and reduce code duplication
*
- * $id$
+ * $Id: info_helper.c,v 1.6 2003/11/16 23:33:48 f1rmb Exp $
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
+#include <stdio.h>
#include <string.h>
#define XINE_ENGINE_INTERNAL
#include "info_helper.h"
-/* Remove trailing separator chars (\n,\r,\t, space,...)
+/* ******************* Stream Info *************************** */
+
+/*
+ * Compare stream_info, private and public values,
+ * return 1 if it's identical, otherwirse 0.
+ */
+static int __stream_info_is_identical(xine_stream_t *stream, int info) {
+
+ if(stream->stream_info_public[info] == stream->stream_info[info])
+ return 1;
+
+ return 0;
+}
+
+/*
+ * Check if 'info' is in bounds.
+ */
+static int __info_valid(int info) {
+ if ((info >= 0) && (info < XINE_STREAM_INFO_MAX))
+ return 1;
+ else {
+ fprintf(stderr, "Error: invalid STREAM_INFO %d. Ignored.\n", info);
+ return 0;
+ }
+}
+
+static void __stream_info_set_unlocked(xine_stream_t *stream, int info, int value) {
+ if(__info_valid(info))
+ stream->stream_info[info] = value;
+}
+
+/*
+ * Reset private info.
+ */
+void _x_stream_info_reset(xine_stream_t *stream, int info) {
+ pthread_mutex_lock(&stream->info_mutex);
+ __stream_info_set_unlocked(stream, info, 0);
+ pthread_mutex_unlock(&stream->info_mutex);
+}
+
+/*
+ * Reset public info value.
+ */
+void _x_stream_info_public_reset(xine_stream_t *stream, int info) {
+ pthread_mutex_lock(&stream->info_mutex);
+ if(__info_valid(info))
+ stream->stream_info_public[info] = 0;
+ pthread_mutex_unlock(&stream->info_mutex);
+}
+
+/*
+ * Set private info value.
+ */
+void _x_stream_info_set(xine_stream_t *stream, int info, int value) {
+ pthread_mutex_lock(&stream->info_mutex);
+ __stream_info_set_unlocked(stream, info, value);
+ pthread_mutex_unlock(&stream->info_mutex);
+}
+
+/*
+ * Retrieve private info value.
+ */
+uint32_t _x_stream_info_get(xine_stream_t *stream, int info) {
+ uint32_t stream_info = 0;
+
+ pthread_mutex_lock(&stream->info_mutex);
+ stream_info = stream->stream_info[info];
+ pthread_mutex_unlock(&stream->info_mutex);
+
+ return stream_info;
+}
+
+/*
+ * Retrieve public info value
+ */
+uint32_t _x_stream_info_get_public(xine_stream_t *stream, int info) {
+ uint32_t stream_info = 0;
+
+ pthread_mutex_lock(&stream->info_mutex);
+ stream_info = stream->stream_info_public[info];
+ if(__info_valid(info) && (!__stream_info_is_identical(stream, info)))
+ stream_info = stream->stream_info_public[info] = stream->stream_info[info];
+ pthread_mutex_unlock(&stream->info_mutex);
+
+ return stream_info;
+}
+
+/* **************** Meta Info *********************** */
+
+/*
+ * Remove trailing separator chars (\n,\r,\t, space,...)
* at the end of the string
*/
-static void chomp (char *str) {
+static void __chomp(char *str) {
int i, len;
len = strlen(str);
@@ -50,58 +141,127 @@ static void chomp (char *str) {
}
}
-static int info_valid(int info) {
- if ((info >= 0) && (info < XINE_STREAM_INFO_MAX)) {
- return 1;
- } else {
- fprintf(stderr, "Error: invalid STREAM_INFO %d. Ignored.\n", info);
+/*
+ * Compare stream_info, public and private values,
+ * return 1 if it's identical, otherwise 0.
+ */
+static int __meta_info_is_identical(xine_stream_t *stream, int info) {
+
+ if((!(stream->meta_info_public[info] && stream->meta_info[info])) ||
+ ((stream->meta_info_public[info] && stream->meta_info[info]) &&
+ strcmp(stream->meta_info_public[info], stream->meta_info[info])))
return 0;
- }
+
+ return 1;
}
-static int meta_valid(int info) {
- if ((info >= 0) && (info < XINE_STREAM_INFO_MAX)) {
+/*
+ * Check if 'info' is in bounds.
+ */
+static int __meta_valid(int info) {
+ if ((info >= 0) && (info < XINE_STREAM_INFO_MAX))
return 1;
- } else {
+ else {
fprintf(stderr, "Error: invalid META_INFO %d. Ignored.\n", info);
return 0;
}
}
-void xine_set_stream_info(xine_stream_t *stream, int info, int value) {
- if(info_valid(info))
- stream->stream_info [info] = value;
-}
+/*
+ * Set private meta info to value (can be NULL).
+ */
+static void __meta_info_set_unlocked(xine_stream_t *stream, int info, const char *value) {
+ if(__meta_valid(info)) {
+
+ if(stream->meta_info[info])
+ free(stream->meta_info[info]);
-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;
+ stream->meta_info[info] = (value) ? strdup(value) : NULL;
+
+ if(stream->meta_info[info] && strlen(stream->meta_info[info]))
+ __chomp(stream->meta_info[info]);
}
}
-void xine_set_meta_info(xine_stream_t *stream, int info, const char *str) {
- if(str && meta_valid(info)) {
- xine_clear_meta_info(stream, info);
- stream->meta_info [info] = strdup(str);
- chomp(stream->meta_info [info]);
+/*
+ * Reset (nullify) private info value.
+ */
+void _x_meta_info_reset(xine_stream_t *stream, int info) {
+ pthread_mutex_lock(&stream->meta_mutex);
+ __meta_info_set_unlocked(stream, info, NULL);
+ pthread_mutex_unlock(&stream->meta_mutex);
+}
+
+/*
+ * Reset (nullify) public info value.
+ */
+static void __meta_info_public_reset_unlocked(xine_stream_t *stream, int info) {
+ if(__meta_valid(info)) {
+ if(stream->meta_info_public[info])
+ free(stream->meta_info_public[info]);
+ stream->meta_info_public[info] = NULL;
}
}
+void _x_meta_info_public_reset(xine_stream_t *stream, int info) {
+ pthread_mutex_lock(&stream->meta_mutex);
+ __meta_info_public_reset_unlocked(stream, info);
+ pthread_mutex_unlock(&stream->meta_mutex);
+}
+
+/*
+ * Set private meta info value.
+ */
+void _x_meta_info_set(xine_stream_t *stream, int info, const char *str) {
+ pthread_mutex_lock(&stream->meta_mutex);
+ if(str)
+ __meta_info_set_unlocked(stream, info, str);
+ pthread_mutex_unlock(&stream->meta_mutex);
+}
-void xine_set_metan_info(xine_stream_t *stream, int info, const char *buf,
- int len) {
- if(meta_valid(info)) {
- char *tmp;
+/*
+ * Set private meta info from buf, 'len' bytes long.
+ */
+void _x_meta_info_n_set(xine_stream_t *stream, int info, const char *buf, int len) {
+ pthread_mutex_lock(&stream->meta_mutex);
+ if(__meta_valid(info) && len) {
+ char str[len + 1];
- xine_clear_meta_info(stream, info);
+ snprintf(str, len + 1 , "%s", buf);
+ __meta_info_set_unlocked(stream, info, (const char *) &str[0]);
+ }
+ pthread_mutex_unlock(&stream->meta_mutex);
+}
+
+/*
+ * Retrieve private info value.
+ */
+const char *_x_meta_info_get(xine_stream_t *stream, int info) {
+ const char *meta_info = NULL;
+
+ pthread_mutex_lock(&stream->meta_mutex);
+ meta_info = stream->meta_info[info];
+ pthread_mutex_unlock(&stream->meta_mutex);
+
+ return meta_info;
+}
+
+/*
+ * Retrieve public info value.
+ */
+const char *_x_meta_info_get_public(xine_stream_t *stream, int info) {
+ const char *meta_info = NULL;
+
+ pthread_mutex_lock(&stream->meta_mutex);
+ meta_info = stream->meta_info_public[info];
+ if(__meta_valid(info) && (!__meta_info_is_identical(stream, info))) {
+ __meta_info_public_reset_unlocked(stream, info);
- if(len) {
- tmp = malloc(len + 1);
- xine_fast_memcpy(tmp, buf, len);
- tmp[len] = '\0';
-
- stream->meta_info [info] = tmp;
- chomp(stream->meta_info [info]);
- }
+ if(stream->meta_info[info])
+ stream->meta_info_public[info] = strdup(stream->meta_info[info]);
+
+ meta_info = stream->meta_info_public[info];
}
+ pthread_mutex_unlock(&stream->meta_mutex);
+
+ return meta_info;
}
diff --git a/src/xine-engine/info_helper.h b/src/xine-engine/info_helper.h
index f7598d661..a163823a5 100644
--- a/src/xine-engine/info_helper.h
+++ b/src/xine-engine/info_helper.h
@@ -37,7 +37,47 @@
* value the value to assign
*
*/
-void xine_set_stream_info(xine_stream_t *stream, int info, int value);
+void _x_stream_info_set(xine_stream_t *stream, int info, int value);
+
+/*
+ * reset a stream info (internal ones only)
+ *
+ * params :
+ * *stream the xine stream
+ * info meta info id (see xine.h, XINE_STREAM_INFO_*)
+ *
+ */
+void _x_stream_info_reset(xine_stream_t *stream, int info);
+
+/*
+ * reset a stream info (public ones only)
+ *
+ * params :
+ * *stream the xine stream
+ * info meta info id (see xine.h, XINE_STREAM_INFO_*)
+ *
+ */
+void _x_stream_info_public_reset(xine_stream_t *stream, int info);
+
+/*
+ * retrieve stream info (internal ones only)
+ *
+ * params :
+ * *stream the xine stream
+ * info meta info id (see xine.h, XINE_STREAM_INFO_*)
+ *
+ */
+uint32_t _x_stream_info_get(xine_stream_t *stream, int info);
+
+/*
+ * retrieve stream info (public ones only)
+ *
+ * params :
+ * *stream the xine stream
+ * info meta info id (see xine.h, XINE_STREAM_INFO_*)
+ *
+ */
+uint32_t _x_stream_info_get_public(xine_stream_t *stream, int info);
/*
* set a stream meta info
@@ -48,7 +88,7 @@ void xine_set_stream_info(xine_stream_t *stream, int info, int value);
* *str null-terminated string
*
*/
-void xine_set_meta_info(xine_stream_t *stream, int info, const char *str);
+void _x_meta_info_set(xine_stream_t *stream, int info, const char *str);
/*
* set a stream meta info
@@ -60,16 +100,46 @@ void xine_set_meta_info(xine_stream_t *stream, int info, const char *str);
* len length of the metainfo
*
*/
-void xine_set_metan_info(xine_stream_t *stream, int info, const char *buf, int len);
+void _x_meta_info_n_set(xine_stream_t *stream, int info, const char *buf, int len);
+
+/*
+ * reset a stream meta info (internal ones only)
+ *
+ * params :
+ * *stream the xine stream
+ * info meta info id (see xine.h, XINE_META_INFO_*)
+ *
+ */
+void _x_meta_info_reset(xine_stream_t *stream, int info);
+
+/*
+ * reset a stream meta info (public ones only)
+ *
+ * params :
+ * *stream the xine stream
+ * info meta info id (see xine.h, XINE_META_INFO_*)
+ *
+ */
+void _x_meta_info_public_reset(xine_stream_t *stream, int info);
+
+/*
+ * retrieve stream meta info (internal ones only)
+ *
+ * params :
+ * *stream the xine stream
+ * info meta info id (see xine.h, XINE_META_INFO_*)
+ *
+ */
+const char *_x_meta_info_get(xine_stream_t *stream, int info);
/*
- * clear a stream meta info
+ * retrieve stream meta info (public ones only)
*
* 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);
+const char *_x_meta_info_get_public(xine_stream_t *stream, int info);
#endif /* INFO_HELPER_H */
diff --git a/src/xine-engine/video_decoder.c b/src/xine-engine/video_decoder.c
index 662179b59..724683a23 100644
--- a/src/xine-engine/video_decoder.c
+++ b/src/xine-engine/video_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: video_decoder.c,v 1.138 2003/11/16 15:41:15 mroi Exp $
+ * $Id: video_decoder.c,v 1.139 2003/11/16 23:33:48 f1rmb Exp $
*
*/
@@ -277,7 +277,7 @@ static void *video_decoder_loop (void *stream_gen) {
if ( (buf->type & 0xFF000000) == BUF_VIDEO_BASE ) {
- if (stream->stream_info[XINE_STREAM_INFO_IGNORE_VIDEO])
+ if (_x_stream_info_get(stream, XINE_STREAM_INFO_IGNORE_VIDEO))
break;
xine_profiler_start_count (prof_video_decode);
@@ -300,22 +300,20 @@ static void *video_decoder_loop (void *stream_gen) {
stream->video_decoder_streamtype = streamtype;
stream->video_decoder_plugin = _x_get_video_decoder (stream, streamtype);
- stream->stream_info[XINE_STREAM_INFO_VIDEO_HANDLED] =
- (stream->video_decoder_plugin != NULL);
+ _x_stream_info_set(stream, XINE_STREAM_INFO_VIDEO_HANDLED, (stream->video_decoder_plugin != NULL));
}
if (stream->video_decoder_plugin)
stream->video_decoder_plugin->decode_data (stream->video_decoder_plugin, buf);
if (buf->type != buftype_unknown &&
- !stream->stream_info[XINE_STREAM_INFO_VIDEO_HANDLED]) {
+ !_x_stream_info_get(stream, XINE_STREAM_INFO_VIDEO_HANDLED)) {
xine_log (stream->xine, XINE_LOG_MSG,
"video_decoder: no plugin available to handle '%s'\n",
_x_buf_video_name( buf->type ) );
- if( !stream->meta_info[XINE_META_INFO_VIDEOCODEC] )
- stream->meta_info[XINE_META_INFO_VIDEOCODEC]
- = strdup (_x_buf_video_name( buf->type ));
+ if( !_x_meta_info_get(stream, XINE_META_INFO_VIDEOCODEC))
+ _x_meta_info_set(stream, XINE_META_INFO_VIDEOCODEC, _x_buf_video_name( buf->type ));
buftype_unknown = buf->type;
@@ -332,7 +330,7 @@ static void *video_decoder_loop (void *stream_gen) {
int i,j;
- if (stream->stream_info[XINE_STREAM_INFO_IGNORE_SPU])
+ if (_x_stream_info_get(stream, XINE_STREAM_INFO_IGNORE_SPU))
break;
xine_profiler_start_count (prof_spu_decode);
diff --git a/src/xine-engine/video_out.c b/src/xine-engine/video_out.c
index b7d7626f6..0a4318075 100644
--- a/src/xine-engine/video_out.c
+++ b/src/xine-engine/video_out.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: video_out.c,v 1.178 2003/11/16 15:41:15 mroi Exp $
+ * $Id: video_out.c,v 1.179 2003/11/16 23:33:48 f1rmb Exp $
*
* frame allocation / queuing / scheduling / output functions
*/
@@ -469,10 +469,10 @@ static int vo_frame_draw (vo_frame_t *img, xine_stream_t *stream) {
pthread_mutex_lock(&this->streams_lock);
for (stream = xine_list_first_content(this->streams); stream;
stream = xine_list_next_content(this->streams)) {
- stream->stream_info[XINE_STREAM_INFO_SKIPPED_FRAMES] =
- 1000 * this->num_frames_skipped / this->num_frames_delivered;
- stream->stream_info[XINE_STREAM_INFO_DISCARDED_FRAMES] =
- 1000 * this->num_frames_discarded / this->num_frames_delivered;
+ _x_stream_info_set(stream, XINE_STREAM_INFO_SKIPPED_FRAMES,
+ 1000 * this->num_frames_skipped / this->num_frames_delivered);
+ _x_stream_info_set(stream, XINE_STREAM_INFO_DISCARDED_FRAMES,
+ 1000 * this->num_frames_discarded / this->num_frames_delivered);
/* we send XINE_EVENT_DROPPED_FRAMES to frontend to warn that
* number of skipped or discarded frames is too high.
@@ -485,9 +485,9 @@ static int vo_frame_draw (vo_frame_t *img, xine_stream_t *stream) {
event.stream = stream;
event.data = &data;
event.data_length = sizeof(data);
- data.skipped_frames = stream->stream_info[XINE_STREAM_INFO_SKIPPED_FRAMES];
+ data.skipped_frames = _x_stream_info_get(stream, XINE_STREAM_INFO_SKIPPED_FRAMES);
data.skipped_threshold = this->warn_skipped_threshold * 10;
- data.discarded_frames = stream->stream_info[XINE_STREAM_INFO_DISCARDED_FRAMES];
+ data.discarded_frames = _x_stream_info_get(stream, XINE_STREAM_INFO_DISCARDED_FRAMES);
data.discarded_threshold = this->warn_discarded_threshold * 10;
xine_event_send(stream, &event);
}
@@ -769,7 +769,7 @@ static vo_frame_t *get_next_frame (vos_t *this, int64_t cur_vpts) {
if (img && !img->next) {
if (!img->stream ||
- img->stream->stream_info[XINE_STREAM_INFO_VIDEO_HAS_STILL] ||
+ _x_stream_info_get(img->stream, XINE_STREAM_INFO_VIDEO_HAS_STILL) ||
img->stream->video_fifo->size(img->stream->video_fifo) < 10) {
#ifdef LOG
diff --git a/src/xine-engine/xine.c b/src/xine-engine/xine.c
index d10004c77..0a163833d 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.266 2003/11/16 15:41:15 mroi Exp $
+ * $Id: xine.c,v 1.267 2003/11/16 23:33:48 f1rmb Exp $
*/
/*
@@ -126,7 +126,7 @@ void _x_extra_info_merge( extra_info_t *dst, extra_info_t *src ) {
}
}
-static void _x_set_speed_internal (xine_stream_t *stream, int speed) {
+static void __set_speed_internal (xine_stream_t *stream, int speed) {
stream->xine->clock->set_speed (stream->xine->clock, speed);
@@ -148,7 +148,7 @@ static void _x_set_speed_internal (xine_stream_t *stream, int speed) {
}
-static void xine_stop_internal (xine_stream_t *stream) {
+static void __stop_internal (xine_stream_t *stream) {
int finished_count_audio = 0;
int finished_count_video = 0;
@@ -161,7 +161,7 @@ static void xine_stop_internal (xine_stream_t *stream) {
}
/* make sure we're not in "paused" state */
- _x_set_speed_internal (stream, XINE_SPEED_NORMAL);
+ __set_speed_internal (stream, XINE_SPEED_NORMAL);
/* Don't change status if we're quitting */
if (stream->status != XINE_STATUS_QUIT)
@@ -190,7 +190,7 @@ static void xine_stop_internal (xine_stream_t *stream) {
* some input plugin may have changed speed by itself, we must ensure
* the engine is not paused.
*/
- _x_set_speed_internal (stream, XINE_SPEED_NORMAL);
+ __set_speed_internal (stream, XINE_SPEED_NORMAL);
_x_demux_flush_engine( stream );
lprintf ("flush engine done\n");
@@ -224,7 +224,7 @@ void xine_stop (xine_stream_t *stream) {
if (stream->video_out)
stream->video_out->set_property(stream->video_out, VO_PROP_DISCARD_FRAMES, 1);
- xine_stop_internal (stream);
+ __stop_internal (stream);
if (stream->slave && (stream->slave_affection & XINE_MASTER_SLAVE_STOP))
xine_stop(stream->slave);
@@ -239,7 +239,7 @@ void xine_stop (xine_stream_t *stream) {
}
-static void xine_close_internal (xine_stream_t *stream) {
+static void __close_internal (xine_stream_t *stream) {
int i ;
@@ -252,7 +252,7 @@ static void xine_close_internal (xine_stream_t *stream) {
}
}
- xine_stop_internal( stream );
+ __stop_internal( stream );
lprintf ("disposing demux\n");
if (stream->demux_plugin) {
@@ -274,8 +274,10 @@ static void xine_close_internal (xine_stream_t *stream) {
*/
for (i=0; i<XINE_STREAM_INFO_MAX; i++) {
- stream->stream_info[i] = 0;
- xine_clear_meta_info(stream, i);
+ _x_stream_info_reset(stream, i);
+ _x_stream_info_public_reset(stream, i);
+ _x_meta_info_reset(stream, i);
+ _x_meta_info_public_reset(stream, i);
}
}
@@ -283,12 +285,12 @@ void xine_close (xine_stream_t *stream) {
pthread_mutex_lock (&stream->frontend_lock);
- xine_close_internal (stream);
+ __close_internal (stream);
pthread_mutex_unlock (&stream->frontend_lock);
}
-static int xine_stream_rewire_audio(xine_post_out_t *output, void *data)
+static int __stream_rewire_audio(xine_post_out_t *output, void *data)
{
xine_stream_t *stream = (xine_stream_t *)output->data;
xine_audio_port_t *new_port = (xine_audio_port_t *)data;
@@ -312,7 +314,7 @@ static int xine_stream_rewire_audio(xine_post_out_t *output, void *data)
return 1;
}
-static int xine_stream_rewire_video(xine_post_out_t *output, void *data)
+static int __stream_rewire_video(xine_post_out_t *output, void *data)
{
xine_stream_t *stream = (xine_stream_t *)output->data;
xine_video_port_t *new_port = (xine_video_port_t *)data;
@@ -361,10 +363,7 @@ xine_stream_t *xine_stream_new (xine_t *this,
stream->xine = this;
stream->status = XINE_STATUS_STOP;
- for (i=0; i<XINE_STREAM_INFO_MAX; i++) {
- stream->stream_info[i] = 0;
- stream->meta_info[i] = NULL;
- }
+
stream->spu_decoder_plugin = NULL;
stream->spu_decoder_streamtype = -1;
stream->audio_out = ao;
@@ -402,6 +401,9 @@ xine_stream_t *xine_stream_new (xine_t *this,
* init mutexes and conditions
*/
+
+ pthread_mutex_init (&stream->info_mutex, NULL);
+ pthread_mutex_init (&stream->meta_mutex, NULL);
pthread_mutex_init (&stream->demux_lock, NULL);
pthread_mutex_init (&stream->frontend_lock, NULL);
pthread_mutex_init (&stream->event_queues_lock, NULL);
@@ -416,6 +418,16 @@ xine_stream_t *xine_stream_new (xine_t *this,
pthread_cond_init (&stream->next_audio_port_wired, NULL);
/*
+ * Clear meta/stream info
+ */
+ for (i = 0; i < XINE_STREAM_INFO_MAX; i++) {
+ _x_stream_info_reset(stream, i);
+ _x_stream_info_public_reset(stream, i);
+ _x_meta_info_reset(stream, i);
+ _x_meta_info_public_reset(stream, i);
+ }
+
+ /*
* event queues
*/
@@ -452,17 +464,17 @@ xine_stream_t *xine_stream_new (xine_t *this,
stream->video_source.name = "video source";
stream->video_source.type = XINE_POST_DATA_VIDEO;
stream->video_source.data = stream;
- stream->video_source.rewire = xine_stream_rewire_video;
+ stream->video_source.rewire = __stream_rewire_video;
stream->audio_source.name = "audio source";
stream->audio_source.type = XINE_POST_DATA_AUDIO;
stream->audio_source.data = stream;
- stream->audio_source.rewire = xine_stream_rewire_audio;
+ stream->audio_source.rewire = __stream_rewire_audio;
return stream;
}
-static void mrl_unescape(char *mrl) {
+static void __mrl_unescape(char *mrl) {
int i, len = strlen(mrl);
for (i = 0; i < len; i++) {
@@ -479,7 +491,7 @@ static void mrl_unescape(char *mrl) {
mrl[len] = 0;
}
-static int xine_open_internal (xine_stream_t *stream, const char *mrl) {
+static int __open_internal (xine_stream_t *stream, const char *mrl) {
const char *stream_setup;
@@ -489,7 +501,7 @@ static int xine_open_internal (xine_stream_t *stream, const char *mrl) {
* stop engine if necessary
*/
- xine_close_internal (stream);
+ __close_internal (stream);
lprintf ("engine should be stopped now\n");
@@ -515,8 +527,8 @@ static int xine_open_internal (xine_stream_t *stream, const char *mrl) {
stream->input_plugin->input_class->get_description(stream->input_plugin->input_class));
if (stream->input_plugin->input_class->eject_media)
stream->eject_class = stream->input_plugin->input_class;
- stream->meta_info[XINE_META_INFO_INPUT_PLUGIN]
- = strdup (stream->input_plugin->input_class->get_identifier (stream->input_plugin->input_class));
+ _x_meta_info_set(stream, XINE_META_INFO_INPUT_PLUGIN,
+ (stream->input_plugin->input_class->get_identifier (stream->input_plugin->input_class)));
if (!stream->input_plugin->open(stream->input_plugin)) {
xine_log (stream->xine, XINE_LOG_MSG,
@@ -562,7 +574,7 @@ static int xine_open_internal (xine_stream_t *stream, const char *mrl) {
memcpy(demux_name, tmp, strlen(tmp));
demux_name[strlen(tmp)] = '\0';
}
- mrl_unescape(demux_name);
+ __mrl_unescape(demux_name);
if (!(stream->demux_plugin = _x_find_demux_plugin_by_name(stream, demux_name, stream->input_plugin))) {
xine_log(stream->xine, XINE_LOG_MSG,
_("xine: specified demuxer %s failed to start\n"), demux_name);
@@ -572,8 +584,8 @@ static int xine_open_internal (xine_stream_t *stream, const char *mrl) {
return 0;
}
- stream->meta_info[XINE_META_INFO_SYSTEMLAYER]
- = strdup (stream->demux_plugin->demux_class->get_identifier(stream->demux_plugin->demux_class));
+ _x_meta_info_set(stream, XINE_META_INFO_SYSTEMLAYER,
+ (stream->demux_plugin->demux_class->get_identifier(stream->demux_plugin->demux_class)));
free(demux_name);
} else {
printf("xine: error while parsing mrl\n");
@@ -636,7 +648,7 @@ static int xine_open_internal (xine_stream_t *stream, const char *mrl) {
memcpy(demux_name, tmp, strlen(tmp));
demux_name[strlen(tmp)] = '\0';
}
- mrl_unescape(demux_name);
+ __mrl_unescape(demux_name);
if (!(stream->demux_plugin = _x_find_demux_plugin_last_probe(stream, demux_name, stream->input_plugin))) {
xine_log(stream->xine, XINE_LOG_MSG,
_("xine: last_probed demuxer %s failed to start\n"), demux_name);
@@ -647,8 +659,8 @@ static int xine_open_internal (xine_stream_t *stream, const char *mrl) {
}
lprintf ("demux and input plugin found\n");
- stream->meta_info[XINE_META_INFO_SYSTEMLAYER]
- = strdup (stream->demux_plugin->demux_class->get_identifier(stream->demux_plugin->demux_class));
+ _x_meta_info_set(stream, XINE_META_INFO_SYSTEMLAYER,
+ (stream->demux_plugin->demux_class->get_identifier(stream->demux_plugin->demux_class)));
free(demux_name);
} else {
printf("xine: error while parsing mrl\n");
@@ -661,7 +673,7 @@ static int xine_open_internal (xine_stream_t *stream, const char *mrl) {
if (strncasecmp(stream_setup, "novideo", 7) == 0) {
stream_setup += 7;
if (*stream_setup == ';' || *stream_setup == '\0') {
- stream->stream_info[XINE_STREAM_INFO_IGNORE_VIDEO] = 1;
+ _x_stream_info_set(stream, XINE_STREAM_INFO_IGNORE_VIDEO, 1);
} else {
printf("xine: error while parsing mrl\n");
stream->err = XINE_ERROR_MALFORMED_MRL;
@@ -674,7 +686,7 @@ static int xine_open_internal (xine_stream_t *stream, const char *mrl) {
if (strncasecmp(stream_setup, "noaudio", 7) == 0) {
stream_setup += 7;
if (*stream_setup == ';' || *stream_setup == '\0') {
- stream->stream_info[XINE_STREAM_INFO_IGNORE_AUDIO] = 1;
+ _x_stream_info_set(stream, XINE_STREAM_INFO_IGNORE_AUDIO, 1);
} else {
printf("xine: error while parsing mrl\n");
stream->err = XINE_ERROR_MALFORMED_MRL;
@@ -687,7 +699,7 @@ static int xine_open_internal (xine_stream_t *stream, const char *mrl) {
if (strncasecmp(stream_setup, "nospu", 5) == 0) {
stream_setup += 5;
if (*stream_setup == ';' || *stream_setup == '\0') {
- stream->stream_info[XINE_STREAM_INFO_IGNORE_SPU] = 1;
+ _x_stream_info_set(stream, XINE_STREAM_INFO_IGNORE_SPU, 1);
} else {
printf("xine: error while parsing mrl\n");
stream->err = XINE_ERROR_MALFORMED_MRL;
@@ -711,7 +723,7 @@ static int xine_open_internal (xine_stream_t *stream, const char *mrl) {
memcpy(volume, tmp, strlen(tmp));
volume[strlen(tmp)] = '\0';
}
- mrl_unescape(volume);
+ __mrl_unescape(volume);
xine_set_param(stream, XINE_PARAM_AUDIO_VOLUME, atoi(volume));
free(volume);
} else {
@@ -736,7 +748,7 @@ static int xine_open_internal (xine_stream_t *stream, const char *mrl) {
memcpy(compression, tmp, strlen(tmp));
compression[strlen(tmp)] = '\0';
}
- mrl_unescape(compression);
+ __mrl_unescape(compression);
xine_set_param(stream, XINE_PARAM_AUDIO_COMPR_LEVEL, atoi(compression));
free(compression);
} else {
@@ -761,7 +773,7 @@ static int xine_open_internal (xine_stream_t *stream, const char *mrl) {
memcpy(subtitle_mrl, tmp, strlen(tmp));
subtitle_mrl[strlen(tmp)] = '\0';
}
- mrl_unescape(subtitle_mrl);
+ __mrl_unescape(subtitle_mrl);
stream->slave = xine_stream_new (stream->xine, NULL, stream->video_out );
stream->slave_affection = XINE_MASTER_SLAVE_PLAY | XINE_MASTER_SLAVE_STOP;
if( xine_open( stream->slave, subtitle_mrl ) ) {
@@ -796,7 +808,7 @@ static int xine_open_internal (xine_stream_t *stream, const char *mrl) {
memcpy(config_entry, tmp, strlen(tmp));
config_entry[strlen(tmp)] = '\0';
}
- mrl_unescape(config_entry);
+ __mrl_unescape(config_entry);
retval = _x_config_change_opt(stream->xine->config, config_entry);
if (retval <= 0) {
if (retval == 0) {
@@ -839,8 +851,8 @@ static int xine_open_internal (xine_stream_t *stream, const char *mrl) {
}
lprintf ("demux and input plugin found\n");
- stream->meta_info[XINE_META_INFO_SYSTEMLAYER]
- = strdup (stream->demux_plugin->demux_class->get_identifier(stream->demux_plugin->demux_class));
+ _x_meta_info_set(stream, XINE_META_INFO_SYSTEMLAYER,
+ (stream->demux_plugin->demux_class->get_identifier(stream->demux_plugin->demux_class)));
}
xine_log (stream->xine, XINE_LOG_MSG,
@@ -854,8 +866,8 @@ static int xine_open_internal (xine_stream_t *stream, const char *mrl) {
/* assume handled for now. we will only know for sure after trying
* to init decoders (which should happen when headers are sent)
*/
- stream->stream_info[XINE_STREAM_INFO_VIDEO_HANDLED] = 1;
- stream->stream_info[XINE_STREAM_INFO_AUDIO_HANDLED] = 1;
+ _x_stream_info_set(stream, XINE_STREAM_INFO_VIDEO_HANDLED, 1);
+ _x_stream_info_set(stream, XINE_STREAM_INFO_AUDIO_HANDLED, 1);
/*
* send and decode headers
@@ -902,7 +914,7 @@ int xine_open (xine_stream_t *stream, const char *mrl) {
lprintf ("open MRL:%s\n", mrl);
- ret = xine_open_internal (stream, mrl);
+ ret = __open_internal (stream, mrl);
pthread_mutex_unlock (&stream->frontend_lock);
@@ -910,7 +922,7 @@ int xine_open (xine_stream_t *stream, const char *mrl) {
}
-static int xine_play_internal (xine_stream_t *stream, int start_pos, int start_time) {
+static int __play_internal (xine_stream_t *stream, int start_pos, int start_time) {
double share ;
off_t pos, len;
@@ -931,7 +943,7 @@ static int xine_play_internal (xine_stream_t *stream, int start_pos, int start_t
/* set normal speed */
if (stream->xine->clock->speed != XINE_SPEED_NORMAL)
- _x_set_speed_internal (stream, XINE_SPEED_NORMAL);
+ __set_speed_internal (stream, XINE_SPEED_NORMAL);
/* discard audio/video buffers to get engine going and take the lock faster */
if (stream->audio_out)
@@ -947,7 +959,7 @@ static int xine_play_internal (xine_stream_t *stream, int start_pos, int start_t
* the engine is not paused.
*/
if (stream->xine->clock->speed != XINE_SPEED_NORMAL)
- _x_set_speed_internal (stream, XINE_SPEED_NORMAL);
+ __set_speed_internal (stream, XINE_SPEED_NORMAL);
/*
* start/seek demux
@@ -1017,7 +1029,7 @@ static int xine_play_internal (xine_stream_t *stream, int start_pos, int start_t
}
pthread_mutex_unlock (&stream->first_frame_lock);
- xprintf (stream->xine, XINE_VERBOSITY_DEBUG, "xine_play_internal ...done\n");
+ xprintf (stream->xine, XINE_VERBOSITY_DEBUG, "__play_internal ...done\n");
return 1;
}
@@ -1028,7 +1040,7 @@ int xine_play (xine_stream_t *stream, int start_pos, int start_time) {
pthread_mutex_lock (&stream->frontend_lock);
- ret = xine_play_internal (stream, start_pos, start_time);
+ ret = __play_internal (stream, start_pos, start_time);
if( stream->slave && (stream->slave_affection & XINE_MASTER_SLAVE_PLAY) )
xine_play (stream->slave, start_pos, start_time);
@@ -1086,6 +1098,8 @@ void xine_dispose (xine_stream_t *stream) {
stream->osd_renderer->close( stream->osd_renderer );
stream->video_fifo->dispose (stream->video_fifo);
+ pthread_mutex_destroy (&stream->info_mutex);
+ pthread_mutex_destroy (&stream->meta_mutex);
pthread_mutex_destroy (&stream->frontend_lock);
pthread_mutex_destroy (&stream->counter_lock);
pthread_mutex_destroy (&stream->event_queues_lock);
@@ -1226,13 +1240,13 @@ int xine_engine_get_param(xine_t *this, int param) {
return -1;
}
-static void config_demux_strategy_cb (void *this_gen, xine_cfg_entry_t *entry) {
+static void __config_demux_strategy_cb (void *this_gen, xine_cfg_entry_t *entry) {
xine_t *this = (xine_t *)this_gen;
this->demux_strategy = entry->num_value;
}
-static void config_save_cb (void *this_gen, xine_cfg_entry_t *entry) {
+static void __config_save_cb (void *this_gen, xine_cfg_entry_t *entry) {
xine_t *this = (xine_t *)this_gen;
char *homedir_trail_slash = strcat(strdup(xine_get_homedir()), "/");
@@ -1284,7 +1298,7 @@ void xine_init (xine_t *this) {
demux_strategies,
_("Media format detection strategy"),
NULL,
- 10, config_demux_strategy_cb, this);
+ 10, __config_demux_strategy_cb, this);
/*
* save directory
@@ -1294,7 +1308,7 @@ void xine_init (xine_t *this) {
"misc.save_dir", "",
_("Path for saving streams"),
_("Streams will be saved only into this directory"),
- XINE_CONFIG_SECURITY, config_save_cb, this);
+ XINE_CONFIG_SECURITY, __config_save_cb, this);
/*
* keep track of all opened streams
@@ -1335,7 +1349,7 @@ void _x_select_spu_channel (xine_stream_t *stream, int channel) {
pthread_mutex_unlock (&stream->frontend_lock);
}
-static int xine_get_current_position (xine_stream_t *stream) {
+static int __get_current_position (xine_stream_t *stream) {
off_t len;
double share;
@@ -1349,7 +1363,7 @@ static int xine_get_current_position (xine_stream_t *stream) {
}
if ( (!stream->video_decoder_plugin && !stream->audio_decoder_plugin) ) {
- if( stream->stream_info[XINE_STREAM_INFO_HAS_VIDEO] )
+ if( _x_stream_info_get(stream, XINE_STREAM_INFO_HAS_VIDEO) )
_x_extra_info_merge( stream->current_extra_info, stream->video_decoder_extra_info );
else
_x_extra_info_merge( stream->current_extra_info, stream->audio_decoder_extra_info );
@@ -1400,7 +1414,7 @@ void _x_set_speed (xine_stream_t *stream, int speed) {
speed = XINE_SPEED_FAST_4;
xprintf (stream->xine, XINE_VERBOSITY_DEBUG, "set_speed %d\n", speed);
- _x_set_speed_internal (stream, speed);
+ __set_speed_internal (stream, speed);
pthread_mutex_unlock (&stream->frontend_lock);
}
@@ -1410,7 +1424,7 @@ void _x_set_speed (xine_stream_t *stream, int speed) {
* time measurement / seek
*/
-static int xine_get_stream_length (xine_stream_t *stream) {
+static int __get_stream_length (xine_stream_t *stream) {
/* pthread_mutex_lock( &stream->demux_lock ); */
@@ -1429,7 +1443,7 @@ static int xine_get_stream_length (xine_stream_t *stream) {
int xine_get_pos_length (xine_stream_t *stream, int *pos_stream,
int *pos_time, int *length_time) {
- int pos = xine_get_current_position (stream); /* force updating extra_info */
+ int pos = __get_current_position (stream); /* force updating extra_info */
if (pos == -1)
return 0;
@@ -1442,7 +1456,7 @@ int xine_get_pos_length (xine_stream_t *stream, int *pos_stream,
pthread_mutex_unlock( &stream->current_extra_info_lock );
}
if (length_time)
- *length_time = xine_get_stream_length (stream);
+ *length_time = __get_stream_length (stream);
return 1;
}
diff --git a/src/xine-engine/xine_interface.c b/src/xine-engine/xine_interface.c
index 304c7baec..de12bafc7 100644
--- a/src/xine-engine/xine_interface.c
+++ b/src/xine-engine/xine_interface.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_interface.c,v 1.66 2003/11/16 15:41:15 mroi Exp $
+ * $Id: xine_interface.c,v 1.67 2003/11/16 23:33:49 f1rmb Exp $
*
* convenience/abstraction layer, functions to implement
* libxine's public interface
@@ -166,8 +166,7 @@ int xine_config_register_bool (xine_t *self,
* and return status
*/
-static int xine_config_get_current_entry (xine_t *this,
- xine_cfg_entry_t *entry) {
+static int __config_get_current_entry (xine_t *this, xine_cfg_entry_t *entry) {
config_values_t *config = this->config;
@@ -206,7 +205,7 @@ int xine_config_get_first_entry (xine_t *this, xine_cfg_entry_t *entry) {
/* do not hand out unclaimed entries */
while (config->cur && config->cur->type == CONFIG_TYPE_UNKNOWN)
config->cur = config->cur->next;
- result = xine_config_get_current_entry (this, entry);
+ result = __config_get_current_entry (this, entry);
pthread_mutex_unlock(&config->config_lock);
return result;
@@ -232,7 +231,7 @@ int xine_config_get_next_entry (xine_t *this, xine_cfg_entry_t *entry) {
do {
config->cur = config->cur->next;
} while (config->cur && config->cur->type == CONFIG_TYPE_UNKNOWN);
- result = xine_config_get_current_entry (this, entry);
+ result = __config_get_current_entry (this, entry);
pthread_mutex_unlock(&config->config_lock);
return result;
@@ -253,7 +252,7 @@ int xine_config_lookup_entry (xine_t *this, const char *key,
/* do not hand out unclaimed entries */
if (config->cur && config->cur->type == CONFIG_TYPE_UNKNOWN)
config->cur = NULL;
- result = xine_config_get_current_entry (this, entry);
+ result = __config_get_current_entry (this, entry);
pthread_mutex_unlock(&config->config_lock);
return result;
@@ -305,13 +304,15 @@ void xine_config_reset (xine_t *this) {
config->last = NULL;
pthread_mutex_unlock(&config->config_lock);
}
-
+
+#ifndef XINE_DISABLE_DEPRECATED_FEATURES
int xine_gui_send_vo_data (xine_stream_t *stream,
int type, void *data) {
return stream->video_driver->gui_data_exchange (stream->video_driver,
type, data);
}
+#endif
int xine_port_send_gui_data (xine_video_port_t *vo,
int type, void *data) {
@@ -413,15 +414,15 @@ void xine_set_param (xine_stream_t *stream, int param, int value) {
break;
case XINE_PARAM_IGNORE_VIDEO:
- stream->stream_info[XINE_STREAM_INFO_IGNORE_VIDEO] = value;
+ _x_stream_info_set(stream, XINE_STREAM_INFO_IGNORE_VIDEO, value);
break;
case XINE_PARAM_IGNORE_AUDIO:
- stream->stream_info[XINE_STREAM_INFO_IGNORE_AUDIO] = value;
+ _x_stream_info_set(stream, XINE_STREAM_INFO_IGNORE_AUDIO, value);
break;
case XINE_PARAM_IGNORE_SPU:
- stream->stream_info[XINE_STREAM_INFO_IGNORE_SPU] = value;
+ _x_stream_info_set(stream, XINE_STREAM_INFO_IGNORE_SPU, value);
break;
case XINE_PARAM_METRONOM_PREBUFFER:
@@ -442,7 +443,7 @@ void xine_set_param (xine_stream_t *stream, int param, int value) {
}
}
-int xine_get_param (xine_stream_t *stream, int param) {
+int xine_get_param (xine_stream_t *stream, int param) {
switch (param) {
case XINE_PARAM_SPEED:
@@ -502,7 +503,7 @@ int xine_get_param (xine_stream_t *stream, int param) {
case XINE_PARAM_VERBOSITY:
return stream->xine->verbosity;
-
+
case XINE_PARAM_VO_HUE:
case XINE_PARAM_VO_SATURATION:
case XINE_PARAM_VO_CONTRAST:
@@ -516,13 +517,13 @@ int xine_get_param (xine_stream_t *stream, int param) {
return stream->video_out->get_property(stream->video_out, param);
case XINE_PARAM_IGNORE_VIDEO:
- return stream->stream_info[XINE_STREAM_INFO_IGNORE_VIDEO];
+ return _x_stream_info_get_public(stream, XINE_STREAM_INFO_IGNORE_VIDEO);
case XINE_PARAM_IGNORE_AUDIO:
- return stream->stream_info[XINE_STREAM_INFO_IGNORE_AUDIO];
+ return _x_stream_info_get_public(stream, XINE_STREAM_INFO_IGNORE_AUDIO);
case XINE_PARAM_IGNORE_SPU:
- return stream->stream_info[XINE_STREAM_INFO_IGNORE_SPU];
+ return _x_stream_info_get_public(stream, XINE_STREAM_INFO_IGNORE_SPU);
case XINE_PARAM_METRONOM_PREBUFFER:
return stream->metronom->get_option(stream->metronom, METRONOM_PREBUFFER);
@@ -577,7 +578,7 @@ uint32_t xine_get_stream_info (xine_stream_t *stream, int info) {
case XINE_STREAM_INFO_IGNORE_AUDIO:
case XINE_STREAM_INFO_IGNORE_SPU:
case XINE_STREAM_INFO_VIDEO_HAS_STILL:
- return stream->stream_info[info];
+ return _x_stream_info_get_public(stream, info);
case XINE_STREAM_INFO_MAX_AUDIO_CHANNEL:
return stream->audio_track_map_entries;
@@ -586,15 +587,13 @@ uint32_t xine_get_stream_info (xine_stream_t *stream, int info) {
return stream->spu_track_map_entries;
default:
- printf ("xine_interface: error, unknown stream info (%d) requested\n",
- info);
+ fprintf (stderr, "xine_interface: error, unknown stream info (%d) requested\n", info);
}
return 0;
}
const char *xine_get_meta_info (xine_stream_t *stream, int info) {
-
- return stream->meta_info[info];
+ return _x_meta_info_get_public(stream, info);
}
xine_osd_t *xine_osd_new(xine_stream_t *stream, int x, int y, int width, int height) {
diff --git a/src/xine-engine/xine_internal.h b/src/xine-engine/xine_internal.h
index 800180a17..95a41398c 100644
--- a/src/xine-engine/xine_internal.h
+++ b/src/xine-engine/xine_internal.h
@@ -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_internal.h,v 1.148 2003/11/15 20:43:12 mroi Exp $
+ * $Id: xine_internal.h,v 1.149 2003/11/16 23:33:49 f1rmb Exp $
*
*/
@@ -220,8 +220,13 @@ struct xine_stream_s {
pthread_mutex_t frontend_lock;
/* stream meta information */
+ /* NEVER access directly, use helpers (see info_helper.c) */
+ pthread_mutex_t info_mutex;
+ int stream_info_public[XINE_STREAM_INFO_MAX];
int stream_info[XINE_STREAM_INFO_MAX];
- char *meta_info [XINE_STREAM_INFO_MAX];
+ pthread_mutex_t meta_mutex;
+ char *meta_info_public[XINE_STREAM_INFO_MAX];
+ char *meta_info[XINE_STREAM_INFO_MAX];
/* seeking slowdown */
int first_frame_flag;