xine-lib: xine-lib-1.2.12/src/xine-engine/vo_scale.c File Reference

xine-lib 1.2.12

Macros | Functions | Variables
vo_scale.c File Reference
`#include <stdio.h>`
`#include <string.h>`
`#include <math.h>`
`#include <xine/xine_internal.h>`
`#include <xine/vo_scale.h>`

## Macros
#define | LOG_MODULE "vo_scale"
#define | LOG_VERBOSE

## Functions
void | _x_vo_scale_compute_ideal_size (vo_scale_t *this)
void | _x_vo_scale_compute_output_size (vo_scale_t *this)
int | _x_vo_scale_redraw_needed (vo_scale_t *this)
void | _x_vo_scale_translate_gui2video (vo_scale_t *this, int x, int y, int *vid_x, int *vid_y)
vo_scale_map_res_t | _x_vo_scale_map (vo_scale_t *this, vo_scale_map_t *map)
| Map a rectangle to video out window. More...
static void | vo_scale_horizontal_pos_changed (void *data, xine_cfg_entry_t *entry)
static void | vo_scale_vertical_pos_changed (void *data, xine_cfg_entry_t *entry)
static void | vo_scale_disable_scaling_changed (void *data, xine_cfg_entry_t *entry)
static void | vo_scale_square_pixels_changed (void *data, xine_cfg_entry_t *entry)
void | _x_vo_scale_cleanup (vo_scale_t *self, config_values_t *config)
void | _x_vo_scale_init (vo_scale_t *this, int support_zoom, int scaling_disabled, config_values_t *config)

## Variables
const char | _x_vo_scale_aspect_ratio_name_table [][8]

## Macro Definition Documentation

## ◆ LOG_MODULE

#define LOG_MODULE "vo_scale"

## ◆ LOG_VERBOSE

#define LOG_VERBOSE

## Function Documentation

## ◆ _x_vo_scale_cleanup()

void _x_vo_scale_cleanup | ( | vo_scale_t * | self,
|  | config_values_t * | config
| ) |  |

References NULL, and config_values_s::unregister_callbacks.

Referenced by directfb_dispose(), fb_dispose(), opengl2_dispose(), opengl_dispose_internal(), pgx32_dispose(), pgx32_init_driver(), pgx64_dispose(), pgx64_init_driver(), sdl_dispose(), stk_dispose(), vaapi_dispose_locked(), vdpau_dispose(), vidix_exit(), xshm_dispose(), xv_dispose(), and xxmc_dispose().

## ◆ _x_vo_scale_compute_ideal_size()

void _x_vo_scale_compute_ideal_size | ( | vo_scale_t * | this | ) |

References _x_assert, XINE_IMGFMT_YV12, XINE_VO_ASPECT_4_3, XINE_VO_ASPECT_ANAMORPHIC, XINE_VO_ASPECT_AUTO, XINE_VO_ASPECT_DVB, and XINE_VO_ASPECT_SQUARE.

Referenced by directfb_redraw_needed(), directfb_set_property(), dxr3_display_frame(), fb_compute_ideal_size(), opengl2_redraw_needed(), opengl2_set_property(), opengl_compute_ideal_size(), pgx32_display_frame(), pgx32_set_property(), pgx64_display_frame(), pgx64_set_property(), sdl_compute_ideal_size(), stk_compute_ideal_size(), vaapi_redraw_needed(), vaapi_set_property(), vdpau_redraw_needed(), vdpau_set_property(), vidix_compute_ideal_size(), xshm_compute_ideal_size(), xv_compute_ideal_size(), and xxmc_compute_ideal_size().

## ◆ _x_vo_scale_compute_output_size()

void _x_vo_scale_compute_output_size | ( | vo_scale_t * | this | ) |

References lprintf.

Referenced by directfb_redraw_needed(), fb_compute_rgb_size(), opengl2_redraw_needed(), opengl_compute_rgb_size(), pgx32_display_frame(), pgx64_display_frame(), sdl_compute_output_size(), stk_compute_output_size(), vaapi_redraw_needed(), vdpau_redraw_needed(), vidix_config_playback(), xshm_compute_rgb_size(), xv_compute_output_size(), and xxmc_compute_output_size().

## ◆ _x_vo_scale_init()

