MLT  7.28.0
Public Member Functions | Data Fields | Private Member Functions
mlt_profile_s Struct Reference

Profile class. More...

#include <mlt_profile.h>

Public Member Functions

mlt_profile mlt_profile_clone (mlt_profile profile)
 Make a copy of a profile. More...
 
void mlt_profile_close (mlt_profile profile)
 Free up the global profile resources. More...
 
double mlt_profile_dar (mlt_profile profile)
 Get the display aspect ratio as floating point value. More...
 
double mlt_profile_fps (mlt_profile profile)
 Get the video frame rate as a floating point value. More...
 
void mlt_profile_from_producer (mlt_profile profile, mlt_producer producer)
 Update the profile using the attributes of a producer. More...
 
mlt_profile mlt_profile_init (const char *name)
 Construct a profile. More...
 
mlt_properties mlt_profile_list ()
 Get the list of profiles. More...
 
mlt_profile mlt_profile_load_file (const char *file)
 Load a profile from specific file. More...
 
mlt_profile mlt_profile_load_properties (mlt_properties properties)
 Load a profile from a properties object. More...
 
mlt_profile mlt_profile_load_string (const char *string)
 Load an anonymous profile from string. More...
 
char * mlt_profile_lumas_dir (mlt_profile profile)
 Get the lumas subdirectory to use for the aspect ratio. More...
 
double mlt_profile_sar (mlt_profile profile)
 Get the sample aspect ratio as a floating point value. More...
 
double mlt_profile_scale_height (mlt_profile profile, int height)
 Get the height scale factor. More...
 
double mlt_profile_scale_width (mlt_profile profile, int width)
 Get the width scale factor. More...
 

Data Fields

int colorspace
 the Y'CbCr colorspace standard: =601 for ITU-R 601, =709 for ITU-R 709, or =240 for SMPTE240M More...
 
char * description
 a brief description suitable as a label in UI menu More...
 
