a0c3356fbc75348ddd8fcca32998e066a5714631
[melted] / 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 #include "mlt_filter.h"
26
27 /** The interface definition for all producers.
28 */
29
30 struct mlt_producer_s
31 {
32 // We're implementing service here
33 struct mlt_service_s parent;
34
35 // Public virtual methods
36 int ( *get_frame )( mlt_producer, mlt_frame_ptr, int );
37 mlt_destructor close;
38 void *close_object;
39
40 // Private data
41 void *local;
42 void *child;
43 };
44
45 /** Public final methods
46 */
47
48 extern int mlt_producer_init( mlt_producer self, void *child );
49 extern mlt_producer mlt_producer_new( );
50 extern mlt_service mlt_producer_service( mlt_producer self );
51 extern mlt_properties mlt_producer_properties( mlt_producer self );
52 extern int mlt_producer_seek( mlt_producer self, mlt_position position );
53 extern mlt_position mlt_producer_position( mlt_producer self );
54 extern mlt_position mlt_producer_frame( mlt_producer self );
55 extern int mlt_producer_set_speed( mlt_producer self, double speed );
56 extern double mlt_producer_get_speed( mlt_producer self );
57 extern double mlt_producer_get_fps( mlt_producer self );
58 extern int mlt_producer_set_in_and_out( mlt_producer self, mlt_position in, mlt_position out );
59 extern int mlt_producer_clear( mlt_producer self );
60 extern mlt_position mlt_producer_get_in( mlt_producer self );
61 extern mlt_position mlt_producer_get_out( mlt_producer self );
62 extern mlt_position mlt_producer_get_playtime( mlt_producer self );
63 extern mlt_position mlt_producer_get_length( mlt_producer self );
64 extern void mlt_producer_prepare_next( mlt_producer self );
65 extern int mlt_producer_attach( mlt_producer self, mlt_filter filter );
66 extern int mlt_producer_detach( mlt_producer self, mlt_filter filter );
67 extern mlt_filter mlt_producer_filter( mlt_producer self, int index );
68 extern mlt_producer mlt_producer_cut( mlt_producer self, int in, int out );
69 extern int mlt_producer_is_cut( mlt_producer self );
70 extern int mlt_producer_is_mix( mlt_producer self );
71 extern int mlt_producer_is_blank( mlt_producer self );
72 extern mlt_producer mlt_producer_cut_parent( mlt_producer self );
73 extern int mlt_producer_optimise( mlt_producer self );
74 extern void mlt_producer_close( mlt_producer self );
75
76 #endif