xine-lib 1.2.13-20230125hg15249
Data Structures | Macros | Typedefs | Functions
events.c File Reference
#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_txine_event_get (xine_event_queue_t *queue)
 
xine_event_txine_event_next (xine_event_queue_t *queue, xine_event_t *prev_event)
 
static xine_event_txine_event_wait_locked (xine_event_queue_private_t *q)
 
xine_event_txine_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_txine_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.
 
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)
 

Macro Definition Documentation

◆ MAX_REUSE_DATA

#define MAX_REUSE_DATA   256

Referenced by xine_event_send().

◆ MAX_REUSE_EVENTS

#define MAX_REUSE_EVENTS   16

Referenced by xine_event_new_queue().

Typedef Documentation

◆ xine_event_queue_private_t

Function Documentation

◆ _x_flush_events_queues()

void _x_flush_events_queues ( xine_stream_t * s)

◆ listener_loop()

static void * listener_loop ( void * queue_gen)
static

◆ 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 )

◆ xine_event_dispose_queue()

void xine_event_dispose_queue ( xine_event_queue_t * queue)

References xine_event_t::data, xine_event_t::data_length, xine_event_private_t::e, 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_s::listener_thread, xine_event_queue_s::lock, xine_stream_private_st::lock, 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, PTR_IN_RANGE, xine_event_queue_private_s::q, xine_event_private_t::queue, 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_stream_private_st::side_streams, xine_event_t::stream, xine_event_queue_s::stream, xine_event_t::tv, xine_event_t::type, xine_stream_s::xine, xine_event_queue_unref_unlock(), XINE_EVENT_QUIT, xine_list_clear(), xine_list_find(), xine_list_next_value(), xine_list_push_back(), xine_list_remove(), xine_list_size(), xine_refs_add(), xine_refs_sub(), 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(), spudec_dispose(), v4l_plugin_dispose(), vdr_audio_dispose(), vdr_audio_port_put_buffer(), vdr_plugin_dispose(), vdr_video_dispose(), and vdr_video_draw().

◆ xine_event_free()

void xine_event_free ( xine_event_t * event)

◆ xine_event_get()

xine_event_t * xine_event_get ( xine_event_queue_t * queue)

◆ xine_event_new_queue()

xine_event_queue_t * xine_event_new_queue ( xine_stream_t * s)

◆ xine_event_next()

xine_event_t * xine_event_next ( xine_event_queue_t * queue,
xine_event_t * prev_event )

◆ xine_event_queue_unref_unlock()

static int xine_event_queue_unref_unlock ( xine_event_queue_private_t * q)
static

◆ xine_event_select()

void xine_event_select ( xine_event_queue_t * queue,
const int * types )

Filter events by type.

Parameters
queueThe queue that shall receive a few types only.
typesList 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().

◆ xine_event_send()

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(), 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_progress(), report_progress(), report_progress(), report_progress(), report_stats(), send_audio_amp_event_internal(), send_header(), send_mouse_enter_leave_event(), 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_metadata(), update_title_display(), update_title_name(), vcd_update_title_display(), vdpau_decoder_init(), vdpau_h264_alter_frame_render(), 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().

◆ xine_event_type_cmp()

static int xine_event_type_cmp ( void * a,
void * b )
static

Referenced by xine_event_select().

◆ xine_event_wait()

xine_event_t * xine_event_wait ( xine_event_queue_t * queue)

◆ xine_event_wait_locked()

static xine_event_t * xine_event_wait_locked ( xine_event_queue_private_t * q)
static