summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/demuxers/demux_avi.c13
-rw-r--r--src/demuxers/demux_cdda.c15
-rw-r--r--src/demuxers/demux_eawve.c12
-rw-r--r--src/demuxers/demux_elem.c6
-rw-r--r--src/demuxers/demux_film.c28
-rw-r--r--src/demuxers/demux_fli.c14
-rw-r--r--src/demuxers/demux_idcin.c28
-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.c18
-rw-r--r--src/demuxers/demux_nsf.c32
-rw-r--r--src/demuxers/demux_nsv.c14
-rw-r--r--src/demuxers/demux_ogg.c6
-rw-r--r--src/demuxers/demux_pva.c6
-rw-r--r--src/demuxers/demux_qt.c68
-rw-r--r--src/demuxers/demux_rawdv.c12
20 files changed, 163 insertions, 159 deletions
diff --git a/src/demuxers/demux_avi.c b/src/demuxers/demux_avi.c
index 0737edd71..8b3b9d645 100644
--- a/src/demuxers/demux_avi.c
+++ b/src/demuxers/demux_avi.c
@@ -19,7 +19,7 @@
*/
/*
- * $Id: demux_avi.c,v 1.169 2003/10/07 19:42:00 hadess Exp $
+ * $Id: demux_avi.c,v 1.170 2003/10/30 00:49:07 tmattern Exp $
*
* demultiplexer for avi streams
*
@@ -1477,8 +1477,8 @@ static void demux_avi_send_headers (demux_plugin_t *this_gen) {
this->status = DEMUX_OK;
- this->stream->stream_info[XINE_STREAM_INFO_VIDEO_WIDTH] = this->avi->width;
- this->stream->stream_info[XINE_STREAM_INFO_VIDEO_HEIGHT] = this->avi->height;
+ 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);
if (this->stream->xine->verbosity >= XINE_VERBOSITY_DEBUG) {
for (i=0; i < this->avi->n_audio; i++)
@@ -1503,8 +1503,8 @@ static void demux_avi_send_headers (demux_plugin_t *this_gen) {
(int)this->avi->audio[i]->wavex->wFormatTag);
}
- this->stream->stream_info[XINE_STREAM_INFO_HAS_VIDEO] = 1;
- this->stream->stream_info[XINE_STREAM_INFO_HAS_AUDIO] = !this->no_audio;
+ 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);
/*
* send start/header buffers
@@ -1530,7 +1530,8 @@ static void demux_avi_send_headers (demux_plugin_t *this_gen) {
} else
this->avi->video_type = fourcc_to_buf_video(this->avi->compressor);
- this->stream->stream_info[XINE_STREAM_INFO_VIDEO_FOURCC] = this->avi->compressor;
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_FOURCC,
+ this->avi->compressor);
if (!this->avi->video_type) {
xprintf (this->stream->xine, XINE_VERBOSITY_DEBUG,
diff --git a/src/demuxers/demux_cdda.c b/src/demuxers/demux_cdda.c
index db79ca2cd..ce71b97ce 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.13 2003/09/04 17:46:00 miguelfreitas Exp $
+ * $Id: demux_cdda.c,v 1.14 2003/10/30 00:49:07 tmattern Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -112,12 +112,13 @@ static void demux_cdda_send_headers(demux_plugin_t *this_gen) {
this->status = DEMUX_OK;
/* load stream information */
- this->stream->stream_info[XINE_STREAM_INFO_SEEKABLE] = INPUT_IS_SEEKABLE(this->input);
- this->stream->stream_info[XINE_STREAM_INFO_HAS_VIDEO] = 0;
- this->stream->stream_info[XINE_STREAM_INFO_HAS_AUDIO] = 1;
- this->stream->stream_info[XINE_STREAM_INFO_AUDIO_CHANNELS] = 2;
- this->stream->stream_info[XINE_STREAM_INFO_AUDIO_SAMPLERATE] = 44100;
- this->stream->stream_info[XINE_STREAM_INFO_AUDIO_BITS] = 16;
+ xine_set_stream_info(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);
/* send start buffers */
xine_demux_control_start(this->stream);
diff --git a/src/demuxers/demux_eawve.c b/src/demuxers/demux_eawve.c
index f2cbf79dd..be0c89786 100644
--- a/src/demuxers/demux_eawve.c
+++ b/src/demuxers/demux_eawve.c
@@ -19,7 +19,7 @@
*/
/*
- * $Id: demux_eawve.c,v 1.20 2003/08/25 21:51:38 f1rmb Exp $
+ * $Id: demux_eawve.c,v 1.21 2003/10/30 00:49:07 tmattern Exp $
*
* demux_eawve.c, Demuxer plugin for Electronic Arts' WVE file format
*
@@ -287,11 +287,11 @@ static void demux_eawve_send_headers(demux_plugin_t *this_gen){
this->status = DEMUX_OK;
/* load stream information */
- this->stream->stream_info[XINE_STREAM_INFO_HAS_VIDEO] = 0;
- this->stream->stream_info[XINE_STREAM_INFO_HAS_AUDIO] = 1;
- this->stream->stream_info[XINE_STREAM_INFO_AUDIO_CHANNELS] = 2;
- this->stream->stream_info[XINE_STREAM_INFO_AUDIO_SAMPLERATE] = 22050;
- this->stream->stream_info[XINE_STREAM_INFO_AUDIO_BITS] = 16;
+ 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);
/* send start buffers */
xine_demux_control_start(this->stream);
diff --git a/src/demuxers/demux_elem.c b/src/demuxers/demux_elem.c
index 9100ebdc6..1cf6bb42f 100644
--- a/src/demuxers/demux_elem.c
+++ b/src/demuxers/demux_elem.c
@@ -19,7 +19,7 @@
*/
/*
- * $Id: demux_elem.c,v 1.75 2003/08/10 16:03:21 miguelfreitas Exp $
+ * $Id: demux_elem.c,v 1.76 2003/10/30 00:49:07 tmattern 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;
- this->stream->stream_info[XINE_STREAM_INFO_HAS_VIDEO] = 1;
- this->stream->stream_info[XINE_STREAM_INFO_HAS_AUDIO] = 0;
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 1);
+ xine_set_stream_info(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 afc6077d5..e207fefdb 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.65 2003/08/25 21:51:38 f1rmb Exp $
+ * $Id: demux_film.c,v 1.66 2003/10/30 00:49:07 tmattern Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -665,19 +665,19 @@ static void demux_film_send_headers(demux_plugin_t *this_gen) {
this->status = DEMUX_OK;
/* load stream information */
- this->stream->stream_info[XINE_STREAM_INFO_HAS_VIDEO] =
- (this->video_type) ? 1 : 0;
- this->stream->stream_info[XINE_STREAM_INFO_HAS_AUDIO] =
- (this->audio_type) ? 1 : 0;
- this->stream->stream_info[XINE_STREAM_INFO_VIDEO_WIDTH] = this->bih.biWidth;
- this->stream->stream_info[XINE_STREAM_INFO_VIDEO_HEIGHT] = this->bih.biHeight;
- this->stream->stream_info[XINE_STREAM_INFO_VIDEO_FOURCC] = this->video_codec;
- this->stream->stream_info[XINE_STREAM_INFO_AUDIO_CHANNELS] =
- this->audio_channels;
- this->stream->stream_info[XINE_STREAM_INFO_AUDIO_SAMPLERATE] =
- this->sample_rate;
- this->stream->stream_info[XINE_STREAM_INFO_AUDIO_BITS] =
- this->audio_bits;
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO,
+ (this->video_type) ? 1 : 0);
+ xine_set_stream_info(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,
+ this->audio_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->audio_bits);
/* send start buffers */
xine_demux_control_start(this->stream);
diff --git a/src/demuxers/demux_fli.c b/src/demuxers/demux_fli.c
index 4d91a21da..1fa1f45f9 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.44 2003/07/25 21:02:05 miguelfreitas Exp $
+ * $Id: demux_fli.c,v 1.45 2003/10/30 00:49:07 tmattern Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -227,12 +227,12 @@ static void demux_fli_send_headers(demux_plugin_t *this_gen) {
this->status = DEMUX_OK;
/* load stream information */
- this->stream->stream_info[XINE_STREAM_INFO_HAS_VIDEO] = 1;
- this->stream->stream_info[XINE_STREAM_INFO_HAS_AUDIO] = 0;
- this->stream->stream_info[XINE_STREAM_INFO_VIDEO_WIDTH] = this->width;
- this->stream->stream_info[XINE_STREAM_INFO_VIDEO_HEIGHT] = this->height;
- this->stream->stream_info[XINE_STREAM_INFO_FRAME_DURATION] =
- this->frame_pts_inc;
+ 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,
+ this->frame_pts_inc);
/* send start buffers */
xine_demux_control_start(this->stream);
diff --git a/src/demuxers/demux_idcin.c b/src/demuxers/demux_idcin.c
index 2fa723d11..c539d4a4a 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.44 2003/10/24 02:57:58 tmmm Exp $
+ * $Id: demux_idcin.c,v 1.45 2003/10/30 00:49:07 tmattern Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -334,19 +334,19 @@ static int open_idcin_file(demux_idcin_t *this) {
return 0;
/* load stream information */
- this->stream->stream_info[XINE_STREAM_INFO_HAS_VIDEO] = 1;
- this->stream->stream_info[XINE_STREAM_INFO_HAS_AUDIO] =
- (this->wave.nChannels) ? 1 : 0;
- this->stream->stream_info[XINE_STREAM_INFO_VIDEO_WIDTH] =
- bih->biWidth;
- this->stream->stream_info[XINE_STREAM_INFO_VIDEO_HEIGHT] =
- bih->biHeight;
- this->stream->stream_info[XINE_STREAM_INFO_AUDIO_CHANNELS] =
- this->wave.nChannels;
- this->stream->stream_info[XINE_STREAM_INFO_AUDIO_SAMPLERATE] =
- this->wave.nSamplesPerSec;
- this->stream->stream_info[XINE_STREAM_INFO_AUDIO_BITS] =
- this->wave.wBitsPerSample;
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 1);
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO,
+ (this->wave.nChannels) ? 1 : 0);
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_WIDTH,
+ bih->biWidth);
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_HEIGHT,
+ bih->biHeight);
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_CHANNELS,
+ this->wave.nChannels);
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE,
+ this->wave.nSamplesPerSec);
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_BITS,
+ this->wave.wBitsPerSample);
this->filesize = this->input->get_length(this->input) -
IDCIN_HEADER_SIZE - HUFFMAN_TABLE_SIZE;
diff --git a/src/demuxers/demux_image.c b/src/demuxers/demux_image.c
index 956d4aa05..db051f4ea 100644
--- a/src/demuxers/demux_image.c
+++ b/src/demuxers/demux_image.c
@@ -19,7 +19,7 @@
*/
/*
- * $Id: demux_image.c,v 1.7 2003/10/22 16:52:47 mroi Exp $
+ * $Id: demux_image.c,v 1.8 2003/10/30 00:49:07 tmattern Exp $
*
* image dummy demultiplexer
*/
@@ -90,8 +90,8 @@ static void demux_image_send_headers (demux_plugin_t *this_gen) {
this->status = DEMUX_OK;
- this->stream->stream_info[XINE_STREAM_INFO_HAS_VIDEO] = 1;
- this->stream->stream_info[XINE_STREAM_INFO_HAS_AUDIO] = 0;
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 1);
+ xine_set_stream_info(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 e08d82ca5..051a2a832 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.14 2003/10/24 04:44:43 tmmm Exp $
+ * $Id: demux_ipmovie.c,v 1.15 2003/10/30 00:49:07 tmattern 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 */
- this->stream->stream_info[XINE_STREAM_INFO_HAS_VIDEO] = 1;
- this->stream->stream_info[XINE_STREAM_INFO_HAS_AUDIO] = 0;
- this->stream->stream_info[XINE_STREAM_INFO_VIDEO_WIDTH] = this->bih.biWidth;
- this->stream->stream_info[XINE_STREAM_INFO_VIDEO_HEIGHT] = this->bih.biHeight;
+ 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);
/* send start buffers */
xine_demux_control_start(this->stream);
diff --git a/src/demuxers/demux_mng.c b/src/demuxers/demux_mng.c
index 6c0858ab6..66364d2a0 100644
--- a/src/demuxers/demux_mng.c
+++ b/src/demuxers/demux_mng.c
@@ -19,7 +19,7 @@
*/
/*
- * $Id: demux_mng.c,v 1.11 2003/07/25 21:02:05 miguelfreitas Exp $
+ * $Id: demux_mng.c,v 1.12 2003/10/30 00:49:07 tmattern 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 */
- this->stream->stream_info[XINE_STREAM_INFO_HAS_VIDEO] = 1;
- this->stream->stream_info[XINE_STREAM_INFO_HAS_AUDIO] = 0;
- this->stream->stream_info[XINE_STREAM_INFO_VIDEO_WIDTH] = this->bih.biWidth;
- this->stream->stream_info[XINE_STREAM_INFO_VIDEO_HEIGHT] = this->bih.biHeight;
+ 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);
/* send start buffers */
xine_demux_control_start(this->stream);
diff --git a/src/demuxers/demux_mpeg.c b/src/demuxers/demux_mpeg.c
index c729b597b..08cbf9795 100644
--- a/src/demuxers/demux_mpeg.c
+++ b/src/demuxers/demux_mpeg.c
@@ -19,7 +19,7 @@
*/
/*
- * $Id: demux_mpeg.c,v 1.124 2003/10/07 14:58:59 mroi Exp $
+ * $Id: demux_mpeg.c,v 1.125 2003/10/30 00:49:07 tmattern Exp $
*
* demultiplexer for mpeg 1/2 program streams
* reads streams of variable blocksizes
@@ -894,8 +894,8 @@ static void demux_mpeg_send_headers (demux_plugin_t *this_gen) {
* send preview buffers for stream/meta_info
*/
- this->stream->stream_info[XINE_STREAM_INFO_HAS_VIDEO] = 1;
- this->stream->stream_info[XINE_STREAM_INFO_HAS_AUDIO] = 1;
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 1);
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1);
this->preview_mode = 1;
@@ -916,7 +916,7 @@ static void demux_mpeg_send_headers (demux_plugin_t *this_gen) {
this->status = DEMUX_OK ;
- this->stream->stream_info[XINE_STREAM_INFO_BITRATE] = this->rate * 50 * 8;
+ xine_set_stream_info(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 324957413..63ed3b929 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.195 2003/09/02 18:59:06 miguelfreitas Exp $
+ * $Id: demux_mpeg_block.c,v 1.196 2003/10/30 00:49:07 tmattern Exp $
*
* demultiplexer for mpeg 1/2 program streams
* used with fixed blocksize devices (like dvd/vcd)
@@ -1188,9 +1188,9 @@ static void demux_mpeg_block_send_headers (demux_plugin_t *this_gen) {
this->status = DEMUX_OK;
- this->stream->stream_info[XINE_STREAM_INFO_HAS_VIDEO] = 1;
- this->stream->stream_info[XINE_STREAM_INFO_HAS_AUDIO] = 1;
- this->stream->stream_info[XINE_STREAM_INFO_BITRATE] = this->rate * 50 * 8;
+ 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);
}
diff --git a/src/demuxers/demux_mpeg_pes.c b/src/demuxers/demux_mpeg_pes.c
index 980f187f6..a2b168b35 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.12 2003/10/12 13:40:43 jcdutton Exp $
+ * $Id: demux_mpeg_pes.c,v 1.13 2003/10/30 00:49:07 tmattern Exp $
*
* demultiplexer for mpeg 2 PES (Packetized Elementary Streams)
* reads streams of variable blocksizes
@@ -1236,9 +1236,9 @@ static void demux_mpeg_pes_send_headers (demux_plugin_t *this_gen) {
this->status = DEMUX_OK;
- this->stream->stream_info[XINE_STREAM_INFO_HAS_VIDEO] = 1;
- this->stream->stream_info[XINE_STREAM_INFO_HAS_AUDIO] = 1;
- this->stream->stream_info[XINE_STREAM_INFO_BITRATE] = this->rate * 50 * 8;
+ 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);
}
diff --git a/src/demuxers/demux_mpgaudio.c b/src/demuxers/demux_mpgaudio.c
index c59993b14..530704140 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.119 2003/10/27 23:23:29 tmattern Exp $
+ * $Id: demux_mpgaudio.c,v 1.120 2003/10/30 00:49:07 tmattern Exp $
*
* demultiplexer for mpeg audio (i.e. mp3) streams
*
@@ -803,8 +803,8 @@ static void demux_mpgaudio_send_headers (demux_plugin_t *this_gen) {
this->status = DEMUX_OK;
this->check_xing = 1;
- this->stream->stream_info[XINE_STREAM_INFO_HAS_VIDEO] = 0;
- this->stream->stream_info[XINE_STREAM_INFO_HAS_AUDIO] = 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);
/* 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) {
@@ -833,17 +833,17 @@ static void demux_mpgaudio_send_headers (demux_plugin_t *this_gen) {
}
if (this->is_vbr)
- this->stream->stream_info[XINE_STREAM_INFO_BITRATE] = this->abr;
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_BITRATE, this->abr);
else
- this->stream->stream_info[XINE_STREAM_INFO_BITRATE] = this->br;
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_BITRATE, this->br);
if (this->cur_frame.samplerate) {
if (this->cur_frame.layer == 1)
- this->stream->stream_info[XINE_STREAM_INFO_FRAME_DURATION] =
- 384000 / this->cur_frame.samplerate;
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_FRAME_DURATION,
+ 384000 / this->cur_frame.samplerate);
else
- this->stream->stream_info[XINE_STREAM_INFO_FRAME_DURATION] =
- 1152000 / this->cur_frame.samplerate;
+ xine_set_stream_info(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 5aa75b9d1..255909a14 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.15 2003/08/25 21:51:38 f1rmb Exp $
+ * $Id: demux_nsf.c,v 1.16 2003/10/30 00:49:07 tmattern Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -162,9 +162,9 @@ static int demux_nsf_send_chunk(demux_plugin_t *this_gen) {
this->new_song = 0;
sprintf(title, "%s, song %d/%d",
this->title, this->current_song, this->total_songs);
- if (this->stream->meta_info[XINE_META_INFO_TITLE])
- free (this->stream->meta_info[XINE_META_INFO_TITLE]);
- this->stream->meta_info[XINE_META_INFO_TITLE] = strdup(title);
+
+ xine_set_meta_info(this->stream, XINE_META_INFO_TITLE, title);
+
xine_demux_control_newpts(this->stream, this->current_pts, 0);
} else
@@ -195,19 +195,19 @@ static void demux_nsf_send_headers(demux_plugin_t *this_gen) {
this->status = DEMUX_OK;
/* load stream information */
- this->stream->stream_info[XINE_STREAM_INFO_HAS_VIDEO] = 0;
- this->stream->stream_info[XINE_STREAM_INFO_HAS_AUDIO] = 1;
- this->stream->stream_info[XINE_STREAM_INFO_AUDIO_CHANNELS] =
- NSF_CHANNELS;
- this->stream->stream_info[XINE_STREAM_INFO_AUDIO_SAMPLERATE] =
- NSF_SAMPLERATE;
- this->stream->stream_info[XINE_STREAM_INFO_AUDIO_BITS] =
- NSF_BITS;
-
- this->stream->meta_info[XINE_META_INFO_TITLE] = strdup(this->title);
- this->stream->meta_info[XINE_META_INFO_ARTIST] = strdup(this->artist);
+ 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,
+ NSF_CHANNELS);
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE,
+ NSF_SAMPLERATE);
+ xine_set_stream_info(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);
sprintf(copyright, "(C) %s", this->copyright);
- this->stream->meta_info[XINE_META_INFO_COMMENT] = strdup(copyright);
+ xine_set_meta_info(this->stream, XINE_META_INFO_COMMENT, copyright);
/* send start buffers */
xine_demux_control_start(this->stream);
diff --git a/src/demuxers/demux_nsv.c b/src/demuxers/demux_nsv.c
index 2f05e0b24..3b9cb54dc 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.5 2003/08/25 21:51:38 f1rmb Exp $
+ * $Id: demux_nsv.c,v 1.6 2003/10/30 00:49:07 tmattern Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -337,10 +337,14 @@ static void demux_nsv_send_headers(demux_plugin_t *this_gen) {
this->status = DEMUX_OK;
/* load stream information */
- this->stream->stream_info[XINE_STREAM_INFO_HAS_VIDEO] = (this->video_type) ? 1 : 0;
- this->stream->stream_info[XINE_STREAM_INFO_HAS_AUDIO] = (this->audio_type) ? 1 : 0;
- this->stream->stream_info[XINE_STREAM_INFO_VIDEO_WIDTH] = this->bih.biWidth;
- this->stream->stream_info[XINE_STREAM_INFO_VIDEO_HEIGHT] = this->bih.biHeight;
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO,
+ (this->video_type) ? 1 : 0);
+ xine_set_stream_info(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);
/* send start buffers */
xine_demux_control_start(this->stream);
diff --git a/src/demuxers/demux_ogg.c b/src/demuxers/demux_ogg.c
index 0c25bdaea..f9597b273 100644
--- a/src/demuxers/demux_ogg.c
+++ b/src/demuxers/demux_ogg.c
@@ -19,7 +19,7 @@
*/
/*
- * $Id: demux_ogg.c,v 1.110 2003/10/27 23:23:29 tmattern Exp $
+ * $Id: demux_ogg.c,v 1.111 2003/10/30 00:49:07 tmattern Exp $
*
* demultiplexer for ogg streams
*
@@ -232,8 +232,8 @@ static void get_stream_length (demux_ogg_t *this) {
while (!done) {
if (!read_ogg_packet (this)) {
if (this->time_length) {
- this->stream->stream_info[XINE_STREAM_INFO_BITRATE]
- = ((int64_t) 8000*filelength)/this->time_length;
+ xine_set_stream_info(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;
}
diff --git a/src/demuxers/demux_pva.c b/src/demuxers/demux_pva.c
index 4caffdc30..7205f1899 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.11 2003/07/25 21:02:05 miguelfreitas Exp $
+ * $Id: demux_pva.c,v 1.12 2003/10/30 00:49:07 tmattern 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 */
- this->stream->stream_info[XINE_STREAM_INFO_HAS_VIDEO] = 1;
- this->stream->stream_info[XINE_STREAM_INFO_HAS_AUDIO] = 1;
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 1);
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1);
/* send start buffers */
xine_demux_control_start(this->stream);
diff --git a/src/demuxers/demux_qt.c b/src/demuxers/demux_qt.c
index 5225ee46f..9ac9373a0 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.167 2003/10/29 01:45:52 tmmm Exp $
+ * $Id: demux_qt.c,v 1.168 2003/10/30 00:49:07 tmattern Exp $
*
*/
@@ -2160,8 +2160,8 @@ static int demux_qt_send_chunk(demux_plugin_t *this_gen) {
video_trak->properties->video.edit_list_compensation = 0;
}
- this->stream->stream_info[XINE_STREAM_INFO_FRAME_DURATION] =
- frame_duration;
+ xine_set_stream_info(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",
i,
@@ -2349,22 +2349,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;
- this->stream->stream_info[XINE_STREAM_INFO_HAS_VIDEO] = 1;
- this->stream->stream_info[XINE_STREAM_INFO_VIDEO_WIDTH] =
- this->bih.biWidth;
- this->stream->stream_info[XINE_STREAM_INFO_VIDEO_HEIGHT] =
- this->bih.biHeight;
- this->stream->stream_info[XINE_STREAM_INFO_VIDEO_FOURCC] =
- video_trak->properties->video.codec_fourcc;
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 1);
+ 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,
+ video_trak->properties->video.codec_fourcc);
} else {
memset(&this->bih, 0, sizeof(this->bih));
this->bih.biSize = sizeof(this->bih);
- this->stream->stream_info[XINE_STREAM_INFO_HAS_VIDEO] = 0;
- this->stream->stream_info[XINE_STREAM_INFO_VIDEO_WIDTH] = 0;
- this->stream->stream_info[XINE_STREAM_INFO_VIDEO_HEIGHT] = 0;
- this->stream->stream_info[XINE_STREAM_INFO_VIDEO_FOURCC] = 0;
+ 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);
}
@@ -2377,39 +2377,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;
- this->stream->stream_info[XINE_STREAM_INFO_HAS_AUDIO] = 1;
- this->stream->stream_info[XINE_STREAM_INFO_AUDIO_CHANNELS] =
- audio_trak->properties->audio.channels;
- this->stream->stream_info[XINE_STREAM_INFO_AUDIO_SAMPLERATE] =
- audio_trak->properties->audio.sample_rate;
- this->stream->stream_info[XINE_STREAM_INFO_AUDIO_BITS] =
- audio_trak->properties->audio.bits;
- this->stream->stream_info[XINE_STREAM_INFO_AUDIO_FOURCC] =
- audio_trak->properties->audio.codec_fourcc;
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1);
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_CHANNELS,
+ audio_trak->properties->audio.channels);
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE,
+ audio_trak->properties->audio.sample_rate);
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_BITS,
+ audio_trak->properties->audio.bits);
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_FOURCC,
+ audio_trak->properties->audio.codec_fourcc);
} else {
- this->stream->stream_info[XINE_STREAM_INFO_HAS_AUDIO] = 0;
- this->stream->stream_info[XINE_STREAM_INFO_AUDIO_CHANNELS] = 0;
- this->stream->stream_info[XINE_STREAM_INFO_AUDIO_SAMPLERATE] = 0;
- this->stream->stream_info[XINE_STREAM_INFO_AUDIO_BITS] = 0;
- this->stream->stream_info[XINE_STREAM_INFO_AUDIO_FOURCC] = 0;
+ 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);
}
/* copy over the meta information like artist and title */
if (this->qt->copyright)
- this->stream->meta_info[XINE_META_INFO_ARTIST] =
- strdup(this->qt->copyright);
+ xine_set_meta_info(this->stream, XINE_META_INFO_ARTIST, this->qt->copyright);
if (this->qt->name)
- this->stream->meta_info[XINE_META_INFO_TITLE] =
- strdup(this->qt->name);
+ xine_set_meta_info(this->stream, XINE_META_INFO_TITLE, this->qt->name);
else if (this->qt->description)
- this->stream->meta_info[XINE_META_INFO_TITLE] =
- strdup(this->qt->description);
+ xine_set_meta_info(this->stream, XINE_META_INFO_TITLE, this->qt->description);
if (this->qt->comment)
- this->stream->meta_info[XINE_META_INFO_COMMENT] =
- strdup(this->qt->comment);
+ xine_set_meta_info(this->stream, XINE_META_INFO_COMMENT, this->qt->comment);
/* send start buffers */
xine_demux_control_start(this->stream);
diff --git a/src/demuxers/demux_rawdv.c b/src/demuxers/demux_rawdv.c
index 11e26309c..f876fc60d 100644
--- a/src/demuxers/demux_rawdv.c
+++ b/src/demuxers/demux_rawdv.c
@@ -19,7 +19,7 @@
*/
/*
- * $Id: demux_rawdv.c,v 1.11 2003/07/25 21:02:05 miguelfreitas Exp $
+ * $Id: demux_rawdv.c,v 1.12 2003/10/30 00:49:07 tmattern Exp $
*
* demultiplexer for raw dv streams
*/
@@ -188,14 +188,16 @@ 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;
- this->stream->stream_info[XINE_STREAM_INFO_VIDEO_BITRATE] = NTSC_FRAME_SIZE * NTSC_FRAME_RATE * 8;
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_BITRATE,
+ NTSC_FRAME_SIZE * NTSC_FRAME_RATE * 8);
} else {
/* PAL */
this->frame_size = PAL_FRAME_SIZE;
this->duration = buf->decoder_info[1] = 3600;
bih->biWidth = 720;
bih->biHeight = 576;
- this->stream->stream_info[XINE_STREAM_INFO_VIDEO_BITRATE] = PAL_FRAME_SIZE * PAL_FRAME_RATE * 8;
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_BITRATE,
+ PAL_FRAME_SIZE * PAL_FRAME_RATE * 8);
}
bih->biSize = sizeof(xine_bmiheader);
bih->biPlanes = 1;
@@ -211,7 +213,7 @@ static void demux_raw_dv_send_headers (demux_plugin_t *this_gen) {
this->status = DEMUX_OK;
- this->stream->stream_info[XINE_STREAM_INFO_HAS_VIDEO] = 1;
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 1);
if (this->audio_fifo) {
int done = 0;
@@ -275,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);
- this->stream->stream_info[XINE_STREAM_INFO_HAS_AUDIO] = 1;
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1);
}
}