VLC 4.0.0-dev
Loading...
Searching...
No Matches

Ancillary that can be attached to any vlc_frame_t or picture_t. More...

Collaboration diagram for Ancillary:

Files

file  vlc_ancillary.h
 Ancillary definition and functions.
 

Data Structures

struct  vlc_video_dovi_metadata_t
 
struct  vlc_video_hdr_dynamic_metadata_t
 
struct  vlc_icc_profile_t
 
struct  vlc_vpx_alpha_t
 

Macros

#define VLC_ANCILLARY_ID(a, b, c, d)   VLC_FOURCC(a,b,c,d)
 
#define VLC_ANCILLARY_ID_DOVI   VLC_FOURCC('D','o','V','i')
 
#define VLC_ANCILLARY_ID_HDR10PLUS   VLC_FOURCC('H','D','R','+')
 HDR10+ Dynamic metadata (based on ATSC A/341 Amendment 2094-40)
 
#define VLC_ANCILLARY_ID_ICC   VLC_FOURCC('i','C','C','P')
 Embedded ICC profiles.
 
#define VLC_ANCILLARY_ID_VPX_ALPHA   VLC_FOURCC('v','p','x','A')
 VPx alpha data.
 

Typedefs

typedef uint32_t vlc_ancillary_id
 ID of an ancillary.
 
typedef void(* vlc_ancillary_free_cb) (void *data)
 Callback to free an ancillary data.
 
typedef struct vlc_video_dovi_metadata_t vlc_video_dovi_metadata_t
 
typedef struct vlc_video_hdr_dynamic_metadata_t vlc_video_hdr_dynamic_metadata_t
 
typedef struct vlc_icc_profile_t vlc_icc_profile_t
 
typedef struct vlc_vpx_alpha_t vlc_vpx_alpha_t
 

Enumerations

enum  vlc_dovi_reshape_method_t { VLC_DOVI_RESHAPE_POLYNOMIAL = 0 , VLC_DOVI_RESHAPE_MMR = 1 }
 Dolby Vision metadata description. More...
 
enum  vlc_dovi_nlq_method_t { VLC_DOVI_NLQ_NONE = -1 , VLC_DOVI_NLQ_LINEAR_DZ = 0 }
 

Functions

struct vlc_ancillaryvlc_ancillary_CreateWithFreeCb (void *data, vlc_ancillary_id id, vlc_ancillary_free_cb free_cb)
 Create an ancillary.
 
static struct vlc_ancillaryvlc_ancillary_Create (void *data, vlc_ancillary_id id)
 Helper to create an ancillary holding an allocated data.
 
void vlc_ancillary_Release (struct vlc_ancillary *ancillary)
 Release an ancillary.
 
struct vlc_ancillaryvlc_ancillary_Hold (struct vlc_ancillary *ancillary)
 Hold an ancillary.
 
void * vlc_ancillary_GetData (const struct vlc_ancillary *ancillary)
 

Detailed Description

Ancillary that can be attached to any vlc_frame_t or picture_t.

Ancillaries can be created from:

Warning
Ancillaries should not be attached from a non packetized demuxer module since the attachment to the vlc_frame will be lost by the packetizer module that will be automatically inserted.

Ancillaries are automatically forwarded from a vlc_frame_t to an other vlc_frame_t and from a picture_t to an other picture_t. This allow to keep ancillaries untouched when audio filters or video filters are used (these filters don't have to know about the ancillary).

Ancillary readers can be either:

Macro Definition Documentation

◆ VLC_ANCILLARY_ID

#define VLC_ANCILLARY_ID (   a,
  b,
  c,
 
)    VLC_FOURCC(a,b,c,d)

◆ VLC_ANCILLARY_ID_DOVI

#define VLC_ANCILLARY_ID_DOVI   VLC_FOURCC('D','o','V','i')

◆ VLC_ANCILLARY_ID_HDR10PLUS

