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

Playlist class. More...

#include <mlt_playlist.h>

Inheritance diagram for mlt_playlist_s:
mlt_producer_s mlt_service_s mlt_properties_s

Public Member Functions

int mlt_playlist_append (mlt_playlist self, mlt_producer producer)
 Append a producer to the playlist. More...
 
int mlt_playlist_append_io (mlt_playlist self, mlt_producer producer, mlt_position in, mlt_position out)
 Append a producer to the playlist with in/out points. More...
 
int mlt_playlist_blank (mlt_playlist self, mlt_position out)
 Append a blank to the playlist of a given length. More...
 
int mlt_playlist_blank_time (mlt_playlist self, const char *length)
 Append a blank item to the playlist with duration as a time string. More...
 
int mlt_playlist_blanks_from (mlt_playlist self, int clip, int bounded)
 Get the duration of a blank space. More...
 
int mlt_playlist_clear (mlt_playlist self)
 Clear the playlist. More...
 
mlt_position mlt_playlist_clip (mlt_playlist self, mlt_whence whence, int index)
 Get the position which corresponds to the start of the next clip. More...
 
int mlt_playlist_clip_is_mix (mlt_playlist self, int clip)
 Determine if the clip is a mix. More...
 
int mlt_playlist_clip_length (mlt_playlist self, int clip)
 Get the playable duration of the clip. More...
 
int mlt_playlist_clip_start (mlt_playlist self, int clip)
 Get the time at which the clip starts relative to the playlist. More...
 
void mlt_playlist_close (mlt_playlist self)
 Close the playlist. More...
 
void mlt_playlist_consolidate_blanks (mlt_playlist self, int keep_length)
 Consolidate adjacent blank producers. More...
 
int mlt_playlist_count (mlt_playlist self)
 Get number of clips in the playlist. More...
 
mlt_producer mlt_playlist_current (mlt_playlist self)
 Obtain the current clips producer. More...
 
int mlt_playlist_current_clip (mlt_playlist self)
 Obtain the current clips index. More...
 
mlt_producer mlt_playlist_get_clip (mlt_playlist self, int clip)
 Return the clip at the clip index. More...
 
mlt_producer mlt_playlist_get_clip_at (mlt_playlist self, mlt_position position)
 Return the clip at the specified position. More...
 
int mlt_playlist_get_clip_index_at (mlt_playlist self, mlt_position position)
 Return the clip index of the specified position. More...
 
int mlt_playlist_get_clip_info (mlt_playlist self, mlt_playlist_clip_info *info, int index)
 Get all the info about the clip specified. More...
 
mlt_playlist mlt_playlist_init ()
 Construct a playlist. More...
 
int mlt_playlist_insert (mlt_playlist self, mlt_producer producer, int where, mlt_position in, mlt_position out)
 Insert a producer into the playlist. More...
 
int mlt_playlist_insert_at (mlt_playlist self, mlt_position position, mlt_producer producer, int mode)
 Insert a clip at a specific time. More...
 
void mlt_playlist_insert_blank (mlt_playlist self, int clip, int out)
 Insert blank space. More...
 
int mlt_playlist_is_blank (mlt_playlist self, int clip)
 Determine if the specified clip index is a blank. More...
 
int mlt_playlist_is_blank_at (mlt_playlist self, mlt_position position)
 Determine if the specified position is a blank. More...
 
int mlt_playlist_join (mlt_playlist self, int clip, int count, int merge)
 Join 1 or more consecutive clips. More...
 
int mlt_playlist_mix (mlt_playlist self, int clip, int length, mlt_transition transition)
 Mix consecutive clips for a specified length and apply transition if specified. More...
 
int mlt_playlist_mix_add (mlt_playlist self, int clip, mlt_transition transition)
 Add a transition to an existing mix. More...
 
int mlt_playlist_mix_in (mlt_playlist self, int clip, int length)
 Mix consecutive clips for a specified length. More...
 
int mlt_playlist_mix_out (mlt_playlist self, int clip, int length)
 Mix consecutive clips for a specified length. More...
 
int mlt_playlist_move (mlt_playlist self, int src, int dest)
 Move an entry in the playlist. More...
 
mlt_playlist mlt_playlist_new (mlt_profile profile)
 Construct a playlist with a profile. More...
 
void mlt_playlist_pad_blanks (mlt_playlist self, mlt_position position, int length, int find)
 Resize a blank entry. More...
 
mlt_producer mlt_playlist_producer (mlt_playlist self)
 Get the producer associated to this playlist. More...
 
mlt_properties mlt_playlist_properties (mlt_playlist self)
 Get the properties associated to this playlist. More...
 
int mlt_playlist_remove (mlt_playlist self, int where)
 Remove an entry in the playlist. More...
 
int mlt_playlist_remove_region (mlt_playlist self, mlt_position position, int length)
 Remove a portion of the playlist by time. More...
 
int mlt_playlist_reorder (mlt_playlist self, const int *indices)
 Reorder the entries in the playlist. More...
 
int mlt_playlist_repeat_clip (mlt_playlist self, int clip, int repeat)
 Repeat the specified clip n times. More...
 
mlt_producer mlt_playlist_replace_with_blank (mlt_playlist self, int clip)
 Replace the specified clip with a blank and return the clip. More...
 
