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

C++ wrapper for mlt_tractor — composites multiple tracks. More...

#include <MltTractor.h>

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

Public Member Functions

int connect (Producer &producer)
 
int count ()
 Return the number of tracks. More...
 
Fieldfield ()
 Return the Field managing transitions and filters. More...
 
mlt_producer get_producer () override
 
virtual mlt_tractor get_tractor ()
 
int insert_track (Producer &producer, int index)
 Insert producer at index, shifting higher tracks up. More...
 
bool locate_cut (Producer *producer, int &track, int &cut)
 Find which track and cut position producer occupies. More...
 
Multitrackmultitrack ()
 Return the underlying Multitrack. More...
 
void plant_filter (Filter &filter, int track=0)
 Attach filter to track track. More...
 
void plant_filter (Filter *filter, int track=0)
 
void plant_transition (Transition &transition, int a_track=0, int b_track=1)
 Plant transition between tracks a_track and b_track. More...
 
void plant_transition (Transition *transition, int a_track=0, int b_track=1)
 
void refresh ()
 Recalculate the tractor's length from its tracks. More...
 
int remove_track (int index)
 Remove the track at index. More...
 
int set_track (Producer &producer, int index)
 Assign producer to track index (replaces any existing track). More...
 
Producertrack (int index)
 Return the producer on track index. More...
 
 Tractor ()
 
 Tractor (mlt_profile profile, char *id, char *arg=NULL)
 
 Tractor (mlt_tractor tractor)
 Wrap an existing mlt_tractor handle. More...
 
 Tractor (Profile &profile)
 
 Tractor (Profile &profile, char *id, char *arg=NULL)
 
 Tractor (Service &tractor)
 
 Tractor (Tractor &tractor)
 
virtual ~Tractor ()
 
- Public Member Functions inherited from Mlt::Producer
int clear ()
 
Producercut (int in=0, int out=-1)
 Create a cut (sub-range) producer sharing this producer's resource. More...
 
int frame ()
 Return the current absolute frame number. More...
 
char * frame_time (mlt_time_format=mlt_time_smpte_df)
 Return the current timecode string. More...
 
int64_t get_creation_time ()
 
double get_fps ()
 Return the frames-per-second rate for this producer's profile. More...
 
int get_in ()
 Return the in-point frame number. More...
 
int get_length ()
 Return the total length of the underlying resource in frames. More...
 
char * get_length_time (mlt_time_format=mlt_time_smpte_df)
 
int get_out ()
 Return the out-point frame number. More...
 
mlt_producer get_parent ()
 
int get_playtime ()
 Return the active play duration (out - in + 1). More...
 
mlt_service get_service () override
 
double get_speed ()
 Return the current playback speed. More...
 
bool is_blank ()
 Return true if this is a blank/gap clip. More...
 
bool is_cut ()
 Return true if this producer is a cut. More...
 
Produceroperator= (const Producer &producer)
 
void optimise ()
 
Producerparent ()
 Return the parent producer (for cut producers, the shared root). More...
 
int pause ()
 Pause playback (sets speed to 0). More...
 
int position ()
 Return the current position relative to in-point. More...
 
bool probe ()
 
 Producer ()
 
 Producer (const Producer &producer)
 
 Producer (mlt_producer producer)
 Wrap an existing mlt_producer handle. More...
 
 Producer (mlt_profile profile, const char *id, const char *service=NULL)
 
 Producer (Producer &producer)
 
 Producer (Producer *producer)
 
 Producer (Profile &profile, const char *id, const char *service=NULL)
 Construct and instantiate producer id from the repository. More...
 
 Producer (Service &producer)
 
bool runs_into (Producer &that)
 
bool same_clip (Producer &that)
 
