]> git.sesse.net Git - mlt/blob - src/framework/mlt_multitrack.h
A little debugging.
[mlt] / src / framework / mlt_multitrack.h
1 /**
2  * \file mlt_multitrack.h
3  * \brief multitrack service class
4  * \see mlt_multitrack_s
5  *
6  * Copyright (C) 2003-2009 Ushodaya Enterprises Limited
7  * \author Charles Yates <charles.yates@pandora.be>
8  *
9  * This library is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public
11  * License as published by the Free Software Foundation; either
12  * version 2.1 of the License, or (at your option) any later version.
13  *
14  * This library is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17  * Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with this library; if not, write to the Free Software
21  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
22  */
23
24 #ifndef _MLT_MULITRACK_H_
25 #define _MLT_MULITRACK_H_
26
27 #include "mlt_producer.h"
28
29 /** \brief Track class used by mlt_multitrack_s
30  */
31
32 struct mlt_track_s
33 {
34         mlt_producer producer;
35         mlt_event event;
36 };
37
38 typedef struct mlt_track_s *mlt_track;
39
40 /** \brief Multitrack class
41  *
42  * A multitrack is a parallel container of producers that acts a single producer.
43  *
44  * \extends mlt_producer_s
45  * \properties \em log_id not currently used, but sets it to "mulitrack"
46  */
47
48 struct mlt_multitrack_s
49 {
50         /** We're extending producer here */
51         struct mlt_producer_s parent;
52         mlt_track *list;
53         int size;
54         int count;
55 };
56
57 #define MLT_MULTITRACK_PRODUCER( multitrack )   ( &( multitrack )->parent )
58 #define MLT_MULTITRACK_SERVICE( multitrack )    MLT_PRODUCER_SERVICE( MLT_MULTITRACK_PRODUCER( multitrack ) )
59 #define MLT_MULTITRACK_PROPERTIES( multitrack ) MLT_SERVICE_PROPERTIES( MLT_MULTITRACK_SERVICE( multitrack ) )
60
61 extern mlt_multitrack mlt_multitrack_init( );
62 extern mlt_producer mlt_multitrack_producer( mlt_multitrack self );
63 extern mlt_service mlt_multitrack_service( mlt_multitrack self );
64 extern mlt_properties mlt_multitrack_properties( mlt_multitrack self );
65 extern int mlt_multitrack_connect( mlt_multitrack self, mlt_producer producer, int track );
66 extern mlt_position mlt_multitrack_clip( mlt_multitrack self, mlt_whence whence, int index );
67 extern void mlt_multitrack_close( mlt_multitrack self );
68 extern int mlt_multitrack_count( mlt_multitrack self );
69 extern void mlt_multitrack_refresh( mlt_multitrack self );
70 extern mlt_producer mlt_multitrack_track( mlt_multitrack self, int track );
71
72 #endif
73