RetroArch
Classes | Typedefs | Functions | Variables
xvideo.c File Reference
#include <stdlib.h>
#include <string.h>
#include <signal.h>
#include <math.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xatom.h>
#include <sys/ipc.h>
#include <sys/shm.h>
#include <X11/extensions/XShm.h>
#include <X11/extensions/Xv.h>
#include <X11/extensions/Xvlib.h>
#include <retro_inline.h>
#include "../font_driver.h"
#include "../../configuration.h"
#include "../../frontend/frontend_driver.h"
#include "../../verbosity.h"
#include "../common/x11_common.h"
Include dependency graph for xvideo.c:

Classes

struct  xv
 
struct  format_desc
 

Typedefs

typedef struct xv xv_t
 

Functions

static void xv_set_nonblock_state (void *data, bool state)
 
static INLINE void xv_calculate_yuv (uint8_t *y, uint8_t *u, uint8_t *v, unsigned r, unsigned g, unsigned b)
 
static void xv_init_yuv_tables (xv_t *xv)
 
static void xv_init_font (xv_t *xv, const char *font_path, unsigned font_size)
 
static void render16_yuy2 (xv_t *xv, const void *input_, unsigned width, unsigned height, unsigned pitch)
 
static void render16_uyvy (xv_t *xv, const void *input_, unsigned width, unsigned height, unsigned pitch)
 
static void render32_yuy2 (xv_t *xv, const void *input_, unsigned width, unsigned height, unsigned pitch)
 
static void render32_uyvy (xv_t *xv, const void *input_, unsigned width, unsigned height, unsigned pitch)
 
static bool xv_adaptor_set_format (xv_t *xv, Display *dpy, XvPortID port, const video_info_t *video)
 
static void xv_calc_out_rect (bool keep_aspect, struct video_viewport *vp, unsigned vp_width, unsigned vp_height)
 
static voidxv_init (const video_info_t *video, const input_driver_t **input, void **input_data)
 
static bool xv_check_resize (xv_t *xv, unsigned width, unsigned height)
 
static void xv_render_msg (xv_t *xv, const char *msg, unsigned width, unsigned height)
 
static bool xv_frame (void *data, const void *frame, unsigned width, unsigned height, uint64_t frame_count, unsigned pitch, const char *msg, video_frame_info_t *video_info)
 
static bool xv_suppress_screensaver (void *data, bool enable)
 
static bool xv_has_windowed (void *data)
 
static void xv_free (void *data)
 
static void xv_viewport_info (void *data, struct video_viewport *vp)
 
static void xv_set_rotation (void *data, unsigned rotation)
 
static bool xv_read_viewport (void *data, uint8_t *buffer, bool is_idle)
 
static void xv_get_poke_interface (void *data, const video_poke_interface_t **iface)
 
static bool xv_set_shader (void *data, enum rarch_shader_type type, const char *path)
 

Variables

static const struct format_desc formats []
 
static video_poke_interface_t xv_video_poke_interface
 
video_driver_t video_xvideo
 

Typedef Documentation

◆ xv_t

typedef struct xv xv_t

Function Documentation

◆ render16_uyvy()

static void render16_uyvy ( xv_t xv,
const void input_,
unsigned  width,
unsigned  height,
unsigned  pitch 
)
static

◆ render16_yuy2()

static void render16_yuy2 ( xv_t xv,
const void input_,
unsigned  width,
unsigned  height,
unsigned  pitch 
)
static

◆ render32_uyvy()

static void render32_uyvy ( xv_t xv,
const void input_,
unsigned  width,
unsigned  height,
unsigned  pitch 
)
static

◆ render32_yuy2()

static void render32_yuy2 ( xv_t xv,
const void input_,
unsigned  width,
unsigned  height,
unsigned  pitch 
)
static

◆ xv_adaptor_set_format()

static bool xv_adaptor_set_format ( xv_t xv,
Display *  dpy,
XvPortID  port,
const video_info_t video 
)
static
Here is the caller graph for this function:

◆ xv_calc_out_rect()

