xine-lib 1.2.11
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
video_out_xcbxv.c File Reference
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <math.h>
#include <sys/types.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <sys/time.h>
#include <xcb/xv.h>
#include "xine.h"
#include <xine/video_out.h>
#include <xine/xine_internal.h>
#include <xine/xineutils.h>
#include <xine/vo_scale.h>
#include "xcbosd.h"
#include "xv_common.h"
#include "color_matrix.c"

Data Structures

struct  xv_property_t
 
struct  xv_frame_t
 
struct  xv_driver_s
 
struct  xv_class_t
 

Macros

#define LOG_MODULE   "video_out_xcbxv"
 
#define LOG_VERBOSE
 
#define DEBUG_EMU
 
#define XV_PROPS
 
#define CM_LUT
 
#define CM_DRIVER_T   xv_driver_t
 

Typedefs

typedef struct xv_driver_s xv_driver_t
 

Enumerations

enum  xv_prefertype {
  xv_prefer_none , xv_prefer_overlay , xv_prefer_textured , xv_prefer_blitter ,
  xv_prefer_none , xv_prefer_overlay , xv_prefer_textured , xv_prefer_blitter ,
  xv_prefer_none , xv_prefer_overlay , xv_prefer_textured , xv_prefer_blitter
}
 

Functions

static uint32_t xv_get_capabilities (vo_driver_t *this_gen)
 
static void xv_frame_field (vo_frame_t *vo_img, int which_field)
 
static void xv_rem_yuy2_emu (xv_frame_t *f)
 
static void xv_frame_dispose (vo_frame_t *vo_img)
 
static vo_frame_txv_alloc_frame (vo_driver_t *this_gen)
 
static void create_ximage (xv_driver_t *this, xv_frame_t *frame, int width, int height, int format)
 
static void dispose_ximage (xv_driver_t *this, xv_frame_t *frame)
 
static void xv_slice_yuy2_emu (vo_frame_t *vo_img, uint8_t **src)
 
static int xv_add_yuy2_emu (xv_frame_t *f)
 
static void xv_update_frame_format (vo_driver_t *this_gen, vo_frame_t *frame_gen, uint32_t width, uint32_t height, double ratio, int format, int flags)
 
static void xv_clean_output_area (xv_driver_t *this)
 
static void xv_compute_ideal_size (xv_driver_t *this)
 
static void xv_compute_output_size (xv_driver_t *this)
 
static void xv_overlay_begin (vo_driver_t *this_gen, vo_frame_t *frame_gen, int changed)
 
static void xv_overlay_end (vo_driver_t *this_gen, vo_frame_t *vo_img)
 
static void xv_overlay_blend (vo_driver_t *this_gen, vo_frame_t *frame_gen, vo_overlay_t *overlay)
 
static void xv_add_recent_frame (xv_driver_t *this, xv_frame_t *frame)
 
static int xv_flush_recent_frames (xv_driver_t *this)
 
static int xv_redraw_needed (vo_driver_t *this_gen)
 
static void xv_new_color (xv_driver_t *this, int cm)
 
static void xv_display_frame (vo_driver_t *this_gen, vo_frame_t *frame_gen)
 
static int xv_get_property (vo_driver_t *this_gen, int property)
 
static int xv_set_property (vo_driver_t *this_gen, int property, int value)
 
static void xv_get_property_min_max (vo_driver_t *this_gen, int property, int *min, int *max)
 
static int xv_gui_data_exchange (vo_driver_t *this_gen, int data_type, void *data)
 
static xcb_atom_t xv_atom_from_name (xv_driver_t *this, const char *name)
 
static void xv_restore_port_attributes (xv_driver_t *this)
 
static void xv_dispose (vo_driver_t *this_gen)
 
static void xv_prop_init (xv_driver_t *this, const xv_prop_list_t *l, const xcb_xv_attribute_info_t *attr)
 
static void xv_prop_update_int (xv_property_t *prop, int value)
 
static void xv_prop_update (void *prop_gen, xine_cfg_entry_t *entry)
 
static void xv_prop_conf (xv_driver_t *this, int property, const char *config_name, const char *config_desc, const char *config_help)
 
