]> git.sesse.net Git - mlt/blob - src/framework/mlt_producer.h
6d59712474d75e1a12c013c0aa5f3908d7c99ac5
[mlt] / src / framework / mlt_producer.h
1 /*
2  * mlt_producer.h -- abstraction for all producer services
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_PRODUCER_H_
22 #define _MLT_PRODUCER_H_
23
24 #include "mlt_service.h"
25
26 /** The interface definition for all producers.
27 */
28
29 struct mlt_producer_s
30 {
31         // We're implementing service here
32         struct mlt_service_s parent;
33
34         // Public virtual methods
35         int ( *get_frame )( mlt_producer, mlt_frame_ptr, int );
36         void ( *close )( mlt_producer );
37
38         // Private data
39         void *private;
40         void *child;
41 };
42
43 /** Public final methods
44 */
45
46 extern int mlt_producer_init( mlt_producer this, void *child );
47 extern mlt_service mlt_producer_service( mlt_producer this );
48 extern mlt_properties mlt_producer_properties( mlt_producer this );
49 extern int mlt_producer_seek( mlt_producer this, mlt_position position );
50 extern mlt_position mlt_producer_position( mlt_producer this );
51 extern mlt_position mlt_producer_frame( mlt_producer this );
52 extern int mlt_producer_set_speed( mlt_producer this, double speed );
53 extern double mlt_producer_get_speed( mlt_producer this );
54 extern double mlt_producer_get_fps( mlt_producer this );
55 extern int mlt_producer_set_in_and_out( mlt_producer this, mlt_position in, mlt_position out );
56 extern mlt_position mlt_producer_get_in( mlt_producer this );
57 extern mlt_position mlt_producer_get_out( mlt_producer this );
58 extern mlt_position mlt_producer_get_playtime( mlt_producer this );
59 extern mlt_position mlt_producer_get_length( mlt_producer this );
60 extern void mlt_producer_prepare_next( mlt_producer this );
61 extern void mlt_producer_close( mlt_producer this );
62
63 #endif