2 * MltProperties.cpp - MLT Wrapper
3 * Copyright (C) 2004-2005 Charles Yates
4 * Author: Charles Yates <charles.yates@pandora.be>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU Lesser General Public License as published
8 * by the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
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.
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.
21 #include "MltProperties.h"
24 PropertiesInstance
::PropertiesInstance( ) :
28 instance
= mlt_properties_new( );
31 PropertiesInstance
::PropertiesInstance( Properties
&properties
) :
33 instance( properties
.get_properties( ) )
37 PropertiesInstance
::PropertiesInstance( mlt_properties properties
) :
39 instance( properties
)
43 PropertiesInstance
::~PropertiesInstance( )
46 mlt_properties_close( instance
);
49 bool Properties
::is_valid( )
51 return get_properties( ) != NULL
;
54 int Properties
::count( )
56 return mlt_properties_count( get_properties( ) );
59 char *Properties
::get( char *name
)
61 return mlt_properties_get( get_properties( ), name
);
64 int Properties
::get_int( char *name
)
66 return mlt_properties_get_int( get_properties( ), name
);
69 double Properties
::get_double( char *name
)
71 return mlt_properties_get_double( get_properties( ), name
);
74 void *Properties
::get_data( char *name
, int &size
)
76 return mlt_properties_get_data( get_properties( ), name
, &size
);
79 int Properties
::set( char *name
, char *value
)
81 return mlt_properties_set( get_properties( ), name
, value
);
84 int Properties
::set( char *name
, int value
)
86 return mlt_properties_set_int( get_properties( ), name
, value
);
89 int Properties
::set( char *name
, double value
)
91 return mlt_properties_set_double( get_properties( ), name
, value
);
94 int Properties
::set( char *name
, void *value
, int size
, mlt_destructor destructor
, mlt_serialiser serialiser
)
96 return mlt_properties_set_data( get_properties( ), name
, value
, size
, destructor
, serialiser
);
99 mlt_properties PropertiesInstance
::get_properties( )