X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fframework%2Fmlt_playlist.h;h=e70ff623b39201b40a1586ee888de5a77d55a652;hb=e6c03148e1dc3b0e363c9f304b3ed93fbc1a91a9;hp=3e30ba6be8425966bcb7560522d823326c17c4b0;hpb=9390e8b584f3f717f0a326893c0e37cf187a0a51;p=melted diff --git a/src/framework/mlt_playlist.h b/src/framework/mlt_playlist.h index 3e30ba6..e70ff62 100644 --- a/src/framework/mlt_playlist.h +++ b/src/framework/mlt_playlist.h @@ -23,37 +23,87 @@ #include "mlt_producer.h" -/** Structur for returning clip information. +/** Structure for returning clip information. */ typedef struct { + int clip; + mlt_producer producer; + mlt_producer cut; + mlt_position start; char *resource; - double in; - double out; - double playtime; - double length; + mlt_position frame_in; + mlt_position frame_out; + mlt_position frame_count; + mlt_position length; float fps; + int repeat; } mlt_playlist_clip_info; +/** Private definition. +*/ + +typedef struct playlist_entry_s playlist_entry; + +struct mlt_playlist_s +{ + struct mlt_producer_s parent; + struct mlt_producer_s blank; + + int size; + int count; + playlist_entry **list; +}; + /** Public final methods */ +#define MLT_PLAYLIST_PRODUCER( playlist ) ( &( playlist )->parent ) +#define MLT_PLAYLIST_SERVICE( playlist ) MLT_PRODUCER_SERVICE( MLT_PLAYLIST_PRODUCER( playlist ) ) +#define MLT_PLAYLIST_PROPERTIES( playlist ) MLT_SERVICE_PROPERTIES( MLT_PLAYLIST_SERVICE( playlist ) ) + extern mlt_playlist mlt_playlist_init( ); -extern mlt_producer mlt_playlist_producer( mlt_playlist this ); -extern mlt_service mlt_playlist_service( mlt_playlist this ); -extern mlt_properties mlt_playlist_properties( mlt_playlist this ); -extern int mlt_playlist_count( mlt_playlist this ); -extern int mlt_playlist_clear( mlt_playlist this ); -extern int mlt_playlist_append( mlt_playlist this, mlt_producer producer ); -extern int mlt_playlist_append_io( mlt_playlist this, mlt_producer producer, double in, double out ); -extern int mlt_playlist_blank( mlt_playlist this, mlt_timecode length ); -extern mlt_timecode mlt_playlist_clip( mlt_playlist this, mlt_whence whence, int index ); -extern int mlt_playlist_current_clip( mlt_playlist this ); -extern mlt_producer mlt_playlist_current( mlt_playlist this ); -extern int mlt_playlist_get_clip_info( mlt_playlist this, mlt_playlist_clip_info *info, int index ); -extern void mlt_playlist_close( mlt_playlist this ); +extern mlt_producer mlt_playlist_producer( mlt_playlist self ); +extern mlt_service mlt_playlist_service( mlt_playlist self ); +extern mlt_properties mlt_playlist_properties( mlt_playlist self ); +extern int mlt_playlist_count( mlt_playlist self ); +extern int mlt_playlist_clear( mlt_playlist self ); +extern int mlt_playlist_append( mlt_playlist self, mlt_producer producer ); +extern int mlt_playlist_append_io( mlt_playlist self, mlt_producer producer, mlt_position in, mlt_position out ); +extern int mlt_playlist_blank( mlt_playlist self, mlt_position length ); +extern mlt_position mlt_playlist_clip( mlt_playlist self, mlt_whence whence, int index ); +extern int mlt_playlist_current_clip( mlt_playlist self ); +extern mlt_producer mlt_playlist_current( mlt_playlist self ); +extern int mlt_playlist_get_clip_info( mlt_playlist self, mlt_playlist_clip_info *info, int index ); +extern int mlt_playlist_insert( mlt_playlist self, mlt_producer producer, int where, mlt_position in, mlt_position out ); +extern int mlt_playlist_remove( mlt_playlist self, int where ); +extern int mlt_playlist_move( mlt_playlist self, int from, int to ); +extern int mlt_playlist_resize_clip( mlt_playlist self, int clip, mlt_position in, mlt_position out ); +extern int mlt_playlist_repeat_clip( mlt_playlist self, int clip, int repeat ); +extern int mlt_playlist_split( mlt_playlist self, int clip, mlt_position position ); +extern int mlt_playlist_split_at( mlt_playlist self, mlt_position position, int left ); +extern int mlt_playlist_join( mlt_playlist self, int clip, int count, int merge ); +extern int mlt_playlist_mix( mlt_playlist self, int clip, int length, mlt_transition transition ); +extern int mlt_playlist_mix_add( mlt_playlist self, int clip, mlt_transition transition ); +extern mlt_producer mlt_playlist_get_clip( mlt_playlist self, int clip ); +extern mlt_producer mlt_playlist_get_clip_at( mlt_playlist self, int position ); +extern int mlt_playlist_get_clip_index_at( mlt_playlist self, int position ); +extern int mlt_playlist_clip_is_mix( mlt_playlist self, int clip ); +extern void mlt_playlist_consolidate_blanks( mlt_playlist self, int keep_length ); +extern int mlt_playlist_is_blank( mlt_playlist self, int clip ); +extern int mlt_playlist_is_blank_at( mlt_playlist self, int position ); +extern void mlt_playlist_insert_blank( mlt_playlist self, int clip, int length ); +extern void mlt_playlist_pad_blanks( mlt_playlist self, int position, int length, int find ); +extern mlt_producer mlt_playlist_replace_with_blank( mlt_playlist self, int clip ); +extern int mlt_playlist_insert_at( mlt_playlist self, int position, mlt_producer producer, int mode ); +extern int mlt_playlist_clip_start( mlt_playlist self, int clip ); +extern int mlt_playlist_clip_length( mlt_playlist self, int clip ); +extern int mlt_playlist_blanks_from( mlt_playlist self, int clip, int bounded ); +extern int mlt_playlist_remove_region( mlt_playlist self, int position, int length ); +extern int mlt_playlist_move_region( mlt_playlist self, int position, int length, int new_position ); +extern void mlt_playlist_close( mlt_playlist self ); #endif