xine-lib 1.2.11
Data Structures | Macros | Typedefs | Functions | Variables
xineutils.h File Reference
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <stddef.h>
#include <pthread.h>
#include <sys/time.h>
#include <xine/os_types.h>
#include <xine/attributes.h>
#include <xine/compat.h>
#include <xine/xmlparser.h>
#include <xine/xine_buffer.h>
#include <xine/configfile.h>
#include <xine/list.h>
#include <xine/array.h>
#include <xine/sorted_array.h>
#include <stdio.h>

Go to the source code of this file.

Data Structures

struct  dnode_st
 
struct  dlist_t
 
struct  xine_mutex_t
 
struct  yuv_planes_s
 

Macros

#define DLIST_H(l)   ((void *)(&(l)->head))
 
#define DLIST_T(l)   ((void *)(&(l)->null))
 
#define DLIST_IS_EMPTY(l)   ((l)->head == DLIST_T(l))
 
#define DLIST_REMOVE(n)
 
#define DLIST_ADD_HEAD(n, l)
 
#define DLIST_ADD_TAIL(n, l)
 
#define DLIST_INSERT(n, h)
 
#define DLIST_INIT(l)
 
#define MM_ACCEL_MLIB   0x00000001
 
#define MM_ACCEL_X86_MMX   0x80000000
 
#define MM_ACCEL_X86_3DNOW   0x40000000
 
#define MM_ACCEL_X86_MMXEXT   0x20000000
 
#define MM_ACCEL_X86_SSE   0x10000000
 
#define MM_ACCEL_X86_SSE2   0x08000000
 
#define MM_ACCEL_X86_SSE3   0x04000000
 
#define MM_ACCEL_X86_SSSE3   0x02000000
 
#define MM_ACCEL_X86_SSE4   0x01000000
 
#define MM_ACCEL_X86_SSE42   0x00800000
 
#define MM_ACCEL_X86_AVX   0x00400000
 
#define MM_ACCEL_PPC_ALTIVEC   0x04000000
 
#define MM_ACCEL_PPC_CACHE32   0x02000000
 
#define MM_ACCEL_SPARC_VIS   0x01000000
 
#define MM_ACCEL_SPARC_VIS2   0x00800000
 
#define MM_MMX   MM_ACCEL_X86_MMX
 
#define MM_3DNOW   MM_ACCEL_X86_3DNOW
 
#define MM_MMXEXT   MM_ACCEL_X86_MMXEXT
 
#define MM_SSE   MM_ACCEL_X86_SSE
 
#define MM_SSE2   MM_ACCEL_X86_SSE2
 
#define xine_small_memcpy(xsm_to, xsm_from, xsm_len)   memcpy (xsm_to, xsm_from, xsm_len)
 
#define xine_container_of(ptr, type, member)    ((type *)(void *)((char *)(1 ? (ptr) : &((type *)0)->member) - offsetof(type, member)))
 
#define XINE_MEM_ALIGN   32
 
#define xine_freep_aligned(xinefreepptr)   do {xine_free_aligned (*(xinefreepptr)); *(xinefreepptr) = NULL; } while (0)
 
#define xine_strpbrk(S, ACCEPT)   strpbrk((S), (ACCEPT))
 
#define xine_strsep(STRINGP, DELIM)   strsep((STRINGP), (DELIM))
 
#define xine_setenv(NAME, VAL, XX)   setenv((NAME), (VAL), (XX))
 
#define SCALESHIFT   16
 
#define SCALEFACTOR   (1<<SCALESHIFT)
 
#define CENTERSAMPLE   128
 
#define COMPUTE_Y(r, g, b)
 
#define COMPUTE_U(r, g, b)
 
#define COMPUTE_V(r, g, b)
 
#define UNPACK_BGR15(packed_pixel, r, g, b)
 
#define UNPACK_BGR16(packed_pixel, r, g, b)
 
#define UNPACK_RGB15(packed_pixel, r, g, b)
 
#define UNPACK_RGB16(packed_pixel, r, g, b)
 
#define EXPECT_TRUE(x)   (x)
 
#define EXPECT_FALSE(x)   (x)
 
#define _x_assert(exp)
 
#define _x_abort()
 
#define LOG_MODULE   __FILE__
 
#define LOG_MODULE_STRING   printf("%s: ", LOG_MODULE );
 
#define LONG_LOG_MODULE_STRING   LOG_MODULE_STRING
 
#define lprintf(...)   do {} while(0)
 
#define llprintf(cat, ...)
 
#define xprintf(xine, verbose, ...)
 
#define XINE_PROFILE(function)   function
 
#define XINE_PROFILE_ACCUMULATE(function)   function
 

Typedefs

typedef struct dnode_st dnode_t
 
typedef struct yuv_planes_s yuv_planes_t
 
typedef struct rgb2yuy2_s rgb2yuy2_t
 

Functions

int xine_mutex_init (xine_mutex_t *mutex, const pthread_mutexattr_t *mutexattr, const char *id)
 
int xine_mutex_lock (xine_mutex_t *mutex, const char *who)
 
int xine_mutex_unlock (xine_mutex_t *mutex, const char *who)
 
int xine_mutex_destroy (xine_mutex_t *mutex)
 
uint32_t xine_mm_accel (void) XINE_CONST
 
int xine_cpu_count (void) XINE_CONST
 
void xine_profiler_init (void)
 
