MLT  7.38.0
Multimedia Framework
Public Member Functions | Static Public Member Functions | Private Attributes
Mlt::Properties Class Reference

C++ wrapper for mlt_properties. More...

#include <MltProperties.h>

Inheritance diagram for Mlt::Properties:
Inheritance graph
[legend]
Collaboration diagram for Mlt::Properties:
Collaboration graph
[legend]

Public Member Functions

char * anim_get (const char *name, int position, int length=0)
 
mlt_color anim_get_color (const char *name, int position, int length=0)
 
double anim_get_double (const char *name, int position, int length=0)
 
int anim_get_int (const char *name, int position, int length=0)
 
mlt_rect anim_get_rect (const char *name, int position, int length=0)
 
int anim_set (const char *name, const char *value, int position, int length=0)
 
int anim_set (const char *name, double value, int position, int length=0, mlt_keyframe_type keyframe_type=mlt_keyframe_linear)
 
int anim_set (const char *name, int value, int position, int length=0, mlt_keyframe_type keyframe_type=mlt_keyframe_linear)
 
int anim_set (const char *name, mlt_color value, int position, int length=0, mlt_keyframe_type keyframe_type=mlt_keyframe_linear)
 
int anim_set (const char *name, mlt_rect value, int position, int length=0, mlt_keyframe_type keyframe_type=mlt_keyframe_linear)
 
void block (void *object=NULL)
 Suppress event delivery to object. More...
 
void clear (const char *name)
 
int copy (Properties &that, const char *prefix)
 Copy all properties whose names begin with prefix from that. More...
 
int count ()
 Return the number of name/value pairs stored. More...
 
void debug (const char *title="Object", FILE *output=stderr)
 
int dec_ref ()
 
void dump (FILE *output=stderr)
 Write all properties to output as "name=value" lines. More...
 
int fire_event (const char *event)
 Fire a named event manually. More...
 
char * frames_to_time (int, mlt_time_format=mlt_time_smpte_df)
 
char * get (const char *name)
 Get a string property value by name. More...
 
char * get (int index)
 Return the property value at positional index as a string. More...
 
char * get (int index, mlt_time_format)
 Return the property value at positional index in the given time format. More...
 
Animationget_anim (const char *name)
 
mlt_animation get_animation (const char *name)
 
mlt_color get_color (const char *name)
 
void * get_data (const char *name)
 
void * get_data (const char *name, int &size)
 Get opaque data stored by name; size receives the byte count. More...
 
void * get_data (int index, int &size)
 
double get_double (const char *name)
 Get a double property value by name. More...
 
int get_int (const char *name)
 Get an integer property value by name. More...
 
int64_t get_int64 (const char *name)
 Get a 64-bit integer property value by name. More...
 
const char * get_lcnumeric ()
 
char * get_name (int index)
 Return the property name at positional index. More...
 
virtual mlt_properties get_properties ()
 
Propertiesget_props (const char *name)
 
Propertiesget_props_at (int index)
 
mlt_rect get_rect (const char *name)
 
char * get_time (const char *name, mlt_time_format=mlt_time_smpte_df)
 
int inc_ref ()
 
int inherit (Properties &that)
 Copy all properties from that into this object. More...
 
bool is_anim (const char *name)
 
