From 1ace1c3f18fb48bab32a2ee5b69ae6e3bce12850 Mon Sep 17 00:00:00 2001 From: Miguel Freitas Date: Sat, 15 Nov 2003 14:54:30 +0000 Subject: start xine_stream_t separation (public/private). (we should finish this before rc3.) - stream_info and meta_info variables are private now. obs: everything must be recompiled due xine_stream_t changes CVS patchset: 5733 CVS date: 2003/11/15 14:54:30 --- src/libffmpeg/xine_decoder.c | 6 +- src/libflac/decoder_flac.c | 2 +- src/libflac/demux_flac.c | 14 ++--- src/libmpeg2/decode.c | 8 +-- src/libmpeg2new/xine_decoder.c | 12 ++-- src/libreal/audio_decoder.c | 4 +- src/libreal/xine_decoder.c | 14 ++--- src/libspeex/xine_decoder.c | 10 ++-- src/libsputext/demux_sputext.c | 8 +-- src/libw32dll/w32codec.c | 6 +- src/xine-engine/Makefile.am | 3 +- src/xine-engine/audio_out.h | 8 +-- src/xine-engine/buffer.h | 27 +++++++-- src/xine-engine/demux.c | 5 +- src/xine-engine/video_out.h | 11 +--- src/xine-engine/xine_internal.h | 124 +++++++++++++++++++++------------------- 16 files changed, 136 insertions(+), 126 deletions(-) (limited to 'src') diff --git a/src/libffmpeg/xine_decoder.c b/src/libffmpeg/xine_decoder.c index 3c10c143c..4c2918e63 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.134 2003/11/15 13:01:12 miguelfreitas Exp $ + * $Id: xine_decoder.c,v 1.135 2003/11/15 14:54:30 miguelfreitas Exp $ * * xine decoder plugin using ffmpeg * @@ -1487,7 +1487,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 = this->stream->stream_info[XINE_STREAM_INFO_AUDIO_FOURCC]; + this->context->codec_tag = xine_get_stream_info(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; @@ -1504,7 +1504,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"); - this->stream->stream_info[XINE_STREAM_INFO_AUDIO_HANDLED] = 0; + xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_HANDLED, 0); return; } diff --git a/src/libflac/decoder_flac.c b/src/libflac/decoder_flac.c index 25b800abd..aaca2ea9b 100644 --- a/src/libflac/decoder_flac.c +++ b/src/libflac/decoder_flac.c @@ -424,7 +424,7 @@ static decoder_info_t dec_info_audio = { plugin_info_t xine_plugin_info[] = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_DEMUX, 22, "flac", XINE_VERSION_CODE, NULL, demux_flac_init_class }, + { PLUGIN_DEMUX, 23, "flac", XINE_VERSION_CODE, NULL, demux_flac_init_class }, { PLUGIN_AUDIO_DECODER, 13, "flacdec", XINE_VERSION_CODE, &dec_info_audio, init_plugin }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/libflac/demux_flac.c b/src/libflac/demux_flac.c index 04722c7a8..bf83cd00f 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; - 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->channels; - this->stream->stream_info[XINE_STREAM_INFO_AUDIO_SAMPLERATE] = this->sample_rate; - this->stream->stream_info[XINE_STREAM_INFO_AUDIO_BITS] = this->bits_per_sample; + 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_demux_control_start (this->stream); @@ -410,7 +410,7 @@ demux_flac_get_status (demux_plugin_t *this_gen) { static int -demux_flac_seek (demux_plugin_t *this_gen, off_t start_pos, int start_time) { +demux_flac_seek (demux_plugin_t *this_gen, off_t start_pos, int start_time, int playing) { demux_flac_t *this = (demux_flac_t *) this_gen; #ifdef LOG @@ -556,8 +556,6 @@ open_plugin (demux_class_t *class_gen, this->demux_plugin.dispose = demux_flac_dispose; this->demux_plugin.get_status = demux_flac_get_status; this->demux_plugin.get_stream_length = demux_flac_get_stream_length; - this->demux_plugin.get_video_frame = NULL; - this->demux_plugin.got_video_frame_cb= NULL; this->demux_plugin.get_capabilities = demux_flac_get_capabilities; this->demux_plugin.get_optional_data = demux_flac_get_optional_data; this->demux_plugin.demux_class = class_gen; diff --git a/src/libmpeg2/decode.c b/src/libmpeg2/decode.c index d53443da4..1a6dd23ab 100644 --- a/src/libmpeg2/decode.c +++ b/src/libmpeg2/decode.c @@ -910,10 +910,10 @@ static void process_userdata(mpeg2dec_t *mpeg2dec, uint8_t *buffer) data.pan_scan = mpeg2dec->force_pan_scan; xine_event_send(mpeg2dec->stream, &event); - mpeg2dec->stream->stream_info[XINE_STREAM_INFO_VIDEO_WIDTH] - = mpeg2dec->picture->coded_picture_width; - mpeg2dec->stream->stream_info[XINE_STREAM_INFO_VIDEO_HEIGHT] - = mpeg2dec->picture->coded_picture_height; + xine_set_stream_info(mpeg2dec->stream, XINE_STREAM_INFO_VIDEO_WIDTH, + mpeg2dec->picture->coded_picture_width); + xine_set_stream_info(mpeg2dec->stream, XINE_STREAM_INFO_VIDEO_HEIGHT, + mpeg2dec->picture->coded_picture_height); } if (mpeg2dec->cc_dec) { diff --git a/src/libmpeg2new/xine_decoder.c b/src/libmpeg2new/xine_decoder.c index 625354060..12f1efac8 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.13 2003/11/15 13:01:14 miguelfreitas Exp $ + * $Id: xine_decoder.c,v 1.14 2003/11/15 14:54:30 miguelfreitas 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 */ - this->stream->stream_info[XINE_STREAM_INFO_VIDEO_BITRATE] = info->sequence->byte_rate * 8; - this->stream->stream_info[XINE_STREAM_INFO_VIDEO_WIDTH] = info->sequence->picture_width; - this->stream->stream_info[XINE_STREAM_INFO_VIDEO_HEIGHT] = info->sequence->picture_height; - this->stream->stream_info[XINE_STREAM_INFO_FRAME_DURATION] = info->sequence->frame_period / 300; + 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); if (this->force_aspect) info->sequence->pixel_width = this->force_aspect; switch (info->sequence->pixel_width) { case 3: @@ -153,7 +153,7 @@ 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; } - this->stream->stream_info[XINE_STREAM_INFO_VIDEO_RATIO] = (int)(10000*this->ratio); + xine_set_stream_info(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)"); diff --git a/src/libreal/audio_decoder.c b/src/libreal/audio_decoder.c index f03036740..0fe0bef6a 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.29 2003/11/15 13:01:14 miguelfreitas Exp $ + * $Id: audio_decoder.c,v 1.30 2003/11/15 14:54:31 miguelfreitas Exp $ * * thin layer to use real binary-only codecs in xine * @@ -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 ) - this->stream->stream_info[XINE_STREAM_INFO_AUDIO_HANDLED] = 0; + xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_HANDLED, 0); } else if( this->decoder_ok ) { diff --git a/src/libreal/xine_decoder.c b/src/libreal/xine_decoder.c index f46693213..3034b8398 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.52 2003/11/15 13:01:15 miguelfreitas Exp $ + * $Id: xine_decoder.c,v 1.53 2003/11/15 14:54:31 miguelfreitas Exp $ * * thin layer to use real binary-only codecs in xine * @@ -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 - this->stream->stream_info[XINE_STREAM_INFO_VIDEO_WIDTH] = this->width; - this->stream->stream_info[XINE_STREAM_INFO_VIDEO_HEIGHT] = 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); 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 ) - this->stream->stream_info[XINE_STREAM_INFO_VIDEO_HANDLED] = 0; + xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_HANDLED, 0); } else if (this->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; - this->stream->stream_info[XINE_STREAM_INFO_VIDEO_WIDTH] = this->width; - this->stream->stream_info[XINE_STREAM_INFO_VIDEO_HEIGHT] = 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); } 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; - this->stream->stream_info[XINE_STREAM_INFO_FRAME_DURATION] = this->duration; + xine_set_stream_info(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 2d6343487..0ff2b129b 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.2 2003/11/15 13:01:15 miguelfreitas Exp $ + * $Id: xine_decoder.c,v 1.3 2003/11/15 14:54:31 miguelfreitas Exp $ * * (ogg/)speex audio decoder plugin (libspeex wrapper) for xine */ @@ -241,8 +241,8 @@ 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); - this->stream->stream_info[XINE_STREAM_INFO_AUDIO_SAMPLERATE] - = this->rate; + xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_SAMPLERATE, + this->rate); this->channels = spx_header->nb_channels; if (this->channels == 2) { @@ -261,7 +261,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 */ - this->stream->stream_info[XINE_STREAM_INFO_AUDIO_BITRATE] = bitrate; + xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_BITRATE, bitrate); this->header_count += spx_header->extra_headers; this->expect_metadata = 1; @@ -343,7 +343,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 */ - this->stream->stream_info[XINE_STREAM_INFO_AUDIO_BITRATE] = bitrate; + xine_set_stream_info(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 9391f20a8..edb20c31b 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.27 2003/11/15 13:01:15 miguelfreitas Exp $ + * $Id: demux_sputext.c,v 1.28 2003/11/15 14:54:31 miguelfreitas Exp $ * * code based on old libsputext/xine_decoder.c * @@ -868,7 +868,7 @@ static int demux_sputext_send_chunk (demux_plugin_t *this_gen) { } static int demux_sputext_seek (demux_plugin_t *this_gen, - off_t start_pos, int start_time) { + off_t start_pos, int start_time, int playing) { demux_sputext_t *this = (demux_sputext_t*)this_gen; lprintf("demux_sputext: seek() called\n"); @@ -942,8 +942,6 @@ static demux_plugin_t *open_demux_plugin (demux_class_t *class_gen, xine_stream_ this->demux_plugin.dispose = demux_sputext_dispose; this->demux_plugin.get_status = demux_sputext_get_status; this->demux_plugin.get_stream_length = demux_sputext_get_stream_length; - this->demux_plugin.get_video_frame = NULL; - this->demux_plugin.got_video_frame_cb= NULL; this->demux_plugin.get_capabilities = demux_sputext_get_capabilities; this->demux_plugin.get_optional_data = demux_sputext_get_optional_data; this->demux_plugin.demux_class = class_gen; @@ -1046,6 +1044,6 @@ static void *init_sputext_demux_class (xine_t *xine, void *data) { plugin_info_t xine_plugin_info[] = { /* type, API, "name", version, special_info, init_function */ - { PLUGIN_DEMUX, 22, "sputext", XINE_VERSION_CODE, NULL, &init_sputext_demux_class }, + { PLUGIN_DEMUX, 23, "sputext", XINE_VERSION_CODE, NULL, &init_sputext_demux_class }, { PLUGIN_NONE, 0, "", 0, NULL, NULL } }; diff --git a/src/libw32dll/w32codec.c b/src/libw32dll/w32codec.c index 4dbb560a6..e3490916f 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.129 2003/11/15 13:01:19 miguelfreitas Exp $ + * $Id: w32codec.c,v 1.130 2003/11/15 14:54:31 miguelfreitas Exp $ * * routines for using w32 codecs * DirectShow support by Miguel Freitas (Nov/2001) @@ -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 ); - this->stream->stream_info[XINE_STREAM_INFO_VIDEO_HANDLED] = 0; + xine_set_stream_info(this->stream, XINE_STREAM_INFO_VIDEO_HANDLED, 0); _x_message(this->stream, XINE_MSG_LIBRARY_LOAD_ERROR, win32_codec_name, NULL); } @@ -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 ); - this->stream->stream_info[XINE_STREAM_INFO_AUDIO_HANDLED] = 0; + xine_set_stream_info(this->stream, XINE_STREAM_INFO_AUDIO_HANDLED, 0); } pthread_mutex_unlock(&win32_codec_mutex); diff --git a/src/xine-engine/Makefile.am b/src/xine-engine/Makefile.am index b1b76cf6e..d5e462477 100644 --- a/src/xine-engine/Makefile.am +++ b/src/xine-engine/Makefile.am @@ -1,6 +1,7 @@ include $(top_srcdir)/misc/Makefile.common -AM_CFLAGS = $(THREAD_CFLAGS) $(X_CFLAGS) $(FT2_CFLAGS) +AM_CFLAGS = $(THREAD_CFLAGS) $(X_CFLAGS) $(FT2_CFLAGS) \ + -DXINE_ENGINE_INTERNAL LIBTOOL = $(SHELL) $(top_builddir)/libtool lib_LTLIBRARIES = libxine.la diff --git a/src/xine-engine/audio_out.h b/src/xine-engine/audio_out.h index fd1906c71..80675ad23 100644 --- a/src/xine-engine/audio_out.h +++ b/src/xine-engine/audio_out.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: audio_out.h,v 1.60 2003/11/11 18:45:00 f1rmb Exp $ + * $Id: audio_out.h,v 1.61 2003/11/15 14:54:31 miguelfreitas Exp $ */ #ifndef HAVE_AUDIO_OUT_H #define HAVE_AUDIO_OUT_H @@ -132,12 +132,6 @@ struct ao_driver_s { void *node; }; -/* to access extra_info_t contents one have to include xine_internal.h */ -#ifndef EXTRA_INFO -#define EXTRA_INFO -typedef struct extra_info_s extra_info_t; -#endif - typedef struct ao_format_s ao_format_t; struct ao_format_s { diff --git a/src/xine-engine/buffer.h b/src/xine-engine/buffer.h index 7d62be4ee..3ea47375b 100644 --- a/src/xine-engine/buffer.h +++ b/src/xine-engine/buffer.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: buffer.h,v 1.123 2003/11/11 18:45:00 f1rmb Exp $ + * $Id: buffer.h,v 1.124 2003/11/15 14:54:31 miguelfreitas Exp $ * * * contents: @@ -227,11 +227,28 @@ extern "C" { #define BUF_DEMUX_BLOCK 0x05000000 -/* to access extra_info_t contents one have to include xine_internal.h */ -#ifndef EXTRA_INFO -#define EXTRA_INFO typedef struct extra_info_s extra_info_t; -#endif + +/* + * extra_info_t is used to pass information from input or demuxer plugins + * to output frames (past decoder). new data must be added after the existing + * fields for backward compatibility. + */ + +struct extra_info_s { + + off_t input_pos; /* remember where this buf came from in the input source */ + off_t input_length; /* remember the length of the input source */ + int input_time;/* time offset in miliseconds from beginning of stream */ + uint32_t frame_number; /* number of current frame if known */ + + int seek_count; /* internal engine use */ + int64_t vpts; /* set on output layers only */ + + int invalid; /* do not use this extra info to update anything */ + int total_time; /* duration in miliseconds of the stream */ +}; + #define BUF_NUM_DEC_INFO 4 diff --git a/src/xine-engine/demux.c b/src/xine-engine/demux.c index ef78a3b29..239298c9f 100644 --- a/src/xine-engine/demux.c +++ b/src/xine-engine/demux.c @@ -20,7 +20,7 @@ * Demuxer helper functions * hide some xine engine details from demuxers and reduce code duplication * - * $Id: demux.c,v 1.38 2003/11/12 17:54:30 mroi Exp $ + * $Id: demux.c,v 1.39 2003/11/15 14:54:31 miguelfreitas Exp $ */ @@ -466,3 +466,6 @@ off_t _x_read_abort (xine_stream_t *stream, int fd, char *buf, off_t todo) { return total; } +int _x_action_pending (xine_stream_t *stream) { + return stream->demux_action_pending; +} diff --git a/src/xine-engine/video_out.h b/src/xine-engine/video_out.h index 44fe4aa92..567f8ddfd 100644 --- a/src/xine-engine/video_out.h +++ b/src/xine-engine/video_out.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: video_out.h,v 1.101 2003/11/11 18:45:01 f1rmb Exp $ + * $Id: video_out.h,v 1.102 2003/11/15 14:54:31 miguelfreitas Exp $ * * * xine version of video_out.h @@ -45,8 +45,10 @@ extern "C" { #ifdef XINE_COMPILE # include "xine.h" +# include "buffer.h" #else # include +# include #endif #include @@ -59,13 +61,6 @@ typedef struct video_driver_class_s video_driver_class_t; typedef struct vo_overlay_s vo_overlay_t; typedef struct video_overlay_manager_s video_overlay_manager_t; -/* to access extra_info_t contents one have to include xine_internal.h */ -#ifndef EXTRA_INFO -#define EXTRA_INFO -typedef struct extra_info_s extra_info_t; -#endif - - typedef struct xine_macroblock_s { short *blockptr; /* pointer to current dct block */ short *blockbaseptr; /* pointer to base of dct block array in blocks */ diff --git a/src/xine-engine/xine_internal.h b/src/xine-engine/xine_internal.h index 6379b51b0..98cd7d4db 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.145 2003/11/11 18:45:02 f1rmb Exp $ + * $Id: xine_internal.h,v 1.146 2003/11/15 14:54:31 miguelfreitas Exp $ * */ @@ -30,11 +30,6 @@ extern "C" { #include -#ifndef EXTRA_INFO -#define EXTRA_INFO -typedef struct extra_info_s extra_info_t; -#endif - /* * include public part of xine header */ @@ -119,26 +114,6 @@ struct xine_s { char *save_path; }; -/* - * extra_info_t is used to pass information from input or demuxer plugins - * to output frames (past decoder). new data must be added after the existing - * fields for backward compatibility. - */ - -struct extra_info_s { - - off_t input_pos; /* remember where this buf came from in the input source */ - off_t input_length; /* remember the length of the input source */ - int input_time;/* time offset in miliseconds from beginning of stream */ - uint32_t frame_number; /* number of current frame if known */ - - int seek_count; /* internal engine use */ - int64_t vpts; /* set on output layers only */ - - int invalid; /* do not use this extra info to update anything */ - int total_time; /* duration in miliseconds of the stream */ -}; - /* * xine event queue */ @@ -158,35 +133,70 @@ struct xine_event_queue_s { */ struct xine_stream_s { - + + /* reference to xine context */ xine_t *xine; - int status; - + /* metronom instance used by current stream */ + metronom_t *metronom; + + /* demuxers use input_plugin to read data */ input_plugin_t *input_plugin; - input_class_t *eject_class; + + /* current content detection method, see METHOD_BY_xxx */ int content_detection_method; - demux_plugin_t *demux_plugin; - - metronom_t *metronom; + /* used by video decoders */ xine_video_port_t *video_out; - vo_driver_t *video_driver; + + /* demuxers send data to video decoders using this fifo */ fifo_buffer_t *video_fifo; + + /* used by audio decoders */ + xine_audio_port_t *audio_out; + + /* demuxers send data to audio decoders using this fifo */ + fifo_buffer_t *audio_fifo; + + /* input_dvd uses this one. is it possible to add helper functions instead? */ + spu_decoder_t *spu_decoder_plugin; + + /* may we change osd api to make this private? */ + osd_renderer_t *osd_renderer; + + /* dxr3 use this one, should be possible to fix to use the port instead */ + vo_driver_t *video_driver; + + /* michael will move this one to metronom i think */ + int64_t metronom_prebuffer; + + /* spudec uses this one. (should be checked) */ + xine_stream_t *master; + + /* these definitely should be made private! */ + int audio_channel_auto; + int spu_decoder_streamtype; + int spu_channel_user; + int spu_channel_auto; + int spu_channel_letterbox; + int spu_channel; + int demux_action_pending; + +#ifdef XINE_ENGINE_INTERNAL + /* these are private variables, plugins must not access them */ + + int status; + + input_class_t *eject_class; + demux_plugin_t *demux_plugin; + +/* vo_driver_t *video_driver;*/ pthread_t video_thread; video_decoder_t *video_decoder_plugin; int video_decoder_streamtype; extra_info_t *video_decoder_extra_info; int video_channel; - xine_audio_port_t *audio_out; - fifo_buffer_t *audio_fifo; - /* FIXME: the next member appears to be unused. Should it be removed? */ -#if 0 - lrb_t *audio_temp; -#else - void *audio_temp; -#endif pthread_t audio_thread; audio_decoder_t *audio_decoder_plugin; int audio_decoder_streamtype; @@ -199,36 +209,28 @@ struct xine_stream_s { >=0 => respect the user's choice */ int audio_channel_user; - int audio_channel_auto; +/* int audio_channel_auto; */ - /* FIXME: remove these two members on the next structure cleanup, - * they are unused */ - void *spu_out; - pthread_t spu_thread; - - spu_decoder_t *spu_decoder_plugin; - int spu_decoder_streamtype; +/* spu_decoder_t *spu_decoder_plugin; */ +/* int spu_decoder_streamtype; */ uint32_t spu_track_map[50]; int spu_track_map_entries; - int spu_channel_user; - int spu_channel_auto; - int spu_channel_letterbox; +/* int spu_channel_user; */ +/* int spu_channel_auto; */ +/* int spu_channel_letterbox; */ int spu_channel_pan_scan; - int spu_channel; +/* int spu_channel; */ /* lock for public xine player functions */ pthread_mutex_t frontend_lock; - pthread_mutex_t osd_lock; - osd_renderer_t *osd_renderer; - /* stream meta information */ int stream_info[XINE_STREAM_INFO_MAX]; char *meta_info [XINE_STREAM_INFO_MAX]; /* master/slave streams */ - xine_stream_t *master; +/* xine_stream_t *master; */ xine_stream_t *slave; /* seeking slowdown */ @@ -252,7 +254,7 @@ struct xine_stream_s { pthread_t demux_thread; int demux_thread_running; pthread_mutex_t demux_lock; - int demux_action_pending; +/* int demux_action_pending; */ extra_info_t *current_extra_info; pthread_mutex_t current_extra_info_lock; @@ -274,8 +276,8 @@ struct xine_stream_s { pthread_cond_t next_video_port_wired; pthread_cond_t next_audio_port_wired; - int64_t metronom_prebuffer; broadcaster_t *broadcaster; +#endif }; @@ -339,6 +341,8 @@ int _x_demux_check_extension (char *mrl, char *extensions); off_t _x_read_abort (xine_stream_t *stream, int fd, char *buf, off_t todo); +int _x_action_pending (xine_stream_t *stream); + /* * plugin_loader functions * -- cgit v1.2.3