int xine_profiler_allocate_slot (const char *label)
 
void xine_profiler_start_count (int id)
 
void xine_profiler_stop_count (int id)
 
void xine_profiler_print_results (void)
 
void * xine_xmalloc (size_t size) XINE_DEPRECATED
 Allocate and clean memory size_t 'size', then return the pointer to the allocated memory. More...
 
void * xine_xcalloc (size_t nmemb, size_t size)
 Wrapper around calloc() function. More...
 
static void _x_freep (void *ptr)
 
static void _x_freep_wipe_string (char **pp)
 
void * xine_memdup (const void *src, size_t length)
 
void * xine_memdup0 (const void *src, size_t length)
 
void * xine_mallocz_aligned (size_t size)
 
void * xine_malloc_aligned (size_t size)
 
void xine_free_aligned (void *ptr)
 
void * xine_realloc_aligned (void *ptr, size_t size)
 
size_t xine_base64_encode (uint8_t *from, char *to, size_t size)
 
size_t xine_base64_decode (const char *from, uint8_t *to)
 
uint32_t xine_crc32_ieee (uint32_t crc, const uint8_t *data, size_t len)
 
uint32_t xine_crc16_ansi (uint32_t crc, const uint8_t *data, size_t len)
 
const char * xine_get_homedir (void)
 
char * xine_chomp (char *str)
 
void xine_usec_sleep (unsigned usec)
 
char * xine_strcat_realloc (char **dest, const char *append)
 
char * _x_asprintf (const char *format,...) XINE_FORMAT_PRINTF(1
 
char int xine_open_cloexec (const char *name, int flags)
 
int xine_create_cloexec (const char *name, int flags, mode_t mode)
 
int xine_socket_cloexec (int domain, int type, int protocol)
 
void init_yuv_conversion (void)
 
void init_yuv_planes (yuv_planes_t *yuv_planes, int width, int height)
 
void free_yuv_planes (yuv_planes_t *yuv_planes)
 
rgb2yuy2_trgb2yuy2_alloc (int color_matrix, const char *format)
 
void rgb2yuy2_free (rgb2yuy2_t *rgb2yuy2)
 
void rgb2yuy2_slice (rgb2yuy2_t *rgb2yuy2, const uint8_t *in, int ipitch, uint8_t *out, int opitch, int width, int height)
 
void rgb2yuy2_palette (rgb2yuy2_t *rgb2yuy2, const uint8_t *pal, int num_colors, int bits_per_pixel)
 
void rgb2yv12_slice (rgb2yuy2_t *rgb2yuy2, const uint8_t *src, int src_stride, uint8_t *y_dst, int y_pitch, uint8_t *u_dst, int u_pitch, uint8_t *v_dst, int v_pitch, int width, int height)
 
void yv12_to_yv12 (const unsigned char *y_src, int y_src_pitch, unsigned char *y_dst, int y_dst_pitch, const unsigned char *u_src, int u_src_pitch, unsigned char *u_dst, int u_dst_pitch, const unsigned char *v_src, int v_src_pitch, unsigned char *v_dst, int v_dst_pitch, int width, int height)
 
void yuy2_to_yuy2 (const unsigned char *src, int src_pitch, unsigned char *dst, int dst_pitch, int width, int height)
 
void _x_nv12_to_yv12 (const uint8_t *y_src, int y_src_pitch, const uint8_t *uv_src, int uv_src_pitch, uint8_t *y_dst, int y_dst_pitch, uint8_t *u_dst, int u_dst_pitch, uint8_t *v_dst, int v_dst_pitch, int width, int height)
 
void xine_hexdump (const void *buf, int length)
 
static XINE_DEPRECATED void _x_abort_is_deprecated (void)
 
char * xine_get_system_encoding (void)
 
const char * xine_guess_spu_encoding (void)
 
int xine_monotonic_clock (struct timeval *tv, struct timezone *tz)
 
void _x_report_video_fourcc (xine_t *, const char *module, uint32_t)
 
void _x_report_audio_format_tag (xine_t *, const char *module, uint32_t)
 

Variables

void *(* xine_fast_memcpy )(void *to, const void *from, size_t len)
 
void(* yuv444_to_yuy2 )(const yuv_planes_t *yuv_planes, unsigned char *yuy2_map, int pitch)
 
void(* yuv9_to_yv12 )(const unsigned char *y_src, int y_src_pitch, unsigned char *y_dest, int y_dest_pitch, const unsigned char *u_src, int u_src_pitch, unsigned char *u_dest, int u_dest_pitch, const unsigned char *v_src, int v_src_pitch, unsigned char *v_dest, int v_dest_pitch, int width, int height)
 
void(* yuv411_to_yv12 )(const unsigned char *y_src, int y_src_pitch, unsigned char *y_dest, int y_dest_pitch, const unsigned char *u_src, int u_src_pitch, unsigned char *u_dest, int u_dest_pitch, const unsigned char *v_src, int v_src_pitch, unsigned char *v_dest, int v_dest_pitch, int width, int height)
 
void(* yv12_to_yuy2 )(const unsigned char *y_src, int y_src_pitch, const unsigned char *u_src, int u_src_pitch, const unsigned char *v_src, int v_src_pitch, unsigned char *yuy2_map, int yuy2_pitch, int width, int height, int progressive)
 
void(* yuy2_to_yv12 )(const unsigned char *yuy2_map, int yuy2_pitch, unsigned char *y_dst, int y_dst_pitch, unsigned char *u_dst, int u_dst_pitch, unsigned char *v_dst, int v_dst_pitch, int width, int height)
 
int y_r_table [256]
 
int y_g_table [256]
 
int y_b_table [256]
 
int uv_br_table [256]
 
int u_r_table [256]
 
int u_g_table [256]
 
int u_b_table [256]
 
int v_r_table [256]
 
int v_g_table [256]
 
int v_b_table [256]
 

Macro Definition Documentation

◆ _x_abort

#define _x_abort ( )
Value:
do { \
fprintf(stderr, "abort: %s:%d: %s: Aborting.\n", \
__FILE__, __LINE__, __XINE_FUNCTION__); \
abort(); \
_x_abort_is_deprecated(); \
} while(0)
#define __XINE_FUNCTION__
Definition: compat.h:37

◆ _x_assert

#define _x_assert (   exp)
Value:
do { \
if (!(exp)) { \
fprintf(stderr, "assert: %s:%d: %s: Assertion `%s' failed.\n", \
__FILE__, __LINE__, __XINE_FUNCTION__, #exp); \
abort(); \
} \
} while(0)

◆ CENTERSAMPLE

#define CENTERSAMPLE   128

◆ COMPUTE_U

#define COMPUTE_U (   r,
  g,
 
)
Value:
(unsigned char) \
#define SCALESHIFT
Definition: xineutils.h:441
int uv_br_table[256]
Definition: color.c:82
int u_r_table[256]
Definition: color.c:84
int u_g_table[256]
Definition: color.c:85

◆ COMPUTE_V

#define COMPUTE_V (   r,
  g,
 
)
Value:
(unsigned char) \
int v_g_table[256]
Definition: color.c:87
int v_b_table[256]
Definition: color.c:86

