Constness changes
[melted] / src / framework / mlt_events.c
index 6732ebd..5c84190 100644 (file)
@@ -1,8 +1,9 @@
 /**
  * \file mlt_events.c
  * \brief event handling
+ * \see mlt_events_struct
  *
- * Copyright (C) 2004-2008 Ushodaya Enterprises Limited
+ * Copyright (C) 2004-2009 Ushodaya Enterprises Limited
  * \author Charles Yates <charles.yates@pandora.be>
  *
  * This library is free software; you can redistribute it and/or
@@ -117,8 +118,7 @@ void mlt_event_close( mlt_event this )
                if ( this->ref_count <= 0 )
                {
 #ifdef _MLT_EVENT_CHECKS_
-                       events_destroyed ++;
-                       fprintf( stderr, "Events created %d, destroyed %d\n", events_created, events_destroyed );
+                       mlt_log( NULL, MLT_LOG_DEBUG, "Events created %d, destroyed %d\n", events_created, ++events_destroyed );
 #endif
                        free( this );
                }
@@ -158,7 +158,7 @@ void mlt_events_init( mlt_properties this )
  * \return true if there was an error
  */
 
-int mlt_events_register( mlt_properties this, char *id, mlt_transmitter transmitter )
+int mlt_events_register( mlt_properties this, const char *id, mlt_transmitter transmitter )
 {
        int error = 1;
        mlt_events events = mlt_events_fetch( this );
@@ -183,7 +183,7 @@ int mlt_events_register( mlt_properties this, char *id, mlt_transmitter transmit
  * \param id the name of an event
  */
 
-void mlt_events_fire( mlt_properties this, char *id, ... )
+void mlt_events_fire( mlt_properties this, const char *id, ... )
 {
        mlt_events events = mlt_events_fetch( this );
        if ( events != NULL )
@@ -231,7 +231,7 @@ void mlt_events_fire( mlt_properties this, char *id, ... )
  * \return
  */
 
-mlt_event mlt_events_listen( mlt_properties this, void *service, char *id, mlt_listener listener )
+mlt_event mlt_events_listen( mlt_properties this, void *service, const char *id, mlt_listener listener )
 {
        mlt_event event = NULL;
        mlt_events events = mlt_events_fetch( this );
@@ -413,7 +413,7 @@ static void mlt_events_listen_for( mlt_properties this, condition_pair *pair )
  * \return an event
  */
 
-mlt_event mlt_events_setup_wait_for( mlt_properties this, char *id )
+mlt_event mlt_events_setup_wait_for( mlt_properties this, const char *id )
 {
        condition_pair *pair = malloc( sizeof( condition_pair ) );
        pair->done = 0;