diff options
Diffstat (limited to 'src/xine-engine')
-rw-r--r-- | src/xine-engine/Makefile.am | 3 | ||||
-rw-r--r-- | src/xine-engine/audio_out.h | 8 | ||||
-rw-r--r-- | src/xine-engine/buffer.h | 27 | ||||
-rw-r--r-- | src/xine-engine/demux.c | 5 | ||||
-rw-r--r-- | src/xine-engine/video_out.h | 11 | ||||
-rw-r--r-- | src/xine-engine/xine_internal.h | 124 |
6 files changed, 96 insertions, 82 deletions
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 <xine.h> +# include <xine/buffer.h> #endif #include <inttypes.h> @@ -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 <inttypes.h> -#ifndef EXTRA_INFO -#define EXTRA_INFO -typedef struct extra_info_s extra_info_t; -#endif - /* * include public part of xine header */ @@ -120,26 +115,6 @@ struct xine_s { }; /* - * 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 * |