◆ COMPUTE_Y

#define COMPUTE_Y (   r,
  g,
 
)
Value:
(unsigned char) \
int y_g_table[256]
Definition: color.c:79
int y_r_table[256]
Definition: color.c:78
int y_b_table[256]
Definition: color.c:80

◆ DLIST_ADD_HEAD

#define DLIST_ADD_HEAD (   n,
 
)
Value:
{ \
dlist_t *dl_ah_list = l; \
dnode_t *dl_ah_node = n; \
dnode_t *dl_ah_head = dl_ah_list->head; \
dl_ah_node->next = dl_ah_head; \
dl_ah_node->prev = DLIST_H(dl_ah_list); \
dl_ah_list->head = dl_ah_node; \
dl_ah_head->prev = dl_ah_node; \
}
#define DLIST_H(l)
Definition: xineutils.h:77

◆ DLIST_ADD_TAIL

#define DLIST_ADD_TAIL (   n,
 
)
Value:
{ \
dlist_t *dl_at_list = l; \
dnode_t *dl_at_node = n; \
dnode_t *dl_at_tail = dl_at_list->tail; \
dl_at_node->next = DLIST_T(dl_at_list); \
dl_at_node->prev = dl_at_tail; \
dl_at_tail->next = dl_at_node; \
dl_at_list->tail = dl_at_node; \
}
#define DLIST_T(l)
Definition: xineutils.h:78

◆ DLIST_H

#define DLIST_H (   l)    ((void *)(&(l)->head))

◆ DLIST_INIT

#define DLIST_INIT (   l)
Value:
{ \
dlist_t *dl_in_list = l; \
dl_in_list->head = DLIST_T(dl_in_list); \
dl_in_list->null = NULL; \
dl_in_list->tail = DLIST_H(dl_in_list); }
NULL
Definition: xine_plugin.c:78

◆ DLIST_INSERT

#define DLIST_INSERT (   n,
 
)
Value:
{ \
dnode_t *dl_i_node = n; \
dnode_t *dl_i_here = h; \
dnode_t *dl_i_prev = dl_i_here->prev; \
dl_i_prev->next = dl_i_node; \
dl_i_here->prev = dl_i_node; \
dl_i_node->next = dl_i_here; \
dl_i_node->prev = dl_i_prev; \
}

◆ DLIST_IS_EMPTY

#define DLIST_IS_EMPTY (   l)    ((l)->head == DLIST_T(l))

◆ DLIST_REMOVE

#define DLIST_REMOVE (   n)
Value:
{ \
dnode_t *dl_rm_this = n; \
dnode_t *dl_rm_prev = dl_rm_this->prev; \
dnode_t *dl_rm_next = dl_rm_this->next; \
dl_rm_next->prev = dl_rm_prev; \
dl_rm_prev->next = dl_rm_next; \
}

◆ DLIST_T

#define DLIST_T (   l)    ((void *)(&(l)->null))

◆ EXPECT_FALSE

#define EXPECT_FALSE (   x)    (x)

◆ EXPECT_TRUE

#define EXPECT_TRUE (   x)    (x)

◆ llprintf

#define llprintf (   cat,
  ... 
)
Value:
do{ \
if(cat){ \
LONG_LOG_MODULE_STRING \
printf( __VA_ARGS__ ); \
} \
}while(0)

◆ LOG_MODULE

#define LOG_MODULE   __FILE__

◆ LOG_MODULE_STRING

#define LOG_MODULE_STRING   printf("%s: ", LOG_MODULE );

◆ LONG_LOG_MODULE_STRING

