diff options
-rw-r--r-- | include/xine.h.in | 41 | ||||
-rw-r--r-- | src/xine-engine/buffer.h | 2 | ||||
-rw-r--r-- | src/xine-engine/configfile.h | 6 | ||||
-rw-r--r-- | src/xine-engine/metronom.h | 4 | ||||
-rw-r--r-- | src/xine-engine/osd.h | 8 | ||||
-rw-r--r-- | src/xine-engine/plugin_catalog.h | 2 | ||||
-rw-r--r-- | src/xine-engine/post.h | 16 | ||||
-rw-r--r-- | src/xine-engine/refcounter.h | 2 | ||||
-rw-r--r-- | src/xine-engine/video_out.h | 5 | ||||
-rw-r--r-- | src/xine-engine/video_overlay.h | 8 | ||||
-rw-r--r-- | src/xine-engine/vo_scale.h | 7 | ||||
-rw-r--r-- | src/xine-engine/xine_internal.h | 55 |
12 files changed, 79 insertions, 77 deletions
diff --git a/include/xine.h.in b/include/xine.h.in index e4210d314..67b746f4e 100644 --- a/include/xine.h.in +++ b/include/xine.h.in @@ -466,17 +466,17 @@ typedef struct { int64_t vpts; /* timestamp 1/90000 sec for a/v sync */ int64_t duration; + double aspect_ratio; int width, height; int colorspace; /* XINE_IMGFMT_* */ - double aspect_ratio; int pos_stream; /* bytes from stream start */ int pos_time; /* milliseconds */ + int frame_number; /* frame number (may be unknown) */ + uint8_t *data; void *xine_frame; /* used internally by xine engine */ - - int frame_number; /* frame number (may be unknown) */ } xine_video_frame_t; int xine_get_next_video_frame (xine_video_port_t *port, @@ -494,11 +494,11 @@ typedef struct { int num_channels; int bits_per_sample; /* per channel */ - off_t pos_stream; /* bytes from stream start */ - int pos_time; /* milliseconds */ - uint8_t *data; void *xine_frame; /* used internally by xine engine */ + + off_t pos_stream; /* bytes from stream start */ + int pos_time; /* milliseconds */ } xine_audio_frame_t; int xine_get_next_audio_frame (xine_audio_port_t *port, @@ -596,13 +596,13 @@ struct xine_post_in_s { /* the name identifying this input */ const char *name; - /* the datatype of this input, use one of XINE_POST_DATA_* here */ - int type; - /* the data pointer; input is directed to this memory location, * so you simply access the pointer to access the input data */ void *data; + /* the datatype of this input, use one of XINE_POST_DATA_* here */ + int type; + }; struct xine_post_out_s { @@ -610,9 +610,6 @@ struct xine_post_out_s { /* the name identifying this output */ const char *name; - /* the datatype of this output, use one of XINE_POST_DATA_* here */ - int type; - /* the data pointer; output should be directed to this memory location, * so in the easy case you simply write through the pointer */ void *data; @@ -628,6 +625,9 @@ struct xine_post_out_s { * if you do not implement rewiring, set this to NULL */ int (*rewire) (xine_post_out_t *self, void *data); + /* the datatype of this output, use one of XINE_POST_DATA_* here */ + int type; + }; /* get a list of all inputs of a post plugin */ @@ -969,8 +969,8 @@ typedef struct { char *origin; /* file plugin: path */ char *mrl; /* <type>://<location> */ char *link; - uint32_t type; /* see below */ off_t size; /* size of this source, may be 0 */ + uint32_t type; /* see below */ } xine_mrl_t; /* mrl types */ @@ -1365,12 +1365,12 @@ typedef struct { #define CHECK_XV 6 struct xine_health_check_s { - int status; const char* cdrom_dev; const char* dvd_dev; char* msg; char* title; char* explanation; + int status; }; typedef struct xine_health_check_s xine_health_check_t; @@ -1407,6 +1407,11 @@ struct xine_cfg_entry_s { int type; + /* user experience level */ + int exp_level; /* 0 => beginner, + 10 => advanced user, + 20 => expert */ + /* type unknown */ char *unknown_value; @@ -1440,11 +1445,6 @@ struct xine_cfg_entry_s { const char *description; const char *help; - /* user experience level */ - int exp_level; /* 0 => beginner, - 10 => advanced user, - 20 => expert */ - /* callback function and data for live changeable values */ /* some config entries will take effect immediately, although they * do not have a callback registered; such values will have some @@ -1675,12 +1675,13 @@ void xine_config_reset (xine_t *self) XINE_PROTECTED; * xine event struct */ typedef struct { - int type; /* event type (constants see above) */ xine_stream_t *stream; /* stream this event belongs to */ void *data; /* contents depending on type */ int data_length; + int type; /* event type (constants see above) */ + /* you do not have to provide this, it will be filled in by xine_event_send() */ struct timeval tv; /* timestamp of event creation */ } xine_event_t; diff --git a/src/xine-engine/buffer.h b/src/xine-engine/buffer.h index 64fe52a20..49f1f17fa 100644 --- a/src/xine-engine/buffer.h +++ b/src/xine-engine/buffer.h @@ -311,7 +311,6 @@ struct buf_element_s { int32_t size ; /* size of _content_ */ int32_t max_size; /* size of pre-allocated memory pointed to by "mem" */ - uint32_t type; int64_t pts; /* presentation time stamp, used for a/v sync */ int64_t disc_off; /* discontinuity offset */ @@ -329,6 +328,7 @@ struct buf_element_s { void *source; /* pointer to source of this buffer for */ /* free_buffer */ + uint32_t type; } ; /* keyframe should be set whenever possible (that is, when demuxer diff --git a/src/xine-engine/configfile.h b/src/xine-engine/configfile.h index 859214d1c..f7d206c41 100644 --- a/src/xine-engine/configfile.h +++ b/src/xine-engine/configfile.h @@ -57,6 +57,9 @@ struct cfg_entry_s { char *key; int type; + /* user experience level */ + int exp_level; + /* type unknown */ char *unknown_value; @@ -80,9 +83,6 @@ struct cfg_entry_s { char *description; char *help; - /* user experience level */ - int exp_level; - /* callback function and data for live changeable values */ xine_config_cb_t callback; void *callback_data; diff --git a/src/xine-engine/metronom.h b/src/xine-engine/metronom.h index 1628ba9fd..e4115b6ad 100644 --- a/src/xine-engine/metronom.h +++ b/src/xine-engine/metronom.h @@ -336,8 +336,6 @@ metronom_clock_t *_x_metronom_clock_init(xine_t *xine) XINE_PROTECTED; struct scr_plugin_s { - int interface_version; - int (*get_priority) (scr_plugin_t *self); /* @@ -358,6 +356,8 @@ struct scr_plugin_s void (*exit) (scr_plugin_t *self); metronom_clock_t *clock; + + int interface_version; }; #ifdef __cplusplus diff --git a/src/xine-engine/osd.h b/src/xine-engine/osd.h index 6c7be8f0b..e8212acff 100644 --- a/src/xine-engine/osd.h +++ b/src/xine-engine/osd.h @@ -57,8 +57,6 @@ struct osd_object_s { uint32_t color[OVL_PALETTE_SIZE]; /* color lookup table */ uint8_t trans[OVL_PALETTE_SIZE]; /* mixer key table */ - int32_t handle; - #ifdef HAVE_ICONV iconv_t cd; /* iconv handle of encoding */ char *encoding; /* name of encoding */ @@ -66,6 +64,8 @@ struct osd_object_s { osd_font_t *font; osd_ft2context_t *ft2; + + int32_t handle; }; /* this one is public */ @@ -74,6 +74,8 @@ struct xine_osd_s { }; struct osd_renderer_s { + + xine_stream_t *stream; /* * open a new osd object. this will allocated an empty (all zero) drawing @@ -219,8 +221,6 @@ struct osd_renderer_s { osd_object_t *osds; /* instances of osd */ osd_font_t *fonts; /* loaded fonts */ int textpalette; /* default textpalette */ - - xine_stream_t *stream; }; diff --git a/src/xine-engine/plugin_catalog.h b/src/xine-engine/plugin_catalog.h index 5bd1c4701..547521ce3 100644 --- a/src/xine-engine/plugin_catalog.h +++ b/src/xine-engine/plugin_catalog.h @@ -48,8 +48,8 @@ typedef struct { char *filename; off_t filesize; time_t filemtime; - int ref; /* count number of classes */ void *lib_handle; + int ref; /* count number of classes */ int no_unload; /* set if the file can't be unloaded */ } plugin_file_t ; diff --git a/src/xine-engine/post.h b/src/xine-engine/post.h index bcdc3c54b..a3b9786ca 100644 --- a/src/xine-engine/post.h +++ b/src/xine-engine/post.h @@ -92,9 +92,6 @@ struct post_plugin_s { */ void (*dispose) (post_plugin_t *this); - /* has dispose been called */ - int dispose_pending; - /* plugins don't have to init the stuff below */ /* @@ -119,6 +116,9 @@ struct post_plugin_s { /* used by plugin loader */ void *node; + + /* has dispose been called */ + int dispose_pending; }; /* helper function to initialize a post_plugin_t */ @@ -290,15 +290,15 @@ struct post_audio_port_s { /* the original port to call its functions from inside yours */ xine_audio_port_t *original_port; - /* usage counter: how many objects are floating around that need - * these pointers to exist */ - int usage_count; - pthread_mutex_t usage_lock; - /* the stream we are being fed by; NULL means no stream is connected; * this may be an anonymous stream */ xine_stream_t *stream; + pthread_mutex_t usage_lock; + /* usage counter: how many objects are floating around that need + * these pointers to exist */ + int usage_count; + /* some values remembered by port->open() */ uint32_t bits; uint32_t rate; diff --git a/src/xine-engine/refcounter.h b/src/xine-engine/refcounter.h index 640366b1f..739a6ad62 100644 --- a/src/xine-engine/refcounter.h +++ b/src/xine-engine/refcounter.h @@ -31,9 +31,9 @@ typedef struct { pthread_mutex_t lock; - int count; void* object; /* referenced object */ void (*destructor)(void *); /* object destructor */ + int count; } refcounter_t; typedef void (*refcounter_destructor)(void*); diff --git a/src/xine-engine/video_out.h b/src/xine-engine/video_out.h index 7b42c43ed..f0f98354b 100644 --- a/src/xine-engine/video_out.h +++ b/src/xine-engine/video_out.h @@ -130,6 +130,9 @@ struct vo_frame_s { /* cropping to be done */ int crop_left, crop_right, crop_top, crop_bottom; + int lock_counter; + pthread_mutex_t mutex; /* protect access to lock_count */ + /* extra info coming from input or demuxers */ extra_info_t *extra_info; @@ -158,8 +161,6 @@ struct vo_frame_s { * obs: changing anything here will require recompiling vo drivers */ struct vo_frame_s *next; - int lock_counter; - pthread_mutex_t mutex; /* protect access to lock_count */ int id; /* debugging - track this frame */ int is_first; diff --git a/src/xine-engine/video_overlay.h b/src/xine-engine/video_overlay.h index 1e7a2bcca..b15eadc7b 100644 --- a/src/xine-engine/video_overlay.h +++ b/src/xine-engine/video_overlay.h @@ -68,14 +68,14 @@ typedef struct vo_buttons_s { int32_t down; int32_t left; int32_t right; + int32_t hili_rgb_clut; /* true if clut was converted to rgb*/ + /* FIXME: Probably not needed ^^^ */ uint32_t select_color[OVL_PALETTE_SIZE]; uint8_t select_trans[OVL_PALETTE_SIZE]; xine_event_t select_event; uint32_t active_color[OVL_PALETTE_SIZE]; uint8_t active_trans[OVL_PALETTE_SIZE]; xine_event_t active_event; - int32_t hili_rgb_clut; /* true if clut was converted to rgb*/ - /* FIXME: Probably not needed ^^^ */ } vo_buttons_t; typedef struct video_overlay_object_s { @@ -83,8 +83,8 @@ typedef struct video_overlay_object_s { uint32_t object_type; /* 0=Subtitle, 1=Menu */ int64_t pts; /* Needed for Menu button compares */ vo_overlay_t *overlay; /* The image data. */ - uint32_t palette_type; /* 1 Y'CrCB, 2 R'G'B' */ uint32_t *palette; /* If NULL, no palette contained in this event. */ + uint32_t palette_type; /* 1 Y'CrCB, 2 R'G'B' */ int32_t buttonN; /* Current highlighed button. 0 means no info on which button to higlight */ /* -1 means don't use this button info. */ vo_buttons_t button[32]; /* Info regarding each button on the overlay */ @@ -92,12 +92,12 @@ typedef struct video_overlay_object_s { /* This will hold all details of an event item, needed for event queue to function */ typedef struct video_overlay_event_s { - uint32_t event_type; /* Show SPU, Show OSD, Hide etc. */ int64_t vpts; /* Time when event will action. 0 means action now */ /* Once video_out blend_yuv etc. can take rle_elem_t with Colour, blend and length information. * we can remove clut and blend from this structure. * This will allow for many more colours for OSD. */ + uint32_t event_type; /* Show SPU, Show OSD, Hide etc. */ video_overlay_object_t object; /* The image data. */ } video_overlay_event_t; diff --git a/src/xine-engine/vo_scale.h b/src/xine-engine/vo_scale.h index 917b6c99e..793ab1eb7 100644 --- a/src/xine-engine/vo_scale.h +++ b/src/xine-engine/vo_scale.h @@ -100,6 +100,9 @@ struct vo_scale_s { int gui_width, gui_height; int gui_win_x, gui_win_y; + /* */ + int force_redraw; + /* * video + display pixel aspect * One pixel of height 1 has this width @@ -121,10 +124,6 @@ struct vo_scale_s { int output_yoffset; - /* */ - int force_redraw; - - /* gui callbacks */ void *user_data; diff --git a/src/xine-engine/xine_internal.h b/src/xine-engine/xine_internal.h index 30899a4b3..19fa54112 100644 --- a/src/xine-engine/xine_internal.h +++ b/src/xine-engine/xine_internal.h @@ -103,14 +103,14 @@ struct xine_s { plugin_catalog_t *plugin_catalog; + int verbosity; + int demux_strategy; char *save_path; /* log output that may be presented to the user */ scratch_buffer_t *log_buffers[XINE_LOG_NUM]; - int verbosity; - xine_list_t *streams; pthread_mutex_t streams_lock; @@ -204,9 +204,6 @@ struct xine_stream_s { /* demuxers use input_plugin to read data */ input_plugin_t *input_plugin; - /* current content detection method, see METHOD_BY_xxx */ - int content_detection_method; - /* used by video decoders */ xine_video_port_t *video_out; @@ -240,6 +237,9 @@ struct xine_stream_s { int spu_channel_letterbox; int spu_channel; + /* current content detection method, see METHOD_BY_xxx */ + int content_detection_method; + #ifdef XINE_ENGINE_INTERNAL /* these are private variables, plugins must not access them */ @@ -247,27 +247,38 @@ struct xine_stream_s { /* lock controlling speed change access */ pthread_mutex_t speed_change_lock; - int ignore_speed_change; /* speed changes during stop can be disastrous */ + uint32_t ignore_speed_change:1; /*< speed changes during stop can be disastrous */ + uint32_t video_thread_created:1; + uint32_t audio_thread_created:1; + uint32_t first_frame_flag:2; + uint32_t demux_action_pending:1; + uint32_t demux_thread_created:1; + uint32_t demux_thread_running:1; + uint32_t slave_is_subtitle:1; /*< ... and will be automaticaly disposed */ + uint32_t emergency_brake:1; /*< something went really wrong and this stream must be + * stopped. usually due some fatal error on output + * layers as they cannot call xine_stop. */ + uint32_t early_finish_event:1; /*< do not wait fifos get empty before sending event */ + uint32_t gapless_switch:1; /*< next stream switch will be gapless */ input_class_t *eject_class; demux_plugin_t *demux_plugin; /* vo_driver_t *video_driver;*/ pthread_t video_thread; - int video_thread_created; video_decoder_t *video_decoder_plugin; - int video_decoder_streamtype; extra_info_t *video_decoder_extra_info; + int video_decoder_streamtype; int video_channel; + uint32_t audio_track_map[50]; + int audio_track_map_entries; + + int audio_decoder_streamtype; pthread_t audio_thread; - int audio_thread_created; audio_decoder_t *audio_decoder_plugin; - int audio_decoder_streamtype; extra_info_t *audio_decoder_extra_info; - uint32_t audio_track_map[50]; - int audio_track_map_entries; uint32_t audio_type; /* *_user: -2 => off -1 => auto (use *_auto value) @@ -299,7 +310,6 @@ struct xine_stream_s { char *meta_info[XINE_STREAM_INFO_MAX]; /* seeking slowdown */ - int first_frame_flag; pthread_mutex_t first_frame_lock; pthread_cond_t first_frame_reached; @@ -317,34 +327,25 @@ struct xine_stream_s { /* demux thread stuff */ pthread_t demux_thread; - int demux_thread_created; - int demux_thread_running; pthread_mutex_t demux_lock; - int demux_action_pending; pthread_mutex_t demux_mutex; /* used in _x_demux_... functions to synchronize order of pairwise A/V buffer operations */ extra_info_t *current_extra_info; pthread_mutex_t current_extra_info_lock; int video_seek_count; - xine_post_out_t video_source; - xine_post_out_t audio_source; - - int slave_is_subtitle; /* ... and will be automaticaly disposed */ + int delay_finish_event; /* delay event in 1/10 sec units. 0=>no delay, -1=>forever */ + int slave_affection; /* what operations need to be propagated down to the slave? */ int err; + xine_post_out_t video_source; + xine_post_out_t audio_source; + broadcaster_t *broadcaster; refcounter_t *refcounter; - - int emergency_brake; /* something went really wrong and this stream must be - * stopped. usually due some fatal error on output - * layers as they cannot call xine_stop. */ - int early_finish_event; /* do not wait fifos get empty before sending event */ - int gapless_switch; /* next stream switch will be gapless */ - int delay_finish_event; /* delay event in 1/10 sec units. 0=>no delay, -1=>forever */ #endif }; |