xine-lib: xine-lib-1.2.13/src/dxr3/video_out_dxr3.c File Reference

xine-lib 1.2.13-20230125hg15249

Macros | Functions
video_out_dxr3.c File Reference
`#include <sys/types.h>`
`#include <sys/stat.h>`
`#include <sys/ioctl.h>`
`#include <stdio.h>`
`#include <stdlib.h>`
`#include <string.h>`
`#include <unistd.h>`
`#include <pthread.h>`
`#include <fcntl.h>`
`#include <errno.h>`
`#include <math.h>`
`#include <xine/xine_internal.h>`
`#include <xine/xineutils.h>`
`#include <xine/video_out.h>`
`#include "dxr3.h"`
`#include "video_out_dxr3.h"`
`#include "group_dxr3.h"`
`#include <libavutil/mem.h>`

## Macros
#define | LOG_MODULE "video_out_dxr3"
#define | LOG_VID 0
#define | LOG_OVR 0
#define | DECODE_PIPE_PREBUFFER 10000

## Functions
static vo_driver_t * | dxr3_vo_open_plugin (video_driver_class_t *class_gen, const void *visual)
static uint32_t | dxr3_get_capabilities (vo_driver_t *this_gen)
static vo_frame_t * | dxr3_alloc_frame (vo_driver_t *this_gen)
static void | dxr3_frame_proc_frame (vo_frame_t *frame_gen)
static void | dxr3_frame_proc_slice (vo_frame_t *frame_gen, uint8_t **src)
static void | dxr3_frame_field (vo_frame_t *vo_img, int which_field)
static void | dxr3_frame_dispose (vo_frame_t *frame_gen)
static void | dxr3_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 | dxr3_overlay_begin (vo_driver_t *this_gen, vo_frame_t *frame_gen, int changed)
static void | dxr3_overlay_blend (vo_driver_t *this_gen, vo_frame_t *frame_gen, vo_overlay_t *overlay)
static void | dxr3_overlay_end (vo_driver_t *this_gen, vo_frame_t *frame_gen)
static void | dxr3_display_frame (vo_driver_t *this_gen, vo_frame_t *frame_gen)
static int | dxr3_redraw_needed (vo_driver_t *this_gen)
static int | dxr3_get_property (vo_driver_t *this_gen, int property)
static int | dxr3_set_property (vo_driver_t *this_gen, int property, int value)
static void | dxr3_get_property_min_max (vo_driver_t *this_gen, int property, int *min, int *max)
static int | dxr3_gui_data_exchange (vo_driver_t *this_gen, int data_type, void *data)
static void | dxr3_dispose (vo_driver_t *this_gen)
static void | gather_screen_vars (dxr3_driver_t *this, const x11_visual_t *vis)
static int | dxr3_overlay_read_state (dxr3_overlay_t *this)
static int | dxr3_overlay_set_keycolor (dxr3_overlay_t *this)
static int | dxr3_overlay_set_attributes (dxr3_overlay_t *this)
static void | dxr3_overlay_update (dxr3_driver_t *this)
static void | dxr3_zoomTV (dxr3_driver_t *this)
static void | dxr3_update_add_bars (void *data, xine_cfg_entry_t *entry)
static void | dxr3_update_swap_fields (void *data, xine_cfg_entry_t *entry)
static void | dxr3_update_enhanced_mode (void *this_gen, xine_cfg_entry_t *entry)
int | dxr3_present (xine_stream_t *stream)
static dxr3_driver_class_t * | dxr3_vo_init_plugin (xine_t *xine, const void *visual_gen)
void * | dxr3_aa_init_plugin (xine_t *xine, const void *visual_gen)

## Macro Definition Documentation

## ◆ DECODE_PIPE_PREBUFFER

#define DECODE_PIPE_PREBUFFER 10000

Referenced by dxr3_display_frame(), dxr3_frame_proc_frame(), and dxr3_frame_proc_slice().

## ◆ LOG_MODULE

#define LOG_MODULE "video_out_dxr3"

## ◆ LOG_OVR

#define LOG_OVR 0

## ◆ LOG_VID

#define LOG_VID 0

Referenced by dxr3_dispose(), dxr3_gui_data_exchange(), dxr3_present(), dxr3_set_property(), and dxr3_vo_open_plugin().

## Function Documentation

## ◆ dxr3_aa_init_plugin()

void * dxr3_aa_init_plugin | ( | xine_t * | xine,
|  | const void * | visual_gen )

References dxr3_vo_init_plugin(), NULL, and XINE_VISUAL_TYPE_AA.

## ◆ dxr3_alloc_frame()

static vo_frame_t * dxr3_alloc_frame | ( | vo_driver_t * | this_gen | ) |
| static