#define LONG_LOG_MODULE_STRING   LOG_MODULE_STRING

◆ lprintf

#define lprintf (   ...)    do {} while(0)

◆ MM_3DNOW

#define MM_3DNOW   MM_ACCEL_X86_3DNOW

◆ MM_ACCEL_MLIB

#define MM_ACCEL_MLIB   0x00000001

◆ MM_ACCEL_PPC_ALTIVEC

#define MM_ACCEL_PPC_ALTIVEC   0x04000000

◆ MM_ACCEL_PPC_CACHE32

#define MM_ACCEL_PPC_CACHE32   0x02000000

◆ MM_ACCEL_SPARC_VIS

#define MM_ACCEL_SPARC_VIS   0x01000000

◆ MM_ACCEL_SPARC_VIS2

#define MM_ACCEL_SPARC_VIS2   0x00800000

◆ MM_ACCEL_X86_3DNOW

#define MM_ACCEL_X86_3DNOW   0x40000000

◆ MM_ACCEL_X86_AVX

#define MM_ACCEL_X86_AVX   0x00400000

◆ MM_ACCEL_X86_MMX

#define MM_ACCEL_X86_MMX   0x80000000

◆ MM_ACCEL_X86_MMXEXT

#define MM_ACCEL_X86_MMXEXT   0x20000000

◆ MM_ACCEL_X86_SSE

#define MM_ACCEL_X86_SSE   0x10000000

◆ MM_ACCEL_X86_SSE2

#define MM_ACCEL_X86_SSE2   0x08000000

◆ MM_ACCEL_X86_SSE3

#define MM_ACCEL_X86_SSE3   0x04000000

◆ MM_ACCEL_X86_SSE4

#define MM_ACCEL_X86_SSE4   0x01000000

◆ MM_ACCEL_X86_SSE42

#define MM_ACCEL_X86_SSE42   0x00800000

◆ MM_ACCEL_X86_SSSE3

#define MM_ACCEL_X86_SSSE3   0x02000000

◆ MM_MMX

#define MM_MMX   MM_ACCEL_X86_MMX

◆ MM_MMXEXT

#define MM_MMXEXT   MM_ACCEL_X86_MMXEXT

◆ MM_SSE

#define MM_SSE   MM_ACCEL_X86_SSE

◆ MM_SSE2

#define MM_SSE2   MM_ACCEL_X86_SSE2

◆ SCALEFACTOR

#define SCALEFACTOR   (1<<SCALESHIFT)

◆ SCALESHIFT

#define SCALESHIFT   16

◆ UNPACK_BGR15

#define UNPACK_BGR15 (   packed_pixel,
  r,
  g,
 
)
Value:
b = (packed_pixel & 0x7C00) >> 7; \
g = (packed_pixel & 0x03E0) >> 2; \
r = (packed_pixel & 0x001F) << 3;

◆ UNPACK_BGR16

#define UNPACK_BGR16 (   packed_pixel,
  r,
  g,
 
)
Value:
b = (packed_pixel & 0xF800) >> 8; \
g = (packed_pixel & 0x07E0) >> 3; \
r = (packed_pixel & 0x001F) << 3;

◆ UNPACK_RGB15

#define UNPACK_RGB15 (   packed_pixel,
  r,
  g,
 
)
Value:
r = (packed_pixel & 0x7C00) >> 7; \
g = (packed_pixel & 0x03E0) >> 2; \
b = (packed_pixel & 0x001F) << 3;

◆ UNPACK_RGB16

#define UNPACK_RGB16 (   packed_pixel,
  r,
  g,
 
)
Value:
r = (packed_pixel & 0xF800) >> 8; \
g = (packed_pixel & 0x07E0) >> 3; \
b = (packed_pixel & 0x001F) << 3;

◆ xine_container_of

#define xine_container_of (   ptr,
  type,
  member 
)     ((type *)(void *)((char *)(1 ? (ptr) : &((type *)0)->member) - offsetof(type, member)))

◆ xine_freep_aligned

#define xine_freep_aligned (   xinefreepptr)    do {xine_free_aligned (*(xinefreepptr)); *(xinefreepptr) = NULL; } while (0)

◆ XINE_MEM_ALIGN

#define XINE_MEM_ALIGN   32

Get/resize/free aligned memory.

◆ XINE_PROFILE

#define XINE_PROFILE (   function)    function

◆ XINE_PROFILE_ACCUMULATE

#define XINE_PROFILE_ACCUMULATE (   function)    function

◆ xine_setenv

#define xine_setenv (   NAME,
  VAL,
  XX 
)    setenv((NAME), (VAL), (XX))

◆ xine_small_memcpy

#define xine_small_memcpy (   xsm_to,
  xsm_from,
  xsm_len 
)    memcpy (xsm_to, xsm_from, xsm_len)

◆ xine_strpbrk

#define xine_strpbrk (   S,
  ACCEPT 
)    strpbrk((S), (ACCEPT))

◆ xine_strsep

#define xine_strsep (   STRINGP,
  DELIM 
)    strsep((STRINGP), (DELIM))

◆ xprintf

#define xprintf (   xine,
  verbose,
  ... 
)
Value:
do { \
if((xine) && (xine)->verbosity >= verbose){ \
xine_log(xine, XINE_LOG_TRACE, __VA_ARGS__); \
} \
} while(0)
#define XINE_LOG_TRACE
Definition: xine_internal.h:66

