xine-lib: xine-lib-1.2.12/src/xine-engine/xine_private.h File Reference

xine-lib 1.2.12

Data Structures | Macros | Typedefs | Functions
xine_private.h File Reference

Declaration of internal, private functions for xine-lib. More...

`#include <xine/xine_internal.h>`

Go to the source code of this file.

## Data Structures
struct | xine_refs_t
struct | xine_private_t
struct | xine_stream_private_st

## Macros
#define | INTERNAL
#define | XINE_DISABLE_DEPRECATION_WARNINGS
#define | XINE_ENABLE_DEPRECATION_WARNINGS
#define | EXTERN_C_START
#define | EXTERN_C_STOP
#define | xine_rwlock_t pthread_mutex_t
#define | xine_rwlock_init_default(l) pthread_mutex_init (l, NULL)
#define | xine_rwlock_rdlock(l) pthread_mutex_lock (l)
#define | xine_rwlock_tryrdlock(l) pthread_mutex_trylock (l)
#define | xine_rwlock_timedrdlock(l, t) pthread_mutex_timedlock (l, t)
#define | xine_rwlock_wrlock(l) pthread_mutex_lock (l)
#define | xine_rwlock_trywrlock(l) pthread_mutex_trylock (l)
#define | xine_rwlock_timedwrlock(l, t) pthread_mutex_timedlock (l, t)
#define | xine_rwlock_unlock(l) pthread_mutex_unlock (l)
#define | xine_rwlock_destroy(l) pthread_mutex_destroy (l)
#define | XINE_MAX_INT32_STR 13
#define | XINE_MAX_INT64_STR 21
#define | xine_uint2str(s, v)
#define | PTR_IN_RANGE(_ptr, _start, _size) ((uintptr_t)((uint8_t *)(_ptr) - (uint8_t *)(_start)) < (uintptr_t)(_size))
#define | SPEED_FLAG_IGNORE_CHANGE 1
#define | SPEED_FLAG_CHANGING 2
#define | SPEED_FLAG_WANT_LIVE 4
#define | SPEED_FLAG_WANT_NEW 8
#define | XINE_NUM_SIDE_STREAMS 4
#define | XINE_NUM_CURR_EXTRA_INFOS 2
#define | XINE_NBC_EVENT_AUDIO_DRY 1

## Typedefs
typedef struct xine_stream_private_st | xine_stream_private_t
typedef struct xine_fast_text_s | xine_fast_text_t

## Functions
static void | xine_refs_init (xine_refs_t *refs, void(*destructor)(void *object), void *object)
static int | xine_refs_add (xine_refs_t *refs, int n)
static int | xine_refs_sub (xine_refs_t *refs, int n)
static int | xine_refs_get (xine_refs_t *refs)
int | _x_scan_plugins (xine_t *this)
| Load plugins into catalog. More...
void | _x_dispose_plugins (xine_t *this)
| Dispose (shutdown) all currently loaded plugins. More...
void | _x_free_video_driver (xine_t *xine, vo_driver_t **driver)
void | _x_free_audio_driver (xine_t *xine, ao_driver_t **driver)
void | xine_probe_fast_memcpy (xine_t *xine)
| Benchmark available memcpy methods. More...
int | _x_set_file_close_on_exec (int fd)
| Make file descriptors and sockets uninheritable. More...
int | _x_set_socket_close_on_exec (int s)
static int | xine_gettime (struct timespec *ts)
static uint32_t | xine_uint_mul_div (uint32_t num, uint32_t mul, uint32_t den)
static int32_t | xine_str2int32 (const char **s)
static uint32_t | xine_str2uint32 (const char **s)
static uint64_t | xine_str2uint64 (const char **s)
static void | xine_int32_2str (char **s, int32_t v)
static void | xine_uint32_2str (char **s, uint32_t v)
static void | xine_uint64_2str (char **s, uint64_t v)
void | xine_current_extra_info_set (xine_stream_private_t *stream, const extra_info_t *info)
void | xine_nbc_event (xine_stream_private_t *stream, uint32_t type)
int | xine_fbc_set (fifo_buffer_t *fifo, int on)
xine_fast_text_t * | xine_fast_text_load (const char *filename, size_t max_size)
char * | xine_fast_text_line (xine_fast_text_t *xft, size_t *linesize)
void | xine_fast_text_unload (xine_fast_text_t **xft)
demux_plugin_t * | _x_find_demux_plugin_last_probe (xine_stream_t *stream, const char *last_demux_name, input_plugin_t *input)
input_plugin_t * | _x_rip_plugin_get_instance (xine_stream_t *stream, const char *filename)
input_plugin_t * | _x_cache_plugin_get_instance (xine_stream_t *stream)
int | _x_video_decoder_init (xine_stream_t *stream)
void | _x_video_decoder_shutdown (xine_stream_t *stream)
int | _x_audio_decoder_init (xine_stream_t *stream)
void | _x_audio_decoder_shutdown (xine_stream_t *stream)