int mlt_playlist_resize_clip (mlt_playlist self, int clip, mlt_position in, mlt_position out)
 Resize the specified clip. More...
 
mlt_service mlt_playlist_service (mlt_playlist self)
 Get the service associated to this playlist. More...
 
int mlt_playlist_split (mlt_playlist self, int clip, mlt_position position)
 Split a clip on the playlist at the given position. More...
 
int mlt_playlist_split_at (mlt_playlist self, mlt_position position, int left)
 Split the playlist at the absolute position. More...
 
- Public Member Functions inherited from mlt_producer_s
int mlt_producer_attach (mlt_producer self, mlt_filter filter)
 Attach a filter. More...
 
int mlt_producer_clear (mlt_producer self)
 Physically reduce the producer (typically a cut) to a 0 length. More...
 
void mlt_producer_close (mlt_producer self)
 Close the producer. More...
 
mlt_producer mlt_producer_cut (mlt_producer self, int in, int out)
 Create a cut of this producer. More...
 
mlt_producer mlt_producer_cut_parent (mlt_producer self)
 Obtain the parent producer. More...
 
int mlt_producer_detach (mlt_producer self, mlt_filter filter)
 Detach a filter. More...
 
mlt_filter mlt_producer_filter (mlt_producer self, int index)
 Retrieve a filter. More...
 
mlt_position mlt_producer_frame (mlt_producer self)
 Get the current position (relative to start of producer). More...
 
char * mlt_producer_frame_time (mlt_producer self, mlt_time_format format)
 Get the current position (relative to start of producer) as a time string. More...
 
int64_t mlt_producer_get_creation_time (mlt_producer self)
 Get the creation time for the producer. More...
 
double mlt_producer_get_fps (mlt_producer self)
 Get the frames per second. More...
 
mlt_position mlt_producer_get_in (mlt_producer self)
 Get the in point. More...
 
mlt_position mlt_producer_get_length (mlt_producer self)
 Get the total, unedited length of the producer. More...
 
char * mlt_producer_get_length_time (mlt_producer self, mlt_time_format format)
 Get the total, unedited length of the producer as a time string. More...
 
mlt_position mlt_producer_get_out (mlt_producer self)
 Get the out point. More...
 
mlt_position mlt_producer_get_playtime (mlt_producer self)
 Get the total play time. More...
 
double mlt_producer_get_speed (mlt_producer self)
 Get the playing speed. More...
 
int mlt_producer_init (mlt_producer self, void *child)
 Initialize a producer service. More...
 
int mlt_producer_is_blank (mlt_producer self)
 Determine if the producer is a blank. More...
 
int mlt_producer_is_cut (mlt_producer self)
 Determine if producer is a cut. More...
 
int mlt_producer_is_mix (mlt_producer self)
 Determine if producer is a mix. More...
 
mlt_producer mlt_producer_new (mlt_profile profile)
 Create and initialize a new producer. More...
 
int mlt_producer_optimise (mlt_producer self)
 Optimise for overlapping cuts from the same clip. More...
 
mlt_position mlt_producer_position (mlt_producer self)
 Get the current position (relative to in point). More...
 
void mlt_producer_prepare_next (mlt_producer self)
 Prepare for next frame. More...
 
int mlt_producer_probe (mlt_producer self)
 Probe the producer to publish metadata properties. More...
 
mlt_properties mlt_producer_properties (mlt_producer self)
 Get the producer properties. More...
 
int mlt_producer_seek (mlt_producer self, mlt_position position)
 Seek to a specified position. More...
 
int mlt_producer_seek_time (mlt_producer self, const char *time)
 Seek to a specified time string. More...
 
mlt_service mlt_producer_service (mlt_producer self)
 Get the parent service object. More...
 
void mlt_producer_set_creation_time (mlt_producer self, int64_t creation_time)
 Set the creation time for the producer. More...
 
int mlt_producer_set_in_and_out (mlt_producer self, mlt_position in, mlt_position out)
 Set the in and out points. More...
 
int mlt_producer_set_speed (mlt_producer self, double speed)
 Set the playing speed. More...
 
- Public Member Functions inherited from mlt_service_s
void mlt_service_apply_filters (mlt_service self, mlt_frame frame, int index)
 Recursively apply attached filters. More...
 
int mlt_service_attach (mlt_service self, mlt_filter filter)
 Attach a filter. More...
 
mlt_cache_item mlt_service_cache_get (mlt_service self, const char *name)
 Get an object from a service's cache. More...
 
int mlt_service_cache_get_size (mlt_service self, const char *name)
 Get the current maximum size of the named cache. More...
 
void mlt_service_cache_put (mlt_service self, const char *name, void *data, int size, mlt_destructor destructor)
 Put an object into a service's cache. More...
 
void mlt_service_cache_set_size (mlt_service self, const char *name, int size)
 Set the number of items to cache for the named cache. More...
 
void mlt_service_close (mlt_service self)
 Destroy a service. More...
 
int mlt_service_connect_producer (mlt_service self, mlt_service producer, int index)
 Connect a producer to the service. More...
 
mlt_service mlt_service_consumer (mlt_service self)
 Obtain the consumer a service is connected to. More...
 