static void xv_update_xv_pitch_alignment (void *this_gen, xine_cfg_entry_t *entry)
 
static void xv_fullrange_cb_config (void *this_gen, xine_cfg_entry_t *entry)
 
static void xv_debug_emu_cb_config (void *this_gen, xine_cfg_entry_t *entry)
 
static xcb_xv_port_t xv_open_port (xv_driver_t *this, xcb_xv_port_t port)
 
static xcb_xv_adaptor_info_iterator_t * xv_find_adaptor_by_port (int port, xcb_xv_adaptor_info_iterator_t *adaptor_it)
 
static xcb_xv_port_t xv_autodetect_port (xv_driver_t *this, xcb_xv_adaptor_info_iterator_t *adaptor_it, xcb_xv_port_t base, xv_prefertype prefer_type)
 
static vo_driver_topen_plugin (video_driver_class_t *class_gen, const void *visual_gen)
 
static void * init_class (xine_t *xine, const void *visual_gen)
 

Variables

static const char *const bicubic_types [] = { "Off", "On", "Auto", NULL }
 
static const char *const prefer_labels [] = { "Any", "Overlay", "Textured Video", "Blitter", NULL }
 
static const char prefer_substrings [][8] = { "", "Overlay", "Texture", "Blitter" }
 
static const vo_info_t vo_info_xv
 
const plugin_info_t xine_plugin_info[] EXPORTED
 

Macro Definition Documentation

◆ CM_DRIVER_T

#define CM_DRIVER_T   xv_driver_t

◆ CM_LUT

#define CM_LUT

◆ DEBUG_EMU

#define DEBUG_EMU

◆ LOG_MODULE

#define LOG_MODULE   "video_out_xcbxv"

◆ LOG_VERBOSE

#define LOG_VERBOSE

◆ XV_PROPS

#define XV_PROPS

Typedef Documentation

◆ xv_driver_t

typedef struct xv_driver_s xv_driver_t

Enumeration Type Documentation

◆ xv_prefertype

Enumerator
xv_prefer_none 
xv_prefer_overlay 
xv_prefer_textured 
xv_prefer_blitter 
xv_prefer_none 
xv_prefer_overlay 
xv_prefer_textured 
xv_prefer_blitter 
xv_prefer_none 
xv_prefer_overlay 
xv_prefer_textured 
xv_prefer_blitter 

Function Documentation

◆ create_ximage()

static void create_ximage ( xv_driver_t this,
xv_frame_t frame,
int  width,
int  height,
int  format 
)
static

◆ dispose_ximage()

static void dispose_ximage ( xv_driver_t this,
xv_frame_t frame 
)
static

◆ init_class()

static void * init_class ( xine_t xine,
const void *  visual_gen 
)
static

◆ open_plugin()

static vo_driver_t * open_plugin ( video_driver_class_t class_gen,
const void *  visual_gen 
)
static

References _, _x_alphablend_init(), _x_vo_scale_init(), bicubic_types, xine_s::config, xcb_visual_t::connection, xcb_visual_t::frame_output_cb, LOG_MODULE, name, NULL, prefer_labels, xcb_visual_t::screen, xcb_visual_t::user_data, VIDEO_DEVICE_XV_AUTOPAINT_COLORKEY_HELP, VIDEO_DEVICE_XV_BICUBIC_HELP, VIDEO_DEVICE_XV_COLORKEY_HELP, VIDEO_DEVICE_XV_DOUBLE_BUFFER_HELP, VIDEO_DEVICE_XV_FILTER_HELP, VIDEO_DEVICE_XV_PITCH_ALIGNMENT_HELP, VIDEO_DEVICE_XV_PORT_HELP, VIDEO_DEVICE_XV_PREFER_TYPE_HELP, VO_CAP_CROP, VO_CAP_FULLRANGE, VO_CAP_UNSCALED_OVERLAY, VO_CAP_ZOOM_X, VO_CAP_ZOOM_Y, VO_PROP_ASPECT_RATIO, VO_PROP_AUTOPAINT_COLORKEY, VO_PROP_BRIGHTNESS, VO_PROP_COLORKEY, VO_PROP_CONTRAST, VO_PROP_HUE, VO_PROP_SATURATION, VO_PROP_ZOOM_X, VO_PROP_ZOOM_Y, xcb_visual_t::window, xcbosd_colorkey(), XCBOSD_COLORKEY, xcbosd_create(), XCBOSD_SHAPED, config_values_s::xine, xv_class_t::xine, XINE_VERBOSITY_DEBUG, XINE_VERBOSITY_LOG, XINE_VERBOSITY_NONE, XINE_VO_ASPECT_AUTO, xprintf, xv_alloc_frame(), xv_autodetect_port(), xv_debug_emu_cb_config(), xv_display_frame(), xv_dispose(), xv_find_adaptor_by_port(), xv_fullrange_cb_config(), xv_get_capabilities(), xv_get_property(), xv_get_property_min_max(), xv_gui_data_exchange(), xv_open_port(), xv_overlay_begin(), xv_overlay_blend(), xv_overlay_end(), xv_prefer_none, xv_prop_conf(), xv_prop_init(), xv_prop_update(), xv_prop_update_int(), xv_redraw_needed(), xv_set_property(), xv_update_frame_format(), and xv_update_xv_pitch_alignment().

