VLC 4.0.0-dev
Loading...
Searching...
No Matches
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.

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.
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.
static subpicture_region_tOSDRegion (int x, int y, int width, int height)
 Create a region with a white transparent picture.
static subpicture_region_tOSDSlider (vlc_osd_widget_type type, int position, const unsigned i_visible_width, const unsigned i_visible_height)
static subpicture_region_tOSDIcon (vlc_osd_widget_type type, const unsigned i_visible_width, const unsigned i_visible_height)
 Create the region for an OSD slider.
static void OSDWidgetUpdate (subpicture_t *subpic, const struct vlc_spu_updater_configuration *cfg)
static void OSDWidgetDestroy (subpicture_t *subpic)
static void OSDWidget (vout_thread_t *vout, int channel, vlc_osd_widget_type type, int position)
void vout_OSDSlider (vout_thread_t *vout, int channel, int position, vlc_osd_widget_type type)
 Display a slider on the video output.
void vout_OSDIcon (vout_thread_t *vout, int channel, vlc_osd_widget_type type)
 Display an Icon on the video output.

Macro Definition Documentation

◆ COL_FILL

#define COL_FILL   2

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

◆ COL_FILL_SHADE

#define COL_FILL_SHADE   3

Referenced by OSDRegion(), and OSDSlider().

◆ COL_TRANSPARENT

#define COL_TRANSPARENT   0

Referenced by OSDIcon(), and OSDRegion().

◆ COL_WHITE

#define COL_WHITE   1

Referenced by OSDIcon(), and OSDRegion().

◆ RGB_BLUE

#define RGB_BLUE   0x2badde

◆ RGB_FILL

#define RGB_FILL   RGB_ORANGE

Referenced by OSDRegion().

◆ 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:28

Referenced by OSDRegion().

◆ 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.

Referenced by OSDSlider().

◆ STYLE_EMPTY

#define STYLE_EMPTY   0

◆ STYLE_FILLED

#define STYLE_FILLED   1

Function Documentation

◆ DrawRect()

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 DrawRect(), 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 DrawRect(), DrawTriangle(), OSDIcon(), and OSDSlider().

◆ DrawTriangle()

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()

subpicture_region_t * OSDIcon ( vlc_osd_widget_type type,
const unsigned i_visible_width,
const unsigned i_visible_height )
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(), OSD_MUTE_ICON, OSD_PAUSE_ICON, OSD_PLAY_ICON, OSDRegion(), and STYLE_FILLED.

Referenced by OSDWidgetUpdate().

◆ OSDRegion()

◆ OSDSlider()

subpicture_region_t * OSDSlider ( vlc_osd_widget_type type,
int position,
const unsigned i_visible_width,
const unsigned i_visible_height )
static

◆ OSDWidget()

◆ OSDWidgetDestroy()

void OSDWidgetDestroy ( subpicture_t * subpic)
static

◆ OSDWidgetUpdate()