## Detailed Description

Declaration of internal, private functions for xine-lib.

These functions should not be used by neither plugins nor frontends.

## Macro Definition Documentation

## ◆ EXTERN_C_START

#define EXTERN_C_START

## ◆ EXTERN_C_STOP

#define EXTERN_C_STOP

## ◆ INTERNAL

#define INTERNAL

## ◆ PTR_IN_RANGE

#define PTR_IN_RANGE | ( |  | _ptr,
|  |  | _start,
|  |  | _size
| ) |  | ((uintptr_t)((uint8_t *)(_ptr) - (uint8_t *)(_start)) < (uintptr_t)(_size))

## ◆ SPEED_FLAG_CHANGING

#define SPEED_FLAG_CHANGING 2

## ◆ SPEED_FLAG_IGNORE_CHANGE

#define SPEED_FLAG_IGNORE_CHANGE 1

## ◆ SPEED_FLAG_WANT_LIVE

#define SPEED_FLAG_WANT_LIVE 4

## ◆ SPEED_FLAG_WANT_NEW

#define SPEED_FLAG_WANT_NEW 8

## ◆ XINE_DISABLE_DEPRECATION_WARNINGS

#define XINE_DISABLE_DEPRECATION_WARNINGS

## ◆ XINE_ENABLE_DEPRECATION_WARNINGS

#define XINE_ENABLE_DEPRECATION_WARNINGS

## ◆ XINE_MAX_INT32_STR

#define XINE_MAX_INT32_STR 13

## ◆ XINE_MAX_INT64_STR

#define XINE_MAX_INT64_STR 21

## ◆ XINE_NBC_EVENT_AUDIO_DRY

#define XINE_NBC_EVENT_AUDIO_DRY 1

## ◆ XINE_NUM_CURR_EXTRA_INFOS

#define XINE_NUM_CURR_EXTRA_INFOS 2

## ◆ XINE_NUM_SIDE_STREAMS

#define XINE_NUM_SIDE_STREAMS 4

## ◆ xine_rwlock_destroy

#define xine_rwlock_destroy | ( |  | l | ) | pthread_mutex_destroy (l)

## ◆ xine_rwlock_init_default

#define xine_rwlock_init_default | ( |  | l | ) | pthread_mutex_init (l, NULL)

## ◆ xine_rwlock_rdlock

#define xine_rwlock_rdlock | ( |  | l | ) | pthread_mutex_lock (l)

## ◆ xine_rwlock_t

#define xine_rwlock_t pthread_mutex_t

## ◆ xine_rwlock_timedrdlock

#define xine_rwlock_timedrdlock | ( |  | l,
|  |  | t
| ) |  | pthread_mutex_timedlock (l, t)

## ◆ xine_rwlock_timedwrlock

