Playlist and blank rearrangement, fix for mlt_consumer and NULL
[melted] / src / framework / mlt_playlist.h
1 /*
2 * mlt_playlist.h -- playlist service class
3 * Copyright (C) 2003-2004 Ushodaya Enterprises Limited
4 * Author: Charles Yates <charles.yates@pandora.be>
5 *
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.
10 *
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.
15 *
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.
19 */
20
21 #ifndef _MLT_PLAYLIST_H_
22 #define _MLT_PLAYLIST_H_
23
24 #include "mlt_producer.h"
25
26 /** Structure for returning clip information.
27 */
28
29 typedef struct
30 {
31 int clip;
32 mlt_producer producer;
33 mlt_producer cut;
34 mlt_position start;
35 char *resource;
36 mlt_position frame_in;
37 mlt_position frame_out;
38 mlt_position frame_count;
39 mlt_position length;
40 float fps;
41 int repeat;
42 }
43 mlt_playlist_clip_info;
44
45 /** Public final methods
46 */
47
48 extern mlt_playlist mlt_playlist_init( );
49 extern mlt_producer mlt_playlist_producer( mlt_playlist self );
50 extern mlt_service mlt_playlist_service( mlt_playlist self );
51 extern mlt_properties mlt_playlist_properties( mlt_playlist self );
52 extern int mlt_playlist_count( mlt_playlist self );
53 extern int mlt_playlist_clear( mlt_playlist self );
54 extern int mlt_playlist_append( mlt_playlist self, mlt_producer producer );
55 extern int mlt_playlist_append_io( mlt_playlist self, mlt_producer producer, mlt_position in, mlt_position out );
56 extern int mlt_playlist_blank( mlt_playlist self, mlt_position length );
57 extern mlt_position mlt_playlist_clip( mlt_playlist self, mlt_whence whence, int index );
58 extern int mlt_playlist_current_clip( mlt_playlist self );
59 extern mlt_producer mlt_playlist_current( mlt_playlist self );
60 extern int mlt_playlist_get_clip_info( mlt_playlist self, mlt_playlist_clip_info *info, int index );
61 extern int mlt_playlist_insert( mlt_playlist self, mlt_producer producer, int where, mlt_position in, mlt_position out );
62 extern int mlt_playlist_remove( mlt_playlist self, int where );
63 extern int mlt_playlist_move( mlt_playlist self, int from, int to );
64 extern int mlt_playlist_resize_clip( mlt_playlist self, int clip, mlt_position in, mlt_position out );
65 extern int mlt_playlist_repeat_clip( mlt_playlist self, int clip, int repeat );
66 extern int mlt_playlist_split( mlt_playlist self, int clip, mlt_position position );
67 extern int mlt_playlist_join( mlt_playlist self, int clip, int count, int merge );
68 extern int mlt_playlist_mix( mlt_playlist self, int clip, int length, mlt_transition transition );
69 extern int mlt_playlist_mix_add( mlt_playlist self, int clip, mlt_transition transition );
70 extern mlt_producer mlt_playlist_get_clip( mlt_playlist self, int clip );
71 extern mlt_producer mlt_playlist_get_clip_at( mlt_playlist self, int position );
72 extern int mlt_playlist_get_clip_index_at( mlt_playlist self, int position );
73 extern int mlt_playlist_clip_is_mix( mlt_playlist self, int clip );
74 extern void mlt_playlist_consolidate_blanks( mlt_playlist self, int keep_length );
75 extern int mlt_playlist_is_blank( mlt_playlist self, int clip );
76 extern mlt_producer mlt_playlist_replace_with_blank( mlt_playlist self, int clip );
77 extern void mlt_playlist_close( mlt_playlist self );
78
79 #endif
80