diff options
Diffstat (limited to 'src/xine-engine/xine_internal.h')
-rw-r--r-- | src/xine-engine/xine_internal.h | 74 |
1 files changed, 45 insertions, 29 deletions
diff --git a/src/xine-engine/xine_internal.h b/src/xine-engine/xine_internal.h index 9b69f16f1..48aafa3f3 100644 --- a/src/xine-engine/xine_internal.h +++ b/src/xine-engine/xine_internal.h @@ -69,7 +69,6 @@ extern "C" { # include <xine/alphablend.h> #endif - #define XINE_MAX_EVENT_LISTENERS 50 #define XINE_MAX_EVENT_TYPES 100 #define XINE_MAX_TICKET_HOLDER_THREADS 64 @@ -101,19 +100,22 @@ 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; metronom_clock_t *clock; + /** Handle for libxdg-basedir functions. It's actually an xdgHandle. */ + void * basedir_handle; + #ifdef XINE_ENGINE_INTERNAL xine_ticket_t *port_ticket; pthread_mutex_t log_lock; @@ -166,6 +168,9 @@ struct xine_ticket_s { * be used in combination with acquire_nonblocking() */ void (*release_nonblocking)(xine_ticket_t *self, int irrevocable); + int (*lock_port_rewiring)(xine_ticket_t *self, int ms_timeout); + void (*unlock_port_rewiring)(xine_ticket_t *self); + void (*dispose)(xine_ticket_t *self); pthread_mutex_t lock; @@ -177,6 +182,7 @@ struct xine_ticket_s { int pending_revocations; int atomic_revoke; pthread_t atomic_revoker_thread; + pthread_mutex_t port_rewiring_lock; struct { int count; pthread_t holder; @@ -196,9 +202,9 @@ struct xine_event_queue_s { pthread_cond_t events_processed; xine_stream_t *stream; pthread_t *listener_thread; + void *user_data; xine_event_listener_cb_t callback; int callback_running; - void *user_data; }; /* @@ -216,9 +222,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; @@ -252,6 +255,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 */ @@ -259,27 +265,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) @@ -311,7 +328,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; @@ -329,34 +345,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 }; @@ -370,6 +377,15 @@ struct xine_stream_s { */ int _x_query_buffer_usage(xine_stream_t *stream, int *num_video_buffers, int *num_audio_buffers, int *num_video_frames, int *num_audio_frames) XINE_PROTECTED; +int _x_lock_port_rewiring(xine_t *xine, int ms_to_time_out) XINE_PROTECTED; +void _x_unlock_port_rewiring(xine_t *xine) XINE_PROTECTED; +int _x_lock_frontend(xine_stream_t *stream, int ms_to_time_out) XINE_PROTECTED; +void _x_unlock_frontend(xine_stream_t *stream) XINE_PROTECTED; +int _x_query_unprocessed_osd_events(xine_stream_t *stream) XINE_PROTECTED; +int _x_demux_seek(xine_stream_t *stream, off_t start_pos, int start_time, int playing) XINE_PROTECTED; +int _x_continue_stream_processing(xine_stream_t *stream) XINE_PROTECTED; +void _x_trigger_relaxed_frame_drop_mode(xine_stream_t *stream) XINE_PROTECTED; +void _x_reset_relaxed_frame_drop_mode(xine_stream_t *stream) XINE_PROTECTED; void _x_handle_stream_end (xine_stream_t *stream, int non_user) XINE_PROTECTED; |