int display_aspect_den
 the denominator of the image aspect ratio in case it can not be simply derived (e.g. More...
 
int display_aspect_num
 the numerator of the image aspect ratio in case it can not be simply derived (e.g. More...
 
int frame_rate_den
 the denominator of the video frame rate More...
 
int frame_rate_num
 the numerator of the video frame rate More...
 
int height
 the vertical resolution of the video More...
 
int is_explicit
 used internally to indicate if the profile was requested explicitly or computed or defaulted More...
 
int progressive
 a flag to indicate if the video is progressive scan, interlace if not set More...
 
int sample_aspect_den
 the denominator of the pixel aspect ratio More...
 
int sample_aspect_num
 the numerator of the pixel aspect ratio More...
 
int width
 the horizontal resolution of the video More...
 

Private Member Functions

static mlt_profile mlt_profile_select (const char *name)
 Load a profile from the system folder. More...
 

Detailed Description

Profile class.

Environment Variable:

MLT_PROFILES_PATH overrides the default full path to the profile preset files, defaults to MLT_DATA/profiles

MLT_PROFILE the profile preset to use, defaults to "dv_pal"

Member Function Documentation

◆ mlt_profile_clone()

mlt_profile mlt_profile_clone ( mlt_profile  profile)

Make a copy of a profile.

Parameters
profilethe profile to clone
Returns
a copy of the profile

◆ mlt_profile_close()

void mlt_profile_close ( mlt_profile  profile)

Free up the global profile resources.

Parameters
profilea profile

◆ mlt_profile_dar()

double mlt_profile_dar ( mlt_profile  profile)

Get the display aspect ratio as floating point value.

Parameters
profilea profile
Returns
the image aspect ratio

◆ mlt_profile_fps()

double mlt_profile_fps ( mlt_profile  profile)

Get the video frame rate as a floating point value.

Parameters
profilea profile
Returns
the frame rate

◆ mlt_profile_from_producer()

void mlt_profile_from_producer ( mlt_profile  profile,
mlt_producer  producer 
)

Update the profile using the attributes of a producer.

Use this to make an "auto-profile." Typically, you need to re-open the producer after you use this because some producers (e.g. avformat) adjust their framerate to that of the profile used when you created it.

Parameters
profilethe profile to update
producerthe producer to inspect

◆ mlt_profile_init()

mlt_profile mlt_profile_init ( const char *  name)

Construct a profile.

This will never return NULL as it uses the dv_pal settings as hard-coded fallback default.

Parameters
namethe name of a profile settings file located in the standard location or the full path name to a profile settings file
Returns
a profile

◆ mlt_profile_list()

mlt_properties mlt_profile_list ( )

Get the list of profiles.

The caller MUST close the returned properties object! Each entry in the list is keyed on its name, and its value is another properties object that contains the attributes of the profile.

Returns
a list of profiles

◆ mlt_profile_load_file()

mlt_profile mlt_profile_load_file ( const char *  file)

Load a profile from specific file.

Parameters
filethe full path name to a properties file
Returns
a profile or NULL on error

◆ mlt_profile_load_properties()

mlt_profile mlt_profile_load_properties ( mlt_properties  properties)

Load a profile from a properties object.

Parameters
propertiesa properties list
Returns
a profile or NULL if out of memory

◆ mlt_profile_load_string()

mlt_profile mlt_profile_load_string ( const char *  string)

Load an anonymous profile from string.

Parameters
stringa newline-delimited list of properties as name=value pairs
Returns
a profile or NULL if out of memory

◆ mlt_profile_lumas_dir()

char * mlt_profile_lumas_dir ( mlt_profile  profile)

Get the lumas subdirectory to use for the aspect ratio.

Parameters
profilethe profile to update
Returns
the name of a subdirectory generated by the lumas module

◆ mlt_profile_sar()

double mlt_profile_sar ( mlt_profile  profile)

Get the sample aspect ratio as a floating point value.

Parameters
profilea profile
Returns
the pixel aspect ratio

◆ mlt_profile_scale_height()

double mlt_profile_scale_height ( mlt_profile  profile,
int  height 
)

Get the height scale factor.

Parameters
profilethe profile to reference
heightthe number of pixels the consumer requested
Returns
the scale factor for the height

◆ mlt_profile_scale_width()

double mlt_profile_scale_width ( mlt_profile  profile,
int  width 
)

Get the width scale factor.

Parameters
profilethe profile to reference
widththe number of pixels the consumer requested
Returns
the scale factor for the width

◆ mlt_profile_select()

static mlt_profile mlt_profile_select ( const char *  name)
private

Load a profile from the system folder.

The environment variable MLT_PROFILES_PATH overrides the default PROFILES_DIR.

Parameters
namethe name of a profile settings file located in the standard location or the full path name to a profile settings file
Returns
a profile or NULL on error

Field Documentation

◆ colorspace

int mlt_profile_s::colorspace

the Y'CbCr colorspace standard: =601 for ITU-R 601, =709 for ITU-R 709, or =240 for SMPTE240M

◆ description

char* mlt_profile_s::description

a brief description suitable as a label in UI menu

◆ display_aspect_den

int mlt_profile_s::display_aspect_den

the denominator of the image aspect ratio in case it can not be simply derived (e.g.

ITU-R 601)

◆ display_aspect_num

int mlt_profile_s::display_aspect_num

the numerator of the image aspect ratio in case it can not be simply derived (e.g.

ITU-R 601)

◆ frame_rate_den

int mlt_profile_s::frame_rate_den

the denominator of the video frame rate

◆ frame_rate_num

int mlt_profile_s::frame_rate_num

the numerator of the video frame rate

◆ height

int mlt_profile_s::height

the vertical resolution of the video

◆ is_explicit

int mlt_profile_s::is_explicit

used internally to indicate if the profile was requested explicitly or computed or defaulted

◆ progressive

int mlt_profile_s::progressive

a flag to indicate if the video is progressive scan, interlace if not set

◆ sample_aspect_den

int mlt_profile_s::sample_aspect_den

the denominator of the pixel aspect ratio

◆ sample_aspect_num

int mlt_profile_s::sample_aspect_num

the numerator of the pixel aspect ratio

◆ width

int mlt_profile_s::width

the horizontal resolution of the video


The documentation for this struct was generated from the following files: