src/framework/mlt_properties.c
authorlilo_booter <lilo_booter@d19143bc-622f-0410-bfdd-b5b2a6649095>
Fri, 26 Aug 2005 10:56:26 +0000 (10:56 +0000)
committerlilo_booter <lilo_booter@d19143bc-622f-0410-bfdd-b5b2a6649095>
Fri, 26 Aug 2005 10:56:26 +0000 (10:56 +0000)
src/framework/mlt_properties.h
+ Added get and set for int64_t

src/framework/mlt_property.h
+ Corrected int64_t

git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt@811 d19143bc-622f-0410-bfdd-b5b2a6649095

src/framework/mlt_properties.c
src/framework/mlt_properties.h
src/framework/mlt_property.h

index 18452dd..9fd2025 100644 (file)
@@ -593,6 +593,37 @@ int mlt_properties_set_int( mlt_properties this, const char *name, int value )
 /** Get a value associated to the name.
 */
 
+int64_t mlt_properties_get_int64( mlt_properties this, const char *name )
+{
+       mlt_property value = mlt_properties_find( this, name );
+       return value == NULL ? 0 : mlt_property_get_int64( value );
+}
+
+/** Set a value associated to the name.
+*/
+
+int mlt_properties_set_int64( mlt_properties this, const char *name, int64_t value )
+{
+       int error = 1;
+
+       // Fetch the property to work with
+       mlt_property property = mlt_properties_fetch( this, name );
+
+       // Set it if not NULL
+       if ( property != NULL )
+       {
+               error = mlt_property_set_int64( property, value );
+               mlt_properties_do_mirror( this, name );
+       }
+
+       mlt_events_fire( this, "property-changed", name, NULL );
+
+       return error;
+}
+
+/** Get a value associated to the name.
+*/
+
 double mlt_properties_get_double( mlt_properties this, const char *name )
 {
        mlt_property value = mlt_properties_find( this, name );
index b6a90d7..e1e84e0 100644 (file)
@@ -60,6 +60,8 @@ extern char *mlt_properties_get_value( mlt_properties self, int index );
 extern void *mlt_properties_get_data_at( mlt_properties self, int index, int *size );
 extern int mlt_properties_get_int( mlt_properties self, const char *name );
 extern int mlt_properties_set_int( mlt_properties self, const char *name, int value );
+extern int64_t mlt_properties_get_int64( mlt_properties self, const char *name );
+extern int mlt_properties_set_int64( mlt_properties self, const char *name, int64_t value );
 extern double mlt_properties_get_double( mlt_properties self, const char *name );
 extern int mlt_properties_set_double( mlt_properties self, const char *name, double value );
 extern mlt_position mlt_properties_get_position( mlt_properties self, const char *name );
index 493839d..8b6a0e9 100644 (file)
@@ -70,7 +70,7 @@ extern mlt_property mlt_property_init( );
 extern int mlt_property_set_int( mlt_property self, int value );
 extern int mlt_property_set_double( mlt_property self, double value );
 extern int mlt_property_set_position( mlt_property self, mlt_position value );
-extern int mlt_property_set_uint64( mlt_property self, uint64_t value );
+extern int mlt_property_set_int64( mlt_property self, int64_t value );
 extern int mlt_property_set_string( mlt_property self, const char *value );
 extern int mlt_property_set_data( mlt_property self, void *value, int length, mlt_destructor destructor, mlt_serialiser serialiser );
 extern int mlt_property_get_int( mlt_property self );