#define xine_rwlock_timedwrlock | ( |  | l,
|  |  | t
| ) |  | pthread_mutex_timedlock (l, t)

## ◆ xine_rwlock_tryrdlock

#define xine_rwlock_tryrdlock | ( |  | l | ) | pthread_mutex_trylock (l)

## ◆ xine_rwlock_trywrlock

#define xine_rwlock_trywrlock | ( |  | l | ) | pthread_mutex_trylock (l)

## ◆ xine_rwlock_unlock

#define xine_rwlock_unlock | ( |  | l | ) | pthread_mutex_unlock (l)

## ◆ xine_rwlock_wrlock

#define xine_rwlock_wrlock | ( |  | l | ) | pthread_mutex_lock (l)

## ◆ xine_uint2str

#define xine_uint2str | ( |  | s,
|  |  | v
| ) |  |

Value:
do { \
if (sizeof (v) == 8) \
xine_uint64_2str (s, v); \
else \
xine_uint32_2str (s, v); \
} while (0)
v
uint32_t v
Definition: utils.c:1157

## Typedef Documentation

## ◆ xine_fast_text_t

typedef struct xine_fast_text_s xine_fast_text_t

The fast text feature.

## ◆ xine_stream_private_t

typedef struct xine_stream_private_st xine_stream_private_t

## Function Documentation

## ◆ _x_audio_decoder_init()

int _x_audio_decoder_init | ( | xine_stream_t * | stream | ) |

References _, _x_dummy_fifo_buffer_new(), _x_fifo_buffer_new(), xine_stream_s::audio_channel_auto, xine_stream_private_st::audio_channel_user, audio_decoder_loop(), xine_stream_s::audio_fifo, xine_stream_s::audio_out, xine_stream_private_st::audio_thread, xine_stream_private_st::audio_thread_created, xine_stream_private_st::audio_track_map_entries, xine_stream_private_st::audio_type, xine_s::config, fifo_buffer_s::dispose, NULL, config_values_s::register_num, xine_stream_private_st::s, SCHED_OTHER, xine_stream_private_st::side_streams, xine_stream_s::xine, XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by xine_stream_new().

## ◆ _x_audio_decoder_shutdown()

void _x_audio_decoder_shutdown | ( | xine_stream_t * | stream | ) |

References xine_stream_s::audio_fifo, xine_stream_private_st::audio_thread, xine_stream_private_st::audio_thread_created, BUF_CONTROL_QUIT, fifo_buffer_s::buffer_pool_alloc, fifo_buffer_s::dispose, NULL, fifo_buffer_s::put, xine_stream_private_st::s, and buf_element_s::type.

Referenced by xine_dispose().

## ◆ _x_cache_plugin_get_instance()

input_plugin_t * _x_cache_plugin_get_instance | ( | xine_stream_t * | stream | ) |

References cache_plugin_new(), and xine_stream_s::input_plugin.

Referenced by open_internal().

## ◆ _x_find_demux_plugin_last_probe()

demux_plugin_t * _x_find_demux_plugin_last_probe | ( | xine_stream_t * | stream,
|  | const char * | last_demux_name,
|  | input_plugin_t * | input
| ) |  |

References _, _load_plugin_class(), _x_demux_check_extension(), xine_stream_s::content_detection_method, plugin_info_t::id, inc_node_ref(), plugin_node_s::info, input(), plugin_catalog_s::lock, lprintf, METHOD_BY_CONTENT, METHOD_BY_MRL, NULL, xine_s::plugin_catalog, plugin_node_s::plugin_class, PLUGIN_DEMUX, plugin_catalog_s::plugin_lists, xine_stream_s::xine, xine_sarray_get(), xine_sarray_size(), XINE_VERBOSITY_DEBUG, XINE_VERBOSITY_LOG, and xprintf.

Referenced by open_internal().

## ◆ _x_free_audio_driver()