#define VLC_ANCILLARY_ID_HDR10PLUS   VLC_FOURCC('H','D','R','+')

HDR10+ Dynamic metadata (based on ATSC A/341 Amendment 2094-40)

This is similar to SMPTE ST2094-40:2016, but omits the mastering display and target display actual peak luminance LUTs, the rectangular boundaries and ellipse coefficients, and support for multiple processing windows, as these are intentionally left unused in this version of the specification.

◆ VLC_ANCILLARY_ID_ICC

#define VLC_ANCILLARY_ID_ICC   VLC_FOURCC('i','C','C','P')

Embedded ICC profiles.

◆ VLC_ANCILLARY_ID_VPX_ALPHA

#define VLC_ANCILLARY_ID_VPX_ALPHA   VLC_FOURCC('v','p','x','A')

VPx alpha data.

Typedef Documentation

◆ vlc_ancillary_free_cb

typedef void(* vlc_ancillary_free_cb) (void *data)

Callback to free an ancillary data.

◆ vlc_ancillary_id

typedef uint32_t vlc_ancillary_id

ID of an ancillary.

Each ancillary user can create its own unique ID via VLC_ANCILLARY_ID.

◆ vlc_icc_profile_t

◆ vlc_video_dovi_metadata_t

◆ vlc_video_hdr_dynamic_metadata_t

◆ vlc_vpx_alpha_t

Enumeration Type Documentation

◆ vlc_dovi_nlq_method_t

Enumerator
VLC_DOVI_NLQ_NONE 
VLC_DOVI_NLQ_LINEAR_DZ 

◆ vlc_dovi_reshape_method_t

Dolby Vision metadata description.

Enumerator
VLC_DOVI_RESHAPE_POLYNOMIAL 
VLC_DOVI_RESHAPE_MMR 

Function Documentation

◆ vlc_ancillary_Create()

static struct vlc_ancillary * vlc_ancillary_Create ( void *  data,
vlc_ancillary_id  id 
)
inlinestatic

Helper to create an ancillary holding an allocated data.

References vlc_ancillary::data, and vlc_ancillary_CreateWithFreeCb().

Referenced by picture_AttachNewAncillary().

◆ vlc_ancillary_CreateWithFreeCb()

struct vlc_ancillary * vlc_ancillary_CreateWithFreeCb ( void *  data,
vlc_ancillary_id  id,
vlc_ancillary_free_cb  free_cb 
)

Create an ancillary.

Parameters
dataan opaque ancillary, can't be NULL
idid of ancillary
free_cbcallback to release the data, can be NULL
Returns
a valid vlc_ancillary pointer or NULL in case of allocation error

References vlc_ancillary::data, vlc_ancillary::free_cb, vlc_ancillary::id, vlc_ancillary::rc, and vlc_atomic_rc_init().

Referenced by vlc_ancillary_Create().

◆ vlc_ancillary_GetData()

void * vlc_ancillary_GetData ( const struct vlc_ancillary ancillary)

References vlc_ancillary::data.

◆ vlc_ancillary_Hold()

struct vlc_ancillary * vlc_ancillary_Hold ( struct vlc_ancillary ancillary)

Hold an ancillary.

Parameters
ancillaryancillary to hold
Returns
the same ancillary

References vlc_ancillary::rc, and vlc_atomic_rc_inc().

Referenced by vlc_ancillary_array_Dup(), and vlc_ancillary_array_Insert().

◆ vlc_ancillary_Release()

void vlc_ancillary_Release ( struct vlc_ancillary ancillary)

Release an ancillary.

If the refcount reaches 0, the free_cb provided by vlc_ancillary_CreateWithFreeCb() is called.

Parameters
ancillaryancillary to release

References vlc_ancillary::data, vlc_ancillary::free_cb, vlc_ancillary::rc, and vlc_atomic_rc_dec().

Referenced by picture_AttachNewAncillary(), vlc_ancillary_array_Clear(), and vlc_ancillary_array_Insert().