int mlt_service_detach (mlt_service self, mlt_filter filter)
 Detach a filter. More...
 
int mlt_service_disconnect_all_producers (mlt_service self)
 Remove the all the attached producers. More...
 
int mlt_service_disconnect_producer (mlt_service self, int index)
 Remove the N-th producer. More...
 
mlt_filter mlt_service_filter (mlt_service self, int index)
 Retrieve an attached filter. More...
 
int mlt_service_filter_count (mlt_service self)
 Get the number of filters attached. More...
 
int mlt_service_get_frame (mlt_service self, mlt_frame_ptr frame, int index)
 Obtain a frame. More...
 
mlt_service mlt_service_get_producer (mlt_service self)
 Get the first connected producer. More...
 
mlt_service_type mlt_service_identify (mlt_service self)
 Identify the subclass of the service. More...
 
int mlt_service_init (mlt_service self, void *child)
 Initialize a service. More...
 
int mlt_service_insert_producer (mlt_service self, mlt_service producer, int index)
 Insert a producer connected to the service. More...
 
void mlt_service_lock (mlt_service self)
 Acquire a mutual exclusion lock on this service. More...
 
int mlt_service_move_filter (mlt_service self, int from, int to)
 Reorder the attached filters. More...
 
mlt_service mlt_service_producer (mlt_service self)
 Obtain the producer a service is connected to. More...
 
mlt_profile mlt_service_profile (mlt_service self)
 Retrieve the profile. More...
 
mlt_properties mlt_service_properties (mlt_service self)
 Return the properties object. More...
 
void mlt_service_set_profile (mlt_service self, mlt_profile profile)
 Set the profile for a service. More...
 
void mlt_service_unlock (mlt_service self)
 Release a mutual exclusion lock on this service. More...
 
- Public Member Functions inherited from mlt_properties_s
char * mlt_properties_anim_get (mlt_properties self, const char *name, int position, int length)
 Get a string value by name at a frame position. More...
 
mlt_color mlt_properties_anim_get_color (mlt_properties self, const char *name, int position, int length)
 Get a color associated to the name at a frame position. More...
 
double mlt_properties_anim_get_double (mlt_properties self, const char *name, int position, int length)
 Get a real number associated to the name at a frame position. More...
 
int mlt_properties_anim_get_int (mlt_properties self, const char *name, int position, int length)
 Get an integer associated to the name at a frame position. More...
 
mlt_rect mlt_properties_anim_get_rect (mlt_properties self, const char *name, int position, int length)
 Get a rectangle associated to the name at a frame position. More...
 
int mlt_properties_anim_set (mlt_properties self, const char *name, const char *value, int position, int length)
 Set a property to a string at a frame position. More...
 
int mlt_properties_anim_set_color (mlt_properties self, const char *name, mlt_color value, int position, int length, mlt_keyframe_type keyframe_type)
 Set a property to an integer value by color at a frame position. More...
 
int mlt_properties_anim_set_double (mlt_properties self, const char *name, double value, int position, int length, mlt_keyframe_type keyframe_type)
 Set a property to a real number at a frame position. More...
 
int mlt_properties_anim_set_int (mlt_properties self, const char *name, int value, int position, int length, mlt_keyframe_type keyframe_type)
 Set a property to an integer value at a frame position. More...
 
int mlt_properties_anim_set_rect (mlt_properties self, const char *name, mlt_rect value, int position, int length, mlt_keyframe_type keyframe_type)
 Set a property to a rectangle value at a frame position. More...
 
void mlt_properties_clear (mlt_properties self, const char *name)
 Remove the value for a property. More...
 
void mlt_properties_close (mlt_properties self)
 Close a properties object. More...
 
int mlt_properties_copy (mlt_properties self, mlt_properties that, const char *prefix)
 Copy all serializable properties that match a prefix to another properties object. More...
 
int mlt_properties_count (mlt_properties self)
 Return the number of items in the list. More...
 
void mlt_properties_debug (mlt_properties self, const char *title, FILE *output)
 Output the properties to a file handle. More...
 
int mlt_properties_dec_ref (mlt_properties self)
 Decrement the reference count. More...
 
int mlt_properties_dir_list (mlt_properties self, const char *dirname, const char *pattern, int sort)
 Get the contents of a directory. More...
 
void mlt_properties_dump (mlt_properties self, FILE *output)
 Dump the properties to a file handle. More...
 
int mlt_properties_exists (mlt_properties self, const char *name)
 Check if a property exists. More...
 
char * mlt_properties_frames_to_time (mlt_properties self, mlt_position frames, mlt_time_format format)
 Convert a frame count to a time string. More...
 
int mlt_properties_from_utf8 (mlt_properties properties, const char *name_from, const char *name_to)
 Convert UTF-8 property to the locale-defined encoding. More...
 
char * mlt_properties_get (mlt_properties self, const char *name)
 Get a string value by name. More...
 
mlt_animation mlt_properties_get_animation (mlt_properties self, const char *name)
 Get the animation associated to the name. More...
 
mlt_color mlt_properties_get_color (mlt_properties self, const char *name)
 Convert a numeric property to a tuple of color components. More...
 
