VLC  3.0.0-git
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Files | Data Structures | Macros | Typedefs | Functions
Video sub-pictures
Video output

Subpictures are pictures that should be displayed on top of the video, like subtitles and OSD. More...

Collaboration diagram for Video sub-pictures:

Files

file  vlc_subpicture.h
 Subpictures functions.

Data Structures

struct  subpicture_region_t
 Video subtitle region. More...
struct  subpicture_updater_t
struct  subpicture_t
 Video subtitle. More...

Macros

#define SUBPICTURE_ALIGN_LEFT   0x1
#define SUBPICTURE_ALIGN_RIGHT   0x2
#define SUBPICTURE_ALIGN_TOP   0x4
#define SUBPICTURE_ALIGN_BOTTOM   0x8
#define SUBPICTURE_ALIGN_LEAVETEXT   0x10
 Align the subpicture, but not the text inside.
#define SUBPICTURE_ALIGN_MASK

Typedefs

typedef struct
subpicture_region_private_t 
subpicture_region_private_t
 Video subtitle region spu core private.
typedef struct
subpicture_updater_sys_t 
subpicture_updater_sys_t
typedef struct subpicture_private_t subpicture_private_t

Functions

subpicture_region_tsubpicture_region_New (const video_format_t *p_fmt)
 This function will create a new subpicture region.
void subpicture_region_Delete (subpicture_region_t *p_region)
 This function will destroy a subpicture region allocated by subpicture_region_New.
void subpicture_region_ChainDelete (subpicture_region_t *p_head)
 This function will destroy a list of subpicture regions allocated by subpicture_region_New.
subpicture_tsubpicture_New (const subpicture_updater_t *)
 This function create a new empty subpicture.
void subpicture_Delete (subpicture_t *p_subpic)
 This function delete a subpicture created by subpicture_New.
subpicture_tsubpicture_NewFromPicture (vlc_object_t *, picture_t *, vlc_fourcc_t i_chroma)
 This function will create a subpicture having one region in the requested chroma showing the given picture.
void subpicture_Update (subpicture_t *, const video_format_t *src, const video_format_t *, mtime_t)
 This function will update the content of a subpicture created with a non NULL subpicture_updater_t.
unsigned picture_BlendSubpicture (picture_t *, filter_t *p_blend, subpicture_t *)
 This function will blend a given subpicture onto a picture.

Detailed Description

Subpictures are pictures that should be displayed on top of the video, like subtitles and OSD.

Macro Definition Documentation

#define SUBPICTURE_ALIGN_BOTTOM   0x8
#define SUBPICTURE_ALIGN_LEAVETEXT   0x10

Align the subpicture, but not the text inside.

#define SUBPICTURE_ALIGN_LEFT   0x1

Referenced by OSDTextUpdate(), and SpuRegionPlace().

#define SUBPICTURE_ALIGN_MASK
Value:
SUBPICTURE_ALIGN_TOP |SUBPICTURE_ALIGN_BOTTOM| \
SUBPICTURE_ALIGN_LEAVETEXT )

Referenced by vout_OSDText().

#define SUBPICTURE_ALIGN_RIGHT   0x2
#define SUBPICTURE_ALIGN_TOP   0x4

Typedef Documentation

Video subtitle region spu core private.

Function Documentation

unsigned picture_BlendSubpicture ( picture_t ,
filter_t p_blend,
subpicture_t  
)

This function will blend a given subpicture onto a picture.

The subpicture and all its region must:

  • be absolute.
  • not be ephemere.
  • not have the fade flag.
  • contains only picture (no text rendering).
    Returns
    the number of region(s) succesfully blent

References subpicture_t::b_absolute, subpicture_t::b_fade, filter_Blend(), filter_ConfigureBlend(), filter_t::fmt_in, filter_t::fmt_out, picture_t::format, subpicture_t::i_alpha, video_format_t::i_chroma, video_format_t::i_height, video_format_t::i_width, msg_Err, subpicture_region_t::p_next, subpicture_t::p_region, and es_format_t::video.

Referenced by ThreadDisplayRenderPicture().

void subpicture_Delete ( subpicture_t p_subpic)
subpicture_t* subpicture_New ( const subpicture_updater_t )
subpicture_t* subpicture_NewFromPicture ( vlc_object_t ,
picture_t ,
vlc_fourcc_t  i_chroma 
)
void subpicture_region_ChainDelete ( subpicture_region_t p_head)

This function will destroy a list of subpicture regions allocated by subpicture_region_New.

Provided for convenience.

References subpicture_region_t::p_next, and subpicture_region_Delete().

Referenced by subpicture_Delete(), and subpicture_Update().

void subpicture_region_Delete ( subpicture_region_t p_region)
subpicture_region_t* subpicture_region_New ( const video_format_t p_fmt)
void subpicture_Update ( subpicture_t ,
const video_format_t src,
const video_format_t ,
mtime_t   
)