mlt 0.7.6
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.
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.
int mlt_playlist_blank (mlt_playlist self, mlt_position length)
 Append a blank to the playlist of a given length.
int mlt_playlist_blanks_from (mlt_playlist self, int clip, int bounded)
 Get the duration of a blank space.
int mlt_playlist_clear (mlt_playlist self)
 Clear the playlist.
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.
int mlt_playlist_clip_is_mix (mlt_playlist self, int clip)
 Determine if the clip is a mix.
int mlt_playlist_clip_length (mlt_playlist self, int clip)
 Get the playable duration of the clip.
int mlt_playlist_clip_start (mlt_playlist self, int clip)
 Get the time at which the clip starts relative to the playlist.
void mlt_playlist_close (mlt_playlist self)
 Close the playlist.
void mlt_playlist_consolidate_blanks (mlt_playlist self, int keep_length)
 Consolidate adjacent blank producers.
int mlt_playlist_count (mlt_playlist self)
 Get number of clips in the playlist.
mlt_producer mlt_playlist_current (mlt_playlist self)
 Obtain the current clips producer.
int mlt_playlist_current_clip (mlt_playlist self)
 Obtain the current clips index.
mlt_producer mlt_playlist_get_clip (mlt_playlist self, int clip)
 Return the clip at the clip index.
mlt_producer mlt_playlist_get_clip_at (mlt_playlist self, mlt_position position)
 Return the clip at the specified position.
int mlt_playlist_get_clip_index_at (mlt_playlist self, mlt_position position)
 Return the clip index of the specified position.
int mlt_playlist_get_clip_info (mlt_playlist self, mlt_playlist_clip_info *info, int index)
 Get all the info about the clip specified.
mlt_playlist mlt_playlist_init ()
 Construct a playlist.
int mlt_playlist_insert (mlt_playlist self, mlt_producer producer, int where, mlt_position in, mlt_position out)
 Insert a producer into the playlist.
int mlt_playlist_insert_at (mlt_playlist self, mlt_position position, mlt_producer producer, int mode)
 Insert a clip at a specific time.
void mlt_playlist_insert_blank (mlt_playlist self, int clip, int length)
 Insert blank space.
int mlt_playlist_is_blank (mlt_playlist self, int clip)
 Determine if the specified clip index is a blank.
int mlt_playlist_is_blank_at (mlt_playlist self, mlt_position position)
 Determine if the specified position is a blank.
int mlt_playlist_join (mlt_playlist self, int clip, int count, int merge)
 Join 1 or more consecutive clips.
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.
int mlt_playlist_mix_add (mlt_playlist self, int clip, mlt_transition transition)
 Add a transition to an existing mix.
int mlt_playlist_move (mlt_playlist self, int src, int dest)
 Move an entry in the playlist.
int mlt_playlist_move_region (mlt_playlist self, mlt_position position, int length, int new_position)
 Not implemented.
void mlt_playlist_pad_blanks (mlt_playlist self, mlt_position position, int length, int find)
 Resize a blank entry.
mlt_producer mlt_playlist_producer (mlt_playlist self)
 Get the producer associated to this playlist.
mlt_properties mlt_playlist_properties (mlt_playlist self)
 Get the properties associated to this playlist.
int mlt_playlist_remove (mlt_playlist self, int where)
 Remove an entry in the playlist.
int mlt_playlist_remove_region (mlt_playlist self, mlt_position position, int length)
 Remove a portion of the playlist by time.
int mlt_playlist_repeat_clip (mlt_playlist self, int clip, int repeat)
 Repeat the specified clip n times.
mlt_producer mlt_playlist_replace_with_blank (mlt_playlist self, int clip)
 Replace the specified clip with a blank and return the clip.
int mlt_playlist_resize_clip (mlt_playlist self, int clip, mlt_position in, mlt_position out)
 Resize the specified clip.
mlt_service mlt_playlist_service (mlt_playlist self)
 Get the service associated to this playlist.
int mlt_playlist_split (mlt_playlist self, int clip, mlt_position position)
 Split a clip on the playlist at the given position.
int mlt_playlist_split_at (mlt_playlist self, mlt_position position, int left)
 Split the playlist at the absolute position.

Data Fields

struct mlt_producer_s blank
int count
playlist_entry ** list
struct mlt_producer_s parent
 A producer is a service.
int size

Private Member Functions

static void mlt_playlist_listener (mlt_producer producer, mlt_playlist self)
 Listener for producers on the playlist.
static mlt_producer mlt_playlist_locate (mlt_playlist self, mlt_position *position, int *clip, int *total)
 Locate a producer by index.
static int mlt_playlist_resize_mix (mlt_playlist self, int clip, int in, int out)
 Resize a mix clip.
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.
static int mlt_playlist_virtual_append (mlt_playlist self, mlt_producer source, mlt_position in, mlt_position out)
 Append to the virtual playlist.
static int mlt_playlist_virtual_refresh (mlt_playlist self)
 Refresh the playlist after a clip has been changed.
static mlt_service mlt_playlist_virtual_seek (mlt_playlist self, int *progressive)
 Seek in the virtual playlist.
static mlt_producer mlt_playlist_virtual_set_out (mlt_playlist self)
 Invoked when a producer indicates that it has prematurely reached its end.

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.
Property:
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 on the wiki.
Property:
mix_in
Property:
mix_out

Member Function Documentation

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
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
int mlt_playlist_blank ( mlt_playlist  self,
mlt_position  length 
)

Append a blank to the playlist of a given length.

Parameters:
selfa playlist
lengththe ending time of the blank entry, not its duration
Returns:
true if there was an error
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
int mlt_playlist_clear ( mlt_playlist  self)

Clear the playlist.

Parameters:
selfa playlist
Returns:
true if there was an error
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
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
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
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
void mlt_playlist_close ( mlt_playlist  self)

Close the playlist.

Parameters:
selfa playlist
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
int mlt_playlist_count ( mlt_playlist  self)

Get number of clips in the playlist.

Parameters:
selfa playlist
Returns:
the number of playlist entries
mlt_producer mlt_playlist_current ( mlt_playlist  self)

Obtain the current clips producer.

Parameters:
selfa playlist
Returns:
the producer at the current position
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_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_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
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
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 mlt_playlist_init ( )

Construct a playlist.

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

Returns:
a new playlist
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
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
void mlt_playlist_insert_blank ( mlt_playlist  self,
int  clip,
int  length 
)

Insert blank space.

Parameters:
selfa playlist
clipthe index of the new blank section
lengththe ending time of the new blank section (duration - 1)
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 there was an error
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
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
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
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
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.

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
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
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
int mlt_playlist_move_region ( mlt_playlist  self,
mlt_position  position,
int  length,
int  new_position 
)

Not implemented.

Deprecated:
not implemented
Parameters:
self
position
length
new_position
Returns:
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_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_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
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
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
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_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
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
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_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
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
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
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
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
static int mlt_playlist_virtual_refresh ( mlt_playlist  self) [private]

Refresh the playlist after a clip has been changed.

Parameters:
selfa playlist
Returns:
false
static mlt_service mlt_playlist_virtual_seek ( mlt_playlist  self,
int *  progressive 
) [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
Returns:
the service interface of the producer at the play head
See also:
producer_get_frame
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

Field Documentation

A producer is a service.

Reimplemented from mlt_producer_s.


The documentation for this struct was generated from the following files:
TWiki Appliance - Powered by TurnKey Linux