static void xv_calc_out_rect ( bool  keep_aspect,
struct video_viewport vp,
unsigned  vp_width,
unsigned  vp_height 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xv_calculate_yuv()

static INLINE void xv_calculate_yuv ( uint8_t y,
uint8_t u,
uint8_t v,
unsigned  r,
unsigned  g,
unsigned  b 
)
static
Here is the caller graph for this function:

◆ xv_check_resize()

static bool xv_check_resize ( xv_t xv,
unsigned  width,
unsigned  height 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xv_frame()

static bool xv_frame ( void data,
const void frame,
unsigned  width,
unsigned  height,
uint64_t  frame_count,
unsigned  pitch,
const char *  msg,
video_frame_info_t video_info 
)
static
Here is the call graph for this function:

◆ xv_free()

static void xv_free ( void data)
static
Here is the call graph for this function:

◆ xv_get_poke_interface()

static void xv_get_poke_interface ( void data,
const video_poke_interface_t **  iface 
)
static
Here is the call graph for this function:

◆ xv_has_windowed()

static bool xv_has_windowed ( void data)
static
Here is the call graph for this function:

◆ xv_init()

static void* xv_init ( const video_info_t video,
const input_driver_t **  input,
void **  input_data 
)
static
Here is the call graph for this function:

◆ xv_init_font()

static void xv_init_font ( xv_t xv,
const char *  font_path,
unsigned  font_size 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xv_init_yuv_tables()

static void xv_init_yuv_tables ( xv_t xv)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xv_read_viewport()

static bool xv_read_viewport ( void data,
uint8_t buffer,
bool  is_idle 
)
static
Here is the call graph for this function:

◆ xv_render_msg()

static void xv_render_msg ( xv_t xv,
const char *  msg,
unsigned  width,
unsigned  height 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xv_set_nonblock_state()

static void xv_set_nonblock_state ( void data,
bool  state 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ xv_set_rotation()

static void xv_set_rotation ( void data,
unsigned  rotation 
)
static
Here is the call graph for this function:

◆ xv_set_shader()

static bool xv_set_shader ( void data,
enum rarch_shader_type  type,
const char *  path 
)
static
Here is the call graph for this function:

◆ xv_suppress_screensaver()

static bool xv_suppress_screensaver ( void data,
bool  enable 
)
static
Here is the call graph for this function:

◆ xv_viewport_info()

static void xv_viewport_info ( void data,
struct video_viewport vp 
)
static

Variable Documentation

◆ formats

const struct format_desc formats[]
static
Initial value:
= {
{
{ 'Y', 'U', 'Y', 'V' },
{ 0, 2 },
1,
3,
},
{
{ 'U', 'Y', 'V', 'Y' },
{ 1, 3 },
0,
2,
},
}
static void render32_yuy2(xv_t *xv, const void *input_, unsigned width, unsigned height, unsigned pitch)
Definition: xvideo.c:224
static void render16_yuy2(xv_t *xv, const void *input_, unsigned width, unsigned height, unsigned pitch)
Definition: xvideo.c:165
static void render16_uyvy(xv_t *xv, const void *input_, unsigned width, unsigned height, unsigned pitch)
Definition: xvideo.c:195
static void render32_uyvy(xv_t *xv, const void *input_, unsigned width, unsigned height, unsigned pitch)
Definition: xvideo.c:258

◆ video_xvideo

video_driver_t video_xvideo
Initial value:
= {
"xvideo",
NULL,
NULL,
}
static bool xv_suppress_screensaver(void *data, bool enable)
Definition: xvideo.c:869
static void xv_set_rotation(void *data, unsigned rotation)
Definition: xvideo.c:923
static bool xv_has_windowed(void *data)
Definition: xvideo.c:880
bool x11_alive(void *data)
Definition: x11_common.c:481
static bool xv_set_shader(void *data, enum rarch_shader_type type, const char *path)
Definition: xvideo.c:970
bool x11_has_focus_internal(void *data)
Definition: x11_common.c:607
#define NULL
Pointer to 0.
Definition: gctypes.h:65
static void xv_set_nonblock_state(void *data, bool state)
Definition: xvideo.c:87
static void * xv_init(const video_info_t *video, const input_driver_t **input, void **input_data)
Definition: xvideo.c:421
static void xv_get_poke_interface(void *data, const video_poke_interface_t **iface)
Definition: xvideo.c:963
static void xv_free(void *data)
Definition: xvideo.c:888
static bool xv_frame(void *data, const void *frame, unsigned width, unsigned height, uint64_t frame_count, unsigned pitch, const char *msg, video_frame_info_t *video_info)
Definition: xvideo.c:831
static bool xv_read_viewport(void *data, uint8_t *buffer, bool is_idle)
Definition: xvideo.c:929
static void xv_viewport_info(void *data, struct video_viewport *vp)
Definition: xvideo.c:917

◆ xv_video_poke_interface

video_poke_interface_t xv_video_poke_interface
static
Initial value:
= {
NULL,
}
#define NULL
Pointer to 0.
Definition: gctypes.h:65
float x11_get_refresh_rate(void *data)
Definition: x11_common.c:238