summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThibaut Mattern <tmattern@users.sourceforge.net>2003-10-28 00:10:18 +0000
committerThibaut Mattern <tmattern@users.sourceforge.net>2003-10-28 00:10:18 +0000
commit2659a8905f34155a35d18990317cc5290019781f (patch)
treec2c4af481336dd0ba3427ff75cea273ead318690 /src
parent0b76e73f92bdac7ddcac493c736fe594ed4cffd5 (diff)
downloadxine-lib-2659a8905f34155a35d18990317cc5290019781f.tar.gz
xine-lib-2659a8905f34155a35d18990317cc5290019781f.tar.bz2
Use info_helper functions.
CVS patchset: 5623 CVS date: 2003/10/28 00:10:18
Diffstat (limited to 'src')
-rw-r--r--src/demuxers/demux_4xm.c26
-rw-r--r--src/demuxers/demux_ac3.c6
-rw-r--r--src/demuxers/demux_aiff.c18
-rw-r--r--src/demuxers/demux_asf.c31
4 files changed, 44 insertions, 37 deletions
diff --git a/src/demuxers/demux_4xm.c b/src/demuxers/demux_4xm.c
index 1edd6f0d3..b2624d354 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.5 2003/08/25 21:51:38 f1rmb Exp $
+ * $Id: demux_4xm.c,v 1.6 2003/10/28 00:10:18 tmattern Exp $
*/
#ifdef HAVE_CONFIG_H
@@ -353,18 +353,20 @@ static void demux_fourxm_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] =
- (this->track_count > 0) ? 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, 1);
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO,
+ (this->track_count > 0) ? 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);
if (this->track_count > 0) {
- this->stream->stream_info[XINE_STREAM_INFO_AUDIO_CHANNELS] =
- this->tracks[0].channels;
- this->stream->stream_info[XINE_STREAM_INFO_AUDIO_SAMPLERATE] =
- this->tracks[0].sample_rate;
- this->stream->stream_info[XINE_STREAM_INFO_AUDIO_BITS] =
- this->tracks[0].bits;
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_CHANNELS,
+ this->tracks[0].channels);
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE,
+ this->tracks[0].sample_rate);
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_BITS,
+ this->tracks[0].bits);
}
/* send start buffers */
diff --git a/src/demuxers/demux_ac3.c b/src/demuxers/demux_ac3.c
index 6c3d693b1..2d4b76b39 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.10 2003/08/25 21:51:38 f1rmb Exp $
+ * $Id: demux_ac3.c,v 1.11 2003/10/28 00:10:18 tmattern 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 */
- 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);
/* send start buffers */
xine_demux_control_start(this->stream);
diff --git a/src/demuxers/demux_aiff.c b/src/demuxers/demux_aiff.c
index bcc352845..d084dbbc2 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.32 2003/08/25 21:51:38 f1rmb Exp $
+ * $Id: demux_aiff.c,v 1.33 2003/10/28 00:10:18 tmattern Exp $
*
*/
@@ -242,14 +242,14 @@ static void demux_aiff_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] =
- this->audio_channels;
- this->stream->stream_info[XINE_STREAM_INFO_AUDIO_SAMPLERATE] =
- this->audio_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, 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->audio_channels);
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE,
+ this->audio_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_asf.c b/src/demuxers/demux_asf.c
index eb6f01502..8f7b63fe4 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.136 2003/10/27 23:23:29 tmattern Exp $
+ * $Id: demux_asf.c,v 1.137 2003/10/28 00:10:18 tmattern Exp $
*
* demultiplexer for asf streams
*
@@ -297,7 +297,8 @@ 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);
- this->stream->stream_info[XINE_STREAM_INFO_AUDIO_FOURCC] = wavex->wFormatTag;
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_FOURCC,
+ wavex->wFormatTag);
#ifdef LOG
printf ("demux_asf: wavex header is %d bytes long\n", this->wavex_size);
@@ -324,7 +325,8 @@ static void asf_send_video_header (demux_asf_t *this, int stream) {
buf_element_t *buf;
xine_bmiheader *bih = (xine_bmiheader *) this->bih;
- this->stream->stream_info[XINE_STREAM_INFO_VIDEO_FOURCC] = bih->biCompression;
+ xine_set_stream_info(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;
@@ -376,7 +378,8 @@ static int asf_read_header (demux_asf_t *this) {
else
this->rate = 0;
- this->stream->stream_info[XINE_STREAM_INFO_BITRATE] = this->rate*8;
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_BITRATE,
+ this->rate*8);
get_le64(this); /* preroll in 1/1000 s*/
flags = get_le32(this); /* flags */
@@ -596,8 +599,8 @@ static int demux_asf_send_headers_common (demux_asf_t *this, int send_ctrl_start
uint32_t bitrate = 0;
/* will get overridden later */
- this->stream->stream_info[XINE_STREAM_INFO_HAS_VIDEO] = 0;
- this->stream->stream_info[XINE_STREAM_INFO_HAS_AUDIO] = 0;
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 0);
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 0);
/*
* initialize asf engine
@@ -648,8 +651,9 @@ 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)) {
- this->stream->stream_info[XINE_STREAM_INFO_HAS_VIDEO] = 1;
- this->stream->stream_info[XINE_STREAM_INFO_VIDEO_BITRATE] = bitrate;
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 1);
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_BITRATE,
+ bitrate);
max_vrate = bitrate;
this->video_stream = i;
@@ -657,8 +661,9 @@ 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)) {
- this->stream->stream_info[XINE_STREAM_INFO_HAS_AUDIO] = 1;
- this->stream->stream_info[XINE_STREAM_INFO_AUDIO_BITRATE] = bitrate;
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1);
+ xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_BITRATE,
+ bitrate);
max_arate = bitrate;
this->audio_stream = i;
@@ -666,15 +671,15 @@ static int demux_asf_send_headers_common (demux_asf_t *this, int send_ctrl_start
}
}
- this->stream->stream_info[XINE_STREAM_INFO_BITRATE] = bitrate;
+ xine_set_stream_info(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(this->stream->stream_info[XINE_STREAM_INFO_HAS_AUDIO])
+ if(xine_get_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO))
asf_send_audio_header(this, this->audio_stream);
- if(this->stream->stream_info[XINE_STREAM_INFO_HAS_VIDEO])
+ if(xine_get_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO))
asf_send_video_header(this, this->video_stream);
}
return 0;