void _x_vo_scale_init | ( | vo_scale_t * | this,
|  | int | support_zoom,
|  | int | scaling_disabled,
|  | config_values_t * | config
| ) |  |

References _, NULL, config_values_s::register_bool, config_values_s::register_range, user_data(), vo_scale_disable_scaling_changed(), vo_scale_horizontal_pos_changed(), vo_scale_square_pixels_changed(), vo_scale_vertical_pos_changed(), and XINE_VO_ASPECT_AUTO.

Referenced by dxr3_vo_open_plugin(), fb_open_plugin(), open_plugin(), open_plugin_2(), open_plugin_fb(), opengl2_open_plugin(), opengl_open_plugin(), pgx32_init_driver(), pgx64_init_driver(), vaapi_open_plugin(), vdpau_open_plugin(), xshm_open_plugin(), and xshm_open_plugin_2().

## ◆ _x_vo_scale_map()

vo_scale_map_res_t _x_vo_scale_map | ( | vo_scale_t * | self,
|  | vo_scale_map_t * | map
| ) |  |

Map a rectangle to video out window.

Parameters

  self | The vo_scale status to use.
  map | On call: map.in = {0, 0, width, height} of input rect. map.out = {left, top, extent_width, extent_height} where input should go. Extents may be 0 if same as video size. On return: map.in = {left, top, right, bottom} to use from input rect. map.out = {left, top, right, bottom} inside video out.

Returns
  What went wrong.

References vo_scale_map_t::in, vo_scale_map_t::out, VO_SCALE_MAP_ERROR, VO_SCALE_MAP_OK, VO_SCALE_MAP_OUTSIDE, VO_SCALE_MAP_WRONG_ARGS, vo_scale_map_t::x0, vo_scale_map_t::x1, vo_scale_map_t::y0, and vo_scale_map_t::y1.

Referenced by opengl2_draw_unscaled_overlays().

## ◆ _x_vo_scale_redraw_needed()

int _x_vo_scale_redraw_needed | ( | vo_scale_t * | this | ) |

References _x_assert, and user_data().

Referenced by directfb_redraw_needed(), fb_display_frame(), opengl2_redraw_needed(), opengl_redraw_needed(), pgx32_display_frame(), pgx32_redraw_needed(), pgx64_display_frame(), pgx64_redraw_needed(), sdl_redraw_needed(), vaapi_redraw_needed(), vdpau_redraw_needed(), vidix_redraw_needed(), win32_redraw_needed(), xshm_display_frame(), xshm_redraw_needed(), xv_redraw_needed(), and xxmc_redraw_needed().

## ◆ _x_vo_scale_translate_gui2video()

void _x_vo_scale_translate_gui2video | ( | vo_scale_t * | this,
|  | int | x,
|  | int | y,
|  | int * | vid_x,
|  | int * | vid_y
| ) |  |

Referenced by directfb_gui_data_exchange(), dxr3_gui_data_exchange(), opengl2_gui_data_exchange(), opengl_gui_data_exchange(), pgx32_gui_data_exchange(), pgx64_gui_data_exchange(), sdl_gui_data_exchange(), vaapi_gui_data_exchange(), vdpau_gui_data_exchange(), vidix_gui_data_exchange(), xshm_gui_data_exchange(), xv_gui_data_exchange(), and xxmc_gui_data_exchange().

## ◆ vo_scale_disable_scaling_changed()

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

References xine_cfg_entry_s::num_value.

Referenced by _x_vo_scale_init().

## ◆ vo_scale_horizontal_pos_changed()

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

References xine_cfg_entry_s::num_value.

Referenced by _x_vo_scale_init().

## ◆ vo_scale_square_pixels_changed()

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

References xine_cfg_entry_s::num_value.

Referenced by _x_vo_scale_init().

## ◆ vo_scale_vertical_pos_changed()

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

References xine_cfg_entry_s::num_value.

Referenced by _x_vo_scale_init().

## Variable Documentation

## ◆ _x_vo_scale_aspect_ratio_name_table

const char _x_vo_scale_aspect_ratio_name_table[][8]

Initial value:
= {
"auto",
"square",
"4:3",
"16:9",
"2:1",
"unknown"
}

Referenced by directfb_set_property(), fb_set_property(), opengl_set_property(), sdl_set_property(), stk_set_property(), vidix_set_property(), and xshm_set_property().