]> git.sesse.net Git - mlt/blob - src/framework/mlt_tractor.h
4df3d9489ba44d8df4808d26f097f78832f23f2d
[mlt] / src / framework / mlt_tractor.h
1 /**
2  * \file mlt_tractor.h
3  * \brief tractor 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_TRACTOR_H_
24 #define _MLT_TRACTOR_H_
25
26 #include "mlt_producer.h"
27
28 /** \brief Tractor class
29  *
30  * The tractor is a convenience class that works with the field class
31  * to manage a multitrack, track filters, and transitions.
32  *
33  * \extends mlt_producer_s
34  * \properties \em multitrack holds a reference to the mulitrack object that a tractor manages
35  * \properties \em field holds a reference to the field object that a tractor manages
36  * \properties \em producer holds a reference to an encapsulated producer
37  * \properties \em global_feed a flag to indicate whether this tractor feeds to the consumer or stops here
38  * \properties \em global_queue is something for the data_feed functionality in the core module
39  * \properties \em data_queue is something for the data_feed functionality in the core module
40  */
41
42 struct mlt_tractor_s
43 {
44         struct mlt_producer_s parent;
45         mlt_service producer;
46 };
47
48 #define MLT_TRACTOR_PRODUCER( tractor )         ( &( tractor )->parent )
49 #define MLT_TRACTOR_SERVICE( tractor )          MLT_PRODUCER_SERVICE( MLT_TRACTOR_PRODUCER( tractor ) )
50 #define MLT_TRACTOR_PROPERTIES( tractor )       MLT_SERVICE_PROPERTIES( MLT_TRACTOR_SERVICE( tractor ) )
51
52 extern mlt_tractor mlt_tractor_init( );
53 extern mlt_tractor mlt_tractor_new( );
54 extern mlt_service mlt_tractor_service( mlt_tractor self );
55 extern mlt_producer mlt_tractor_producer( mlt_tractor self );
56 extern mlt_properties mlt_tractor_properties( mlt_tractor self );
57 extern mlt_field mlt_tractor_field( mlt_tractor self );
58 extern mlt_multitrack mlt_tractor_multitrack( mlt_tractor self );
59 extern int mlt_tractor_connect( mlt_tractor self, mlt_service service );
60 extern void mlt_tractor_refresh( mlt_tractor self );
61 extern int mlt_tractor_set_track( mlt_tractor self, mlt_producer producer, int index );
62 extern mlt_producer mlt_tractor_get_track( mlt_tractor self, int index );
63 extern void mlt_tractor_close( mlt_tractor self );
64
65 #endif