int seek (const char *time)
 Seek to a timecode string (e.g. More...
 
int seek (int position)
 Seek to position (relative to in-point). More...
 
void set_creation_time (int64_t creation_time)
 
int set_in_and_out (int in, int out)
 Set the active in/out range in frame numbers. More...
 
int set_speed (double speed)
 Set the playback speed (1.0 = normal, 0.0 = paused, -1.0 = reverse). More...
 
virtual ~Producer ()
 
- Public Member Functions inherited from Mlt::Service
int attach (Filter &filter)
 Attach filter to this service. More...
 
int connect_producer (Service &producer, int index=0)
 Connect producer as the input at index. More...
 
Serviceconsumer ()
 Return the downstream consumer service, or null. More...
 
int detach (Filter &filter)
 Detach filter from this service. More...
 
int disconnect_all_producers ()
 Disconnect all producer inputs. More...
 
int disconnect_producer (int index=0)
 Disconnect the producer at index. More...
 
Filterfilter (int index)
 Return the attached filter at index. More...
 
int filter_count ()
 Return the number of attached filters. More...
 
Frameget_frame (int index=0)
 Pull and return frame index from this service. More...
 
mlt_profile get_profile ()
 
virtual mlt_properties get_properties () override
 
int insert_producer (Service &producer, int index=0)
 Insert producer at index, shifting existing connections up. More...
 
void lock ()
 Acquire the service mutex (use around property reads in render threads). More...
 
int move_filter (int from, int to)
 Move the attached filter at position from to position to. More...
 
Serviceoperator= (const Service &service)
 
Serviceproducer ()
 Return the first upstream producer, or null. More...
 
Profileprofile ()
 Return the profile associated with this service. More...
 
 Service ()
 
 Service (const Service &service)
 
 Service (mlt_service service)
 Wrap an existing mlt_service handle. More...
 
 Service (Service &service)
 
 Service (Service *service)
 
void set_consumer (Service &service)
 
void set_profile (mlt_profile profile)
 
void set_profile (Profile &profile)
 
mlt_service_type type ()
 Return the service sub-type (producer, filter, consumer, transition, etc.). More...
 
void unlock ()
 Release the service mutex. More...
 
virtual ~Service ()
 
- Public Member Functions inherited from Mlt::Properties
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...
 
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 ()
 

Private Attributes

mlt_tractor instance
 

Additional Inherited Members

- Static Public Member Functions inherited from Mlt::Properties
static void delete_event (Event *)
 
static Propertiesparse_yaml (const char *file)
 Parse a YAML Tiny file and return a new Properties tree. More...
 

Detailed Description

C++ wrapper for mlt_tractor — composites multiple tracks.

A tractor owns a Multitrack (parallel track container) and a Field (ordered list of transitions and filters). Together they form the compositing graph for multi-track editing.

See also
mlt_tractor_s

Constructor & Destructor Documentation

◆ Tractor() [1/7]

Tractor::Tractor ( )

◆ Tractor() [2/7]

Tractor::Tractor ( Profile profile)

◆ Tractor() [3/7]

Tractor::Tractor ( Service tractor)

◆ Tractor() [4/7]

Tractor::Tractor ( mlt_tractor  tractor)

Wrap an existing mlt_tractor handle.

◆ Tractor() [5/7]

Tractor::Tractor ( Tractor tractor)

◆ Tractor() [6/7]

Tractor::Tractor ( Profile profile,
char *  id,
char *  arg = NULL 
)

◆ Tractor() [7/7]

Tractor::Tractor ( mlt_profile  profile,
char *  id,
char *  arg = NULL 
)

◆ ~Tractor()

Tractor::~Tractor ( )
virtual

Member Function Documentation

◆ connect()

int Tractor::connect ( Producer producer)

◆ count()

int Tractor::count ( )

Return the number of tracks.

◆ field()

Field * Tractor::field ( )

Return the Field managing transitions and filters.

Caller does not own the result.

◆ get_producer()

mlt_producer Tractor::get_producer ( )
overridevirtual

Reimplemented from Mlt::Producer.

◆ get_tractor()

mlt_tractor Tractor::get_tractor ( )
virtual

◆ insert_track()

int Tractor::insert_track ( Producer producer,
int  index 
)

Insert producer at index, shifting higher tracks up.

◆ locate_cut()

bool Tractor::locate_cut ( Producer producer,
int &  track,
int &  cut 
)

Find which track and cut position producer occupies.

◆ multitrack()

Multitrack * Tractor::multitrack ( )

Return the underlying Multitrack.

Caller does not own the result.

◆ plant_filter() [1/2]

void Tractor::plant_filter ( Filter filter,
int  track = 0 
)

Attach filter to track track.

◆ plant_filter() [2/2]

void Tractor::plant_filter ( Filter filter,
int  track = 0 
)

◆ plant_transition() [1/2]

void Tractor::plant_transition ( Transition transition,
int  a_track = 0,
int  b_track = 1 
)

Plant transition between tracks a_track and b_track.

◆ plant_transition() [2/2]

void Tractor::plant_transition ( Transition transition,
int  a_track = 0,
int  b_track = 1 
)

◆ refresh()

void Tractor::refresh ( )

Recalculate the tractor's length from its tracks.

◆ remove_track()

int Tractor::remove_track ( int  index)

Remove the track at index.

◆ set_track()

int Tractor::set_track ( Producer producer,
int  index 
)

Assign producer to track index (replaces any existing track).

◆ track()

Producer * Tractor::track ( int  index)

Return the producer on track index.

Caller does not own the result.

Field Documentation

◆ instance

mlt_tractor Mlt::Tractor::instance
private

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