Typedef Documentation

◆ dnode_t

typedef struct dnode_st dnode_t

◆ rgb2yuy2_t

typedef struct rgb2yuy2_s rgb2yuy2_t

◆ yuv_planes_t

typedef struct yuv_planes_s yuv_planes_t

Function Documentation

◆ _x_abort_is_deprecated()

static XINE_DEPRECATED void _x_abort_is_deprecated ( void  )
inlinestatic

◆ _x_asprintf()

char * _x_asprintf ( const char *  format,
  ... 
)

asprintf wrapper allocate a string large enough to hold the output, and return a pointer to it. This pointer should be passed to free when it is no longer needed. return NULL on error.

◆ _x_freep()

static void _x_freep ( void *  ptr)
inlinestatic

References NULL.

Referenced by _aom_dispose(), _cdda_free_cddb_info(), _dav1d_dispose(), _dispose(), _free_vbri_header(), _ftp_dispose(), _x_alphablend_free(), _x_dispose_plugins(), _x_freep_wipe_string(), _x_input_free_mrls(), _x_meta_info_public_reset(), _x_post_dispose(), _x_tls_close(), _x_tls_deinit(), ao_alsa_exit(), ao_exit(), ao_streams_close(), blend_yuv_grow_extra_data(), blend_yuy2_grow_extra_data(), bluray_plugin_dispose(), caca_update_frame_format(), cache_plugin_dispose(), config_dispose(), config_free_string(), demux_avformat_dispose(), demux_film_dispose(), demux_fourxm_dispose(), demux_ipmovie_dispose(), demux_matroska_dispose(), demux_mod_dispose(), demux_mpgaudio_dispose(), demux_mve_dispose(), demux_nsf_dispose(), demux_sputext_dispose(), demux_tta_dispose(), demux_wav_dispose(), dispose_ebml_parser(), dispose_plugin_file_list(), dispose_plugin_list(), dispose_ximage(), do_record(), dvaudio_dispose(), dvb_class_dispose(), dvb_plugin_dispose(), dvd_class_dispose(), dvd_input_saved_delete(), dvd_parse_try_open(), dvd_plugin_dispose(), dvd_plugin_free_buffer(), extract_channel_from_string(), faad_dispose(), ff_audio_dispose(), ff_dispose(), fftgraph_dispose(), fftscope_dispose(), file_input_class_dispose(), file_input_class_get_dir(), file_input_dispose(), file_input_open(), free_autoplay_list(), free_channel_list(), free_subtitle_object(), free_xml_node(), free_xml_property(), gnomevfs_plugin_dispose(), gsm610_dispose(), hls_input_dispose(), hls_input_load_list(), http_plugin_get_optional_data(), input_avformat_dispose(), input_avformat_get_instance(), input_avio_dispose(), input_http_init_class(), internal_video_overlay_free_handle(), lexer_finalize_r(), lpcm_dispose(), lpcm_reset(), mpc_dispose(), net_plugin_dispose(), open_plugin(), oscope_dispose(), osd_free_encoding(), osd_free_object(), osd_renderer_close(), osd_renderer_unload_font(), process_ipmovie_chunk(), pvr_plugin_dispose(), realdec_dispose(), remove_events_handle(), rip_plugin_dispose(), rtp_plugin_dispose(), rtsp_plugin_dispose(), scratch_dispose(), sdpplin_free(), sdpplin_free_stream(), segbuf_decode_object(), segbuf_dispose(), smb_class_dispose(), smb_class_get_dir(), sparse_array_delete(), spudec_dispose(), spudec_dispose_stopped(), sputext_class_dispose(), stdin_plugin_open(), stretch_port_close(), tuner_dispose(), tuner_init(), update_region(), upmix_dispose(), upmix_port_open(), v4l_plugin_dispose(), vaapi_close(), vaapi_dispose_locked(), vaapi_initialize(), vaapi_terminate(), vcd_class_dispose(), vcd_class_get_dir(), video_overlay_dispose(), video_overlay_event(), vo_dispose_grab_video_frame(), vo_grab_grab_video_frame(), xine_array_delete(), xine_ring_buffer_delete(), xxmc_dispose_context(), and yuv2rgb_factory_dispose().

◆ _x_freep_wipe_string()

static void _x_freep_wipe_string ( char **  pp)
inlinestatic

◆ _x_nv12_to_yv12()

void _x_nv12_to_yv12 ( const uint8_t *  y_src,
int  y_src_pitch,
const uint8_t *  uv_src,
int  uv_src_pitch,
uint8_t *  y_dst,
int  y_dst_pitch,
uint8_t *  u_dst,
int  u_dst_pitch,
uint8_t *  v_dst,
int  v_dst_pitch,
int  width,
int  height 
)

◆ _x_report_audio_format_tag()

void _x_report_audio_format_tag ( xine_t xine,
const char *  module,
uint32_t  code 
)

◆ _x_report_video_fourcc()

void _x_report_video_fourcc ( xine_t xine,
const char *  module,
uint32_t  code 
)

◆ free_yuv_planes()

void free_yuv_planes ( yuv_planes_t yuv_planes)

◆ init_yuv_conversion()

void init_yuv_conversion ( void  )

◆ init_yuv_planes()

void init_yuv_planes ( yuv_planes_t yuv_planes,
int  width,
int  height 
)