void * mlt_properties_get_data (mlt_properties self, const char *name, int *length)
 Get a binary data value associated to the name. More...
 
void * mlt_properties_get_data_at (mlt_properties self, int index, int *size)
 Get a data value by index. More...
 
double mlt_properties_get_double (mlt_properties self, const char *name)
 Get a floating point value associated to the name. More...
 
int mlt_properties_get_int (mlt_properties self, const char *name)
 Get an integer associated to the name. More...
 
int64_t mlt_properties_get_int64 (mlt_properties self, const char *name)
 Get a 64-bit integer associated to the name. More...
 
const char * mlt_properties_get_lcnumeric (mlt_properties self)
 Get the numeric locale for this properties object. More...
 
char * mlt_properties_get_name (mlt_properties self, int index)
 Get a property name by index. More...
 
mlt_position mlt_properties_get_position (mlt_properties self, const char *name)
 Get a position value associated to the name. More...
 
mlt_properties mlt_properties_get_properties (mlt_properties self, const char *name)
 Get a nested properties object by name. More...
 
mlt_properties mlt_properties_get_properties_at (mlt_properties self, int index)
 Get a nested properties object by index. More...
 
mlt_rect mlt_properties_get_rect (mlt_properties self, const char *name)
 Get a rectangle associated to the name. More...
 
char * mlt_properties_get_time (mlt_properties self, const char *name, mlt_time_format format)
 Get a time string associated to the name. More...
 
char * mlt_properties_get_value (mlt_properties self, int index)
 Get a property's string value by index. More...
 
char * mlt_properties_get_value_tf (mlt_properties self, int index, mlt_time_format time_format)
 Get a property's string value by index (with time format). More...
 
int mlt_properties_inc_ref (mlt_properties self)
 Increment the reference count. More...
 
int mlt_properties_inherit (mlt_properties self, mlt_properties that)
 Copy all serializable properties to another properties list. More...
 
int mlt_properties_init (mlt_properties self, void *child)
 Initialize a properties object that was already allocated. More...
 
int mlt_properties_is_anim (mlt_properties self, const char *name)
 Check if a property is animated. More...
 
int mlt_properties_is_sequence (mlt_properties properties)
 Determine if the properties list is really just a sequence or ordered list. More...
 
mlt_properties mlt_properties_load (const char *filename)
 Create a properties object by reading a .properties text file. More...
 
void mlt_properties_lock (mlt_properties self)
 Protect a properties list against concurrent access. More...
 
void mlt_properties_mirror (mlt_properties self, mlt_properties that)
 Set a properties list to be a mirror copy of another. More...
 
mlt_properties mlt_properties_new ()
 Create a properties object. More...
 
int mlt_properties_parse (mlt_properties self, const char *namevalue)
 Set a value by parsing a name=value string. More...
 
mlt_properties mlt_properties_parse_yaml (const char *filename)
 Parse a YAML Tiny file by name. More...
 
int mlt_properties_pass (mlt_properties self, mlt_properties that, const char *prefix)
 Pass all serializable properties that match a prefix to another properties object. More...
 
int mlt_properties_pass_list (mlt_properties self, mlt_properties that, const char *list)
 Copy all properties specified in a comma-separated list to another properties list. More...
 
void mlt_properties_pass_property (mlt_properties self, mlt_properties that, const char *name)
 Copy a property to another properties list. More...
 
int mlt_properties_preset (mlt_properties self, const char *name)
 Set properties from a preset. More...
 
int mlt_properties_ref_count (mlt_properties self)
 Get the reference count. More...
 
int mlt_properties_rename (mlt_properties self, const char *source, const char *dest)
 Rename a property. More...
 
int mlt_properties_save (mlt_properties self, const char *filename)
 Save the properties to a file by name. More...
 
char * mlt_properties_serialise_yaml (mlt_properties self)
 Serialize a properties list as a string of YAML Tiny. More...
 
int mlt_properties_set (mlt_properties self, const char *name, const char *value)
 Set a property to a string. More...
 
int mlt_properties_set_color (mlt_properties self, const char *name, mlt_color color)
 Set a property to an integer value by color. More...
 
int mlt_properties_set_data (mlt_properties self, const char *name, void *value, int length, mlt_destructor destroy, mlt_serialiser serialise)
 Store binary data as a property. More...
 
int mlt_properties_set_double (mlt_properties self, const char *name, double value)
 Set a property to a floating point value. More...
 
int mlt_properties_set_int (mlt_properties self, const char *name, int value)
 Set a property to an integer value. More...
 
int mlt_properties_set_int64 (mlt_properties self, const char *name, int64_t value)
 Set a property to a 64-bit integer value. More...
 
int mlt_properties_set_lcnumeric (mlt_properties self, const char *locale)
 Set the numeric locale used for string/double conversions. More...
 
int mlt_properties_set_or_default (mlt_properties self, const char *name, const char *value, const char *def)
 Set or default a property to a string. More...
 
int mlt_properties_set_position (mlt_properties self, const char *name, mlt_position value)
 Set a property to a position value. More...
 
int mlt_properties_set_properties (mlt_properties self, const char *name, mlt_properties properties)
 Set a property to a nested properties object. More...
 