Referenced by init_class().

◆ xv_add_recent_frame()

static void xv_add_recent_frame ( xv_driver_t this,
xv_frame_t frame 
)
static

References VO_NUM_RECENT_FRAMES.

Referenced by xv_display_frame().

◆ xv_add_yuy2_emu()

static int xv_add_yuy2_emu ( xv_frame_t f)
static

◆ xv_alloc_frame()

static vo_frame_t * xv_alloc_frame ( vo_driver_t this_gen)
static

◆ xv_atom_from_name()

static xcb_atom_t xv_atom_from_name ( xv_driver_t this,
const char *  name 
)
static

References name, and NULL.

Referenced by xv_prop_init().

◆ xv_autodetect_port()

static xcb_xv_port_t xv_autodetect_port ( xv_driver_t this,
xcb_xv_adaptor_info_iterator_t *  adaptor_it,
xcb_xv_port_t  base,
xv_prefertype  prefer_type 
)
static

◆ xv_clean_output_area()

static void xv_clean_output_area ( xv_driver_t this)
static

◆ xv_compute_ideal_size()

static void xv_compute_ideal_size ( xv_driver_t this)
static

◆ xv_compute_output_size()

static void xv_compute_output_size ( xv_driver_t this)
static

◆ xv_debug_emu_cb_config()

static void xv_debug_emu_cb_config ( void *  this_gen,
xine_cfg_entry_t entry 
)
static

References xine_cfg_entry_s::num_value.

Referenced by open_plugin().

◆ xv_display_frame()

static void xv_display_frame ( vo_driver_t this_gen,
vo_frame_t frame_gen 
)
static

◆ xv_dispose()

static void xv_dispose ( vo_driver_t this_gen)
static

◆ xv_find_adaptor_by_port()

static xcb_xv_adaptor_info_iterator_t * xv_find_adaptor_by_port ( int  port,
xcb_xv_adaptor_info_iterator_t *  adaptor_it 
)
static

References NULL.

Referenced by open_plugin().

◆ xv_flush_recent_frames()

static int xv_flush_recent_frames ( xv_driver_t this)
static

References NULL, and VO_NUM_RECENT_FRAMES.

Referenced by xv_set_property().

◆ xv_frame_dispose()

static void xv_frame_dispose ( vo_frame_t vo_img)
static

◆ xv_frame_field()

static void xv_frame_field ( vo_frame_t vo_img,
int  which_field 
)
static

Referenced by xv_alloc_frame().

◆ xv_fullrange_cb_config()

static void xv_fullrange_cb_config ( void *  this_gen,
xine_cfg_entry_t entry 
)
static

◆ xv_get_capabilities()

static uint32_t xv_get_capabilities ( vo_driver_t this_gen)
static

Referenced by open_plugin().

◆ xv_get_property()

static int xv_get_property ( vo_driver_t this_gen,
int  property 
)
static

◆ xv_get_property_min_max()

static void xv_get_property_min_max ( vo_driver_t this_gen,
int  property,
int *  min,
int *  max 
)
static