References vo_frame_s::dispose, vo_frame_s::driver, dxr3_frame_dispose(), dxr3_frame_field(), dxr3_frame_proc_frame(), dxr3_frame_proc_slice(), vo_frame_s::field, vo_frame_s::mutex, NULL, vo_frame_s::proc_frame, vo_frame_s::proc_slice, and dxr3_frame_s::vo_frame.

Referenced by dxr3_vo_open_plugin().

## ◆ dxr3_display_frame()

static void dxr3_display_frame | ( | vo_driver_t * | this_gen,
|  | vo_frame_t * | frame_gen )
| static

References _x_vo_scale_compute_ideal_size(), dxr3_frame_s::aspect, DECODE_PIPE_PREBUFFER, dxr3_overlay_update(), dxr3_set_property(), dxr3_video_setpts, EM8300_IOCTL_WRITEREG, vo_frame_s::format, vo_frame_s::free, em8300_register_t::microcode_register, MVCOMMAND_SYNC, dxr3_frame_s::oheight, dxr3_frame_s::pan_scan, vo_frame_s::ratio, em8300_register_t::reg, em8300_register_t::val, VO_PROP_ASPECT_RATIO, VO_PROP_ZOOM_X, vo_frame_s::vpts, vo_frame_s::width, XINE_IMGFMT_DXR3, xine_usec_sleep(), XINE_VERBOSITY_DEBUG, XINE_VO_ASPECT_4_3, and xprintf.

Referenced by dxr3_vo_open_plugin().

## ◆ dxr3_dispose()

static void dxr3_dispose | ( | vo_driver_t * | this_gen | ) |
| static

References _x_alphablend_free(), dxr3_spu_button, EM8300_IOCTL_OVERLAY_SETMODE, EM8300_OVERLAY_MODE_OFF, llprintf, LOG_VID, NULL, XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by dxr3_present(), and dxr3_vo_open_plugin().

## ◆ dxr3_frame_dispose()

static void dxr3_frame_dispose | ( | vo_frame_t * | frame_gen | ) |
| static

References dxr3_frame_s::mem, and vo_frame_s::mutex.

Referenced by dxr3_alloc_frame().

## ◆ dxr3_frame_field()

static void dxr3_frame_field | ( | vo_frame_t * | vo_img,
|  | int | which_field )
| static

Referenced by dxr3_alloc_frame().

## ◆ dxr3_frame_proc_frame()

static void dxr3_frame_proc_frame | ( | vo_frame_t * | frame_gen | ) |
| static

References DECODE_PIPE_PREBUFFER, vo_frame_s::format, vo_frame_s::proc_called, vo_frame_s::vpts, and XINE_IMGFMT_DXR3.

Referenced by dxr3_alloc_frame().

## ◆ dxr3_frame_proc_slice()

static void dxr3_frame_proc_slice | ( | vo_frame_t * | frame_gen,
|  | uint8_t ** | src )
| static

References DECODE_PIPE_PREBUFFER, vo_frame_s::driver, vo_frame_s::format, vo_frame_s::proc_called, vo_frame_s::vpts, and XINE_IMGFMT_DXR3.

Referenced by dxr3_alloc_frame().

## ◆ dxr3_get_capabilities()

static uint32_t dxr3_get_capabilities | ( | vo_driver_t * | this_gen | ) |
| static

References VO_CAP_YUY2, and VO_CAP_YV12.

Referenced by dxr3_vo_open_plugin().

## ◆ dxr3_get_property()

static int dxr3_get_property | ( | vo_driver_t * | this_gen,
|  | int | property )
| static

References VO_PROP_ASPECT_RATIO, VO_PROP_BRIGHTNESS, VO_PROP_COLORKEY, VO_PROP_CONTRAST, VO_PROP_SATURATION, VO_PROP_TVMODE, VO_PROP_WINDOW_HEIGHT, VO_PROP_WINDOW_WIDTH, VO_PROP_ZOOM_X, VO_PROP_ZOOM_Y, XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by dxr3_vo_open_plugin().

## ◆ dxr3_get_property_min_max()

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

References VO_PROP_BRIGHTNESS, VO_PROP_CONTRAST, and VO_PROP_SATURATION.

Referenced by dxr3_vo_open_plugin().

## ◆ dxr3_gui_data_exchange()

static int dxr3_gui_data_exchange | ( | vo_driver_t * | this_gen,
|  | int | data_type,
|  | void * | data )
| static

References _x_vo_scale_translate_gui2video(), dxr3_set_property(), EM8300_IOCTL_OVERLAY_SETMODE, EM8300_OVERLAY_MODE_OFF, EM8300_OVERLAY_MODE_OVERLAY, x11_rectangle_t::h, llprintf, LOG_VID, NULL, VO_PROP_ASPECT_RATIO, VO_PROP_ZOOM_X, x11_rectangle_t::w, x11_rectangle_t::x, XINE_GUI_SEND_DRAWABLE_CHANGED, XINE_GUI_SEND_EXPOSE_EVENT, XINE_GUI_SEND_TRANSLATE_GUI_TO_VIDEO, XINE_GUI_SEND_VIDEOWIN_VISIBLE, and x11_rectangle_t::y.