int mlt_properties_set_rect (mlt_properties self, const char *name, mlt_rect value)
 Set a property to a rectangle value. More...
 
int mlt_properties_set_string (mlt_properties self, const char *name, const char *value)
 Set a property to a string. More...
 
mlt_position mlt_properties_time_to_frames (mlt_properties self, const char *time)
 Convert a time string to a frame count. More...
 
void mlt_properties_unlock (mlt_properties self)
 End protecting a properties list against concurrent access. More...
 

Data Fields

struct mlt_producer_s blank
 
int count
 
playlist_entry ** list
 
struct mlt_producer_s parent
 
int size
 Deprecated. More...
 
- Data Fields inherited from mlt_producer_s
mlt_destructor close
 the destructor virtual function More...
 
void * close_object
 the object supplied to the close virtual function More...
 
int(* get_frame )(mlt_producer, mlt_frame_ptr, int)
 Get a frame of data (virtual function). More...
 
struct mlt_service_s parent
 A producer is a service. More...
 
int(* seek )(mlt_producer, mlt_position)
 Seek to a specified position (virtual function). More...
 
int(* set_in_and_out )(mlt_producer, mlt_position, mlt_position)
 Set the in and out points. More...
 
- Data Fields inherited from mlt_service_s
mlt_destructor close
 the destructor virtual function More...
 
void * close_object
 the object supplied to the close virtual function More...
 
int(* get_frame )(mlt_service self, mlt_frame_ptr frame, int index)
 Get a frame of data (virtual function). More...
 
- Data Fields inherited from mlt_properties_s
mlt_destructor close
 the destructor virtual function More...
 
void * close_object
 the object supplied to the close virtual function More...
 

Private Member Functions

static void mlt_playlist_listener (mlt_producer producer, mlt_playlist self)
 Listener for producers on the playlist. More...
 
static mlt_producer mlt_playlist_locate (mlt_playlist self, mlt_position *position, int *clip, int *total)
 Locate a producer by index. More...
 
static int mlt_playlist_resize_mix (mlt_playlist self, int clip, int in, int out)
 Resize a mix clip. More...
 
static int mlt_playlist_unmix (mlt_playlist self, int clip)
 Remove a mixed clip - ensure that the cuts included in the mix find their way back correctly on to the playlist. More...
 
static int mlt_playlist_virtual_append (mlt_playlist self, mlt_producer source, mlt_position in, mlt_position out)
 Append to the virtual playlist. More...
 
static int mlt_playlist_virtual_refresh (mlt_playlist self)
 Refresh the playlist after a clip has been changed. More...
 
static mlt_service mlt_playlist_virtual_seek (mlt_playlist self, int *progressive, int *clip_index, int *clip_position)
 Seek in the virtual playlist. More...
 
static mlt_producer mlt_playlist_virtual_set_out (mlt_playlist self)
 Invoked when a producer indicates that it has prematurely reached its end. More...
 
static int producer_get_frame (mlt_producer producer, mlt_frame_ptr frame, int index)
 Get the current frame. More...
 

Detailed Description

Playlist class.

A playlist is a sequential container of producers and blank spaces. The class provides all sorts of playlist assembly and manipulation routines. A playlist is also a producer within the framework.

Property:

autoclose Set this true if you are doing sequential processing and want to automatically close producers as they are finished being used to free resources.

meta.fx_cut Set true on a producer to indicate that it is a "fx_cut," which is a way to add filters as a playlist entry - useful only in a multitrack. See FxCut in the docs.

mix_in

mix_out

hide Set to 1 to hide the video (make it an audio-only track), 2 to hide the audio (make it a video-only track), or 3 to hide audio and video (hidden track). This property only applies when using a multitrack or transition.

Event:
playlist-next The playlist fires this when it moves to the next item in the list. The event data is an integer of the index of the entry that just completed.

Member Function Documentation

◆ mlt_playlist_append()

int mlt_playlist_append ( mlt_playlist  self,
mlt_producer  producer 
)

Append a producer to the playlist.

Parameters
selfa playlist
producerthe producer to append
Returns
true if there was an error

◆ mlt_playlist_append_io()

int mlt_playlist_append_io ( mlt_playlist  self,
mlt_producer  producer,
mlt_position  in,
mlt_position  out 
)

Append a producer to the playlist with in/out points.

Parameters
selfa playlist
producerthe producer to append
inthe starting point on the producer; a negative value is the same as 0
outthe ending point on the producer; a negative value is the same as producer length - 1
Returns
true if there was an error

◆ mlt_playlist_blank()

int mlt_playlist_blank ( mlt_playlist  self,
mlt_position  out 
)

Append a blank to the playlist of a given length.

Parameters
selfa playlist
outthe ending time of the blank entry, not its duration
Returns
true if there was an error

◆ mlt_playlist_blank_time()

int mlt_playlist_blank_time ( mlt_playlist  self,
const char *  length 
)

Append a blank item to the playlist with duration as a time string.

Parameters
selfa playlist
lengththe duration of the blank entry as a time string
Returns
true if there was an error

◆ mlt_playlist_blanks_from()

int mlt_playlist_blanks_from ( mlt_playlist  self,
int  clip,
int  bounded 
)

Get the duration of a blank space.

Parameters
selfa playlist
clipthe index of the playlist entry
boundedthe maximum number of blank entries or 0 for all
Returns
the duration of a blank section

◆ mlt_playlist_clear()

int mlt_playlist_clear ( mlt_playlist  self)

Clear the playlist.

Parameters
selfa playlist
Returns
true if there was an error

◆ mlt_playlist_clip()

mlt_position mlt_playlist_clip ( mlt_playlist  self,
mlt_whence  whence,
int  index 
)

Get the position which corresponds to the start of the next clip.

Parameters
selfa playlist
whencethe location from which to make the index relative: start of playlist, end of playlist, or current position
indexthe playlist entry index relative to whence
Returns
the time at which the referenced clip starts

◆ mlt_playlist_clip_is_mix()

int mlt_playlist_clip_is_mix ( mlt_playlist  self,
int  clip 
)

Determine if the clip is a mix.

Parameters
selfa playlist
clipthe index of the playlist entry
Returns
true if the producer is a mix

◆ mlt_playlist_clip_length()

int mlt_playlist_clip_length ( mlt_playlist  self,
int  clip 
)

Get the playable duration of the clip.

Parameters
selfa playlist
clipthe index of the playlist entry
Returns
the duration of the playlist entry

◆ mlt_playlist_clip_start()

int mlt_playlist_clip_start ( mlt_playlist  self,
int  clip 
)

Get the time at which the clip starts relative to the playlist.

Parameters
selfa playlist
clipthe index of the playlist entry
Returns
the starting time

◆ mlt_playlist_close()

void mlt_playlist_close ( mlt_playlist  self)

Close the playlist.

Parameters
selfa playlist

◆ mlt_playlist_consolidate_blanks()

void mlt_playlist_consolidate_blanks ( mlt_playlist  self,
int  keep_length 
)

Consolidate adjacent blank producers.

Parameters
selfa playlist
keep_lengthset false to remove the last entry if it is blank

◆ mlt_playlist_count()

int mlt_playlist_count ( mlt_playlist  self)

Get number of clips in the playlist.

Parameters
selfa playlist
Returns
the number of playlist entries

◆ mlt_playlist_current()

mlt_producer mlt_playlist_current ( mlt_playlist  self)

Obtain the current clips producer.

Parameters
selfa playlist
Returns
the producer at the current position

◆ mlt_playlist_current_clip()

int mlt_playlist_current_clip ( mlt_playlist  self)

Obtain the current clips index.

Parameters
selfa playlist
Returns
the index of the playlist entry at the current position

◆ mlt_playlist_get_clip()

mlt_producer mlt_playlist_get_clip ( mlt_playlist  self,
int  clip 
)

Return the clip at the clip index.

Parameters
selfa playlist
clipthe index of a playlist entry
Returns
a producer or NULL if there was an error

◆ mlt_playlist_get_clip_at()

mlt_producer mlt_playlist_get_clip_at ( mlt_playlist  self,
mlt_position  position 
)

Return the clip at the specified position.

Parameters
selfa playlist
positiona time relative to the beginning of the playlist
Returns
a producer or NULL if not found

◆ mlt_playlist_get_clip_index_at()

int mlt_playlist_get_clip_index_at ( mlt_playlist  self,
mlt_position  position 
)

Return the clip index of the specified position.

Parameters
selfa playlist
positiona time relative to the beginning of the playlist
Returns
the index of the playlist entry

◆ mlt_playlist_get_clip_info()

int mlt_playlist_get_clip_info ( mlt_playlist  self,
mlt_playlist_clip_info info,
int  index 
)

Get all the info about the clip specified.

Parameters
selfa playlist
infoa clip info struct
indexa playlist entry index
Returns
true if there was an error

◆ mlt_playlist_init()

mlt_playlist mlt_playlist_init ( )

Construct a playlist.

Sets the resource property to "<playlist>". Set the mlt_type to property to "mlt_producer".

Deprecated:
use mlt_playlist_new()
Returns
a new playlist

◆ mlt_playlist_insert()

int mlt_playlist_insert ( mlt_playlist  self,
mlt_producer  producer,
int  where,
mlt_position  in,
mlt_position  out 
)

Insert a producer into the playlist.

Parameters
selfa playlist
producerthe producer to insert
wherethe producer's playlist entry index
inthe starting point on the producer
outthe ending point on the producer
Returns
true if there was an error

◆ mlt_playlist_insert_at()

int mlt_playlist_insert_at ( mlt_playlist  self,
mlt_position  position,
mlt_producer  producer,
int  mode 
)

Insert a clip at a specific time.

Parameters
selfa playlist
positionthe time at which to insert
producerthe producer to insert
modetrue if you want to overwrite any blank section
Returns
true if there was an error

◆ mlt_playlist_insert_blank()

void mlt_playlist_insert_blank ( mlt_playlist  self,
int  clip,
int  out 
)

Insert blank space.

Parameters
selfa playlist
clipthe index of the new blank section
outthe ending time of the new blank section (duration - 1)

◆ mlt_playlist_is_blank()

int mlt_playlist_is_blank ( mlt_playlist  self,
int  clip 
)

Determine if the specified clip index is a blank.

Parameters
selfa playlist
clipthe index of the playlist entry
Returns
true if clip is a "blank" producer

◆ mlt_playlist_is_blank_at()

int mlt_playlist_is_blank_at ( mlt_playlist  self,
mlt_position  position 
)

Determine if the specified position is a blank.

Parameters
selfa playlist
positiona time relative to the start or end (negative) of the playlist
Returns
true if there was an error

◆ mlt_playlist_join()

int mlt_playlist_join ( mlt_playlist  self,
int  clip,
int  count,
int  merge 
)

Join 1 or more consecutive clips.

Parameters
selfa playlist
clipthe starting playlist entry index
countthe number of entries to merge
mergeignored
Returns
true if there was an error

◆ mlt_playlist_listener()

static void mlt_playlist_listener ( mlt_producer  producer,
mlt_playlist  self 
)
private

Listener for producers on the playlist.

Refreshes the playlist whenever an entry receives producer-changed.

Parameters
producera producer
selfa playlist

◆ mlt_playlist_locate()

static mlt_producer mlt_playlist_locate ( mlt_playlist  self,
mlt_position position,
int *  clip,
int *  total 
)
private

Locate a producer by index.

Parameters
selfa playlist
[in,out]positionthe time at which to locate the producer, returns the time relative to the producer's starting point
[out]clipthe index of the playlist entry
[out]totalthe duration of the playlist up to and including this producer
Returns
a producer or NULL if not found

◆ mlt_playlist_mix()

int mlt_playlist_mix ( mlt_playlist  self,
int  clip,
int  length,
mlt_transition  transition 
)

Mix consecutive clips for a specified length and apply transition if specified.

This version of the mix function does not utilize any frames beyond the out of clip A or before the in point of clip B. It takes the frames needed for the length of the transition by adjusting the duration of both clips - the out point for clip A and the in point for clip B.

Parameters
selfa playlist
clipthe index of the playlist entry
lengththe number of frames over which to create the mix
transitionthe transition to use for the mix
Returns
true if there was an error

◆ mlt_playlist_mix_add()

int mlt_playlist_mix_add ( mlt_playlist  self,
int  clip,
mlt_transition  transition 
)

Add a transition to an existing mix.

Parameters
selfa playlist
clipthe index of the playlist entry
transitiona transition
Returns
true if there was an error

◆ mlt_playlist_mix_in()

int mlt_playlist_mix_in ( mlt_playlist  self,
int  clip,
int  length 
)

Mix consecutive clips for a specified length.

This version of the mix function maintains the out point of the clip A by occupying the beginning of clip B before its current in point. Therefore, it ends up adjusting the in point and duration of clip B without affecting the duration of clip A. Also, therefore, there must be enough frames after the out point of clip A.

Parameters
selfa playlist
clipthe index of the playlist entry
lengththe number of frames over which to create the mix
Returns
true if there was an error

◆ mlt_playlist_mix_out()

int mlt_playlist_mix_out ( mlt_playlist  self,
int  clip,
int  length 
)

Mix consecutive clips for a specified length.

This version of the mix function maintains the in point of the B clip by occupying the end of clip A before its current out point. Therefore, it ends up adjusting the out point and duration of clip A without affecting the duration or starting frame of clip B. Also, therefore, there must be enough frames before the in point of clip B.

Parameters
selfa playlist
clipthe index of the playlist entry
lengththe number of frames over which to create the mix
Returns
true if there was an error

◆ mlt_playlist_move()

int mlt_playlist_move ( mlt_playlist  self,
int  src,
int  dest 
)

Move an entry in the playlist.

Parameters
selfa playlist
srcan entry index
destan entry index
Returns
false

◆ mlt_playlist_new()

mlt_playlist mlt_playlist_new ( mlt_profile  profile)

Construct a playlist with a profile.

Sets the resource property to "<playlist>". Set the mlt_type to property to "mlt_producer".

Parameters
profilethe profile to use with the profile
Returns
a new playlist

◆ mlt_playlist_pad_blanks()

void mlt_playlist_pad_blanks ( mlt_playlist  self,
mlt_position  position,
int  length,
int  find 
)

Resize a blank entry.

Parameters
selfa playlist
positionthe time at which the blank entry exists relative to the start or end (negative) of the playlist.
lengththe additional amount of blank frames to add
findtrue to fist locate the blank after the clip at position

◆ mlt_playlist_producer()

mlt_producer mlt_playlist_producer ( mlt_playlist  self)

Get the producer associated to this playlist.

Parameters
selfa playlist
Returns
the producer interface
See also
MLT_PLAYLIST_PRODUCER

◆ mlt_playlist_properties()

mlt_properties mlt_playlist_properties ( mlt_playlist  self)

Get the properties associated to this playlist.

Parameters
selfa playlist
Returns
the playlist's properties list
See also
MLT_PLAYLIST_PROPERTIES

◆ mlt_playlist_remove()

int mlt_playlist_remove ( mlt_playlist  self,
int  where 
)

Remove an entry in the playlist.

Parameters
selfa playlist
wherethe playlist entry index
Returns
true if there was an error

◆ mlt_playlist_remove_region()

int mlt_playlist_remove_region ( mlt_playlist  self,
mlt_position  position,
int  length 
)

