6fc81ad77acaf69cbac595cf9de38f294a273fae
2 * \file mlt_properties.h
3 * \brief Properties class declaration
5 * Copyright (C) 2003-2008 Ushodaya Enterprises Limited
6 * \author Charles Yates <charles.yates@pandora.be>
7 * \author Dan Dennedy <dan@dennedy.org>
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.
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.
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
24 #ifndef _MLT_PROPERTIES_H_
25 #define _MLT_PROPERTIES_H_
27 #include "mlt_types.h"
28 #include "mlt_events.h"
31 /** \brief Properties class
33 * Properties is a combination list/dictionary of name/::mlt_property pairs.
34 * It is also a base class for many of the other MLT classes.
37 struct mlt_properties_s
39 void *child
; /**< \private the object of a subclass */
40 void *local
; /**< \private instance object */
42 /** the destructor virtual function */
44 void *close_object
; /**< the object supplied to the close virtual function */
47 extern int mlt_properties_init( mlt_properties
, void *child
);
48 extern mlt_properties
mlt_properties_new( );
49 extern mlt_properties
mlt_properties_load( const char *file
);
50 extern int mlt_properties_inc_ref( mlt_properties self
);
51 extern int mlt_properties_dec_ref( mlt_properties self
);
52 extern int mlt_properties_ref_count( mlt_properties self
);
53 extern void mlt_properties_mirror( mlt_properties self
, mlt_properties that
);
54 extern int mlt_properties_inherit( mlt_properties self
, mlt_properties that
);
55 extern int mlt_properties_pass( mlt_properties self
, mlt_properties that
, const char *prefix
);
56 extern void mlt_properties_pass_property( mlt_properties self
, mlt_properties that
, const char *name
);
57 extern int mlt_properties_pass_list( mlt_properties self
, mlt_properties that
, const char *list
);
58 extern int mlt_properties_set( mlt_properties self
, const char *name
, const char *value
);
59 extern int mlt_properties_set_or_default( mlt_properties self
, const char *name
, const char *value
, const char *def
);
60 extern int mlt_properties_parse( mlt_properties self
, const char *namevalue
);
61 extern char *mlt_properties_get( mlt_properties self
, const char *name
);
62 extern char *mlt_properties_get_name( mlt_properties self
, int index
);
63 extern char *mlt_properties_get_value( mlt_properties self
, int index
);
64 extern void *mlt_properties_get_data_at( mlt_properties self
, int index
, int *size
);
65 extern int mlt_properties_get_int( mlt_properties self
, const char *name
);
66 extern int mlt_properties_set_int( mlt_properties self
, const char *name
, int value
);
67 extern int64_t mlt_properties_get_int64( mlt_properties self
, const char *name
);
68 extern int mlt_properties_set_int64( mlt_properties self
, const char *name
, int64_t value
);
69 extern double mlt_properties_get_double( mlt_properties self
, const char *name
);
70 extern int mlt_properties_set_double( mlt_properties self
, const char *name
, double value
);
71 extern mlt_position
mlt_properties_get_position( mlt_properties self
, const char *name
);
72 extern int mlt_properties_set_position( mlt_properties self
, const char *name
, mlt_position value
);
73 extern int mlt_properties_set_data( mlt_properties self
, const char *name
, void *value
, int length
, mlt_destructor
, mlt_serialiser
);
74 extern void *mlt_properties_get_data( mlt_properties self
, const char *name
, int *length
);
75 extern int mlt_properties_rename( mlt_properties self
, const char *source
, const char *dest
);
76 extern int mlt_properties_count( mlt_properties self
);
77 extern void mlt_properties_dump( mlt_properties self
, FILE *output
);
78 extern void mlt_properties_debug( mlt_properties self
, const char *title
, FILE *output
);
79 extern int mlt_properties_save( mlt_properties
, const char * );
80 extern int mlt_properties_dir_list( mlt_properties
, const char *, const char *, int );
81 extern void mlt_properties_close( mlt_properties self
);
82 extern int mlt_properties_is_sequence( mlt_properties self
);
83 extern mlt_properties
mlt_properties_parse_yaml( const char *file
);
84 extern char *mlt_properties_serialise_yaml( mlt_properties self
);