2 * mlt_playlist.h -- playlist service class
3 * Copyright (C) 2003-2004 Ushodaya Enterprises Limited
4 * Author: Charles Yates <charles.yates@pandora.be>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software Foundation,
18 * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 #ifndef _MLT_PLAYLIST_H_
22 #define _MLT_PLAYLIST_H_
24 #include "mlt_producer.h"
26 /** Structure for returning clip information.
32 mlt_producer producer
;
36 mlt_position frame_in
;
37 mlt_position frame_out
;
38 mlt_position frame_count
;
43 mlt_playlist_clip_info
;
45 /** Private definition.
48 typedef struct playlist_entry_s playlist_entry
;
52 struct mlt_producer_s parent
;
53 struct mlt_producer_s blank
;
57 playlist_entry
**list
;
60 /** Public final methods
63 #define MLT_PLAYLIST_PRODUCER( playlist ) ( &( playlist )->parent )
64 #define MLT_PLAYLIST_SERVICE( playlist ) MLT_PRODUCER_SERVICE( MLT_PLAYLIST_PRODUCER( playlist ) )
65 #define MLT_PLAYLIST_PROPERTIES( playlist ) MLT_SERVICE_PROPERTIES( MLT_PLAYLIST_SERVICE( playlist ) )
67 extern mlt_playlist
mlt_playlist_init( );
68 extern mlt_producer
mlt_playlist_producer( mlt_playlist self
);
69 extern mlt_service
mlt_playlist_service( mlt_playlist self
);
70 extern mlt_properties
mlt_playlist_properties( mlt_playlist self
);
71 extern int mlt_playlist_count( mlt_playlist self
);
72 extern int mlt_playlist_clear( mlt_playlist self
);
73 extern int mlt_playlist_append( mlt_playlist self
, mlt_producer producer
);
74 extern int mlt_playlist_append_io( mlt_playlist self
, mlt_producer producer
, mlt_position in
, mlt_position out
);
75 extern int mlt_playlist_blank( mlt_playlist self
, mlt_position length
);
76 extern mlt_position
mlt_playlist_clip( mlt_playlist self
, mlt_whence whence
, int index
);
77 extern int mlt_playlist_current_clip( mlt_playlist self
);
78 extern mlt_producer
mlt_playlist_current( mlt_playlist self
);
79 extern int mlt_playlist_get_clip_info( mlt_playlist self
, mlt_playlist_clip_info
*info
, int index
);
80 extern int mlt_playlist_insert( mlt_playlist self
, mlt_producer producer
, int where
, mlt_position in
, mlt_position out
);
81 extern int mlt_playlist_remove( mlt_playlist self
, int where
);
82 extern int mlt_playlist_move( mlt_playlist self
, int from
, int to
);
83 extern int mlt_playlist_resize_clip( mlt_playlist self
, int clip
, mlt_position in
, mlt_position out
);
84 extern int mlt_playlist_repeat_clip( mlt_playlist self
, int clip
, int repeat
);
85 extern int mlt_playlist_split( mlt_playlist self
, int clip
, mlt_position position
);
86 extern int mlt_playlist_split_at( mlt_playlist self
, mlt_position position
, int left
);
87 extern int mlt_playlist_join( mlt_playlist self
, int clip
, int count
, int merge
);
88 extern int mlt_playlist_mix( mlt_playlist self
, int clip
, int length
, mlt_transition transition
);
89 extern int mlt_playlist_mix_add( mlt_playlist self
, int clip
, mlt_transition transition
);
90 extern mlt_producer
mlt_playlist_get_clip( mlt_playlist self
, int clip
);
91 extern mlt_producer
mlt_playlist_get_clip_at( mlt_playlist self
, int position
);
92 extern int mlt_playlist_get_clip_index_at( mlt_playlist self
, int position
);
93 extern int mlt_playlist_clip_is_mix( mlt_playlist self
, int clip
);
94 extern void mlt_playlist_consolidate_blanks( mlt_playlist self
, int keep_length
);
95 extern int mlt_playlist_is_blank( mlt_playlist self
, int clip
);
96 extern int mlt_playlist_is_blank_at( mlt_playlist self
, int position
);
97 extern void mlt_playlist_insert_blank( mlt_playlist self
, int clip
, int length
);
98 extern void mlt_playlist_pad_blanks( mlt_playlist self
, int position
, int length
, int find
);
99 extern mlt_producer
mlt_playlist_replace_with_blank( mlt_playlist self
, int clip
);
100 extern int mlt_playlist_insert_at( mlt_playlist self
, int position
, mlt_producer producer
, int mode
);
101 extern int mlt_playlist_clip_start( mlt_playlist self
, int clip
);
102 extern int mlt_playlist_clip_length( mlt_playlist self
, int clip
);
103 extern int mlt_playlist_blanks_from( mlt_playlist self
, int clip
, int bounded
);
104 extern int mlt_playlist_remove_region( mlt_playlist self
, int position
, int length
);
105 extern int mlt_playlist_move_region( mlt_playlist self
, int position
, int length
, int new_position
);
106 extern void mlt_playlist_close( mlt_playlist self
);