xine-lib 1.2.11
|
#include <pthread.h>
#include <sys/time.h>
#include <errno.h>
#include <xine/xine_internal.h>
#include <xine/sorted_array.h>
#include "xine_private.h"
Data Structures | |
struct | xine_event_private_t |
struct | xine_event_queue_private_s |
Macros | |
#define | MAX_REUSE_EVENTS 16 |
#define | MAX_REUSE_DATA 256 |
Typedefs | |
typedef struct xine_event_queue_private_s | xine_event_queue_private_t |
Functions | |
xine_event_t * | xine_event_get (xine_event_queue_t *queue) |
xine_event_t * | xine_event_next (xine_event_queue_t *queue, xine_event_t *prev_event) |
static xine_event_t * | xine_event_wait_locked (xine_event_queue_private_t *q) |
xine_event_t * | xine_event_wait (xine_event_queue_t *queue) |
static int | xine_event_queue_unref_unlock (xine_event_queue_private_t *q) |
void | xine_event_free (xine_event_t *event) |
void | xine_event_send (xine_stream_t *s, const xine_event_t *event) |
xine_event_queue_t * | xine_event_new_queue (xine_stream_t *s) |
static int | xine_event_type_cmp (void *a, void *b) |
void | xine_event_select (xine_event_queue_t *queue, const int *types) |
Filter events by type. More... | |
void | xine_event_dispose_queue (xine_event_queue_t *queue) |
static void * | listener_loop (void *queue_gen) |
int | xine_event_create_listener_thread (xine_event_queue_t *queue, xine_event_listener_cb_t callback, void *user_data) |
void | _x_flush_events_queues (xine_stream_t *s) |
#define MAX_REUSE_DATA 256 |
#define MAX_REUSE_EVENTS 16 |
typedef struct xine_event_queue_private_s xine_event_queue_private_t |
void _x_flush_events_queues | ( | xine_stream_t * | s | ) |
References xine_event_queue_s::callback_running, xine_stream_private_st::event, xine_event_queue_s::events, xine_event_queue_s::events_processed, xine_event_queue_private_s::flush, xine_event_queue_private_s::handler, xine_event_queue_private_s::lasttime, xine_event_queue_s::listener_thread, xine_event_queue_s::lock, xine_stream_private_st::lock, NULL, xine_event_queue_private_s::q, xine_stream_private_st::queues, xine_event_queue_private_s::refs, xine_stream_private_st::s, xine_stream_private_st::side_streams, xine_event_t::tv, xine_stream_s::xine, xine_event_queue_unref_unlock(), xine_gettime(), xine_list_next_value(), XINE_VERBOSITY_DEBUG, and xprintf.
Referenced by open_internal().
|
static |
References xine_event_queue_s::callback, xine_event_queue_s::callback_running, xine_event_queue_s::events_processed, xine_event_queue_private_s::flush, xine_event_queue_private_s::free_events, xine_event_queue_private_s::lasttime, xine_event_queue_s::lock, NULL, PTR_IN_RANGE, xine_event_queue_private_s::q, xine_event_queue_private_s::refs, xine_event_queue_private_s::revents, xine_event_queue_s::user_data, XINE_EVENT_QUIT, xine_event_wait_locked(), and xine_list_push_back().
Referenced by xine_event_create_listener_thread().
int xine_event_create_listener_thread | ( | xine_event_queue_t * | queue, |
xine_event_listener_cb_t | callback, | ||
void * | user_data | ||
) |
References _x_assert, xine_event_queue_s::callback, xine_event_queue_private_s::handler, listener_loop(), xine_event_queue_s::listener_thread, NULL, xine_event_queue_private_s::q, xine_event_queue_s::stream, xine_event_queue_s::user_data, user_data(), xine_stream_s::xine, XINE_VERBOSITY_NONE, and xprintf.
Referenced by external_stream_play(), spucmml_class_open_plugin(), and vdr_class_get_instance().
void xine_event_dispose_queue | ( | xine_event_queue_t * | queue | ) |
References xine_event_queue_private_s::q, xine_stream_private_st::s, xine_stream_private_st::side_streams, xine_event_queue_s::stream, xine_stream_s::xine, xine_list_find(), xine_list_remove(), XINE_VERBOSITY_DEBUG, and xprintf.
Referenced by bluray_plugin_dispose(), demux_matroska_dispose(), demux_ogg_dispose(), demux_ts_dispose(), dvb_plugin_dispose(), dvd_plugin_dispose(), dxr3_spudec_dispose(), external_stream_stop(), open_plugin(), pvr_plugin_dispose(), spudec_dispose(), v4l_plugin_dispose(), vdr_audio_dispose(), vdr_audio_port_put_buffer(), vdr_plugin_dispose(), vdr_video_dispose(), and vdr_video_draw().
void xine_event_free | ( | xine_event_t * | event | ) |
References xine_event_queue_private_s::free_events, xine_event_queue_s::lock, PTR_IN_RANGE, xine_event_queue_private_s::q, xine_event_private_t::queue, xine_event_queue_private_s::revents, xine_event_queue_unref_unlock(), and xine_list_push_back().
Referenced by dvb_event_handler(), dvd_handle_events(), dxr3_spudec_decode_data(), handle_events(), ogg_handle_event(), pvr_event_handler(), spudec_decode_data(), v4l_event_handler(), vdr_audio_port_put_buffer(), and vdr_video_draw().
xine_event_t * xine_event_get | ( | xine_event_queue_t * | queue | ) |
References xine_event_queue_s::events, xine_event_queue_s::lock, NULL, xine_event_queue_private_s::q, xine_list_next_value(), xine_list_remove(), xine_list_size(), xine_refs_add(), and xine_refs_get().
Referenced by dvb_event_handler(), dvd_handle_events(), dxr3_spudec_decode_data(), handle_events(), ogg_handle_event(), pvr_event_handler(), spudec_decode_data(), v4l_event_handler(), vcd_handle_events(), vdr_audio_port_put_buffer(), and vdr_video_draw().
xine_event_queue_t * xine_event_new_queue | ( | xine_stream_t * | s | ) |
References xine_event_queue_s::callback_running, xine_stream_private_st::event, xine_event_queue_s::events, xine_event_queue_s::events_processed, xine_event_queue_private_s::flush, xine_event_queue_private_s::free_events, xine_event_queue_private_s::lasttime, xine_event_queue_s::listener_thread, xine_event_queue_s::lock, xine_stream_private_st::lock, MAX_REUSE_EVENTS, xine_event_queue_s::new_event, NULL, xine_event_queue_private_s::num_all, xine_event_queue_private_s::num_alloc, xine_event_queue_private_s::num_skip, xine_event_queue_private_s::q, xine_stream_private_st::queues, xine_event_queue_private_s::refs, xine_stream_private_st::refs, xine_event_queue_private_s::revents, xine_stream_private_st::s, xine_event_queue_private_s::select, xine_stream_private_st::side_streams, xine_event_queue_s::stream, xine_list_delete(), xine_list_new(), xine_list_push_back(), xine_refs_add(), and xine_refs_init().
Referenced by anx_open_plugin(), bluray_class_get_instance(), dvb_plugin_open(), dvd_class_get_instance(), dxr3_spudec_open_plugin(), external_stream_play(), ogg_open_plugin(), open_plugin(), pvr_plugin_open(), spucmml_class_open_plugin(), spudec_open_plugin(), v4l2_input_open(), v4l_plugin_radio_open(), v4l_plugin_video_open(), vcd_class_get_instance(), vdr_audio_port_put_buffer(), vdr_class_get_instance(), and vdr_video_draw().
xine_event_t * xine_event_next | ( | xine_event_queue_t * | queue, |
xine_event_t * | prev_event | ||
) |
References xine_event_queue_s::events, xine_event_queue_private_s::free_events, xine_event_queue_s::lock, NULL, PTR_IN_RANGE, xine_event_queue_private_s::q, xine_event_queue_private_s::refs, xine_event_queue_private_s::revents, xine_list_next_value(), xine_list_push_back(), xine_list_remove(), xine_list_size(), xine_refs_add(), and xine_refs_get().
Referenced by demux_ts_event_handler().
|
static |
References xine_event_queue_s::events, xine_event_queue_s::events_processed, xine_event_queue_private_s::free_events, xine_event_queue_s::lock, xine_event_queue_s::new_event, xine_event_queue_private_s::q, xine_event_queue_private_s::refs, xine_event_queue_private_s::select, xine_list_delete(), xine_refs_sub(), and xine_sarray_delete().
Referenced by _x_flush_events_queues(), and xine_event_free().
void xine_event_select | ( | xine_event_queue_t * | queue, |
const int * | types | ||
) |
Filter events by type.
queue | The queue that shall receive a few types only. |
types | List of event types, termiated by XINE_EVENT_QUIT. NULL reverts to the "all types" default. |
References xine_event_queue_s::lock, NULL, xine_event_queue_private_s::q, xine_event_queue_private_s::select, XINE_EVENT_QUIT, xine_event_type_cmp(), xine_sarray_add(), xine_sarray_clear(), xine_sarray_delete(), XINE_SARRAY_MODE_UNIQUE, xine_sarray_new(), and xine_sarray_set_mode().
Referenced by open_plugin().
void xine_event_send | ( | xine_stream_t * | s, |
const xine_event_t * | event | ||
) |
References xine_event_t::data, xine_event_t::data_length, xine_progress_data_t::description, xine_event_private_t::e, xine_event_queue_s::events, xine_event_queue_private_s::free_events, xine_event_queue_s::lock, MAX_REUSE_DATA, xine_event_queue_s::new_event, now(), NULL, xine_event_queue_private_s::num_all, xine_event_queue_private_s::num_alloc, xine_event_queue_private_s::num_skip, xine_progress_data_t::percent, xine_event_queue_private_s::q, xine_event_private_t::queue, xine_event_queue_private_s::refs, xine_stream_private_st::s, xine_event_queue_private_s::select, xine_stream_private_st::side_streams, xine_event_t::stream, xine_event_t::tv, xine_event_t::type, XINE_EVENT_NBC_STATS, XINE_EVENT_PROGRESS, xine_list_next_value(), xine_list_prev_value(), xine_list_push_back(), xine_list_remove(), xine_list_size(), xine_refs_add(), xine_sarray_binary_search(), and xine_small_memcpy.
Referenced by __xine_pa_sink_info_callback(), _x_demux_send_mrl_reference(), _x_handle_stream_end(), _x_message(), ao_alsa_handle_event_thread(), audio_decoder_loop(), decode_render(), deinterlace_draw(), demux_ts_parse_pmt(), dvd_plugin_open(), dvd_plugin_read_block(), dxr3_spudec_process_nav(), event_handler(), ff_handle_mpeg_sequence(), frame_format_change(), http_plugin_read_int(), http_plugin_read_metainf(), mpeg2_find_sequence_header(), parse_chunk(), process_sequence_mpeg12_dependent_data(), process_userdata(), pvr_finish_recording(), pvr_report_realtime(), report_progress(), report_stats(), send_audio_amp_event_internal(), send_header(), send_mouse_enter_leave_event(), send_num_buttons(), spudec_decode_data(), spudec_decode_nav(), spudec_process(), spudec_process_nav(), stream_flush(), stream_reset(), switch_channel(), trick_speed_send_event(), update_chapter_display(), update_metadata(), update_title_display(), update_title_name(), vcd_update_title_display(), vdpau_decoder_init(), vdr_audio_port_put_buffer(), vdr_execute_rpc_command(), vdr_video_dispose(), vdr_video_draw(), vdr_vpts_offset_queue_add(), video_decoder_loop(), and vo_frame_draw().
|
static |
Referenced by xine_event_select().
xine_event_t * xine_event_wait | ( | xine_event_queue_t * | queue | ) |
References xine_event_queue_s::lock, xine_event_queue_private_s::q, and xine_event_wait_locked().
|
static |
References xine_event_queue_s::events, xine_event_queue_s::lock, xine_event_queue_s::new_event, NULL, xine_event_queue_private_s::q, xine_event_t::type, XINE_EVENT_NBC_STATS, XINE_EVENT_PROGRESS, xine_gettime(), xine_list_next_value(), xine_list_remove(), xine_list_size(), and xine_refs_add().
Referenced by listener_loop(), and xine_event_wait().