xine-lib: xine-lib-1.2.12/src/video_out/video_out_sdl.c File Reference

xine-lib 1.2.12

Data Structures | Macros | Typedefs | Functions | Variables
video_out_sdl.c File Reference
`#include <stdio.h>`
`#include <stdlib.h>`
`#include <string.h>`
`#include <inttypes.h>`
`#include <math.h>`
`#include <pthread.h>`
`#include <SDL.h>`
`#include "xine.h"`
`#include <xine/xine_internal.h>`
`#include <xine/video_out.h>`
`#include <xine/xineutils.h>`
`#include <xine/vo_scale.h>`

## Data Structures
struct | sdl_frame_s
struct | sdl_driver_s
struct | sdl_class_t

## Macros
#define | LOG_MODULE "video_out_sdl"
#define | LOG_VERBOSE

## Typedefs
typedef struct sdl_driver_s | sdl_driver_t
typedef struct sdl_frame_s | sdl_frame_t

## Functions
static uint32_t | sdl_get_capabilities (vo_driver_t *this_gen)
static void | sdl_frame_field (vo_frame_t *vo_img, int which_field)
static void | sdl_frame_dispose (vo_frame_t *vo_img)
static vo_frame_t * | sdl_alloc_frame (vo_driver_t *this_gen)
static void | sdl_compute_ideal_size (sdl_driver_t *this)
static void | sdl_compute_output_size (sdl_driver_t *this)
static void | sdl_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 | sdl_overlay_blend (vo_driver_t *this_gen, vo_frame_t *frame_gen, vo_overlay_t *overlay)
static void | sdl_check_events (sdl_driver_t *this)
static int | sdl_redraw_needed (vo_driver_t *this_gen)
static void | sdl_display_frame (vo_driver_t *this_gen, vo_frame_t *frame_gen)
static int | sdl_get_property (vo_driver_t *this_gen, int property)
static int | sdl_set_property (vo_driver_t *this_gen, int property, int value)
static void | sdl_get_property_min_max (vo_driver_t *this_gen, int property, int *min, int *max)
static int | sdl_gui_data_exchange (vo_driver_t *this_gen, int data_type, void *data)
static void | sdl_dispose (vo_driver_t *this_gen)
static vo_driver_t * | open_plugin (video_driver_class_t *class_gen, const void *visual_gen)
static void * | init_class (xine_t *xine, const void *visual_gen)
static void * | init_class_fb (xine_t *xine, const void *visual_gen)

## Variables
static const vo_info_t | vo_info_sdl
static const vo_info_t | vo_info_sdl_fb
const plugin_info_t xine_plugin_info[] | EXPORTED

## Macro Definition Documentation

## ◆ LOG_MODULE

#define LOG_MODULE "video_out_sdl"

## ◆ LOG_VERBOSE

#define LOG_VERBOSE

## Typedef Documentation

## ◆ sdl_driver_t

typedef struct sdl_driver_s sdl_driver_t

## ◆ sdl_frame_t

typedef struct sdl_frame_s sdl_frame_t

## Function Documentation

## ◆ init_class()

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

Class Functions

References default_video_driver_class_dispose, video_driver_class_s::description, video_driver_class_s::dispose, sdl_class_t::driver_class, video_driver_class_s::identifier, N_, NULL, open_plugin(), video_driver_class_s::open_plugin, sdl_class_t::visual_type, sdl_class_t::xine, XINE_VERBOSITY_DEBUG, XINE_VISUAL_TYPE_X11, and xprintf.

Referenced by init_class_fb().

## ◆ init_class_fb()

static void * init_class_fb | ( | xine_t * | xine,
|  | const void * | visual_gen
| ) |  |
| static

References init_class(), sdl_class_t::visual_type, sdl_class_t::xine, and XINE_VISUAL_TYPE_FB.

## ◆ 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(), xine_s::config, sdl_class_t::config, x11_visual_t::d, x11_visual_t::display, x11_visual_t::frame_output_cb, fb_visual_t::frame_output_cb, NULL, config_values_s::register_bool, sdl_alloc_frame(), sdl_display_frame(), sdl_dispose(), sdl_get_capabilities(), sdl_get_property(), sdl_get_property_min_max(), sdl_gui_data_exchange(), sdl_overlay_blend(), sdl_redraw_needed(), sdl_set_property(), sdl_update_frame_format(), x11_visual_t::user_data, fb_visual_t::user_data, VO_CAP_YUY2, VO_CAP_YV12, config_values_s::xine, sdl_class_t::xine, xine_setenv, XINE_VERBOSITY_DEBUG, XINE_VERBOSITY_LOG, XINE_VISUAL_TYPE_X11, and xprintf.

Referenced by init_class().

## ◆ sdl_alloc_frame()

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

References vo_frame_s::dispose, vo_frame_s::field, vo_frame_s::mutex, NULL, vo_frame_s::proc_frame, vo_frame_s::proc_slice, sdl_frame_dispose(), sdl_frame_field(), and sdl_frame_s::vo_frame.

Referenced by open_plugin().

## ◆ sdl_check_events()

static void sdl_check_events | ( | sdl_driver_t * | this | ) |
| static

References sdl_compute_output_size().

Referenced by sdl_display_frame().

## ◆ sdl_compute_ideal_size()

static void sdl_compute_ideal_size | ( | sdl_driver_t * | this | ) |
| static

References _x_vo_scale_compute_ideal_size().