void _x_free_audio_driver | ( | xine_t * | xine,
|  | ao_driver_t ** | driver
| ) |  |

References dec_node_ref(), ao_driver_s::exit, plugin_catalog_s::lock, NULL, and xine_s::plugin_catalog.

Referenced by ao_exit(), and ao_loop().

## ◆ _x_free_video_driver()

void _x_free_video_driver | ( | xine_t * | xine,
|  | vo_driver_t ** | driver
| ) |  |

References dec_node_ref(), plugin_catalog_s::lock, NULL, and xine_s::plugin_catalog.

Referenced by vo_exit().

## ◆ _x_rip_plugin_get_instance()

input_plugin_t * _x_rip_plugin_get_instance | ( | xine_stream_t * | stream,
|  | const char * | filename
| ) |  |

References _, _x_freep(), _x_message(), buf_element_s::content, buf_element_s::free_buffer, input_plugin_s::get_blocksize, input_plugin_s::get_capabilities, input_plugin_s::get_optional_data, INPUT_CAP_BLOCK, INPUT_CAP_PREVIEW, INPUT_CAP_RIP_FORBIDDEN, INPUT_CAP_SEEKABLE, INPUT_CAP_SIZED_PREVIEW, input_plugin_s::input_class, INPUT_OPTIONAL_DATA_FRAGLIST, INPUT_OPTIONAL_DATA_PTSOFFS, INPUT_OPTIONAL_SUCCESS, xine_stream_s::input_plugin, lprintf, MAX_PREVIEW_SIZE, MAX_TARGET_LEN, NULL, input_plugin_s::read, input_plugin_s::read_block, rip_plugin_dispose(), rip_plugin_get_blocksize(), rip_plugin_get_capabilities(), rip_plugin_get_current_pos(), rip_plugin_get_current_time(), rip_plugin_get_length(), rip_plugin_get_mrl(), rip_plugin_get_optional_data(), rip_plugin_open(), rip_plugin_read(), rip_plugin_read_block(), rip_plugin_seek(), rip_plugin_seek_time(), rip_read_file_read_1a(), S_ISFIFO, xine_s::save_path, buf_element_s::size, xine_stream_s::video_fifo, xine_stream_s::xine, xine_log(), XINE_LOG_MSG, XINE_MSG_SECURITY, and xine_small_memcpy.

Referenced by open_internal().

## ◆ _x_set_file_close_on_exec()

int _x_set_file_close_on_exec | ( | int | fd | ) |

Make file descriptors and sockets uninheritable.

Referenced by xine_create_cloexec(), and xine_open_cloexec().

## ◆ _x_set_socket_close_on_exec()

int _x_set_socket_close_on_exec | ( | int | s | ) |

Referenced by manager_loop(), and xine_socket_cloexec().

## ◆ _x_video_decoder_init()

int _x_video_decoder_init | ( | xine_stream_t * | stream | ) |

References _, _x_dummy_fifo_buffer_new(), _x_fifo_buffer_new(), xine_s::config, fifo_buffer_s::dispose, NULL, config_values_s::register_num, xine_stream_private_st::s, SCHED_OTHER, xine_stream_private_st::side_streams, xine_stream_private_st::spu_track_map_entries, video_decoder_loop(), xine_stream_s::video_fifo, xine_stream_s::video_out, xine_stream_private_st::video_thread, xine_stream_private_st::video_thread_created, xine_stream_s::xine, xine_log(), and XINE_LOG_MSG.

Referenced by xine_stream_new().

## ◆ _x_video_decoder_shutdown()

void _x_video_decoder_shutdown | ( | xine_stream_t * | stream | ) |

References BUF_CONTROL_QUIT, fifo_buffer_s::buffer_pool_alloc, fifo_buffer_s::dispose, lprintf, NULL, fifo_buffer_s::put, xine_stream_private_st::s, buf_element_s::type, xine_stream_s::video_fifo, xine_stream_private_st::video_thread, and xine_stream_private_st::video_thread_created.

