Add doxygen documentation for mlt_profile, mlt_pool, mlt_repository, and mlt_factory.
[melted] / src / framework / mlt_filter.h
1 /**
2 * \file mlt_filter.h
3 * \brief abstraction for all filter services
4 * \see mlt_filter_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_FILTER_H_
25 #define _MLT_FILTER_H_
26
27 #include "mlt_service.h"
28
29 /** \brief Filter abstract service class
30 *
31 * A filter is a service that may modify the output of a single producer.
32 *
33 * \extends mlt_service_s
34 * \properties \em track the index of the track of a multitrack on which the filter is applied
35 */
36
37 struct mlt_filter_s
38 {
39 /** We're implementing service here */
40 struct mlt_service_s parent;
41
42 /** public virtual */
43 void ( *close )( mlt_filter );
44
45 /** protected filter method */
46 mlt_frame ( *process )( mlt_filter, mlt_frame );
47
48 /** Protected */
49 void *child;
50 };
51
52 #define MLT_FILTER_SERVICE( filter ) ( &( filter )->parent )
53 #define MLT_FILTER_PROPERTIES( filter ) MLT_SERVICE_PROPERTIES( MLT_FILTER_SERVICE( filter ) )
54
55 extern int mlt_filter_init( mlt_filter self, void *child );
56 extern mlt_filter mlt_filter_new( );
57 extern mlt_service mlt_filter_service( mlt_filter self );
58 extern mlt_properties mlt_filter_properties( mlt_filter self );
59 extern mlt_frame mlt_filter_process( mlt_filter self, mlt_frame that );
60 extern int mlt_filter_connect( mlt_filter self, mlt_service producer, int index );
61 extern void mlt_filter_set_in_and_out( mlt_filter self, mlt_position in, mlt_position out );
62 extern int mlt_filter_get_track( mlt_filter self );
63 extern mlt_position mlt_filter_get_in( mlt_filter self );
64 extern mlt_position mlt_filter_get_out( mlt_filter self );
65 extern void mlt_filter_close( mlt_filter );
66
67 #endif