Referenced by sdl_display_frame(), and sdl_set_property().

## ◆ sdl_compute_output_size()

static void sdl_compute_output_size | ( | sdl_driver_t * | this | ) |
| static

References _x_vo_scale_compute_output_size(), and lprintf.

Referenced by sdl_check_events(), and sdl_redraw_needed().

## ◆ sdl_display_frame()

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

References vo_frame_s::free, sdl_frame_s::height, sdl_frame_s::overlay, sdl_frame_s::ratio, sdl_check_events(), sdl_compute_ideal_size(), sdl_redraw_needed(), sdl_frame_s::vo_frame, sdl_frame_s::width, XINE_VERBOSITY_DEBUG, and xprintf.

Referenced by open_plugin().

## ◆ sdl_dispose()

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

References _x_alphablend_free(), and _x_vo_scale_cleanup().

Referenced by open_plugin().

## ◆ sdl_frame_dispose()

static void sdl_frame_dispose | ( | vo_frame_t * | vo_img | ) |
| static

References sdl_frame_s::overlay.

Referenced by sdl_alloc_frame().

## ◆ sdl_frame_field()

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

Referenced by sdl_alloc_frame().

## ◆ sdl_get_capabilities()

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

Referenced by open_plugin().

## ◆ sdl_get_property()

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

References VO_PROP_ASPECT_RATIO, VO_PROP_OUTPUT_HEIGHT, VO_PROP_OUTPUT_WIDTH, VO_PROP_OUTPUT_XOFFSET, VO_PROP_OUTPUT_YOFFSET, VO_PROP_WINDOW_HEIGHT, and VO_PROP_WINDOW_WIDTH.

Referenced by open_plugin().

## ◆ sdl_get_property_min_max()

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

Referenced by open_plugin().

## ◆ sdl_gui_data_exchange()

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

References _x_vo_scale_translate_gui2video(), x11_rectangle_t::h, lprintf, 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, and x11_rectangle_t::y.

Referenced by open_plugin().

## ◆ sdl_overlay_blend()

static void sdl_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, sdl_frame_s::format, sdl_frame_s::height, vo_frame_s::overlay_offset_x, vo_frame_s::overlay_offset_y, vo_frame_s::pitches, vo_overlay_s::rle, sdl_frame_s::vo_frame, sdl_frame_s::width, and XINE_IMGFMT_YV12.

Referenced by open_plugin().

## ◆ sdl_redraw_needed()

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

References _x_vo_scale_redraw_needed(), and sdl_compute_output_size().

Referenced by open_plugin(), and sdl_display_frame().

## ◆ sdl_set_property()

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

References _x_vo_scale_aspect_ratio_name_table, sdl_compute_ideal_size(), VO_PROP_ASPECT_RATIO, XINE_VERBOSITY_DEBUG, XINE_VO_ASPECT_AUTO, XINE_VO_ASPECT_NUM_RATIOS, and xprintf.

Referenced by open_plugin().

## ◆ sdl_update_frame_format()

static void sdl_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 vo_frame_s::base, sdl_frame_s::format, height, sdl_frame_s::height, lprintf, NULL, sdl_frame_s::overlay, vo_frame_s::pitches, sdl_frame_s::ratio, sdl_frame_s::vo_frame, width, sdl_frame_s::width, XINE_IMGFMT_YUY2, and XINE_IMGFMT_YV12.

Referenced by open_plugin().

## Variable Documentation

## ◆ EXPORTED

const plugin_info_t xine_plugin_info [] EXPORTED

Initial value:
= {
{ PLUGIN_VIDEO_OUT, 22, "sdl", XINE_VERSION_CODE, &vo_info_sdl, init_class },
{ PLUGIN_VIDEO_OUT, 22, "sdl", XINE_VERSION_CODE, &vo_info_sdl_fb, init_class_fb },
{ PLUGIN_NONE, 0, NULL, 0, NULL, NULL }
}
vo_info_sdl
static const vo_info_t vo_info_sdl
Definition: video_out_sdl.c:626
init_class
static void * init_class(xine_t *xine, const void *visual_gen)
Definition: video_out_sdl.c:587
vo_info_sdl_fb
static const vo_info_t vo_info_sdl_fb
Definition: video_out_sdl.c:631
init_class_fb
static void * init_class_fb(xine_t *xine, const void *visual_gen)
Definition: video_out_sdl.c:616
XINE_VERSION_CODE
#define XINE_VERSION_CODE
Definition: xine_internal.h:57
NULL
NULL
Definition: xine_plugin.c:78
PLUGIN_NONE
#define PLUGIN_NONE
Definition: xine_plugin.h:29
PLUGIN_VIDEO_OUT
#define PLUGIN_VIDEO_OUT
Definition: xine_plugin.h:36

## ◆ vo_info_sdl

const vo_info_t vo_info_sdl
| static

Initial value:
= {
.priority = 4,
.visual_type = XINE_VISUAL_TYPE_X11,
}
XINE_VISUAL_TYPE_X11
#define XINE_VISUAL_TYPE_X11
Definition: xine.h:154

## ◆ vo_info_sdl_fb

const vo_info_t vo_info_sdl_fb
| static

Initial value:
= {
.priority = 4,
.visual_type = XINE_VISUAL_TYPE_FB,
}
XINE_VISUAL_TYPE_FB
#define XINE_VISUAL_TYPE_FB
Definition: xine.h:157