X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fframework%2Fmlt_producer.c;h=f43738bd0899eb21ce9cc94084e3063e8c5334e9;hb=93ba5329ea2cadd2ce01b4cceb20f1309fd37bed;hp=6646ed8d0a6acf5e0c14d6afdfdbbbc9b7fbecdb;hpb=793ea0cb67a2766b1294249a0b77508cfb93b35d;p=melted diff --git a/src/framework/mlt_producer.c b/src/framework/mlt_producer.c index 6646ed8..f43738b 100644 --- a/src/framework/mlt_producer.c +++ b/src/framework/mlt_producer.c @@ -1,8 +1,9 @@ /** * \file mlt_producer.c * \brief abstraction for all producer services + * \see mlt_producer_s * - * Copyright (C) 2003-2008 Ushodaya Enterprises Limited + * Copyright (C) 2003-2009 Ushodaya Enterprises Limited * \author Charles Yates * * This library is free software; you can redistribute it and/or @@ -25,6 +26,7 @@ #include "mlt_frame.h" #include "mlt_parser.h" #include "mlt_profile.h" +#include "mlt_log.h" #include #include @@ -50,7 +52,6 @@ static int producers_destroyed = 0; * \param this the producer structure to initialize * \param child a pointer to the child object for the subclass * \return true if there was an error - * \todo Document the special properties and events. */ int mlt_producer_init( mlt_producer this, void *child ) @@ -611,7 +612,7 @@ static int producer_get_frame( mlt_service service, mlt_frame_ptr frame, int ind char key[ 25 ]; sprintf( key, "_clone.%d", clone_index - 1 ); clone = mlt_properties_get_data( MLT_PRODUCER_PROPERTIES( mlt_producer_cut_parent( this ) ), key, NULL ); - if ( clone == NULL ) fprintf( stderr, "requested clone doesn't exist %d\n", clone_index ); + if ( clone == NULL ) mlt_log( service, MLT_LOG_ERROR, "requested clone doesn't exist %d\n", clone_index ); clone = clone == NULL ? this : clone; } else @@ -1017,11 +1018,8 @@ void mlt_producer_close( mlt_producer this ) #endif #ifdef _MLT_PRODUCER_CHECKS_ - // Increment destroyed count - producers_destroyed ++; - // Show current stats - these should match when the app is closed - fprintf( stderr, "Producers created %d, destroyed %d\n", producers_created, producers_destroyed ); + mlt_log( MLT_PRODUCER_SERVICE( this ), MLT_LOG_DEBUG, "Producers created %d, destroyed %d\n", producers_created, ++producers_destroyed ); #endif mlt_service_close( &this->parent );