Referenced by xine_dispose(), and xine_stream_new().

## ◆ xine_current_extra_info_set()

void xine_current_extra_info_set | ( | xine_stream_private_t * | stream,
|  | const extra_info_t * | info
| ) |  |

References xine_stream_private_st::current_extra_info, xine_stream_private_st::current_extra_info_index, extra_info_s::frame_number, extra_info_s::input_normpos, extra_info_s::input_time, extra_info_s::invalid, extra_info_s::seek_count, extra_info_s::vpts, XINE_NUM_CURR_EXTRA_INFOS, xine_refs_add(), and xine_refs_get().

Referenced by ao_loop(), ao_put_buffer(), next_frame(), overlay_and_display_frame(), vo_frame_draw(), and xine_get_pos_length().

## ◆ xine_fast_text_line()

char * xine_fast_text_line | ( | xine_fast_text_t * | xft,
|  | size_t * | linesize
| ) |  |

get next line. you may modify return[0] ... return[filesize]. it all stays valid until xine_fast_text_unload ().

References xine_fast_text_s::dummy, xine_fast_text_s::flags, xine_fast_text_s::line_start, NULL, xine_fast_text_s::scan_here, xine_fast_text_s::text_len, and v.

Referenced by load_plugin_list(), and xine_config_load().

## ◆ xine_fast_text_load()

xine_fast_text_t * xine_fast_text_load | ( | const char * | filename,
|  | size_t | max_size
| ) |  |

load fast text from file.

References xine_fast_text_s::dummy, xine_fast_text_s::flags, xine_fast_text_s::line_start, NULL, xine_fast_text_s::scan_here, and xine_fast_text_s::text_len.

Referenced by load_plugin_list(), and xine_config_load().

## ◆ xine_fast_text_unload()

void xine_fast_text_unload | ( | xine_fast_text_t ** | xft | ) |

free the text.

References NULL.

Referenced by load_plugin_list(), and xine_config_load().

## ◆ xine_fbc_set()

int xine_fbc_set | ( | fifo_buffer_t * | fifo,
|  | int | on
| ) |  |

References fifo_buffer_s::alloc_cb, fifo_buffer_s::alloc_cb_data, fifo_buffer_s::buffer_pool_capacity, fbc_dummy(), fifo_buffer_s::mutex, and NULL.

## ◆ xine_gettime()

static int xine_gettime | ( | struct timespec * | ts | ) |
| inlinestatic

References NULL.

## ◆ xine_int32_2str()

static void xine_int32_2str | ( | char ** | s,
|  | int32_t | v
| ) |  |
| inlinestatic

References v.

Referenced by save_plugin_list(), and xine_config_save().

## ◆ xine_nbc_event()

void xine_nbc_event | ( | xine_stream_private_t * | stream,
|  | uint32_t | type
| ) |  |

References xine_stream_private_st::counter, xine_stream_private_st::lock, xine_stream_private_st::nbc, xine_stream_private_st::nbc_refs, nbc_set_speed(), nbc_stats_reset(), xine_stream_private_st::side_streams, type, xine_nbc_close(), XINE_NBC_EVENT_AUDIO_DRY, XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by ao_out_fifo_get().

## ◆ xine_probe_fast_memcpy()

void xine_probe_fast_memcpy | ( | xine_t * | xine | ) |

Benchmark available memcpy methods.

References _, xine_s::config, NULL, config_values_s::register_enum, update_fast_memcpy(), config_values_s::update_num, and xine_fast_memcpy.

Referenced by xine_init().

## ◆ xine_refs_add()

static int xine_refs_add | ( | xine_refs_t * | refs,
|  | int | n
| ) |  |
| inlinestatic

References xine_refs_t::mutex, xine_refs_t::refs, and v.