◆ rgb2yuy2_alloc()

rgb2yuy2_t * rgb2yuy2_alloc ( int  color_matrix,
const char *  format 
)

◆ rgb2yuy2_free()

void rgb2yuy2_free ( rgb2yuy2_t rgb2yuy2)

◆ rgb2yuy2_palette()

void rgb2yuy2_palette ( rgb2yuy2_t rgb2yuy2,
const uint8_t *  pal,
int  num_colors,
int  bits_per_pixel 
)

◆ rgb2yuy2_slice()

void rgb2yuy2_slice ( rgb2yuy2_t rgb2yuy2,
const uint8_t *  in,
int  ipitch,
uint8_t *  out,
int  opitch,
int  width,
int  height 
)

◆ rgb2yv12_slice()

void rgb2yv12_slice ( rgb2yuy2_t rgb2yuy2,
const uint8_t *  src,
int  src_stride,
uint8_t *  y_dst,
int  y_pitch,
uint8_t *  u_dst,
int  u_pitch,
uint8_t *  v_dst,
int  v_pitch,
int  width,
int  height 
)

◆ xine_base64_decode()

size_t xine_base64_decode ( const char *  from,
uint8_t *  to 
)

Base64 decoder. from: pointer to input string or line formatted / indented, null terminated text. to: pointer to output buffer. ret: length of output in bytes.

References rr, and ss.

Referenced by config_register_serialized_entry(), sdpplin_parse(), and sdpplin_parse_stream().

◆ xine_base64_encode()

size_t xine_base64_encode ( uint8_t *  from,
char *  to,
size_t  size 
)

Base64 encoder. from: pointer to binary input. to: pointer to output string buffer. size: byte length of input. ret: length of output string (without \0). Note that both buffers need 4 writable padding bytes.

References _X_BE_24.

Referenced by _cdda_cdindex(), config_get_serialized_entry(), http_plugin_basicauth(), and rtsp_basicauth().

◆ xine_chomp()

char * xine_chomp ( char *  str)

◆ xine_cpu_count()

int xine_cpu_count ( void  )

References _cpu_count().

Referenced by _open_plugin(), and open_plugin().

◆ xine_crc16_ansi()

uint32_t xine_crc16_ansi ( uint32_t  crc,
const uint8_t *  data,
size_t  len 
)

References rev16, and tab_crc16_ansi.

Referenced by xine_a52_parse_data().

◆ xine_crc32_ieee()

uint32_t xine_crc32_ieee ( uint32_t  crc,
const uint8_t *  data,
size_t  len 
)

Checksum calculator.

References rev32, and tab_crc32_ieee.

Referenced by demux_ts_parse_pat(), demux_ts_parse_pmt(), and ts_rewrite_packets().

◆ xine_create_cloexec()

int xine_create_cloexec ( const char *  name,
int  flags,
mode_t  mode 
)

creates a file, ensuring that the descriptor will be closed automatically after a fork/execute.

References _x_set_file_close_on_exec(), mode(), name, and O_CLOEXEC.

Referenced by ao_file_open(), do_record(), open_plugin(), and pvr_break_rec_page().

◆ xine_free_aligned()

void xine_free_aligned ( void *  ptr)

◆ xine_get_homedir()

const char * xine_get_homedir ( void  )

◆ xine_get_system_encoding()

char * xine_get_system_encoding ( void  )

get encoding of current locale

References _get_first_lang_locale(), _get_lang(), lang_locale_t::encoding, and NULL.

Referenced by _meta_info_set_encoding(), and osd_set_encoding().

◆ xine_guess_spu_encoding()

const char * xine_guess_spu_encoding ( void  )

◆ xine_hexdump()

void xine_hexdump ( const void *  buf,
int  length 
)

◆ xine_malloc_aligned()

void * xine_malloc_aligned ( size_t  size)

◆ xine_mallocz_aligned()

void * xine_mallocz_aligned ( size_t  size)

◆ xine_memdup()

void * xine_memdup ( const void *  src,
size_t  length 
)

References NULL, and xine_fast_memcpy.

Referenced by rmff_new_mdpr(), and rmff_scan_mdpr().

◆ xine_memdup0()

void * xine_memdup0 ( const void *  src,
size_t  length 
)

References NULL, and xine_fast_memcpy.

Referenced by rmff_scan_cont(), and rmff_scan_mdpr().

◆ xine_mm_accel()

uint32_t xine_mm_accel ( void  )

◆ xine_monotonic_clock()

int xine_monotonic_clock ( struct timeval *  tv,
struct timezone *  tz 
)

◆ xine_mutex_destroy()

int xine_mutex_destroy ( xine_mutex_t mutex)

References xine_mutex_t::mutex.

◆ xine_mutex_init()

int xine_mutex_init ( xine_mutex_t mutex,
const pthread_mutexattr_t *  mutexattr,
const char *  id 
)

◆ xine_mutex_lock()

int xine_mutex_lock ( xine_mutex_t mutex,
const char *  who 
)

◆ xine_mutex_unlock()

int xine_mutex_unlock ( xine_mutex_t mutex,
const char *  who 
)

◆ xine_open_cloexec()

char int xine_open_cloexec ( const char *  name,
int  flags 
)

◆ xine_profiler_allocate_slot()

int xine_profiler_allocate_slot ( const char *  label)

◆ xine_profiler_init()

