VLC  4.0.0-dev
Data Structures | Macros | Functions
video_widgets.c File Reference
Include dependency graph for video_widgets.c:

Data Structures

struct  osdwidget_spu_updater_sys_t
 

Macros

#define STYLE_EMPTY   0
 
#define STYLE_FILLED   1
 
#define RGB_BLUE   0x2badde
 
#define RGB_ORANGE   0xf48b00
 
#define RGB_FILL   RGB_ORANGE
 
#define COL_TRANSPARENT   0
 
#define COL_WHITE   1
 
#define COL_FILL   2
 
#define COL_FILL_SHADE   3
 
#define SET_PALETTE_COLOR(id, rgb, alpha)
 
#define SLIDER_MARGIN_BASE   0.10
 Create the region for an OSD slider. More...
 

Functions

static void DrawRect (subpicture_region_t *r, int fill, uint8_t color, int x1, int y1, int x2, int y2)
 Draws a rectangle at the given position in the region. More...
 
static void DrawTriangle (subpicture_region_t *r, int fill, uint8_t color, int x1, int y1, int x2, int y2)
 Draws a triangle at the given position in the region. More...
 
static subpicture_region_tOSDRegion (int x, int y, int width, int height)
 Create a region with a white transparent picture. More...
 
static subpicture_region_tOSDSlider (int type, int position, const video_format_t *fmt)
 
static subpicture_region_tOSDIcon (int type, const video_format_t *fmt)
 Create the region for an OSD slider. More...
 
static int OSDWidgetValidate (subpicture_t *subpic, bool has_src_changed, const video_format_t *fmt_src, bool has_dst_changed, const video_format_t *fmt_dst, vlc_tick_t ts)
 
static void OSDWidgetUpdate (subpicture_t *subpic, const video_format_t *fmt_src, const video_format_t *fmt_dst, vlc_tick_t ts)
 
static void OSDWidgetDestroy (subpicture_t *subpic)
 
static void OSDWidget (vout_thread_t *vout, int channel, int type, int position)
 
void vout_OSDSlider (vout_thread_t *vout, int channel, int position, short type)
 Display a slider on the video output. More...
 
void vout_OSDIcon (vout_thread_t *vout, int channel, short type)
 Display an Icon on the video output. More...
 

Macro Definition Documentation

◆ COL_FILL

#define COL_FILL   2

◆ COL_FILL_SHADE

#define COL_FILL_SHADE   3

◆ COL_TRANSPARENT

#define COL_TRANSPARENT   0

◆ COL_WHITE

#define COL_WHITE   1

◆ RGB_BLUE

#define RGB_BLUE   0x2badde

◆ RGB_FILL

#define RGB_FILL   RGB_ORANGE

◆ RGB_ORANGE

#define RGB_ORANGE   0xf48b00

◆ SET_PALETTE_COLOR

#define SET_PALETTE_COLOR (   id,
  rgb,
  alpha 
)
Value:
{\
uint8_t color[4] = { HEX2YUV(rgb), alpha };\
memcpy( &palette.palette[id], &color, 4 );\
}
#define HEX2YUV(rgb)
Definition: vout_spuregion_helper.h:27

◆ SLIDER_MARGIN_BASE

#define SLIDER_MARGIN_BASE   0.10

Create the region for an OSD slider.

Types are: OSD_HOR_SLIDER and OSD_VERT_SLIDER.

◆ STYLE_EMPTY

#define STYLE_EMPTY   0

◆ STYLE_FILLED

#define STYLE_FILLED   1

Function Documentation

◆ DrawRect()

static void DrawRect ( subpicture_region_t r,
int  fill,
uint8_t  color,
int  x1,
int  y1,
int  x2,
int  y2 
)
static

Draws a rectangle at the given position in the region.

It may be filled (fill == STYLE_FILLED) or empty (fill == STYLE_EMPTY).

References plane_t::i_pitch, plane_t::i_visible_pitch, p, picture_t::p, subpicture_region_t::p_picture, plane_t::p_pixels, and STYLE_FILLED.

Referenced by DrawTriangle(), OSDIcon(), and OSDSlider().

◆ DrawTriangle()

static void DrawTriangle ( subpicture_region_t r,
int  fill,
uint8_t  color,
int  x1,
int  y1,
int  x2,
int  y2 
)
static

Draws a triangle at the given position in the region.

It may be filled (fill == STYLE_FILLED) or empty (fill == STYLE_EMPTY).

References DrawRect(), plane_t::i_pitch, p, picture_t::p, subpicture_region_t::p_picture, plane_t::p_pixels, and STYLE_FILLED.

Referenced by OSDIcon().

◆ OSDIcon()

static subpicture_region_t* OSDIcon ( int  type,
const video_format_t fmt 
)
static

Create the region for an OSD slider.

Types are: OSD_PLAY_ICON, OSD_PAUSE_ICON, OSD_SPEAKER_ICON, OSD_MUTE_ICON

References COL_FILL, COL_TRANSPARENT, COL_WHITE, DrawRect(), DrawTriangle(), video_format_t::i_visible_height, video_format_t::i_visible_width, video_format_t::i_x_offset, video_format_t::i_y_offset, OSD_MUTE_ICON, OSD_PAUSE_ICON, OSD_PLAY_ICON, OSDRegion(), and STYLE_FILLED.

Referenced by OSDWidgetUpdate().

◆ OSDRegion()

static subpicture_region_t* OSDRegion ( int  x,
int  y,
int  width,
int  height 
)
static

◆ OSDSlider()

static subpicture_region_t* OSDSlider ( int  type,
int  position,
const video_format_t fmt 
)
static

◆ OSDWidget()

static void OSDWidget ( vout_thread_t vout,
int  channel,
int  type,
int  position 
)
static

◆ OSDWidgetDestroy()

static void OSDWidgetDestroy ( subpicture_t subpic)
static

◆ OSDWidgetUpdate()

static void OSDWidgetUpdate ( subpicture_t subpic,
const video_format_t fmt_src,
const video_format_t fmt_dst,
vlc_tick_t  ts 
)
static

◆ OSDWidgetValidate()

static int OSDWidgetValidate ( subpicture_t subpic,
bool  has_src_changed,
const video_format_t fmt_src,
bool  has_dst_changed,
const video_format_t fmt_dst,
vlc_tick_t  ts 
)
static

References VLC_EGENERIC, VLC_SUCCESS, and VLC_UNUSED.

Referenced by OSDWidget().