MLT  7.24.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_producer.h"
27 
31 typedef struct
32 {
33  int clip;
37  char *resource;
42  float fps;
43  int repeat;
45 
49 typedef struct playlist_entry_s playlist_entry;
50 
72 {
73  struct mlt_producer_s parent;
74  struct mlt_producer_s blank;
75 
76  int size;
77  int count;
79 };
80 
81 #define MLT_PLAYLIST_PRODUCER(playlist) (&(playlist)->parent)
82 #define MLT_PLAYLIST_SERVICE(playlist) MLT_PRODUCER_SERVICE(MLT_PLAYLIST_PRODUCER(playlist))
83 #define MLT_PLAYLIST_PROPERTIES(playlist) MLT_SERVICE_PROPERTIES(MLT_PLAYLIST_SERVICE(playlist))
84 
92 extern int mlt_playlist_append(mlt_playlist self, mlt_producer producer);
94  mlt_producer producer,
95  mlt_position in,
96  mlt_position out);
98 extern int mlt_playlist_blank_time(mlt_playlist self, const char *length);
99 extern mlt_position mlt_playlist_clip(mlt_playlist self, mlt_whence whence, int index);
104  mlt_playlist self, mlt_producer producer, int where, mlt_position in, mlt_position out);
105 extern int mlt_playlist_remove(mlt_playlist self, int where);
106 extern int mlt_playlist_move(mlt_playlist self, int from, int to);
107 extern int mlt_playlist_reorder(mlt_playlist self, const int *indices);
109 extern int mlt_playlist_repeat_clip(mlt_playlist self, int clip, int repeat);
110 extern int mlt_playlist_split(mlt_playlist self, int clip, mlt_position position);
111 extern int mlt_playlist_split_at(mlt_playlist self, mlt_position position, int left);
112 extern int mlt_playlist_join(mlt_playlist self, int clip, int count, int merge);
113 extern int mlt_playlist_mix(mlt_playlist self, int clip, int length, mlt_transition transition);
114 extern int mlt_playlist_mix_in(mlt_playlist self, int clip, int length);
115 extern int mlt_playlist_mix_out(mlt_playlist self, int clip, int length);
116 extern int mlt_playlist_mix_add(mlt_playlist self, int clip, mlt_transition transition);
120 extern int mlt_playlist_clip_is_mix(mlt_playlist self, int clip);
121 extern void mlt_playlist_consolidate_blanks(mlt_playlist self, int keep_length);
122 extern int mlt_playlist_is_blank(mlt_playlist self, int clip);
124 extern void mlt_playlist_insert_blank(mlt_playlist self, int clip, int out);
125 extern void mlt_playlist_pad_blanks(mlt_playlist self, mlt_position position, int length, int find);
128  mlt_position position,
129  mlt_producer producer,
130  int mode);
131 extern int mlt_playlist_clip_start(mlt_playlist self, int clip);
132 extern int mlt_playlist_clip_length(mlt_playlist self, int clip);
133 extern int mlt_playlist_blanks_from(mlt_playlist self, int clip, int bounded);
134 extern int mlt_playlist_remove_region(mlt_playlist self, mlt_position position, int length);
136 
137 #endif
abstraction for all producer services
int32_t mlt_position
Definition: mlt_types.h:217
mlt_whence
The relative time qualifiers.
Definition: mlt_types.h:186
structure for returning clip information from a playlist entry
Definition: mlt_playlist.h:32
mlt_position length
the unedited duration of the clip
Definition: mlt_playlist.h:41
float fps
the frame rate of the clip
Definition: mlt_playlist.h:42
mlt_producer cut
the clips' cut producer
Definition: mlt_playlist.h:35
mlt_position start
the time this begins relative to the beginning of the playlist
Definition: mlt_playlist.h:36
mlt_position frame_in
the clip's in point
Definition: mlt_playlist.h:38
mlt_position frame_out
the clip's out point
Definition: mlt_playlist.h:39
int clip
the index of the clip within the playlist
Definition: mlt_playlist.h:33
char * resource
the file name or address of the clip
Definition: mlt_playlist.h:37
mlt_producer producer
the clip's producer (or parent producer of a cut)
Definition: mlt_playlist.h:34
mlt_position frame_count
the duration of the clip
Definition: mlt_playlist.h:40
Playlist class.
Definition: mlt_playlist.h:72
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:77
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:76
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:74
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:78
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:73
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:70
Profile class.
Definition: mlt_profile.h:35
Properties class.
Definition: mlt_properties.h:40
Service abstract base class.
Definition: mlt_service.h:58
Transition abstract service class.
Definition: mlt_transition.h:43
Virtual playlist entry used by mlt_playlist_s.
Definition: mlt_playlist.c:40