xine-lib  1.2.9
Data Structures | Macros | Typedefs | Functions
video_overlay.c File Reference
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <pthread.h>
#include <sys/types.h>
#include <xine/buffer.h>
#include <xine/xine_internal.h>
#include <xine/xineutils.h>
#include <xine/video_overlay.h>
#include "bswap.h"

Data Structures

struct  video_overlay_events_s
 
struct  video_overlay_showing_s
 
struct  video_overlay_s
 

Macros

#define LUT_SIZE   (sizeof(overlay->color)/sizeof(overlay->color[0]))
 
#define NEXT_BITE
 
#define LIMIT_WIDTH
 
#define BLEND_LINE
 

Typedefs

typedef struct video_overlay_events_s video_overlay_events_t
 
typedef struct video_overlay_showing_s video_overlay_showing_t
 
typedef struct video_overlay_s video_overlay_t
 

Functions

static void add_showing_handle (video_overlay_t *this, int32_t handle)
 
static void remove_showing_handle (video_overlay_t *this, int32_t handle)
 
static void remove_events_handle (video_overlay_t *this, int32_t handle, int lock)
 
static int32_t video_overlay_get_handle (video_overlay_manager_t *this_gen, int object_type)
 
static void internal_video_overlay_free_handle (video_overlay_t *this, int32_t handle)
 
static void video_overlay_free_handle (video_overlay_manager_t *this_gen, int32_t handle)
 
static void video_overlay_reset (video_overlay_t *this)
 
static void video_overlay_init (video_overlay_manager_t *this_gen)
 
static int32_t video_overlay_add_event (video_overlay_manager_t *this_gen, void *event_gen)
 
static int video_overlay_event (video_overlay_t *this, int64_t vpts)
 
void _x_overlay_clut_yuv2rgb (vo_overlay_t *overlay, int video_color_matrix)
 
static void clut_to_argb (const uint32_t *color, const uint8_t *trans, int num_items, uint32_t *argb, const char *format)
 
void _x_overlay_to_argb32 (const vo_overlay_t *overlay, uint32_t *rgba, int stride, const char *format)
 
static void video_overlay_multiple_overlay_blend (video_overlay_manager_t *this_gen, int64_t vpts, vo_driver_t *output, vo_frame_t *vo_img, int enabled)
 
static void video_overlay_flush_events (video_overlay_manager_t *this_gen)
 
static int video_overlay_redraw_needed (video_overlay_manager_t *this_gen, int64_t vpts)
 
static void video_overlay_dispose (video_overlay_manager_t *this_gen)
 
video_overlay_manager_t_x_video_overlay_new_manager (xine_t *xine)
 

Macro Definition Documentation

◆ BLEND_LINE

#define BLEND_LINE
Value:
do { \
for (x = 0; x < overlay->width; ) { \
NEXT_BITE; \
LIMIT_WIDTH; \
\
while (x < x_limit) { \
rgba[x++] = colors[rle->color]; \
} \
} \
rgba += stride; \
} while (0)

Referenced by _x_overlay_to_argb32().

◆ LIMIT_WIDTH

#define LIMIT_WIDTH
Value:
do { \
x_limit = x + rle_len; \
if (x_limit > overlay->width) { \
rle_len = x_limit - overlay->width; \
x_limit = overlay->width; \
} else { \
rle_len = 0; \
} \
} while (0)

Referenced by _x_overlay_to_argb32().

◆ LUT_SIZE

#define LUT_SIZE   (sizeof(overlay->color)/sizeof(overlay->color[0]))

Referenced by _x_overlay_to_argb32().

◆ NEXT_BITE

#define NEXT_BITE
Value:
do { \
if (rle_len < 1) { \
rle++; \
if (rle >= rle_end) { \
/* fill with transparent */ \
memset(rgba, 0, (overlay->width - x) * sizeof(uint32_t)); \
rgba += stride; \
for (; y < overlay->height; y++, rgba += stride) { \
memset(rgba, 0, stride * sizeof(uint32_t)); \
} \
return; \
} \
rle_len = rle->len; \
} \
} while (0)

Referenced by _x_overlay_to_argb32().

Typedef Documentation

◆ video_overlay_events_t

◆ video_overlay_showing_t

◆ video_overlay_t

Function Documentation

◆ _x_overlay_clut_yuv2rgb()

void _x_overlay_clut_yuv2rgb ( vo_overlay_t overlay,
int  video_color_matrix 
)

◆ _x_overlay_to_argb32()

void _x_overlay_to_argb32 ( const vo_overlay_t overlay,
uint32_t *  rgba,
int  stride,
const char *  format 
)

◆ _x_video_overlay_new_manager()

video_overlay_manager_t* _x_video_overlay_new_manager ( xine_t xine)

◆ add_showing_handle()

static void add_showing_handle ( video_overlay_t this,
int32_t  handle 
)
static

◆ clut_to_argb()

static void clut_to_argb ( const uint32_t *  color,
const uint8_t *  trans,
int  num_items,
uint32_t *  argb,
const char *  format 
)
static

References clut_t::cb.

Referenced by _x_overlay_to_argb32().

◆ internal_video_overlay_free_handle()

static void internal_video_overlay_free_handle ( video_overlay_t this,
int32_t  handle 
)
static

◆ remove_events_handle()

static void remove_events_handle ( video_overlay_t this,
int32_t  handle,
int  lock 
)
static

◆ remove_showing_handle()

static void remove_showing_handle ( video_overlay_t this,
int32_t  handle 
)
static

◆ video_overlay_add_event()

static int32_t video_overlay_add_event ( video_overlay_manager_t this_gen,
void *  event_gen 
)
static

◆ video_overlay_dispose()

static void video_overlay_dispose ( video_overlay_manager_t this_gen)
static

◆ video_overlay_event()

static int video_overlay_event ( video_overlay_t this,
int64_t  vpts 
)
static

◆ video_overlay_flush_events()

static void video_overlay_flush_events ( video_overlay_manager_t this_gen)
static

◆ video_overlay_free_handle()

static void video_overlay_free_handle ( video_overlay_manager_t this_gen,
int32_t  handle 
)
static

◆ video_overlay_get_handle()

static int32_t video_overlay_get_handle ( video_overlay_manager_t this_gen,
int  object_type 
)
static

References MAX_OBJECTS.

Referenced by _x_video_overlay_new_manager().

◆ video_overlay_init()

static void video_overlay_init ( video_overlay_manager_t this_gen)
static

◆ video_overlay_multiple_overlay_blend()

static void video_overlay_multiple_overlay_blend ( video_overlay_manager_t this_gen,
int64_t  vpts,
vo_driver_t output,
vo_frame_t vo_img,
int  enabled 
)
static

◆ video_overlay_redraw_needed()

static int video_overlay_redraw_needed ( video_overlay_manager_t this_gen,
int64_t  vpts 
)
static

◆ video_overlay_reset()

static void video_overlay_reset ( video_overlay_t this)
static