]> git.sesse.net Git - mlt/blob - src/framework/mlt_properties.h
Mlt Ref Counts and Playlist split/join
[mlt] / src / framework / mlt_properties.h
1 /*
2  * mlt_properties.h -- base properties class
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_PROPERTIES_H_
22 #define _MLT_PROPERTIES_H_
23
24 #include "mlt_types.h"
25 #include <stdio.h>
26
27 /** The properties base class defines the basic property propagation and
28         handling.
29 */
30
31 struct mlt_properties_s
32 {
33         void *child;
34         void *local;
35         mlt_destructor close;
36         void *close_object;
37 };
38
39 /** Public interface.
40 */
41
42 extern int mlt_properties_init( mlt_properties, void *child );
43 extern mlt_properties mlt_properties_new( );
44 extern mlt_properties mlt_properties_load( char *file );
45 extern int mlt_properties_inc_ref( mlt_properties self );
46 extern int mlt_properties_dec_ref( mlt_properties self );
47 extern void mlt_properties_mirror( mlt_properties self, mlt_properties that );
48 extern int mlt_properties_inherit( mlt_properties self, mlt_properties that );
49 extern int mlt_properties_pass( mlt_properties self, mlt_properties that, char *prefix );
50 extern int mlt_properties_set( mlt_properties self, char *name, char *value );
51 extern int mlt_properties_set_or_default( mlt_properties self, char *name, char *value, char *def );
52 extern int mlt_properties_parse( mlt_properties self, char *namevalue );
53 extern char *mlt_properties_get( mlt_properties self, char *name );
54 extern char *mlt_properties_get_name( mlt_properties self, int index );
55 extern char *mlt_properties_get_value( mlt_properties self, int index );
56 extern void *mlt_properties_get_data_at( mlt_properties self, int index, int *size );
57 extern int mlt_properties_get_int( mlt_properties self, char *name );
58 extern int mlt_properties_set_int( mlt_properties self, char *name, int value );
59 extern double mlt_properties_get_double( mlt_properties self, char *name );
60 extern int mlt_properties_set_double( mlt_properties self, char *name, double value );
61 extern mlt_position mlt_properties_get_position( mlt_properties self, char *name );
62 extern int mlt_properties_set_position( mlt_properties self, char *name, mlt_position value );
63 extern int mlt_properties_set_data( mlt_properties self, char *name, void *value, int length, mlt_destructor, mlt_serialiser );
64 extern void *mlt_properties_get_data( mlt_properties self, char *name, int *length );
65 extern int mlt_properties_rename( mlt_properties self, char *source, char *dest );
66 extern int mlt_properties_count( mlt_properties self );
67 extern void mlt_properties_dump( mlt_properties self, FILE *output );
68 extern void mlt_properties_debug( mlt_properties self, char *title, FILE *output );
69 extern void mlt_properties_close( mlt_properties self );
70
71 #endif