Remove a portion of the playlist by time.

Parameters
selfa playlist
positionthe starting time
lengththe duration of time to remove
Returns
the new entry index at the position

◆ mlt_playlist_reorder()

int mlt_playlist_reorder ( mlt_playlist  self,
const int *  indices 
)

Reorder the entries in the playlist.

Parameters
selfa playlist
indicesa list of current indices mapped to the new desired index
Returns
true if there was an error

◆ mlt_playlist_repeat_clip()

int mlt_playlist_repeat_clip ( mlt_playlist  self,
int  clip,
int  repeat 
)

Repeat the specified clip n times.

Parameters
selfa playlist
clipa playlist entry index
repeatthe number of times to repeat the clip
Returns
true if there was an error

◆ mlt_playlist_replace_with_blank()

mlt_producer mlt_playlist_replace_with_blank ( mlt_playlist  self,
int  clip 
)

Replace the specified clip with a blank and return the clip.

Parameters
selfa playlist
clipthe index of the playlist entry
Returns
a producer or NULL if there was an error

◆ mlt_playlist_resize_clip()

int mlt_playlist_resize_clip ( mlt_playlist  self,
int  clip,
mlt_position  in,
mlt_position  out 
)

Resize the specified clip.

Parameters
selfa playlist
clipthe index of the playlist entry
inthe new starting time on the clip's producer; a negative value is the same as 0
outthe new ending time on the clip's producer; a negative value is the same as length - 1
Returns
true if there was an error

◆ mlt_playlist_resize_mix()

static int mlt_playlist_resize_mix ( mlt_playlist  self,
int  clip,
int  in,
int  out 
)
private

Resize a mix clip.

Parameters
selfa playlist
clipthe index of the playlist entry
inthe new starting point
outthe new ending point
Returns
true if there was an error

◆ mlt_playlist_service()

mlt_service mlt_playlist_service ( mlt_playlist  self)

Get the service associated to this playlist.

Parameters
selfa playlist
Returns
the service interface
See also
MLT_PLAYLIST_SERVICE

◆ mlt_playlist_split()

int mlt_playlist_split ( mlt_playlist  self,
int  clip,
mlt_position  position 
)

Split a clip on the playlist at the given position.

This splits after the specified frame.

Parameters
selfa playlist
clipthe index of the playlist entry
positionthe time at which to split relative to the beginning of the clip or its end if negative
Returns
true if there was an error

◆ mlt_playlist_split_at()

int mlt_playlist_split_at ( mlt_playlist  self,
mlt_position  position,
int  left 
)

Split the playlist at the absolute position.

Parameters
selfa playlist
positionthe time at which to split relative to the beginning of the clip
lefttrue to split before the frame starting at position
Returns
true if there was an error

◆ mlt_playlist_unmix()

static int mlt_playlist_unmix ( mlt_playlist  self,
int  clip 
)
private

Remove a mixed clip - ensure that the cuts included in the mix find their way back correctly on to the playlist.

Parameters
selfa playlist
clipthe index of the playlist entry
Returns
true if there was an error

◆ mlt_playlist_virtual_append()

static int mlt_playlist_virtual_append ( mlt_playlist  self,
mlt_producer  source,
mlt_position  in,
mlt_position  out 
)
private

Append to the virtual playlist.

Parameters
selfa playlist
sourcea producer
inthe producer's starting time
outthe producer's ending time
Returns
true if there was an error

◆ mlt_playlist_virtual_refresh()

static int mlt_playlist_virtual_refresh ( mlt_playlist  self)
private

Refresh the playlist after a clip has been changed.

Parameters
selfa playlist
Returns
false

◆ mlt_playlist_virtual_seek()

static mlt_service mlt_playlist_virtual_seek ( mlt_playlist  self,
int *  progressive,
int *  clip_index,
int *  clip_position 
)
private

Seek in the virtual playlist.

This gets the producer at the current position and seeks on the producer while doing repeat and end-of-file handling. This is also responsible for closing producers previous to the preceding playlist if the autoclose property is set.

Parameters
selfa playlist
[out]progressivetrue if the producer should be displayed progressively
[out]clip_indexthe index of the returned service
[out]clip_positionthe position in the returned service relative to the beginning
Returns
the service interface of the producer at the play head
See also
producer_get_frame

◆ mlt_playlist_virtual_set_out()

static mlt_producer mlt_playlist_virtual_set_out ( mlt_playlist  self)
private

Invoked when a producer indicates that it has prematurely reached its end.

Parameters
selfa playlist
Returns
a producer
See also
producer_get_frame

◆ producer_get_frame()

static int producer_get_frame ( mlt_producer  producer,
mlt_frame_ptr  frame,
int  index 
)
private

Get the current frame.

The implementation of the get_frame virtual function.

Parameters
producera producer
framea frame by reference
indexthe time at which to get the frame
Returns
false

Field Documentation

◆ blank

struct mlt_producer_s mlt_playlist_s::blank

◆ count

int mlt_playlist_s::count

◆ list

playlist_entry** mlt_playlist_s::list

◆ parent

struct mlt_producer_s mlt_playlist_s::parent

◆ size

int mlt_playlist_s::size

Deprecated.


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