References VO_NUM_PROPERTIES.

Referenced by open_plugin().

◆ xv_gui_data_exchange()

static int xv_gui_data_exchange ( vo_driver_t this_gen,
int  data_type,
void *  data 
)
static

◆ xv_new_color()

static void xv_new_color ( xv_driver_t this,
int  cm 
)
static

◆ xv_open_port()

static xcb_xv_port_t xv_open_port ( xv_driver_t this,
xcb_xv_port_t  port 
)
static

◆ xv_overlay_begin()

static void xv_overlay_begin ( vo_driver_t this_gen,
vo_frame_t frame_gen,
int  changed 
)
static

◆ xv_overlay_blend()

static void xv_overlay_blend ( vo_driver_t this_gen,
vo_frame_t frame_gen,
vo_overlay_t overlay 
)
static

◆ xv_overlay_end()

static void xv_overlay_end ( vo_driver_t this_gen,
vo_frame_t vo_img 
)
static

References xcbosd_expose().

Referenced by open_plugin().

◆ xv_prop_conf()

static void xv_prop_conf ( xv_driver_t this,
int  property,
const char *  config_name,
const char *  config_desc,
const char *  config_help 
)
static

◆ xv_prop_init()

static void xv_prop_init ( xv_driver_t this,
const xv_prop_list_t *  l,
const xcb_xv_attribute_info_t *  attr 
)
static

◆ xv_prop_update()

static void xv_prop_update ( void *  prop_gen,
xine_cfg_entry_t entry 
)
static

◆ xv_prop_update_int()

static void xv_prop_update_int ( xv_property_t prop,
int  value 
)
static

◆ xv_redraw_needed()

static int xv_redraw_needed ( vo_driver_t this_gen)
static

◆ xv_rem_yuy2_emu()

static void xv_rem_yuy2_emu ( xv_frame_t f)
static

◆ xv_restore_port_attributes()

static void xv_restore_port_attributes ( xv_driver_t this)
static

◆ xv_set_property()

static int xv_set_property ( vo_driver_t this_gen,
int  property,
int  value 
)
static

◆ xv_slice_yuy2_emu()

static void xv_slice_yuy2_emu ( vo_frame_t vo_img,
uint8_t **  src 
)
static

◆ xv_update_frame_format()

static void xv_update_frame_format ( vo_driver_t this_gen,
vo_frame_t frame_gen,
uint32_t  width,
uint32_t  height,
double  ratio,
int  format,
int  flags 
)
static

◆ xv_update_xv_pitch_alignment()

static void xv_update_xv_pitch_alignment ( void *  this_gen,
xine_cfg_entry_t entry 
)
static

References xine_cfg_entry_s::num_value.

Referenced by open_plugin().

Variable Documentation

◆ bicubic_types

const char* const bicubic_types[] = { "Off", "On", "Auto", NULL }
static

Referenced by open_plugin().

◆ EXPORTED

const plugin_info_t xine_plugin_info [] EXPORTED
Initial value:
= {
{ PLUGIN_NONE, 0, NULL, 0, NULL, NULL }
}
static const vo_info_t vo_info_xv
Definition: video_out_xcbxv.c:1728
static void * init_class(xine_t *xine, const void *visual_gen)
Definition: video_out_xcbxv.c:1709
#define XINE_VERSION_CODE
Definition: xine_internal.h:57
NULL
Definition: xine_plugin.c:78
#define PLUGIN_NONE
Definition: xine_plugin.h:29
#define PLUGIN_VIDEO_OUT
Definition: xine_plugin.h:36

◆ prefer_labels

const char* const prefer_labels[] = { "Any", "Overlay", "Textured Video", "Blitter", NULL }
static

Referenced by open_plugin().

◆ prefer_substrings

const char prefer_substrings[][8] = { "", "Overlay", "Texture", "Blitter" }
static

Referenced by xv_autodetect_port().

◆ vo_info_xv

const vo_info_t vo_info_xv
static
Initial value:
= {
.priority = 9,
.visual_type = XINE_VISUAL_TYPE_XCB,
}
#define XINE_VISUAL_TYPE_XCB
Definition: xine.h:164