void xine_profiler_init ( void  )

References profiler, and profiler_lock.

◆ xine_profiler_print_results()

void xine_profiler_print_results ( void  )

◆ xine_profiler_start_count()

void xine_profiler_start_count ( int  id)

◆ xine_profiler_stop_count()

void xine_profiler_stop_count ( int  id)

◆ xine_realloc_aligned()

void * xine_realloc_aligned ( void *  ptr,
size_t  size 
)

◆ xine_socket_cloexec()

int xine_socket_cloexec ( int  domain,
int  type,
int  protocol 
)

creates a socket, ensuring that the descriptor will be closed automatically after a fork/execute.

References _x_set_socket_close_on_exec().

Referenced by _x_init_broadcaster(), _x_io_tcp_handshake_connect(), host_connect_attempt(), and vdr_plugin_open_socket().

◆ xine_strcat_realloc()

char * xine_strcat_realloc ( char **  dest,
const char *  append 
)

append to a string, reallocating normally, updates & returns *dest on error, *dest is unchanged & NULL is returned.

◆ xine_usec_sleep()

void xine_usec_sleep ( unsigned  usec)

◆ xine_xcalloc()

void * xine_xcalloc ( size_t  nmemb,
size_t  size 
)

Wrapper around calloc() function.

Parameters
nmembNumber of elements to allocate
sizeSize of each element to allocate

This is a simple wrapper around calloc(), the only thing it does more than calloc() is outputting an error if the calloc fails (returning NULL).

References __XINE_FUNCTION__, and NULL.

Referenced by open_film_file(), open_mve_file(), open_tta_file(), and parse_vbri_header().

◆ xine_xmalloc()

void * xine_xmalloc ( size_t  size)

Allocate and clean memory size_t 'size', then return the pointer to the allocated memory.

Parameters
sizeSize of the memory area to allocate.
Returns
A pointer to the allocated memory area, or NULL in case of error.

The behaviour of this function differs from standard malloc() as xine_xmalloc(0) will not return a NULL pointer, but rather a pointer to a memory area of size 1 byte.

The NULL value is only ever returned in case of an error in malloc(), and is reported to stderr stream.

Deprecated:
This function has been deprecated, as the behaviour of allocating a 1 byte memory area on zero size is almost never desired, and the function is thus mostly misused.

References __XINE_FUNCTION__, and NULL.

Referenced by fooviz_init_plugin().

◆ yuy2_to_yuy2()

void yuy2_to_yuy2 ( const unsigned char *  src,
int  src_pitch,
unsigned char *  dst,
int  dst_pitch,
int  width,
int  height 
)

◆ yv12_to_yv12()

void yv12_to_yv12 ( const unsigned char *  y_src,
int  y_src_pitch,
unsigned char *  y_dst,
int  y_dst_pitch,
const unsigned char *  u_src,
int  u_src_pitch,
unsigned char *  u_dst,
int  u_dst_pitch,
const unsigned char *  v_src,
int  v_src_pitch,
unsigned char *  v_dst,
int  v_dst_pitch,
int  width,
int  height 
)

Variable Documentation

◆ u_b_table

int u_b_table[256]
extern

Referenced by init_yuv_conversion().

◆ u_g_table

int u_g_table[256]
extern

Referenced by init_yuv_conversion().

◆ u_r_table

int u_r_table[256]
extern

Referenced by init_yuv_conversion().

◆ uv_br_table

int uv_br_table[256]
extern

Referenced by init_yuv_conversion().

◆ v_b_table

int v_b_table[256]
extern

Referenced by init_yuv_conversion().

◆ v_g_table

int v_g_table[256]
extern

Referenced by init_yuv_conversion().

◆ v_r_table

int v_r_table[256]
extern

Referenced by init_yuv_conversion().

◆ xine_fast_memcpy

void *(* xine_fast_memcpy) (void *to, const void *from, size_t len) ( void *  to,
const void *  from,
size_t  len 
)
extern

