/** Memory leak checks.
*/
-//#define _MLT_PROPERTY_CHECKS_
+//#define _MLT_PROPERTY_CHECKS_ 2
#ifdef _MLT_PROPERTY_CHECKS_
static int properties_created = 0;
return 0;
}
+/** Return the ref count of this object.
+*/
+
+int mlt_properties_ref_count( mlt_properties this )
+{
+ if ( this != NULL )
+ {
+ property_list *list = this->local;
+ return list->ref_count;
+ }
+ return 0;
+}
+
/** Allow the specification of a mirror.
*/
void mlt_properties_debug( mlt_properties this, char *title, FILE *output )
{
- fprintf( stderr, "%s: ", title );
+ fprintf( output, "%s: ", title );
if ( this != NULL )
{
property_list *list = this->local;
fprintf( output, ", %s=%p", list->name[ i ], mlt_properties_get_data( this, list->name[ i ], NULL ) );
fprintf( output, " ]" );
}
- fprintf( stderr, "\n" );
+ fprintf( output, "\n" );
}
/** Close the list.
property_list *list = this->local;
int index = 0;
-#ifdef _MLT_PROPERTY_CHECKS_
+#if _MLT_PROPERTY_CHECKS_ == 1
// Show debug info
mlt_properties_debug( this, "Closing", stderr );
+#endif
+#ifdef _MLT_PROPERTY_CHECKS_
// Increment destroyed count
properties_destroyed ++;