diff options
author | Thibaut Mattern <tmattern@users.sourceforge.net> | 2003-10-31 22:56:21 +0000 |
---|---|---|
committer | Thibaut Mattern <tmattern@users.sourceforge.net> | 2003-10-31 22:56:21 +0000 |
commit | 65690e52a1b5823d6444994e307ad7317b778709 (patch) | |
tree | a33eb715b15f7124511ec4e8c490838ea0adb9fc /src | |
parent | d5d6cb86986c3c1d1e22c76cb939898834e5f4de (diff) | |
download | xine-lib-65690e52a1b5823d6444994e307ad7317b778709.tar.gz xine-lib-65690e52a1b5823d6444994e307ad7317b778709.tar.bz2 |
Use info_helper functions.
CVS patchset: 5657
CVS date: 2003/10/31 22:56:21
Diffstat (limited to 'src')
-rw-r--r-- | src/demuxers/demux_real.c | 29 | ||||
-rw-r--r-- | src/demuxers/demux_realaudio.c | 18 | ||||
-rw-r--r-- | src/demuxers/demux_roq.c | 24 | ||||
-rw-r--r-- | src/demuxers/demux_slave.c | 6 | ||||
-rw-r--r-- | src/demuxers/demux_snd.c | 18 | ||||
-rw-r--r-- | src/demuxers/demux_str.c | 30 | ||||
-rw-r--r-- | src/demuxers/demux_ts.c | 6 | ||||
-rw-r--r-- | src/demuxers/demux_voc.c | 18 | ||||
-rw-r--r-- | src/demuxers/demux_vox.c | 13 | ||||
-rw-r--r-- | src/demuxers/demux_vqa.c | 26 | ||||
-rw-r--r-- | src/demuxers/demux_wav.c | 18 | ||||
-rw-r--r-- | src/demuxers/demux_wc3movie.c | 24 | ||||
-rw-r--r-- | src/demuxers/demux_yuv4mpeg2.c | 12 | ||||
-rw-r--r-- | src/demuxers/demux_yuv_frames.c | 6 |
14 files changed, 129 insertions, 119 deletions
diff --git a/src/demuxers/demux_real.c b/src/demuxers/demux_real.c index 476273b57..fc0f2f33c 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.67 2003/10/28 21:14:17 jstembridge Exp $ + * $Id: demux_real.c,v 1.68 2003/10/31 22:56:21 tmattern Exp $ */ #ifdef HAVE_CONFIG_H @@ -394,7 +394,8 @@ static void real_parse_headers (demux_real_t *this) { if (this->avg_bitrate<1) this->avg_bitrate = 1; - this->stream->stream_info[XINE_STREAM_INFO_BITRATE] = this->avg_bitrate; + xine_set_stream_info(this->stream, XINE_STREAM_INFO_BITRATE, + this->avg_bitrate); } else if (chunk_type == MDPR_TAG) { @@ -656,11 +657,11 @@ unknown: this->video_fifo->put (this->video_fifo, buf); /* Set meta info */ - this->stream->stream_info[XINE_STREAM_INFO_HAS_VIDEO] = 1; - this->stream->stream_info[XINE_STREAM_INFO_VIDEO_FOURCC] = - this->video_stream->fourcc; - this->stream->stream_info[XINE_STREAM_INFO_VIDEO_BITRATE] = - this->video_stream->mdpr->avg_bit_rate; + xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 1); + xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_FOURCC, + this->video_stream->fourcc); + xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_BITRATE, + this->video_stream->mdpr->avg_bit_rate); } if(this->audio_stream) { @@ -686,11 +687,11 @@ unknown: } /* Set meta info */ - this->stream->stream_info[XINE_STREAM_INFO_HAS_AUDIO] = 1; - this->stream->stream_info[XINE_STREAM_INFO_AUDIO_FOURCC] = - this->audio_stream->fourcc; - this->stream->stream_info[XINE_STREAM_INFO_AUDIO_BITRATE] = - this->audio_stream->mdpr->avg_bit_rate; + xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1); + xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_FOURCC, + this->audio_stream->fourcc); + xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_BITRATE, + this->audio_stream->mdpr->avg_bit_rate); } } @@ -1149,8 +1150,8 @@ static void demux_real_send_headers(demux_plugin_t *this_gen) { this->input->seek (this->input, 0, SEEK_SET); - 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); if( !this->reference_mode ) { real_parse_headers (this); diff --git a/src/demuxers/demux_realaudio.c b/src/demuxers/demux_realaudio.c index 3ec674a05..a6d03ed8a 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.23 2003/10/28 20:12:54 jstembridge Exp $ + * $Id: demux_realaudio.c,v 1.24 2003/10/31 22:56:21 tmattern Exp $ */ #ifdef HAVE_CONFIG_H @@ -275,14 +275,14 @@ static void demux_ra_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->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, 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->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); /* send start buffers */ xine_demux_control_start(this->stream); diff --git a/src/demuxers/demux_roq.c b/src/demuxers/demux_roq.c index 1c8aa8f6d..955d085da 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.43 2003/10/24 02:57:58 tmmm Exp $ + * $Id: demux_roq.c,v 1.44 2003/10/31 22:56:21 tmattern Exp $ */ #ifdef HAVE_CONFIG_H @@ -306,16 +306,18 @@ static void demux_roq_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->wave.nChannels) ? 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_AUDIO_CHANNELS] = - this->wave.nChannels; - this->stream->stream_info[XINE_STREAM_INFO_AUDIO_SAMPLERATE] = - RoQ_AUDIO_SAMPLE_RATE; - this->stream->stream_info[XINE_STREAM_INFO_AUDIO_BITS] = 16; + 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, + 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_AUDIO_CHANNELS, + this->wave.nChannels); + xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE, + RoQ_AUDIO_SAMPLE_RATE); + 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_slave.c b/src/demuxers/demux_slave.c index 331adc7fe..0a1638ac4 100644 --- a/src/demuxers/demux_slave.c +++ b/src/demuxers/demux_slave.c @@ -21,7 +21,7 @@ */ /* - * $Id: demux_slave.c,v 1.5 2003/07/25 21:02:05 miguelfreitas Exp $ + * $Id: demux_slave.c,v 1.6 2003/10/31 22:56:21 tmattern 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; - 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->last_vpts = 0; this->send_newpts = 1; diff --git a/src/demuxers/demux_snd.c b/src/demuxers/demux_snd.c index 6f83ac447..cfaa8ba1d 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.32 2003/08/25 21:51:39 f1rmb Exp $ + * $Id: demux_snd.c,v 1.33 2003/10/31 22:56:21 tmattern Exp $ */ #ifdef HAVE_CONFIG_H @@ -208,14 +208,14 @@ static void demux_snd_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_str.c b/src/demuxers/demux_str.c index eb596f84b..7f3773e7e 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.15 2003/08/25 21:51:39 f1rmb Exp $ + * $Id: demux_str.c,v 1.16 2003/10/31 22:56:21 tmattern Exp $ */ /* @@ -444,9 +444,9 @@ static void demux_str_send_headers(demux_plugin_t *this_gen) { xine_demux_control_start(this->stream); /* load stream information */ - this->stream->stream_info[XINE_STREAM_INFO_SEEKABLE] = 1; - 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_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); for (channel = 0; channel < STR_MAX_CHANNELS; channel++) { if (this->channel_type[channel] & CDXA_TYPE_VIDEO) { @@ -454,12 +454,12 @@ 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; - this->stream->stream_info[XINE_STREAM_INFO_HAS_VIDEO] = 1; + xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO, 1); - this->stream->stream_info[XINE_STREAM_INFO_VIDEO_WIDTH] = - this->bih[channel].biWidth; - this->stream->stream_info[XINE_STREAM_INFO_VIDEO_HEIGHT] = - this->bih[channel].biHeight; + xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_WIDTH, + this->bih[channel].biWidth); + xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_HEIGHT, + this->bih[channel].biHeight); /* send init info to video decoder */ buf = this->video_fifo->buffer_pool_alloc (this->video_fifo); @@ -474,14 +474,14 @@ static void demux_str_send_headers(demux_plugin_t *this_gen) { } if (this->channel_type[channel] & CDXA_TYPE_AUDIO) { - this->stream->stream_info[XINE_STREAM_INFO_HAS_AUDIO] = 1; + xine_set_stream_info(this->stream, XINE_STREAM_INFO_HAS_AUDIO, 1); audio_info = this->audio_info[channel]; - this->stream->stream_info[XINE_STREAM_INFO_AUDIO_CHANNELS] = - (audio_info & 0x01) ? 2 : 1; - this->stream->stream_info[XINE_STREAM_INFO_AUDIO_SAMPLERATE] = - (audio_info & 0x04) ? 18900 : 37800; - this->stream->stream_info[XINE_STREAM_INFO_AUDIO_BITS] = 16; + xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_CHANNELS, + (audio_info & 0x01) ? 2 : 1); + xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE, + (audio_info & 0x04) ? 18900 : 37800); + xine_set_stream_info(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 e10da8208..42f4b7e45 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.91 2003/10/20 06:19:02 jcdutton Exp $ + * $Id: demux_ts.c,v 1.92 2003/10/31 22:56:21 tmattern 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 ? */ - 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); } 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 9a08a126d..0be32d8a7 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.32 2003/08/25 21:51:39 f1rmb Exp $ + * $Id: demux_voc.c,v 1.33 2003/10/31 22:56:21 tmattern Exp $ */ #ifdef HAVE_CONFIG_H @@ -202,14 +202,14 @@ static void demux_voc_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_vox.c b/src/demuxers/demux_vox.c index 152671811..2a7b237a8 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.7 2003/08/25 21:51:39 f1rmb Exp $ + * $Id: demux_vox.c,v 1.8 2003/10/31 22:56:21 tmattern Exp $ * */ @@ -110,11 +110,12 @@ static void demux_vox_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] = 1; - this->stream->stream_info[XINE_STREAM_INFO_AUDIO_SAMPLERATE] = DIALOGIC_SAMPLERATE; - 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, 1); + xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE, + DIALOGIC_SAMPLERATE); + 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_vqa.c b/src/demuxers/demux_vqa.c index 6f7d5f0ec..e22ed7bc9 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.33 2003/10/23 05:18:59 tmmm Exp $ + * $Id: demux_vqa.c,v 1.34 2003/10/31 22:56:21 tmattern Exp $ */ #ifdef HAVE_CONFIG_H @@ -255,17 +255,19 @@ static void demux_vqa_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->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); /* send start buffers */ xine_demux_control_start(this->stream); diff --git a/src/demuxers/demux_wav.c b/src/demuxers/demux_wav.c index dc4d1c83e..830f94e94 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.49 2003/10/12 00:06:00 tmattern Exp $ + * $Id: demux_wav.c,v 1.50 2003/10/31 22:56:21 tmattern Exp $ */ #ifdef HAVE_CONFIG_H @@ -268,14 +268,14 @@ static void demux_wav_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->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, 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->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); /* send start buffers */ xine_demux_control_start(this->stream); diff --git a/src/demuxers/demux_wc3movie.c b/src/demuxers/demux_wc3movie.c index 0a3abf0c1..c5767c48f 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.42 2003/10/27 23:23:29 tmattern Exp $ + * $Id: demux_wc3movie.c,v 1.43 2003/10/31 22:56:21 tmattern Exp $ */ #ifdef HAVE_CONFIG_H @@ -295,18 +295,20 @@ static void demux_mve_send_headers(demux_plugin_t *this_gen) { this->status = DEMUX_OK; /* load stream information */ - this->stream->stream_info[XINE_STREAM_INFO_HAS_VIDEO] = 1; + xine_set_stream_info(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 */ - this->stream->stream_info[XINE_STREAM_INFO_HAS_AUDIO] = 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_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_AUDIO, 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_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); /* send start buffers */ xine_demux_control_start(this->stream); diff --git a/src/demuxers/demux_yuv4mpeg2.c b/src/demuxers/demux_yuv4mpeg2.c index 51499ed2d..e5842378d 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.28 2003/08/12 20:00:34 jstembridge Exp $ + * $Id: demux_yuv4mpeg2.c,v 1.29 2003/10/31 22:56:21 tmattern Exp $ */ #ifdef HAVE_CONFIG_H @@ -301,10 +301,12 @@ static void demux_yuv4mpeg2_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_yuv_frames.c b/src/demuxers/demux_yuv_frames.c index 8628dd0c1..e92498847 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.8 2003/07/25 21:02:05 miguelfreitas Exp $ + * $Id: demux_yuv_frames.c,v 1.9 2003/10/31 22:56:21 tmattern 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 (!this->stream->stream_info[XINE_STREAM_INFO_HAS_VIDEO]) + if (!xine_get_stream_info(this->stream, XINE_STREAM_INFO_HAS_VIDEO)) xine_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 ( this->stream->stream_info[XINE_STREAM_INFO_HAS_VIDEO]) + if ( xine_get_stream_info(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); |