Referenced by dxr3_vo_open_plugin().

## ◆ dxr3_overlay_begin()

static void dxr3_overlay_begin | ( | vo_driver_t * | this_gen,
|  | vo_frame_t * | frame_gen,
|  | int | changed )
| static

References dxr3_spu_encoder_init(), vo_frame_s::format, NULL, vo_frame_s::overlay_offset_x, vo_frame_s::overlay_offset_y, and XINE_IMGFMT_DXR3.

Referenced by dxr3_vo_open_plugin().

## ◆ dxr3_overlay_blend()

static void dxr3_overlay_blend | ( | vo_driver_t * | this_gen,
|  | vo_frame_t * | frame_gen,
|  | vo_overlay_t * | overlay )
| static

References _x_blend_yuv(), _x_blend_yuy2(), vo_frame_s::base, vo_frame_s::format, vo_frame_s::height, vo_frame_s::pitches, vo_overlay_s::rle, dxr3_frame_s::vo_frame, vo_frame_s::width, XINE_IMGFMT_DXR3, and XINE_IMGFMT_YV12.

Referenced by dxr3_vo_open_plugin().

## ◆ dxr3_overlay_end()

static void dxr3_overlay_end | ( | vo_driver_t * | this_gen,
|  | vo_frame_t * | frame_gen )
| static

References em8300_button_t::bottom, em8300_button_t::color, em8300_button_t::contrast, dxr3_spu_button, dxr3_spu_encode(), dxr3_spu_setpalette, vo_frame_s::format, em8300_button_t::left, NULL, em8300_button_t::right, em8300_button_t::top, XINE_IMGFMT_DXR3, xine_open_cloexec(), XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by dxr3_vo_open_plugin().

## ◆ dxr3_overlay_read_state()

static int dxr3_overlay_read_state | ( | dxr3_overlay_t * | this | ) |
| static

Referenced by dxr3_vo_open_plugin().

## ◆ dxr3_overlay_set_attributes()

static int dxr3_overlay_set_attributes | ( | dxr3_overlay_t * | this | ) |
| static

Referenced by dxr3_vo_open_plugin().

## ◆ dxr3_overlay_set_keycolor()

static int dxr3_overlay_set_keycolor | ( | dxr3_overlay_t * | this | ) |
| static

Referenced by dxr3_vo_open_plugin().

## ◆ dxr3_overlay_update()

static void dxr3_overlay_update | ( | dxr3_driver_t * | this | ) |
| static

Referenced by dxr3_display_frame(), and dxr3_redraw_needed().

## ◆ dxr3_present()

int dxr3_present | ( | xine_stream_t * | stream | ) |

References dxr3_dispose(), llprintf, LOG_VID, and xine_stream_s::video_driver.

Referenced by dxr3_open_plugin(), and dxr3_spudec_open_plugin().

## ◆ dxr3_redraw_needed()

static int dxr3_redraw_needed | ( | vo_driver_t * | this_gen | ) |
| static

References dxr3_overlay_update().

Referenced by dxr3_vo_open_plugin().

## ◆ dxr3_set_property()

static int dxr3_set_property | ( | vo_driver_t * | this_gen,
|  | int | property,
|  | int | value )
| static

References dxr3_set_property(), dxr3_zoomTV(), EM8300_ASPECTRATIO_16_9, EM8300_ASPECTRATIO_4_3, EM8300_IOCTL_SET_ASPECTRATIO, EM8300_IOCTL_SET_VIDEOMODE, EM8300_IOCTL_SETBCS, EM8300_VIDEOMODE_LAST, EM8300_VIDEOMODE_NTSC, EM8300_VIDEOMODE_PAL, EM8300_VIDEOMODE_PAL60, llprintf, LOG_VID, VO_PROP_ASPECT_RATIO, VO_PROP_BRIGHTNESS, VO_PROP_COLORKEY, VO_PROP_CONTRAST, VO_PROP_SATURATION, VO_PROP_TVMODE, VO_PROP_ZOOM_X, XINE_VERBOSITY_DEBUG, XINE_VO_ASPECT_4_3, XINE_VO_ASPECT_ANAMORPHIC, XINE_VO_ASPECT_DVB, XINE_VO_ASPECT_SQUARE, and xprintf.

Referenced by dxr3_display_frame(), dxr3_gui_data_exchange(), dxr3_set_property(), and dxr3_vo_open_plugin().

## ◆ dxr3_update_add_bars()

