return 0;
}
-/** Allow the specification of a mirror.
+/** Mirror properties set on 'this' to 'that'.
*/
void mlt_properties_mirror( mlt_properties this, mlt_properties that )
return 0;
}
+
/** Locate a property by name
*/
return property;
}
+/** Pass property 'name' from 'that' to 'this'
+* Who to blame: Zach <zachary.drew@gmail.com>
+*/
+
+void mlt_properties_pass_property( mlt_properties this, mlt_properties that, const char *name )
+{
+ // Make sure the source property isn't null.
+ mlt_property that_prop = mlt_properties_find( that, name );
+ if( that_prop == NULL )
+ return;
+
+ mlt_property_pass( mlt_properties_fetch( this, name ), that_prop );
+}
+
+/** Pass all properties from 'that' to 'this' as found in comma seperated 'list'.
+* Who to blame: Zach <zachary.drew@gmail.com>
+*/
+
+int mlt_properties_pass_list( mlt_properties this, mlt_properties that, const char *list )
+{
+ char *props = strdup( list );
+ char *ptr = props;
+ char *delim = " ,\t\n"; // Any combination of spaces, commas, tabs, and newlines
+ int count, done = 0;
+
+ while( !done )
+ {
+ count = strcspn( ptr, delim );
+
+ if( ptr[count] == '\0' )
+ done = 1;
+ else
+ ptr[count] = '\0'; // Make it a real string
+
+ mlt_properties_pass_property( this, that, ptr );
+
+ ptr += count + 1;
+ ptr += strspn( ptr, delim );
+ }
+
+ free( props );
+
+ return 0;
+}
+
+
/** Set the property.
*/
/** 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 );