bool is_sequence ()
 Return true if all property names are numeric indices (i.e. More...
 
bool is_valid ()
 Return true if the underlying mlt_properties handle is non-null. More...
 
Eventlisten (const char *id, void *object, mlt_listener)
 Register a listener callback for the named event. More...
 
void load (const char *file)
 Merge properties from a file into this object. More...
 
void lock ()
 Acquire the recursive mutex protecting this object. More...
 
void mirror (Properties &that)
 Mirror all property changes on this object to that. More...
 
Propertiesoperator= (const Properties &properties)
 
int parse (const char *namevalue)
 Parse a "name=value" string and store the result. More...
 
int pass_list (Properties &that, const char *list)
 Copy the space-delimited list of named properties from that. More...
 
void pass_property (Properties &that, const char *name)
 Copy a single named property from that. More...
 
int pass_values (Properties &that, const char *prefix)
 Copy all properties whose names begin with prefix from that. More...
 
int preset (const char *name)
 Apply a named preset from the presets directory. More...
 
 Properties ()
 
 Properties (bool dummy)
 
 Properties (const char *file)
 Load properties from a file. More...
 
 Properties (const Properties &properties)
 
 Properties (mlt_properties properties)
 Wrap an existing mlt_properties without taking ownership. More...
 
 Properties (Properties &properties)
 
 Properties (void *properties)
 
bool property_exists (const char *name)
 
int ref_count ()
 
int rename (const char *source, const char *dest)
 Rename property source to dest. More...
 
int save (const char *file)
 Save properties to a file. More...
 
char * serialise_yaml ()
 
int set (const char *name, const char *value)
 Set a string property. More...
 
int set (const char *name, double value)
 Set a double property. More...
 
int set (const char *name, double x, double y, double w, double h, double opacity=1.0)
 
int set (const char *name, int value)
 Set an integer property. More...
 
int set (const char *name, int64_t value)
 Set a 64-bit integer property. More...
 
int set (const char *name, mlt_color value)
 
int set (const char *name, mlt_rect value)
 
int set (const char *name, Properties &properties)
 
int set (const char *name, void *value, int size, mlt_destructor destroy=NULL, mlt_serialiser serial=NULL)
 Store opaque data with an optional destructor and serialiser. More...
 
int set_lcnumeric (const char *locale)
 
int set_string (const char *name, const char *value)
 Set a string property (no environment-variable expansion). More...
 
Eventsetup_wait_for (const char *id)
 Set up a one-shot wait handle for event id. More...
 
int time_to_frames (const char *time)
 
void unblock (void *object=NULL)
 Resume event delivery to object. More...
 
void unlock ()
 Release the recursive mutex. More...
 
void wait_for (const char *id)
 
void wait_for (Event *, bool destroy=true)
 
virtual ~Properties ()
 

Static Public Member Functions

static void delete_event (Event *)
 
static Propertiesparse_yaml (const char *file)
 Parse a YAML Tiny file and return a new Properties tree. More...
 

Private Attributes

mlt_properties instance
 

Detailed Description

C++ wrapper for mlt_properties.

Properties is a combination list/dictionary of name/value pairs and the base class for most MLT objects. It fires a property-changed event when a value is modified.

See also
mlt_properties_s

Constructor & Destructor Documentation

◆ Properties() [1/7]

Properties::Properties ( )

◆ Properties() [2/7]

Properties::Properties ( bool  dummy)

◆ Properties() [3/7]

Properties::Properties ( Properties properties)

◆ Properties() [4/7]

Properties::Properties ( const Properties properties)

◆ Properties() [5/7]

Properties::Properties ( mlt_properties  properties)

Wrap an existing mlt_properties without taking ownership.

◆ Properties() [6/7]

Properties::Properties ( void *  properties)

◆ Properties() [7/7]

Properties::Properties ( const char *  file)

Load properties from a file.

◆ ~Properties()

Properties::~Properties ( )
virtual

Member Function Documentation

◆ anim_get()

char * Properties::anim_get ( const char *  name,
int  position,
int  length = 0 
)

◆ anim_get_color()

mlt_color Properties::anim_get_color ( const char *  name,
int  position,
int  length = 0 
)

◆ anim_get_double()

double Properties::anim_get_double ( const char *  name,
int  position,
int  length = 0 
)

◆ anim_get_int()

int Properties::anim_get_int ( const char *  name,
int  position,
int  length = 0 
)

◆ anim_get_rect()

mlt_rect Properties::anim_get_rect ( const char *  name,
int  position,
int  length = 0 
)

◆ anim_set() [1/5]

int Properties::anim_set ( const char *  name,
const char *  value,
int  position,
int  length = 0 
)

◆ anim_set() [2/5]

int Properties::anim_set ( const char *  name,
double  value,
int  position,
int  length = 0,
mlt_keyframe_type  keyframe_type = mlt_keyframe_linear 
)

◆ anim_set() [3/5]

int Properties::anim_set ( const char *  name,
int  value,
int  position,
int  length = 0,
mlt_keyframe_type  keyframe_type = mlt_keyframe_linear 
)

◆ anim_set() [4/5]

int Properties::anim_set ( const char *  name,
mlt_color  value,
int  position,
int  length = 0,
mlt_keyframe_type  keyframe_type = mlt_keyframe_linear 
)

◆ anim_set() [5/5]

int Properties::anim_set ( const char *  name,
mlt_rect  value,
int  position,
int  length = 0,
mlt_keyframe_type  keyframe_type = mlt_keyframe_linear 
)

◆ block()

void Properties::block ( void *  object = NULL)

Suppress event delivery to object.

◆ clear()

void Properties::clear ( const char *  name)

◆ copy()

int Properties::copy ( Properties that,
const char *  prefix 
)

Copy all properties whose names begin with prefix from that.

◆ count()

int Properties::count ( )

Return the number of name/value pairs stored.

◆ debug()

void Properties::debug ( const char *  title = "Object",
FILE *  output = stderr 
)

◆ dec_ref()

int Properties::dec_ref ( )

◆ delete_event()

void Properties::delete_event ( Event event)
static

◆ dump()

void Properties::dump ( FILE *  output = stderr)

Write all properties to output as "name=value" lines.

◆ fire_event()

int Properties::fire_event ( const char *  event)

Fire a named event manually.

◆ frames_to_time()

char * Properties::frames_to_time ( int  frames,
mlt_time_format  format = mlt_time_smpte_df 
)

◆ get() [1/3]

char * Properties::get ( const char *  name)

Get a string property value by name.

◆ get() [2/3]

char * Properties::get ( int  index)

Return the property value at positional index as a string.

◆ get() [3/3]

char * Properties::get ( int  index,
mlt_time_format  format 
)

Return the property value at positional index in the given time format.

◆ get_anim()

Animation * Properties::get_anim ( const char *  name)

◆ get_animation()

mlt_animation Properties::get_animation ( const char *  name)

◆ get_color()

mlt_color Properties::get_color ( const char *  name)

◆ get_data() [1/3]

void * Properties::get_data ( const char *  name)

◆ get_data() [2/3]

void * Properties::get_data ( const char *  name,
int &  size 
)

Get opaque data stored by name; size receives the byte count.

◆ get_data() [3/3]

void * Properties::get_data ( int  index,
int &  size 
)

◆ get_double()

double Properties::get_double ( const char *  name)

Get a double property value by name.

◆ get_int()

int Properties::get_int ( const char *  name)

Get an integer property value by name.

◆ get_int64()

int64_t Properties::get_int64 ( const char *  name)

Get a 64-bit integer property value by name.

◆ get_lcnumeric()

const char * Properties::get_lcnumeric ( )

◆ get_name()

char * Properties::get_name ( int  index)

Return the property name at positional index.

◆ get_properties()

mlt_properties Properties::get_properties ( )
virtual

Reimplemented in Mlt::Service, Mlt::Parser, and Mlt::Frame.

◆ get_props()

Properties * Properties::get_props ( const char *  name)

◆ get_props_at()

Properties * Properties::get_props_at ( int  index)

◆ get_rect()

mlt_rect Properties::get_rect ( const char *  name)

◆ get_time()

char * Properties::get_time ( const char *  name,
mlt_time_format  format = mlt_time_smpte_df 
)

◆ inc_ref()

int Properties::inc_ref ( )

◆ inherit()

int Properties::inherit ( Properties that)

Copy all properties from that into this object.

◆ is_anim()

bool Properties::is_anim ( const char *  name)

◆ is_sequence()

bool Properties::is_sequence ( )

Return true if all property names are numeric indices (i.e.

a sequence).

◆ is_valid()

bool Properties::is_valid ( )

Return true if the underlying mlt_properties handle is non-null.

◆ listen()

Event * Properties::listen ( const char *  id,
void *  object,
mlt_listener  listener 
)

Register a listener callback for the named event.

Caller owns the returned Event.

◆ load()

void Properties::load ( const char *  file)

Merge properties from a file into this object.

◆ lock()

void Properties::lock ( )

Acquire the recursive mutex protecting this object.

◆ mirror()

void Properties::mirror ( Properties that)

Mirror all property changes on this object to that.

◆ operator=()

Properties & Properties::operator= ( const Properties properties)

◆ parse()

int Properties::parse ( const char *  namevalue)

Parse a "name=value" string and store the result.

◆ parse_yaml()

Properties * Properties::parse_yaml ( const char *  file)
static

Parse a YAML Tiny file and return a new Properties tree.

Caller owns the result.

◆ pass_list()

int Properties::pass_list ( Properties that,
const char *  list 
)

Copy the space-delimited list of named properties from that.

◆ pass_property()

void Properties::pass_property ( Properties that,
const char *  name 
)

Copy a single named property from that.

◆ pass_values()

int Properties::pass_values ( Properties that,
const char *  prefix 
)

Copy all properties whose names begin with prefix from that.

◆ preset()

int Properties::preset ( const char *  name)

Apply a named preset from the presets directory.

◆ property_exists()

bool Properties::property_exists ( const char *  name)

◆ ref_count()

int Properties::ref_count ( )

◆ rename()

int Properties::rename ( const char *  source,
const char *  dest 
)

Rename property source to dest.

◆ save()

int Properties::save ( const char *  file)

Save properties to a file.

◆ serialise_yaml()

char * Properties::serialise_yaml ( )

◆ set() [1/9]

int Properties::set ( const char *  name,
const char *  value 
)

Set a string property.

◆ set() [2/9]

int Properties::set ( const char *  name,
double  value 
)

Set a double property.

◆ set() [3/9]

int Properties::set ( const char *  name,
double  x,
double  y,
double  w,
double  h,
double  opacity = 1.0 
)

◆ set() [4/9]

int Properties::set ( const char *  name,
int  value 
)

Set an integer property.

◆ set() [5/9]

int Properties::set ( const char *  name,
int64_t  value 
)

Set a 64-bit integer property.

◆ set() [6/9]

int Properties::set ( const char *  name,
mlt_color  value 
)

◆ set() [7/9]

int Properties::set ( const char *  name,
mlt_rect  value 
)

◆ set() [8/9]

int Properties::set ( const char *  name,
Properties properties 
)

◆ set() [9/9]

int Properties::set ( const char *  name,
void *  value,
int  size,
mlt_destructor  destroy = NULL,
mlt_serialiser  serial = NULL 
)

Store opaque data with an optional destructor and serialiser.

◆ set_lcnumeric()

int Properties::set_lcnumeric ( const char *  locale)

◆ set_string()

int Properties::set_string ( const char *  name,
const char *  value 
)

Set a string property (no environment-variable expansion).

◆ setup_wait_for()

Event * Properties::setup_wait_for ( const char *  id)

Set up a one-shot wait handle for event id.

Caller owns the returned Event.

◆ time_to_frames()

int Properties::time_to_frames ( const char *  time)

◆ unblock()

void Properties::unblock ( void *  object = NULL)

Resume event delivery to object.

◆ unlock()

void Properties::unlock ( )

Release the recursive mutex.

◆ wait_for() [1/2]

void Properties::wait_for ( const char *  id)

◆ wait_for() [2/2]

void Properties::wait_for ( Event event,
bool  destroy = true 
)

Field Documentation

◆ instance

mlt_properties Mlt::Properties::instance
private

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