VLC  4.0.0-dev
Data Structures | Macros | Typedefs | Enumerations | Functions | Variables
vlc_es.h File Reference

This file defines the elementary streams format types. More...

Include dependency graph for vlc_es.h:

Go to the source code of this file.

Data Structures

struct  video_palette_t
 
struct  audio_replay_gain_t
 
struct  audio_format_t
 audio format description More...
 
struct  video_format_t
 video format description More...
 
struct  subs_format_t
 subtitles format description More...
 
struct  extra_languages_t
 ES language definition. More...
 
struct  es_format_t
 

Macros

#define VIDEO_PALETTE_COLORS_MAX   256
 video palette data More...
 
#define AUDIO_REPLAY_GAIN_MAX   (2)
 audio replay gain description More...
 
#define AUDIO_REPLAY_GAIN_TRACK   (0)
 
#define AUDIO_REPLAY_GAIN_ALBUM   (1)
 
#define AOUT_CHAN_CENTER   0x1
 
#define AOUT_CHAN_LEFT   0x2
 
#define AOUT_CHAN_RIGHT   0x4
 
#define AOUT_CHAN_REARCENTER   0x10
 
#define AOUT_CHAN_REARLEFT   0x20
 
#define AOUT_CHAN_REARRIGHT   0x40
 
#define AOUT_CHAN_MIDDLELEFT   0x100
 
#define AOUT_CHAN_MIDDLERIGHT   0x200
 
#define AOUT_CHAN_LFE   0x1000
 
#define AOUT_CHANS_FRONT   (AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT)
 
#define AOUT_CHANS_MIDDLE   (AOUT_CHAN_MIDDLELEFT | AOUT_CHAN_MIDDLERIGHT)
 
#define AOUT_CHANS_REAR   (AOUT_CHAN_REARLEFT | AOUT_CHAN_REARRIGHT)
 
#define AOUT_CHANS_CENTER   (AOUT_CHAN_CENTER | AOUT_CHAN_REARCENTER)
 
#define AOUT_CHANS_STEREO   AOUT_CHANS_2_0
 
#define AOUT_CHANS_2_0   (AOUT_CHANS_FRONT)
 
#define AOUT_CHANS_2_1   (AOUT_CHANS_FRONT | AOUT_CHAN_LFE)
 
#define AOUT_CHANS_3_0   (AOUT_CHANS_FRONT | AOUT_CHAN_CENTER)
 
#define AOUT_CHANS_3_1   (AOUT_CHANS_3_0 | AOUT_CHAN_LFE)
 
#define AOUT_CHANS_4_0   (AOUT_CHANS_FRONT | AOUT_CHANS_REAR)
 
#define AOUT_CHANS_4_1   (AOUT_CHANS_4_0 | AOUT_CHAN_LFE)
 
#define AOUT_CHANS_5_0   (AOUT_CHANS_4_0 | AOUT_CHAN_CENTER)
 
#define AOUT_CHANS_5_1   (AOUT_CHANS_5_0 | AOUT_CHAN_LFE)
 
#define AOUT_CHANS_6_0   (AOUT_CHANS_4_0 | AOUT_CHANS_MIDDLE)
 
#define AOUT_CHANS_7_0   (AOUT_CHANS_6_0 | AOUT_CHAN_CENTER)
 
#define AOUT_CHANS_7_1   (AOUT_CHANS_5_1 | AOUT_CHANS_MIDDLE)
 
#define AOUT_CHANS_8_1   (AOUT_CHANS_7_1 | AOUT_CHAN_REARCENTER)
 
#define AOUT_CHANS_4_0_MIDDLE   (AOUT_CHANS_FRONT | AOUT_CHANS_MIDDLE)
 
#define AOUT_CHANS_4_CENTER_REAR   (AOUT_CHANS_FRONT | AOUT_CHANS_CENTER)
 
#define AOUT_CHANS_5_0_MIDDLE   (AOUT_CHANS_4_0_MIDDLE | AOUT_CHAN_CENTER)
 
#define AOUT_CHANS_6_1_MIDDLE   (AOUT_CHANS_5_0_MIDDLE | AOUT_CHAN_REARCENTER | AOUT_CHAN_LFE)
 
#define AOUT_CHAN_MAX   9
 
#define INPUT_CHAN_MAX   64
 
#define AOUT_CHANMODE_DUALMONO   0x1
 
#define AOUT_CHANMODE_DOLBYSTEREO   0x2
 
#define ORIENT_FROM_EXIF(exif)   ((0x57642310U >> (4 * ((exif) - 1))) & 7)
 Convert EXIF orientation to enum video_orientation_t. More...
 
#define ORIENT_TO_EXIF(orient)   ((0x76853421U >> (4 * (orient))) & 15)
 Convert enum video_orientation_t to EXIF. More...
 
#define ORIENT_IS_MIRROR(orient)   parity(orient)
 If the orientation is natural or mirrored. More...
 
#define ORIENT_IS_SWAP(orient)   (((orient) & 4) != 0)
 If the orientation swaps dimensions. More...
 
#define ORIENT_HFLIP(orient)   ((orient) ^ 1)
 Applies horizontal flip to an orientation. More...
 
#define ORIENT_VFLIP(orient)   ((orient) ^ 2)
 Applies vertical flip to an orientation. More...
 
#define ORIENT_ROTATE_180(orient)   ((orient) ^ 3)
 Applies horizontal flip to an orientation. More...
 
#define MULTIVIEW_STEREO_MAX   MULTIVIEW_STEREO_CHECKERBOARD
 
#define COLOR_PRIMARIES_SRGB   COLOR_PRIMARIES_BT709
 
#define COLOR_PRIMARIES_SMTPE_170   COLOR_PRIMARIES_BT601_525
 
#define COLOR_PRIMARIES_SMTPE_240   COLOR_PRIMARIES_BT601_525 /* Only differs from 1e10-4 in white Y */
 
#define COLOR_PRIMARIES_SMTPE_RP145   COLOR_PRIMARIES_BT601_525
 
#define COLOR_PRIMARIES_EBU_3213   COLOR_PRIMARIES_BT601_625
 
#define COLOR_PRIMARIES_BT470_BG   COLOR_PRIMARIES_BT601_625
 
#define COLOR_PRIMARIES_BT470_M   COLOR_PRIMARIES_FCC1953
 
#define COLOR_PRIMARIES_MAX   COLOR_PRIMARIES_FCC1953
 
#define TRANSFER_FUNC_BT2020   TRANSFER_FUNC_BT709
 
#define TRANSFER_FUNC_SMPTE_170   TRANSFER_FUNC_BT709
 
#define TRANSFER_FUNC_SMPTE_274   TRANSFER_FUNC_BT709
 
#define TRANSFER_FUNC_SMPTE_293   TRANSFER_FUNC_BT709
 
#define TRANSFER_FUNC_SMPTE_296   TRANSFER_FUNC_BT709
 
#define TRANSFER_FUNC_ARIB_B67   TRANSFER_FUNC_HLG
 
#define TRANSFER_FUNC_MAX   TRANSFER_FUNC_HLG
 
#define COLOR_SPACE_SRGB   COLOR_SPACE_BT709
 
#define COLOR_SPACE_SMPTE_170   COLOR_SPACE_BT601
 
#define COLOR_SPACE_SMPTE_240   COLOR_SPACE_SMPTE_170
 
#define COLOR_SPACE_MAX   COLOR_SPACE_BT2020
 
#define CHROMA_LOCATION_MAX   CHROMA_LOCATION_BOTTOM_CENTER
 
#define COLOR_RANGE_STUDIO   COLOR_RANGE_LIMITED
 
#define COLOR_RANGE_MAX   COLOR_RANGE_LIMITED
 
#define SPU_PALETTE_DEFINED   0xbeefbeef
 
#define ES_CATEGORY_COUNT   (DATA_ES + 1)
 
#define ES_PRIORITY_NOT_SELECTABLE   -2
 ES format definition. More...
 
#define ES_PRIORITY_NOT_DEFAULTABLE   -1
 
#define ES_PRIORITY_SELECTABLE_MIN   0
 
#define ES_PRIORITY_MIN   ES_PRIORITY_NOT_SELECTABLE
 

Typedefs

typedef enum audio_channel_type_t audio_channel_type_t
 Audio channel type. More...
 
typedef enum video_orientation_t video_orientation_t
 Picture orientation. More...
 
typedef enum video_transform_t video_transform_t
 
typedef enum video_multiview_mode_t video_multiview_mode_t
 
typedef enum video_projection_mode_t video_projection_mode_t
 Video projection mode. More...
 
typedef enum video_color_primaries_t video_color_primaries_t
 Video color primaries (a.k.a. More...
 
typedef enum video_transfer_func_t video_transfer_func_t
 Video transfer functions. More...
 
typedef enum video_color_space_t video_color_space_t
 Video color space (i.e. More...
 
typedef enum video_chroma_location_t video_chroma_location_t
 Video chroma location. More...
 
typedef enum video_color_range_t video_color_range_t
 
typedef struct extra_languages_t extra_languages_t
 ES language definition. More...
 

Enumerations

enum  audio_channel_type_t { AUDIO_CHANNEL_TYPE_BITMAP, AUDIO_CHANNEL_TYPE_AMBISONICS }
 Audio channel type. More...
 
enum  video_orientation_t {
  ORIENT_TOP_LEFT = 0, ORIENT_TOP_RIGHT, ORIENT_BOTTOM_LEFT, ORIENT_BOTTOM_RIGHT,
  ORIENT_LEFT_TOP, ORIENT_LEFT_BOTTOM, ORIENT_RIGHT_TOP, ORIENT_RIGHT_BOTTOM,
  ORIENT_NORMAL = ORIENT_TOP_LEFT, ORIENT_TRANSPOSED = ORIENT_LEFT_TOP, ORIENT_ANTI_TRANSPOSED = ORIENT_RIGHT_BOTTOM, ORIENT_HFLIPPED = ORIENT_TOP_RIGHT,
  ORIENT_VFLIPPED = ORIENT_BOTTOM_LEFT, ORIENT_ROTATED_180 = ORIENT_BOTTOM_RIGHT, ORIENT_ROTATED_270 = ORIENT_LEFT_BOTTOM, ORIENT_ROTATED_90 = ORIENT_RIGHT_TOP
}
 Picture orientation. More...
 
enum  video_transform_t {
  TRANSFORM_IDENTITY = ORIENT_NORMAL, TRANSFORM_HFLIP = ORIENT_HFLIPPED, TRANSFORM_VFLIP = ORIENT_VFLIPPED, TRANSFORM_R180 = ORIENT_ROTATED_180,
  TRANSFORM_R270 = ORIENT_ROTATED_270, TRANSFORM_R90 = ORIENT_ROTATED_90, TRANSFORM_TRANSPOSE = ORIENT_TRANSPOSED, TRANSFORM_ANTI_TRANSPOSE = ORIENT_ANTI_TRANSPOSED
}
 
enum  video_multiview_mode_t {
  MULTIVIEW_2D = 0, MULTIVIEW_STEREO_SBS, MULTIVIEW_STEREO_TB, MULTIVIEW_STEREO_ROW,
  MULTIVIEW_STEREO_COL, MULTIVIEW_STEREO_FRAME, MULTIVIEW_STEREO_CHECKERBOARD
}
 
enum  video_projection_mode_t { PROJECTION_MODE_RECTANGULAR = 0, PROJECTION_MODE_EQUIRECTANGULAR, PROJECTION_MODE_CUBEMAP_LAYOUT_STANDARD = 0x100 }
 Video projection mode. More...
 
enum  video_color_primaries_t {
  COLOR_PRIMARIES_UNDEF, COLOR_PRIMARIES_BT601_525, COLOR_PRIMARIES_BT601_625, COLOR_PRIMARIES_BT709,
  COLOR_PRIMARIES_BT2020, COLOR_PRIMARIES_DCI_P3, COLOR_PRIMARIES_FCC1953
}
 Video color primaries (a.k.a. More...
 
enum  video_transfer_func_t {
  TRANSFER_FUNC_UNDEF, TRANSFER_FUNC_LINEAR, TRANSFER_FUNC_SRGB, TRANSFER_FUNC_BT470_BG,
  TRANSFER_FUNC_BT470_M, TRANSFER_FUNC_BT709, TRANSFER_FUNC_SMPTE_ST2084, TRANSFER_FUNC_SMPTE_240,
  TRANSFER_FUNC_HLG
}
 Video transfer functions. More...
 
enum  video_color_space_t { COLOR_SPACE_UNDEF, COLOR_SPACE_BT601, COLOR_SPACE_BT709, COLOR_SPACE_BT2020 }
 Video color space (i.e. More...
 
enum  video_chroma_location_t {
  CHROMA_LOCATION_UNDEF, CHROMA_LOCATION_LEFT, CHROMA_LOCATION_CENTER, CHROMA_LOCATION_TOP_LEFT,
  CHROMA_LOCATION_TOP_CENTER, CHROMA_LOCATION_BOTTOM_LEFT, CHROMA_LOCATION_BOTTOM_CENTER
}
 Video chroma location. More...
 
enum  video_color_range_t { COLOR_RANGE_UNDEF, COLOR_RANGE_FULL, COLOR_RANGE_LIMITED }
 
enum  es_format_category_e {
  UNKNOWN_ES = 0x00, VIDEO_ES, AUDIO_ES, SPU_ES,
  DATA_ES
}
 ES Categories. More...
 

Functions

static void video_format_Init (video_format_t *p_src, vlc_fourcc_t i_chroma)
 Initialize a video_format_t structure with chroma 'i_chroma'. More...
 
static int video_format_Copy (video_format_t *p_dst, const video_format_t *p_src)
 Copy video_format_t including the palette. More...
 
static void video_format_AdjustColorSpace (video_format_t *p_fmt)
 
static void video_format_Clean (video_format_t *p_src)
 Cleanup and free palette of this video_format_t. More...
 
void video_format_Setup (video_format_t *, vlc_fourcc_t i_chroma, int i_width, int i_height, int i_visible_width, int i_visible_height, int i_sar_num, int i_sar_den)
 It will fill up a video_format_t using the given arguments. More...
 
void video_format_CopyCrop (video_format_t *, const video_format_t *)
 It will copy the crop properties from a video_format_t to another. More...
 
static void video_format_CopyCropAr (video_format_t *dst, const video_format_t *src)
 
void video_format_ScaleCropAr (video_format_t *, const video_format_t *)
 It will compute the crop/ar properties when scaling. More...
 
void video_format_ApplyRotation (video_format_t *out, const video_format_t *in)
 This function "normalizes" the formats orientation, by switching the a/r according to the orientation, producing a format whose orientation is ORIENT_NORMAL. More...
 
void video_format_TransformBy (video_format_t *fmt, video_transform_t transform)
 This function applies the transform operation to fmt. More...
 
void video_format_TransformTo (video_format_t *fmt, video_orientation_t dst_orientation)
 This function applies the transforms necessary to fmt so that the resulting fmt has the dst_orientation. More...
 
video_transform_t video_format_GetTransform (video_orientation_t src, video_orientation_t dst)
 Returns the operation required to transform src into dst. More...
 
bool video_format_IsSimilar (const video_format_t *, const video_format_t *)
 This function will check if the first video format is similar to the second one. More...
 
void video_format_Print (vlc_object_t *, const char *, const video_format_t *)
 It prints details about the given video_format_t. More...
 
static video_transform_t transform_Inverse (video_transform_t transform)
 
void video_format_FixRgb (video_format_t *)
 This function will fill all RGB shift from RGB masks. More...
 
void es_format_Init (es_format_t *, int i_cat, vlc_fourcc_t i_codec)
 This function will initialize a es_format_t structure. More...
 
void es_format_InitFromVideo (es_format_t *, const video_format_t *)
 This function will initialize a es_format_t structure from a video_format_t. More...
 
int es_format_Copy (es_format_t *p_dst, const es_format_t *p_src)
 This functions will copy a es_format_t. More...
 
void es_format_Clean (es_format_t *fmt)
 This function will clean up a es_format_t and release all associated resources. More...
 
bool es_format_IsSimilar (const es_format_t *, const es_format_t *)
 This function will check if the first ES format is similar to the second one. More...
 
static void es_format_Change (es_format_t *fmt, int i_cat, vlc_fourcc_t i_codec)
 Changes ES format to another category Format must have been properly initialized. More...
 
vlc_es_id_tvlc_es_id_Hold (vlc_es_id_t *es)
 Increase the ES track id reference count. More...
 
void vlc_es_id_Release (vlc_es_id_t *id)
 Decrease the ES track id reference count. More...
 
int vlc_es_id_GetInputId (vlc_es_id_t *id)
 Get the ES track input id. More...
 
bool vlc_es_id_IsStrIdStable (vlc_es_id_t *id)
 Return whether the ES track identifier is stable. More...
 
const char * vlc_es_id_GetStrId (vlc_es_id_t *id)
 Get the unique string identifier. More...
 
enum es_format_category_e vlc_es_id_GetCat (vlc_es_id_t *id)
 Get the ES category. More...
 

Variables

static const uint16_t vlc_chan_maps []
 

Detailed Description

This file defines the elementary streams format types.

Macro Definition Documentation

◆ AOUT_CHAN_CENTER

#define AOUT_CHAN_CENTER   0x1

◆ AOUT_CHAN_LEFT

#define AOUT_CHAN_LEFT   0x2

◆ AOUT_CHAN_LFE

#define AOUT_CHAN_LFE   0x1000

◆ AOUT_CHAN_MAX

#define AOUT_CHAN_MAX   9

◆ AOUT_CHAN_MIDDLELEFT

#define AOUT_CHAN_MIDDLELEFT   0x100

◆ AOUT_CHAN_MIDDLERIGHT

#define AOUT_CHAN_MIDDLERIGHT   0x200

◆ AOUT_CHAN_REARCENTER

#define AOUT_CHAN_REARCENTER   0x10

◆ AOUT_CHAN_REARLEFT

#define AOUT_CHAN_REARLEFT   0x20

◆ AOUT_CHAN_REARRIGHT

#define AOUT_CHAN_REARRIGHT   0x40

◆ AOUT_CHAN_RIGHT

#define AOUT_CHAN_RIGHT   0x4

◆ AOUT_CHANMODE_DOLBYSTEREO

#define AOUT_CHANMODE_DOLBYSTEREO   0x2

◆ AOUT_CHANMODE_DUALMONO

#define AOUT_CHANMODE_DUALMONO   0x1

◆ AOUT_CHANS_2_0

#define AOUT_CHANS_2_0   (AOUT_CHANS_FRONT)

◆ AOUT_CHANS_2_1

#define AOUT_CHANS_2_1   (AOUT_CHANS_FRONT | AOUT_CHAN_LFE)

◆ AOUT_CHANS_3_0

#define AOUT_CHANS_3_0   (AOUT_CHANS_FRONT | AOUT_CHAN_CENTER)

◆ AOUT_CHANS_3_1

#define AOUT_CHANS_3_1   (AOUT_CHANS_3_0 | AOUT_CHAN_LFE)

◆ AOUT_CHANS_4_0

#define AOUT_CHANS_4_0   (AOUT_CHANS_FRONT | AOUT_CHANS_REAR)

◆ AOUT_CHANS_4_0_MIDDLE

#define AOUT_CHANS_4_0_MIDDLE   (AOUT_CHANS_FRONT | AOUT_CHANS_MIDDLE)

◆ AOUT_CHANS_4_1

#define AOUT_CHANS_4_1   (AOUT_CHANS_4_0 | AOUT_CHAN_LFE)

◆ AOUT_CHANS_4_CENTER_REAR

#define AOUT_CHANS_4_CENTER_REAR   (AOUT_CHANS_FRONT | AOUT_CHANS_CENTER)

◆ AOUT_CHANS_5_0

#define AOUT_CHANS_5_0   (AOUT_CHANS_4_0 | AOUT_CHAN_CENTER)

◆ AOUT_CHANS_5_0_MIDDLE

#define AOUT_CHANS_5_0_MIDDLE   (AOUT_CHANS_4_0_MIDDLE | AOUT_CHAN_CENTER)

◆ AOUT_CHANS_5_1

#define AOUT_CHANS_5_1   (AOUT_CHANS_5_0 | AOUT_CHAN_LFE)

◆ AOUT_CHANS_6_0

#define AOUT_CHANS_6_0   (AOUT_CHANS_4_0 | AOUT_CHANS_MIDDLE)

◆ AOUT_CHANS_6_1_MIDDLE

#define AOUT_CHANS_6_1_MIDDLE   (AOUT_CHANS_5_0_MIDDLE | AOUT_CHAN_REARCENTER | AOUT_CHAN_LFE)

◆ AOUT_CHANS_7_0

#define AOUT_CHANS_7_0   (AOUT_CHANS_6_0 | AOUT_CHAN_CENTER)

◆ AOUT_CHANS_7_1

#define AOUT_CHANS_7_1   (AOUT_CHANS_5_1 | AOUT_CHANS_MIDDLE)

Referenced by aout_OutputNew().

◆ AOUT_CHANS_8_1

#define AOUT_CHANS_8_1   (AOUT_CHANS_7_1 | AOUT_CHAN_REARCENTER)

◆ AOUT_CHANS_CENTER

#define AOUT_CHANS_CENTER   (AOUT_CHAN_CENTER | AOUT_CHAN_REARCENTER)

◆ AOUT_CHANS_FRONT

#define AOUT_CHANS_FRONT   (AOUT_CHAN_LEFT | AOUT_CHAN_RIGHT)

◆ AOUT_CHANS_MIDDLE

#define AOUT_CHANS_MIDDLE   (AOUT_CHAN_MIDDLELEFT | AOUT_CHAN_MIDDLERIGHT)

◆ AOUT_CHANS_REAR

#define AOUT_CHANS_REAR   (AOUT_CHAN_REARLEFT | AOUT_CHAN_REARRIGHT)

◆ AOUT_CHANS_STEREO

#define AOUT_CHANS_STEREO   AOUT_CHANS_2_0

Referenced by aout_OutputNew().

◆ AUDIO_REPLAY_GAIN_ALBUM

#define AUDIO_REPLAY_GAIN_ALBUM   (1)

◆ AUDIO_REPLAY_GAIN_MAX

#define AUDIO_REPLAY_GAIN_MAX   (2)

◆ AUDIO_REPLAY_GAIN_TRACK

#define AUDIO_REPLAY_GAIN_TRACK   (0)

◆ CHROMA_LOCATION_MAX

#define CHROMA_LOCATION_MAX   CHROMA_LOCATION_BOTTOM_CENTER

Referenced by EsOutUpdateInfo().

◆ COLOR_PRIMARIES_BT470_BG

#define COLOR_PRIMARIES_BT470_BG   COLOR_PRIMARIES_BT601_625

◆ COLOR_PRIMARIES_BT470_M

#define COLOR_PRIMARIES_BT470_M   COLOR_PRIMARIES_FCC1953

Referenced by EsOutUpdateInfo().

◆ COLOR_PRIMARIES_EBU_3213

#define COLOR_PRIMARIES_EBU_3213   COLOR_PRIMARIES_BT601_625

◆ COLOR_PRIMARIES_MAX

#define COLOR_PRIMARIES_MAX   COLOR_PRIMARIES_FCC1953

Referenced by EsOutUpdateInfo().

◆ COLOR_PRIMARIES_SMTPE_170

#define COLOR_PRIMARIES_SMTPE_170   COLOR_PRIMARIES_BT601_525

◆ COLOR_PRIMARIES_SMTPE_240

#define COLOR_PRIMARIES_SMTPE_240   COLOR_PRIMARIES_BT601_525 /* Only differs from 1e10-4 in white Y */

◆ COLOR_PRIMARIES_SMTPE_RP145

#define COLOR_PRIMARIES_SMTPE_RP145   COLOR_PRIMARIES_BT601_525

◆ COLOR_PRIMARIES_SRGB

#define COLOR_PRIMARIES_SRGB   COLOR_PRIMARIES_BT709

Referenced by SpuRenderText().

◆ COLOR_RANGE_MAX

#define COLOR_RANGE_MAX   COLOR_RANGE_LIMITED

Referenced by EsOutUpdateInfo().

◆ COLOR_RANGE_STUDIO

#define COLOR_RANGE_STUDIO   COLOR_RANGE_LIMITED

◆ COLOR_SPACE_MAX

#define COLOR_SPACE_MAX   COLOR_SPACE_BT2020

Referenced by EsOutUpdateInfo().

◆ COLOR_SPACE_SMPTE_170

#define COLOR_SPACE_SMPTE_170   COLOR_SPACE_BT601

◆ COLOR_SPACE_SMPTE_240

#define COLOR_SPACE_SMPTE_240   COLOR_SPACE_SMPTE_170

◆ COLOR_SPACE_SRGB

#define COLOR_SPACE_SRGB   COLOR_SPACE_BT709

Referenced by SpuRenderText().

◆ ES_CATEGORY_COUNT

#define ES_CATEGORY_COUNT   (DATA_ES + 1)

Referenced by LoadDecoder().

◆ ES_PRIORITY_MIN

#define ES_PRIORITY_MIN   ES_PRIORITY_NOT_SELECTABLE

◆ ES_PRIORITY_NOT_DEFAULTABLE

#define ES_PRIORITY_NOT_DEFAULTABLE   -1

◆ ES_PRIORITY_NOT_SELECTABLE

#define ES_PRIORITY_NOT_SELECTABLE   -2

ES format definition.

◆ ES_PRIORITY_SELECTABLE_MIN

#define ES_PRIORITY_SELECTABLE_MIN   0

Referenced by es_format_Init(), and EsOutSelect().

◆ INPUT_CHAN_MAX

#define INPUT_CHAN_MAX   64

Referenced by aout_DecNew().

◆ MULTIVIEW_STEREO_MAX

#define MULTIVIEW_STEREO_MAX   MULTIVIEW_STEREO_CHECKERBOARD

Referenced by EsOutUpdateInfo().

◆ ORIENT_FROM_EXIF

#define ORIENT_FROM_EXIF (   exif)    ((0x57642310U >> (4 * ((exif) - 1))) & 7)

Convert EXIF orientation to enum video_orientation_t.

◆ ORIENT_HFLIP

#define ORIENT_HFLIP (   orient)    ((orient) ^ 1)

Applies horizontal flip to an orientation.

◆ ORIENT_IS_MIRROR

#define ORIENT_IS_MIRROR (   orient)    parity(orient)

If the orientation is natural or mirrored.

Referenced by transform_GetBasicOps().

◆ ORIENT_IS_SWAP

#define ORIENT_IS_SWAP (   orient)    (((orient) & 4) != 0)

If the orientation swaps dimensions.

Referenced by video_format_TransformBy(), vout_display_GetDefaultDisplaySize(), and vout_display_SizeWindow().

◆ ORIENT_ROTATE_180

#define ORIENT_ROTATE_180 (   orient)    ((orient) ^ 3)

Applies horizontal flip to an orientation.

◆ ORIENT_TO_EXIF

#define ORIENT_TO_EXIF (   orient)    ((0x76853421U >> (4 * (orient))) & 15)

Convert enum video_orientation_t to EXIF.

◆ ORIENT_VFLIP

#define ORIENT_VFLIP (   orient)    ((orient) ^ 2)

Applies vertical flip to an orientation.

◆ SPU_PALETTE_DEFINED

#define SPU_PALETTE_DEFINED   0xbeefbeef

◆ TRANSFER_FUNC_ARIB_B67

#define TRANSFER_FUNC_ARIB_B67   TRANSFER_FUNC_HLG

◆ TRANSFER_FUNC_BT2020

#define TRANSFER_FUNC_BT2020   TRANSFER_FUNC_BT709

◆ TRANSFER_FUNC_MAX

#define TRANSFER_FUNC_MAX   TRANSFER_FUNC_HLG

Referenced by EsOutUpdateInfo().

◆ TRANSFER_FUNC_SMPTE_170

#define TRANSFER_FUNC_SMPTE_170   TRANSFER_FUNC_BT709

◆ TRANSFER_FUNC_SMPTE_274

#define TRANSFER_FUNC_SMPTE_274   TRANSFER_FUNC_BT709

◆ TRANSFER_FUNC_SMPTE_293

#define TRANSFER_FUNC_SMPTE_293   TRANSFER_FUNC_BT709

◆ TRANSFER_FUNC_SMPTE_296

#define TRANSFER_FUNC_SMPTE_296   TRANSFER_FUNC_BT709

◆ VIDEO_PALETTE_COLORS_MAX

#define VIDEO_PALETTE_COLORS_MAX   256

video palette data

See also
video_format_t
subs_format_t

Typedef Documentation

◆ audio_channel_type_t

Audio channel type.

◆ extra_languages_t

ES language definition.

◆ video_chroma_location_t

Video chroma location.

◆ video_color_primaries_t

Video color primaries (a.k.a.

chromacities)

◆ video_color_range_t

◆ video_color_space_t

Video color space (i.e.

YCbCr matrices)

◆ video_multiview_mode_t

◆ video_orientation_t

Picture orientation.

◆ video_projection_mode_t

Video projection mode.

◆ video_transfer_func_t

Video transfer functions.

◆ video_transform_t

Enumeration Type Documentation

◆ audio_channel_type_t

Audio channel type.

Enumerator
AUDIO_CHANNEL_TYPE_BITMAP 
AUDIO_CHANNEL_TYPE_AMBISONICS 

◆ es_format_category_e

ES Categories.

Enumerator
UNKNOWN_ES 
VIDEO_ES 
AUDIO_ES 
SPU_ES 
DATA_ES 

◆ video_chroma_location_t

Video chroma location.

Enumerator
CHROMA_LOCATION_UNDEF 
CHROMA_LOCATION_LEFT 
CHROMA_LOCATION_CENTER 
CHROMA_LOCATION_TOP_LEFT 
CHROMA_LOCATION_TOP_CENTER 
CHROMA_LOCATION_BOTTOM_LEFT 
CHROMA_LOCATION_BOTTOM_CENTER 

◆ video_color_primaries_t

Video color primaries (a.k.a.

chromacities)

Enumerator
COLOR_PRIMARIES_UNDEF 
COLOR_PRIMARIES_BT601_525 
COLOR_PRIMARIES_BT601_625 
COLOR_PRIMARIES_BT709 
COLOR_PRIMARIES_BT2020 
COLOR_PRIMARIES_DCI_P3 
COLOR_PRIMARIES_FCC1953 

◆ video_color_range_t

Enumerator
COLOR_RANGE_UNDEF 
COLOR_RANGE_FULL 
COLOR_RANGE_LIMITED 

◆ video_color_space_t

Video color space (i.e.

YCbCr matrices)

Enumerator
COLOR_SPACE_UNDEF 
COLOR_SPACE_BT601 
COLOR_SPACE_BT709 
COLOR_SPACE_BT2020 

◆ video_multiview_mode_t

Enumerator
MULTIVIEW_2D 
MULTIVIEW_STEREO_SBS 
MULTIVIEW_STEREO_TB 
MULTIVIEW_STEREO_ROW 
MULTIVIEW_STEREO_COL 
MULTIVIEW_STEREO_FRAME 
MULTIVIEW_STEREO_CHECKERBOARD 

◆ video_orientation_t

Picture orientation.

Enumerator
ORIENT_TOP_LEFT 

Top line represents top, left column left.

ORIENT_TOP_RIGHT 

Flipped horizontally.

ORIENT_BOTTOM_LEFT 

Flipped vertically.

ORIENT_BOTTOM_RIGHT 

Rotated 180 degrees.

ORIENT_LEFT_TOP 

Transposed.

ORIENT_LEFT_BOTTOM 

Rotated 90 degrees clockwise.

ORIENT_RIGHT_TOP 

Rotated 90 degrees anti-clockwise.

ORIENT_RIGHT_BOTTOM 

Anti-transposed.

ORIENT_NORMAL 
ORIENT_TRANSPOSED 
ORIENT_ANTI_TRANSPOSED 
ORIENT_HFLIPPED 
ORIENT_VFLIPPED 
ORIENT_ROTATED_180 
ORIENT_ROTATED_270 
ORIENT_ROTATED_90 

◆ video_projection_mode_t

Video projection mode.

Enumerator
PROJECTION_MODE_RECTANGULAR 
PROJECTION_MODE_EQUIRECTANGULAR 
PROJECTION_MODE_CUBEMAP_LAYOUT_STANDARD 

◆ video_transfer_func_t

Video transfer functions.

Enumerator
TRANSFER_FUNC_UNDEF 
TRANSFER_FUNC_LINEAR 
TRANSFER_FUNC_SRGB 
TRANSFER_FUNC_BT470_BG 
TRANSFER_FUNC_BT470_M 
TRANSFER_FUNC_BT709 
TRANSFER_FUNC_SMPTE_ST2084 
TRANSFER_FUNC_SMPTE_240 
TRANSFER_FUNC_HLG 

◆ video_transform_t

Enumerator
TRANSFORM_IDENTITY 
TRANSFORM_HFLIP 
TRANSFORM_VFLIP 
TRANSFORM_R180 
TRANSFORM_R270 
TRANSFORM_R90 
TRANSFORM_TRANSPOSE 
TRANSFORM_ANTI_TRANSPOSE 

Function Documentation

◆ es_format_Change()

static void es_format_Change ( es_format_t fmt,
int  i_cat,
vlc_fourcc_t  i_codec 
)
inlinestatic

Changes ES format to another category Format must have been properly initialized.

References es_format_Clean(), es_format_Init(), VLC_API, vlc_es_id_GetCat(), vlc_es_id_GetInputId(), vlc_es_id_GetStrId(), vlc_es_id_Hold(), vlc_es_id_IsStrIdStable(), and vlc_es_id_Release().

◆ es_format_Clean()

void es_format_Clean ( es_format_t fmt)

◆ es_format_Copy()

int es_format_Copy ( es_format_t p_dst,
const es_format_t p_src 
)

This functions will copy a es_format_t.

◆ es_format_Init()

void es_format_Init ( es_format_t ,
int  i_cat,
vlc_fourcc_t  i_codec 
)

◆ es_format_InitFromVideo()

void es_format_InitFromVideo ( es_format_t ,
const video_format_t  
)

◆ es_format_IsSimilar()

bool es_format_IsSimilar ( const es_format_t ,
const es_format_t  
)

◆ transform_Inverse()

static video_transform_t transform_Inverse ( video_transform_t  transform)
inlinestatic

◆ video_format_AdjustColorSpace()

static void video_format_AdjustColorSpace ( video_format_t p_fmt)
inlinestatic

◆ video_format_ApplyRotation()

void video_format_ApplyRotation ( video_format_t out,
const video_format_t in 
)

This function "normalizes" the formats orientation, by switching the a/r according to the orientation, producing a format whose orientation is ORIENT_NORMAL.

It makes a shallow copy (pallette is not alloc'ed).

Referenced by video_format_CopyCropAr().

◆ video_format_Clean()

static void video_format_Clean ( video_format_t p_src)
inlinestatic

◆ video_format_Copy()

static int video_format_Copy ( video_format_t p_dst,
const video_format_t p_src 
)
inlinestatic

◆ video_format_CopyCrop()

void video_format_CopyCrop ( video_format_t ,
const video_format_t  
)

◆ video_format_CopyCropAr()

static void video_format_CopyCropAr ( video_format_t dst,
const video_format_t src 
)
inlinestatic

◆ video_format_FixRgb()

void video_format_FixRgb ( video_format_t )

◆ video_format_GetTransform()

video_transform_t video_format_GetTransform ( video_orientation_t  src,
video_orientation_t  dst 
)

Returns the operation required to transform src into dst.

References transform_FromBasicOps(), transform_GetBasicOps(), and transform_Inverse().

Referenced by video_format_CopyCropAr(), and video_format_TransformTo().

◆ video_format_Init()

static void video_format_Init ( video_format_t p_src,
vlc_fourcc_t  i_chroma 
)
inlinestatic

Initialize a video_format_t structure with chroma 'i_chroma'.

Parameters
p_srcpointer to video_format_t structure
i_chromachroma value to use

References video_format_t::i_chroma, video_format_t::pose, and vlc_viewpoint_init().

Referenced by es_format_Init(), OSDRegion(), OSDTextUpdate(), picture_New(), spu_Create(), subpicture_New(), vout_OSDBackground(), vout_OSDEpgSlider(), vout_OSDImage(), and vout_OSDTextRegion().

◆ video_format_IsSimilar()

bool video_format_IsSimilar ( const video_format_t ,
const video_format_t  
)

◆ video_format_Print()

void video_format_Print ( vlc_object_t ,
const char *  ,
const video_format_t  
)

◆ video_format_ScaleCropAr()

void video_format_ScaleCropAr ( video_format_t ,
const video_format_t  
)

◆ video_format_Setup()

void video_format_Setup ( video_format_t ,
vlc_fourcc_t  i_chroma,
int  i_width,
int  i_height,
int  i_visible_width,
int  i_visible_height,
int  i_sar_num,
int  i_sar_den 
)

◆ video_format_TransformBy()

void video_format_TransformBy ( video_format_t fmt,
video_transform_t  transform 
)

◆ video_format_TransformTo()

void video_format_TransformTo ( video_format_t fmt,
video_orientation_t  dst_orientation 
)

This function applies the transforms necessary to fmt so that the resulting fmt has the dst_orientation.

Referenced by video_format_CopyCropAr().

◆ vlc_es_id_GetCat()

enum es_format_category_e vlc_es_id_GetCat ( vlc_es_id_t id)

Get the ES category.

Parameters
idpointer to the ES track id
Returns
the es track category (always valid)

Referenced by es_format_Change(), vlc_player_GetPrivTrack(), vlc_player_input_FindTrackById(), vlc_player_osd_Track(), vlc_player_SelectEsId(), vlc_player_SelectEsIdList(), and vlc_player_UpdateTimer().

◆ vlc_es_id_GetInputId()

int vlc_es_id_GetInputId ( vlc_es_id_t id)

Get the ES track input id.

Parameters
idpointer to the ES track id
Returns
the ES track input id (always valid)

Referenced by Control(), ControlSetEsList(), and es_format_Change().

◆ vlc_es_id_GetStrId()

const char* vlc_es_id_GetStrId ( vlc_es_id_t id)

Get the unique string identifier.

This id could be used to identify a track across different playback instances. For example, it can be used to store a track selection preference in a database.

Warning
Check with vlc_es_id_IsStrIdStable() if the ES track is stable before saving it for a future usage.
Parameters
idpointer to the ES track id
Returns
the ES track string identifier, can't be NULL, valid until id is released

Referenced by es_format_Change(), and vlc_player_input_GetSelectedTrackStringIds().

◆ vlc_es_id_Hold()

vlc_es_id_t* vlc_es_id_Hold ( vlc_es_id_t es)

Increase the ES track id reference count.

Any held ES tracks must be released with vlc_es_id_Release().

Parameters
idpointer to the ES id
Returns
the same ES pointer, for convenience

References EsHold(), and vlc_es_id_get_out().

Referenced by es_format_Change(), EsOutVaPrivControlLocked(), input_ControlPushEsHelper(), vlc_player_SelectEsIdList(), and vlc_player_track_priv_New().

◆ vlc_es_id_IsStrIdStable()

bool vlc_es_id_IsStrIdStable ( vlc_es_id_t id)

Return whether the ES track identifier is stable.

An string identifier is stable when it is certified to be the same across different playback instances for the same ES track.

Parameters
idpointer to the ES track id
Returns
true if stable

Referenced by es_format_Change(), and vlc_player_input_GetSelectedTrackStringIds().

◆ vlc_es_id_Release()

void vlc_es_id_Release ( vlc_es_id_t id)

Decrease the ES track id reference count.

Parameters
idpointer to the ES track id

References EsRelease(), and vlc_es_id_get_out().

Referenced by ControlRelease(), es_format_Change(), EsOutVaPrivControlLocked(), and vlc_player_track_priv_Delete().

Variable Documentation

◆ vlc_chan_maps

const uint16_t vlc_chan_maps[]
static
Initial value:
=
{
0,
0x1 ,
( ( 0x2 | 0x4 ) ) ,
( ( 0x2 | 0x4 ) | 0x1 ) ,
( ( 0x2 | 0x4 ) | ( 0x20 | 0x40 ) ) ,
( ( ( 0x2 | 0x4 ) | ( 0x20 | 0x40 ) ) | 0x1 ) ,
( ( ( ( 0x2 | 0x4 ) | ( 0x20 | 0x40 ) ) | 0x1 ) | 0x1000 ) ,
( ( ( ( 0x2 | 0x4 ) | ( 0x20 | 0x40 ) ) | ( 0x100 | 0x200 ) ) | 0x1 ) ,
( ( ( ( ( 0x2 | 0x4 ) | ( 0x20 | 0x40 ) ) | 0x1 ) | 0x1000 ) | ( 0x100 | 0x200 ) ) ,
( ( ( ( ( ( 0x2 | 0x4 ) | ( 0x20 | 0x40 ) ) | 0x1 ) | 0x1000 ) | ( 0x100 | 0x200 ) ) | 0x10 ) ,
}