Referenced by _aom_decode_data(), _copy_plane(), _dav1d_decode_data(), _x_demux_send_data(), _xine_buffer_copyin(), ao_coreaudio_render_proc(), ao_coreaudio_write(), ao_resend_store(), asf_send_buffer_defrag(), audio_fill(), bitplane_decode_data(), cache_plugin_read(), collect_data(), copy_chunk(), copy_slice(), decode_render(), DeinterlaceGreedy2Frame_MMX(), DeinterlaceGreedy2Frame_SSE2(), demux_real_send_chunk(), demux_str_send_chunk(), demux_vc1_es_send_headers(), demux_wv_send_chunk(), draw_fftgraph(), dvaudio_decode_data(), dxr3_spudec_decode_data(), dxr3_spudec_update_nav(), eq2_draw(), eq_draw(), fb_display_frame(), ff_audio_decode_data(), ff_convert_frame(), ff_handle_buffer(), ff_handle_header_buffer(), flac_decode_data(), flac_read_callback(), flush_buffer(), fooaudio_decode_data(), foovideo_decode_data(), frame_copy_content(), gnutls_tcp_pull(), goom_update(), gsm610_decode_data(), handle_realvideo(), handle_sub_utf8(), handle_vobsub(), hevc_decode_data(), init_codec_real(), init_codec_video(), init_codec_vobsub(), init_codec_xiph(), macosx_display_frame(), mad_decode_data(), mms_read(), mmsh_read(), mpc_decode_data(), mpc_reader_read(), nsf_decode_data(), open_dts_file(), open_plugin(), opengl2_draw(), parse_block(), parse_frame(), post_intercept_video_frame(), pvr_plugin_read_block(), qtv_decode_data(), readin_op(), realdec_decode_data(), rgb_decode_data(), scale_line_1_1(), spudec_decode_data(), spudec_process(), stdin_plugin_read(), test_plugin_read(), unsharp(), update_fast_memcpy(), v4l2_input_dequeue_video_buffer(), v4l_plugin_read_block(), vaapi_duplicate_frame_data(), vaapi_overlay_end(), vaapi_ovl_associate(), vdpau_h264_alter_decode_data(), vdpau_mpeg12_decode_data(), vdpau_mpeg4_decode_data(), vdpau_vc1_decode_data(), vdr_execute_rpc_command(), video_overlay_add_event(), vorbis_decode_data(), vpx_decode_data(), w32a_decode_audio(), w32v_decode_data(), wavpack_decode_data(), win32_display_frame(), write_frame_YUV420P2(), xine_buffer_copyout(), xine_buffer_dup(), xine_buffer_read_bytes(), xine_memdup(), xine_memdup0(), xine_probe_fast_memcpy(), xine_realloc_aligned(), xxmc_do_update_frame(), yuv2frame(), yuv2rgb_c_16(), yuv2rgb_c_24_bgr(), yuv2rgb_c_24_rgb(), yuv2rgb_c_32(), yuv2rgb_c_8(), yuv2rgb_c_gray(), yuv2rgb_c_palette(), yuv411_to_yv12_c(), yuv9_to_yv12_c(), yuv_decode_data(), yuy22rgb_c_16(), yuy22rgb_c_24_bgr(), yuy22rgb_c_24_rgb(), yuy22rgb_c_32(), yuy22rgb_c_8(), yuy22rgb_c_gray(), yuy22rgb_c_palette(), and yv12_to_nv12().

◆ y_b_table

int y_b_table[256]
extern

Referenced by init_yuv_conversion().

◆ y_g_table

int y_g_table[256]
extern

Referenced by init_yuv_conversion().

◆ y_r_table

int y_r_table[256]
extern

Referenced by init_yuv_conversion().

◆ yuv411_to_yv12

void(* yuv411_to_yv12) (const unsigned char *y_src, int y_src_pitch, unsigned char *y_dest, int y_dest_pitch, const unsigned char *u_src, int u_src_pitch, unsigned char *u_dest, int u_dest_pitch, const unsigned char *v_src, int v_src_pitch, unsigned char *v_dest, int v_dest_pitch, int width, int height) ( const unsigned char *  y_src,
int  y_src_pitch,
unsigned char *  y_dest,
int  y_dest_pitch,
const unsigned char *  u_src,
int  u_src_pitch,
unsigned char *  u_dest,
int  u_dest_pitch,
const unsigned char *  v_src,
int  v_src_pitch,
unsigned char *  v_dest,
int  v_dest_pitch,
int  width,
int  height 
)
extern

◆ yuv444_to_yuy2

void(* yuv444_to_yuy2) (const yuv_planes_t *yuv_planes, unsigned char *yuy2_map, int pitch) ( const yuv_planes_t yuv_planes,
unsigned char *  yuy2_map,
int  pitch 
)
extern

◆ yuv9_to_yv12

void(* yuv9_to_yv12) (const unsigned char *y_src, int y_src_pitch, unsigned char *y_dest, int y_dest_pitch, const unsigned char *u_src, int u_src_pitch, unsigned char *u_dest, int u_dest_pitch, const unsigned char *v_src, int v_src_pitch, unsigned char *v_dest, int v_dest_pitch, int width, int height) ( const unsigned char *  y_src,
int  y_src_pitch,
unsigned char *  y_dest,
int  y_dest_pitch,
const unsigned char *  u_src,
int  u_src_pitch,
unsigned char *  u_dest,
int  u_dest_pitch,
const unsigned char *  v_src,
int  v_src_pitch,
unsigned char *  v_dest,
int  v_dest_pitch,
int  width,
int  height 
)
extern

◆ yuy2_to_yv12

void(* yuy2_to_yv12) (const unsigned char *yuy2_map, int yuy2_pitch, unsigned char *y_dst, int y_dst_pitch, unsigned char *u_dst, int u_dst_pitch, unsigned char *v_dst, int v_dst_pitch, int width, int height) ( const unsigned char *  yuy2_map,
int  yuy2_pitch,
unsigned char *  y_dst,
int  y_dst_pitch,
unsigned char *  u_dst,
int  u_dst_pitch,
unsigned char *  v_dst,
int  v_dst_pitch,
int  width,
int  height 
)
extern

◆ yv12_to_yuy2

void(* yv12_to_yuy2) (const unsigned char *y_src, int y_src_pitch, const unsigned char *u_src, int u_src_pitch, const unsigned char *v_src, int v_src_pitch, unsigned char *yuy2_map, int yuy2_pitch, int width, int height, int progressive) ( const unsigned char *  y_src,
int  y_src_pitch,
const unsigned char *  u_src,
int  u_src_pitch,
const unsigned char *  v_src,
int  v_src_pitch,
unsigned char *  yuy2_map,
int  yuy2_pitch,
int  width,
int  height,
int  progressive 
)
extern