MLT  7.34.0
mlt_playlist.h
Go to the documentation of this file.
1 
23 #ifndef MLT_PLAYLIST_H
24 #define MLT_PLAYLIST_H
25 
26 #include "mlt_export.h"
27 #include "mlt_producer.h"
28 
32 typedef struct
33 {
34  int clip;
38  char *resource;
43  float fps;
44  int repeat;
46 
50 typedef struct playlist_entry_s playlist_entry;
51 
73 {
74  struct mlt_producer_s parent;
75  struct mlt_producer_s blank;
76 
77  int size;
78  int count;
80 };
81 
82 #define MLT_PLAYLIST_PRODUCER(playlist) (&(playlist)->parent)
83 #define MLT_PLAYLIST_SERVICE(playlist) MLT_PRODUCER_SERVICE(MLT_PLAYLIST_PRODUCER(playlist))
84 #define MLT_PLAYLIST_PROPERTIES(playlist) MLT_SERVICE_PROPERTIES(MLT_PLAYLIST_SERVICE(playlist))
85 
91 MLT_EXPORT int mlt_playlist_count(mlt_playlist self);
92 MLT_EXPORT int mlt_playlist_clear(mlt_playlist self);
93 MLT_EXPORT int mlt_playlist_append(mlt_playlist self, mlt_producer producer);
95  mlt_producer producer,
96  mlt_position in,
97  mlt_position out);
98 MLT_EXPORT int mlt_playlist_blank(mlt_playlist self, mlt_position out);
99 MLT_EXPORT int mlt_playlist_blank_time(mlt_playlist self, const char *length);
100 MLT_EXPORT mlt_position mlt_playlist_clip(mlt_playlist self, mlt_whence whence, int index);
105  int index);
106 MLT_EXPORT int mlt_playlist_insert(
107  mlt_playlist self, mlt_producer producer, int where, mlt_position in, mlt_position out);
108 MLT_EXPORT int mlt_playlist_remove(mlt_playlist self, int where);
109 MLT_EXPORT int mlt_playlist_move(mlt_playlist self, int from, int to);
110 MLT_EXPORT int mlt_playlist_reorder(mlt_playlist self, const int *indices);
112  int clip,
113  mlt_position in,
114  mlt_position out);
115 MLT_EXPORT int mlt_playlist_repeat_clip(mlt_playlist self, int clip, int repeat);
116 MLT_EXPORT int mlt_playlist_split(mlt_playlist self, int clip, mlt_position position);
117 MLT_EXPORT int mlt_playlist_split_at(mlt_playlist self, mlt_position position, int left);
118 MLT_EXPORT int mlt_playlist_join(mlt_playlist self, int clip, int count, int merge);
119 MLT_EXPORT int mlt_playlist_mix(mlt_playlist self, int clip, int length, mlt_transition transition);
120 MLT_EXPORT int mlt_playlist_mix_in(mlt_playlist self, int clip, int length);
121 MLT_EXPORT int mlt_playlist_mix_out(mlt_playlist self, int clip, int length);
122 MLT_EXPORT int mlt_playlist_mix_add(mlt_playlist self, int clip, mlt_transition transition);
126 MLT_EXPORT int mlt_playlist_clip_is_mix(mlt_playlist self, int clip);
127 MLT_EXPORT void mlt_playlist_consolidate_blanks(mlt_playlist self, int keep_length);
128 MLT_EXPORT int mlt_playlist_is_blank(mlt_playlist self, int clip);
129 MLT_EXPORT int mlt_playlist_is_blank_at(mlt_playlist self, mlt_position position);
130 MLT_EXPORT void mlt_playlist_insert_blank(mlt_playlist self, int clip, int out);
132  mlt_position position,
133  int length,
134  int find);
137  mlt_position position,
138  mlt_producer producer,
139  int mode);
140 MLT_EXPORT int mlt_playlist_clip_start(mlt_playlist self, int clip);
141 MLT_EXPORT int mlt_playlist_clip_length(mlt_playlist self, int clip);
142 MLT_EXPORT int mlt_playlist_blanks_from(mlt_playlist self, int clip, int bounded);
143 MLT_EXPORT int mlt_playlist_remove_region(mlt_playlist self, mlt_position position, int length);
144 MLT_EXPORT void mlt_playlist_close(mlt_playlist self);
145 
146 #endif
abstraction for all producer services
int32_t mlt_position
Definition: mlt_types.h:255
mlt_whence
The relative time qualifiers.
Definition: mlt_types.h:224
structure for returning clip information from a playlist entry
Definition: mlt_playlist.h:33
mlt_position length
the unedited duration of the clip
Definition: mlt_playlist.h:42
float fps
the frame rate of the clip
Definition: mlt_playlist.h:43
mlt_producer cut
the clips' cut producer
Definition: mlt_playlist.h:36
mlt_position start
the time this begins relative to the beginning of the playlist
Definition: mlt_playlist.h:37
mlt_position frame_in
the clip's in point
Definition: mlt_playlist.h:39
mlt_position frame_out
the clip's out point
Definition: mlt_playlist.h:40
int clip
the index of the clip within the playlist
Definition: mlt_playlist.h:34
char * resource
the file name or address of the clip
Definition: mlt_playlist.h:38
mlt_producer producer
the clip's producer (or parent producer of a cut)
Definition: mlt_playlist.h:35
mlt_position frame_count
the duration of the clip
Definition: mlt_playlist.h:41
Playlist class.
Definition: mlt_playlist.h:73
int mlt_playlist_remove(mlt_playlist self, int where)
Remove an entry in the playlist.
Definition: mlt_playlist.c:785
int mlt_playlist_clip_start(mlt_playlist self, int clip)
Get the time at which the clip starts relative to the playlist.
Definition: mlt_playlist.c:1907
int mlt_playlist_remove_region(mlt_playlist self, mlt_position position, int length)
Remove a portion of the playlist by time.
Definition: mlt_playlist.c:1970
int mlt_playlist_append(mlt_playlist self, mlt_producer producer)
Append a producer to the playlist.
Definition: mlt_playlist.c:688
int mlt_playlist_current_clip(mlt_playlist self)
Obtain the current clips index.
Definition: mlt_playlist.c:537
int mlt_playlist_is_blank_at(mlt_playlist self, mlt_position position)
Determine if the specified position is a blank.
Definition: mlt_playlist.c:1748
int count
Definition: mlt_playlist.h:78
int mlt_playlist_clip_is_mix(mlt_playlist self, int clip)
Determine if the clip is a mix.
Definition: mlt_playlist.c:1564
int mlt_playlist_get_clip_info(mlt_playlist self, mlt_playlist_clip_info *info, int index)
Get all the info about the clip specified.
Definition: mlt_playlist.c:627
int mlt_playlist_insert(mlt_playlist self, mlt_producer producer, int where, mlt_position in, mlt_position out)
Insert a producer into the playlist.
Definition: mlt_playlist.c:763
int mlt_playlist_mix_in(mlt_playlist self, int clip, int length)
Mix consecutive clips for a specified length.
Definition: mlt_playlist.c:1269
int mlt_playlist_join(mlt_playlist self, int clip, int count, int merge)
Join 1 or more consecutive clips.
Definition: mlt_playlist.c:1106
int size
Deprecated.
Definition: mlt_playlist.h:77
void mlt_playlist_consolidate_blanks(mlt_playlist self, int keep_length)
Consolidate adjacent blank producers.
Definition: mlt_playlist.c:1699
int mlt_playlist_mix_add(mlt_playlist self, int clip, mlt_transition transition)
Add a transition to an existing mix.
Definition: mlt_playlist.c:1497
int mlt_playlist_resize_clip(mlt_playlist self, int clip, mlt_position in, mlt_position out)
Resize the specified clip.
Definition: mlt_playlist.c:980
struct mlt_producer_s blank
Definition: mlt_playlist.h:75
mlt_producer mlt_playlist_current(mlt_playlist self)
Obtain the current clips producer.
Definition: mlt_playlist.c:565
int mlt_playlist_clip_length(mlt_playlist self, int clip)
Get the playable duration of the clip.
Definition: mlt_playlist.c:1923
void mlt_playlist_close(mlt_playlist self)
Close the playlist.
Definition: mlt_playlist.c:2096
void mlt_playlist_insert_blank(mlt_playlist self, int clip, int out)
Insert blank space.
Definition: mlt_playlist.c:1790
int mlt_playlist_clear(mlt_playlist self)
Clear the playlist.
Definition: mlt_playlist.c:669
int mlt_playlist_split_at(mlt_playlist self, mlt_position position, int left)
Split the playlist at the absolute position.
Definition: mlt_playlist.c:1074
int mlt_playlist_mix_out(mlt_playlist self, int clip, int length)
Mix consecutive clips for a specified length.
Definition: mlt_playlist.c:1385
void mlt_playlist_pad_blanks(mlt_playlist self, mlt_position position, int length, int find)
Resize a blank entry.
Definition: mlt_playlist.c:1810
int mlt_playlist_blanks_from(mlt_playlist self, int clip, int bounded)
Get the duration of a blank space.
Definition: mlt_playlist.c:1940
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.
Definition: mlt_playlist.c:1145
int mlt_playlist_reorder(mlt_playlist self, const int *indices)
Reorder the entries in the playlist.
Definition: mlt_playlist.c:916
mlt_producer mlt_playlist_get_clip(mlt_playlist self, int clip)
Return the clip at the clip index.
Definition: mlt_playlist.c:1520
playlist_entry ** list
Definition: mlt_playlist.h:79
int mlt_playlist_get_clip_index_at(mlt_playlist self, mlt_position position)
Return the clip index of the specified position.
Definition: mlt_playlist.c:1549
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.
Definition: mlt_playlist.c:584
mlt_properties mlt_playlist_properties(mlt_playlist self)
Get the properties associated to this playlist.
Definition: mlt_playlist.c:168
int mlt_playlist_move(mlt_playlist self, int src, int dest)
Move an entry in the playlist.
Definition: mlt_playlist.c:855
int mlt_playlist_split(mlt_playlist self, int clip, mlt_position position)
Split a clip on the playlist at the given position.
Definition: mlt_playlist.c:1033
int mlt_playlist_blank_time(mlt_playlist self, const char *length)
Append a blank item to the playlist with duration as a time string.
Definition: mlt_playlist.c:741
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.
Definition: mlt_playlist.c:704
int mlt_playlist_is_blank(mlt_playlist self, int clip)
Determine if the specified clip index is a blank.
Definition: mlt_playlist.c:1735
mlt_producer mlt_playlist_get_clip_at(mlt_playlist self, mlt_position position)
Return the clip at the specified position.
Definition: mlt_playlist.c:1535
mlt_producer mlt_playlist_replace_with_blank(mlt_playlist self, int clip)
Replace the specified clip with a blank and return the clip.
Definition: mlt_playlist.c:1761
int mlt_playlist_insert_at(mlt_playlist self, mlt_position position, mlt_producer producer, int mode)
Insert a clip at a specific time.
Definition: mlt_playlist.c:1843
struct mlt_producer_s parent
Definition: mlt_playlist.h:74
int mlt_playlist_repeat_clip(mlt_playlist self, int clip, int repeat)
Repeat the specified clip n times.
Definition: mlt_playlist.c:959
mlt_service mlt_playlist_service(mlt_playlist self)
Get the service associated to this playlist.
Definition: mlt_playlist.c:155
mlt_playlist mlt_playlist_init()
Construct a playlist.
Definition: mlt_playlist.c:112
int mlt_playlist_count(mlt_playlist self)
Get number of clips in the playlist.
Definition: mlt_playlist.c:657
mlt_producer mlt_playlist_producer(mlt_playlist self)
Get the producer associated to this playlist.
Definition: mlt_playlist.c:142
mlt_playlist mlt_playlist_new(mlt_profile profile)
Construct a playlist with a profile.
Definition: mlt_playlist.c:126
int mlt_playlist_blank(mlt_playlist self, mlt_position out)
Append a blank to the playlist of a given length.
Definition: mlt_playlist.c:724
Producer abstract service class.
Definition: mlt_producer.h:71
Profile class.
Definition: mlt_profile.h:36
Properties class.
Definition: mlt_properties.h:41
Service abstract base class.
Definition: mlt_service.h:59
Transition abstract service class.
Definition: mlt_transition.h:44
Virtual playlist entry used by mlt_playlist_s.
Definition: mlt_playlist.c:40