]> git.sesse.net Git - mlt/blob - src/framework/mlt_playlist.h
src/framework/*: improve the doxygen documentation (work in progress). This also...
[mlt] / src / framework / mlt_playlist.h
1 /**
2  * \file mlt_playlist.h
3  * \brief playlist service class
4  *
5  * Copyright (C) 2003-2008 Ushodaya Enterprises Limited
6  * \author Charles Yates <charles.yates@pandora.be>
7  *
8  * This library is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or (at your option) any later version.
12  *
13  * This library is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the Free Software
20  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
21  */
22
23 #ifndef _MLT_PLAYLIST_H_
24 #define _MLT_PLAYLIST_H_
25
26 #include "mlt_producer.h"
27
28 /** \brief structure for returning clip information
29  */
30
31 typedef struct
32 {
33         int clip;
34         mlt_producer producer;
35         mlt_producer cut;
36         mlt_position start;
37         char *resource;
38         mlt_position frame_in;
39         mlt_position frame_out;
40         mlt_position frame_count;
41         mlt_position length;
42         float fps;
43         int repeat;
44 }
45 mlt_playlist_clip_info;
46
47 /** Private definition.
48 */
49
50 typedef struct playlist_entry_s playlist_entry;
51
52 /** \brief Playlist class
53  *
54  * \extends mlt_producer_s
55  */
56
57 struct mlt_playlist_s
58 {
59         struct mlt_producer_s parent;
60         struct mlt_producer_s blank;
61
62         int size;
63         int count;
64         playlist_entry **list;
65 };
66
67 #define MLT_PLAYLIST_PRODUCER( playlist )       ( &( playlist )->parent )
68 #define MLT_PLAYLIST_SERVICE( playlist )        MLT_PRODUCER_SERVICE( MLT_PLAYLIST_PRODUCER( playlist ) )
69 #define MLT_PLAYLIST_PROPERTIES( playlist )     MLT_SERVICE_PROPERTIES( MLT_PLAYLIST_SERVICE( playlist ) )
70
71 extern mlt_playlist mlt_playlist_init( );
72 extern mlt_producer mlt_playlist_producer( mlt_playlist self );
73 extern mlt_service mlt_playlist_service( mlt_playlist self );
74 extern mlt_properties mlt_playlist_properties( mlt_playlist self );
75 extern int mlt_playlist_count( mlt_playlist self );
76 extern int mlt_playlist_clear( mlt_playlist self );
77 extern int mlt_playlist_append( mlt_playlist self, mlt_producer producer );
78 extern int mlt_playlist_append_io( mlt_playlist self, mlt_producer producer, mlt_position in, mlt_position out );
79 extern int mlt_playlist_blank( mlt_playlist self, mlt_position length );
80 extern mlt_position mlt_playlist_clip( mlt_playlist self, mlt_whence whence, int index );
81 extern int mlt_playlist_current_clip( mlt_playlist self );
82 extern mlt_producer mlt_playlist_current( mlt_playlist self );
83 extern int mlt_playlist_get_clip_info( mlt_playlist self, mlt_playlist_clip_info *info, int index );
84 extern int mlt_playlist_insert( mlt_playlist self, mlt_producer producer, int where, mlt_position in, mlt_position out );
85 extern int mlt_playlist_remove( mlt_playlist self, int where );
86 extern int mlt_playlist_move( mlt_playlist self, int from, int to );
87 extern int mlt_playlist_resize_clip( mlt_playlist self, int clip, mlt_position in, mlt_position out );
88 extern int mlt_playlist_repeat_clip( mlt_playlist self, int clip, int repeat );
89 extern int mlt_playlist_split( mlt_playlist self, int clip, mlt_position position );
90 extern int mlt_playlist_split_at( mlt_playlist self, mlt_position position, int left );
91 extern int mlt_playlist_join( mlt_playlist self, int clip, int count, int merge );
92 extern int mlt_playlist_mix( mlt_playlist self, int clip, int length, mlt_transition transition );
93 extern int mlt_playlist_mix_add( mlt_playlist self, int clip, mlt_transition transition );
94 extern mlt_producer mlt_playlist_get_clip( mlt_playlist self, int clip );
95 extern mlt_producer mlt_playlist_get_clip_at( mlt_playlist self, mlt_position position );
96 extern int mlt_playlist_get_clip_index_at( mlt_playlist self, mlt_position position );
97 extern int mlt_playlist_clip_is_mix( mlt_playlist self, int clip );
98 extern void mlt_playlist_consolidate_blanks( mlt_playlist self, int keep_length );
99 extern int mlt_playlist_is_blank( mlt_playlist self, int clip );
100 extern int mlt_playlist_is_blank_at( mlt_playlist self, mlt_position position );
101 extern void mlt_playlist_insert_blank( mlt_playlist self, int clip, int length );
102 extern void mlt_playlist_pad_blanks( mlt_playlist self, mlt_position position, int length, int find );
103 extern mlt_producer mlt_playlist_replace_with_blank( mlt_playlist self, int clip );
104 extern int mlt_playlist_insert_at( mlt_playlist self, mlt_position position, mlt_producer producer, int mode );
105 extern int mlt_playlist_clip_start( mlt_playlist self, int clip );
106 extern int mlt_playlist_clip_length( mlt_playlist self, int clip );
107 extern int mlt_playlist_blanks_from( mlt_playlist self, int clip, int bounded );
108 extern int mlt_playlist_remove_region( mlt_playlist self, mlt_position position, int length );
109 extern int mlt_playlist_move_region( mlt_playlist self, mlt_position position, int length, int new_position );
110 extern void mlt_playlist_close( mlt_playlist self );
111
112 #endif
113