Referenced by _x_post_frame_copy_down(), _x_post_frame_copy_up(), _x_post_frame_u_turn(), ao_out_fifo_reref_append(), post_intercept_video_frame(), unixscr_adjust(), unixscr_set_speed(), unixscr_start(), vo_display_reref_append(), vo_reref(), xine_current_extra_info_reset(), xine_current_extra_info_set(), xine_event_get(), xine_event_new_queue(), xine_event_next(), xine_event_send(), xine_event_wait_locked(), xine_exit(), xine_get_side_stream(), and xine_nbc_init().

## ◆ xine_refs_get()

static int xine_refs_get | ( | xine_refs_t * | refs | ) |
| inlinestatic

References xine_refs_t::mutex, xine_refs_t::refs, and v.

Referenced by unixscr_exit(), unixscr_get_current(), xine_current_extra_info_get(), xine_current_extra_info_reset(), xine_current_extra_info_set(), xine_dispose_internal(), xine_event_get(), xine_event_next(), and xine_stream_new().

## ◆ xine_refs_init()

static void xine_refs_init | ( | xine_refs_t * | refs,
|  | void(*)(void *object) | destructor,
|  | void * | object
| ) |  |
| inlinestatic

References xine_refs_t::destructor, xine_refs_t::mutex, NULL, xine_refs_t::object, and xine_refs_t::refs.

Referenced by unixscr_init(), xine_event_new_queue(), xine_get_side_stream(), and xine_stream_new().

## ◆ xine_refs_sub()

static int xine_refs_sub | ( | xine_refs_t * | refs,
|  | int | n
| ) |  |
| inlinestatic

References xine_refs_t::destructor, xine_refs_t::mutex, xine_refs_t::object, xine_refs_t::refs, and v.

Referenced by _x_post_dispose(), _x_post_frame_copy_down(), _x_post_frame_copy_up(), _x_post_frame_u_turn(), ao_force_unref_all(), ao_out_fifo_reref_append(), ao_unref_obsolete(), post_intercept_video_frame(), post_restore_video_frame(), post_video_close(), unixscr_exit(), vo_display_reref_append(), vo_reref(), vo_unref_list(), vo_unref_obsolete(), xine_dispose(), xine_dispose_internal(), xine_event_queue_unref_unlock(), xine_nbc_close(), xine_side_dispose_internal(), and xine_stream_new().

## ◆ xine_str2int32()

static int32_t xine_str2int32 | ( | const char ** | s | ) |
| inlinestatic

References v, and z.

Referenced by config_register_bool(), config_register_num(), config_register_range(), config_update_string_e(), load_plugin_list(), and xine_config_load().

## ◆ xine_str2uint32()

static uint32_t xine_str2uint32 | ( | const char ** | s | ) |
| inlinestatic

References v, and z.

Referenced by _x_osd_renderer_init(), and load_plugin_list().

## ◆ xine_str2uint64()

static uint64_t xine_str2uint64 | ( | const char ** | s | ) |
| inlinestatic

References v, and z.

Referenced by load_plugin_list().

## ◆ xine_uint32_2str()

static void xine_uint32_2str | ( | char ** | s,
|  | uint32_t | v
| ) |  |
| inlinestatic

References v.

Referenced by _x_io_tcp_handshake_connect(), _x_scan_plugins(), reportIP(), save_plugin_list(), and xine_config_save().

## ◆ xine_uint64_2str()

static void xine_uint64_2str | ( | char ** | s,
|  | uint64_t | v
| ) |  |
| inlinestatic

References v.

## ◆ xine_uint_mul_div()

static uint32_t xine_uint_mul_div | ( | uint32_t | num,
|  | uint32_t | mul,
|  | uint32_t | den
| ) |  |
| inlinestatic

Referenced by ao_out_fifo_get(), ao_update_resample_factor(), audio_decoder_loop(), metronom_handle_discontinuity(), and video_decoder_loop().