static void dxr3_update_add_bars | ( | void * | data,
|  | xine_cfg_entry_t * | entry )
| static

References xine_cfg_entry_s::num_value, XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by dxr3_vo_open_plugin().

## ◆ dxr3_update_enhanced_mode()

static void dxr3_update_enhanced_mode | ( | void * | this_gen,
|  | xine_cfg_entry_t * | entry )
| static

References xine_cfg_entry_s::num_value, XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by dxr3_vo_open_plugin().

## ◆ dxr3_update_frame_format()

static void dxr3_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

References _, dxr3_frame_s::aspect, vo_frame_s::base, vo_frame_s::format, metronom_clock_s::get_current_time, height, vo_frame_s::height, dxr3_frame_s::mem, NULL, dxr3_frame_s::oheight, dxr3_frame_s::pan_scan, vo_frame_s::pitches, vo_frame_s::ratio, dxr3_frame_s::real_base, metronom_clock_s::register_scr, dxr3_frame_s::swap_fields, metronom_clock_s::unregister_scr, dxr3_frame_s::vo_frame, VO_PAN_SCAN_FLAG, vo_frame_s::width, width, XINE_IMGFMT_DXR3, XINE_IMGFMT_YUY2, xine_open_cloexec(), XINE_VERBOSITY_DEBUG, XINE_VERBOSITY_LOG, XINE_VO_ASPECT_4_3, XINE_VO_ASPECT_ANAMORPHIC, and xprintf.

Referenced by dxr3_vo_open_plugin().

## ◆ dxr3_update_swap_fields()

static void dxr3_update_swap_fields | ( | void * | data,
|  | xine_cfg_entry_t * | entry )
| static

References xine_cfg_entry_s::num_value, XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by dxr3_vo_open_plugin().

## ◆ dxr3_vo_init_plugin()

static dxr3_driver_class_t * dxr3_vo_init_plugin | ( | xine_t * | xine,
|  | const void * | visual_gen )
| static

References CONF_HELP, CONF_KEY, CONF_NAME, xine_s::config, default_video_driver_class_dispose, DXR3_VO_ID, dxr3_vo_open_plugin(), N_, NULL, and config_values_s::register_num.

Referenced by dxr3_aa_init_plugin().

## ◆ dxr3_vo_open_plugin()

static vo_driver_t * dxr3_vo_open_plugin | ( | video_driver_class_t * | class_gen,
|  | const void * | visual )
| static

References _, _x_alphablend_init(), _x_vo_scale_init(), xine_s::config, vo_frame_s::dispose, dxr3_alloc_frame(), dxr3_display_frame(), dxr3_dispose(), dxr3_get_capabilities(), dxr3_get_property(), dxr3_get_property_min_max(), dxr3_gui_data_exchange(), dxr3_lavc_init(), dxr3_overlay_begin(), dxr3_overlay_blend(), dxr3_overlay_end(), dxr3_overlay_read_state(), dxr3_overlay_set_attributes(), dxr3_overlay_set_keycolor(), dxr3_redraw_needed(), dxr3_scr_init(), dxr3_set_property(), dxr3_update_add_bars(), dxr3_update_enhanced_mode(), dxr3_update_frame_format(), dxr3_update_swap_fields(), EM8300_IOCTL_OVERLAY_SETMODE, EM8300_IOCTL_OVERLAY_SETSCREEN, EM8300_IOCTL_SET_VIDEOMODE, EM8300_OVERLAY_MODE_OVERLAY, EM8300_VIDEOMODE_DEFAULT, EM8300_VIDEOMODE_NTSC, EM8300_VIDEOMODE_PAL, EM8300_VIDEOMODE_PAL60, gather_screen_vars(), key, llprintf, LOG_VID, NULL, SUPPORTED_ENCODER_COUNT, VO_PROP_ASPECT_RATIO, VO_PROP_BRIGHTNESS, VO_PROP_CONTRAST, VO_PROP_SATURATION, config_values_s::xine, xine_open_cloexec(), XINE_VERBOSITY_DEBUG, XINE_VERBOSITY_LOG, XINE_VISUAL_TYPE_X11, XINE_VO_ASPECT_4_3, xprintf, em8300_overlay_screen_t::xsize, and em8300_overlay_screen_t::ysize.

Referenced by dxr3_vo_init_plugin().

## ◆ dxr3_zoomTV()

static void dxr3_zoomTV | ( | dxr3_driver_t * | this | ) |
| static

References EM8300_IOCTL_WRITEREG, em8300_register_t::microcode_register, em8300_register_t::reg, and em8300_register_t::val.

Referenced by dxr3_set_property().

## ◆ gather_screen_vars()

static void gather_screen_vars | ( | dxr3_driver_t * | this,
|  | const x11_visual_t * | vis )
| static

Referenced by dxr3_vo_open_plugin().