X-Git-Url: http://research.m1stereo.tv/gitweb?a=blobdiff_plain;f=src%2Fframework%2Fmlt_producer.c;h=2a6a4875b3ee81206cd4722cb4edf460c638086c;hb=51f99c29759e71318c4c575f8a68cf1b5d1c5137;hp=6f00734fa67d9ff59ea618df611c2ec0a57c22fc;hpb=e5fd66367b6f976e3bcb0ada98408afcb40cb2ce;p=melted diff --git a/src/framework/mlt_producer.c b/src/framework/mlt_producer.c index 6f00734..2a6a487 100644 --- a/src/framework/mlt_producer.c +++ b/src/framework/mlt_producer.c @@ -25,6 +25,7 @@ #include "mlt_frame.h" #include "mlt_parser.h" #include "mlt_profile.h" +#include "mlt_log.h" #include #include @@ -50,7 +51,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 ) @@ -266,6 +266,7 @@ mlt_service mlt_producer_service( mlt_producer this ) * \public \memberof mlt_producer_s * \param this a producer * \return the producer's property list + * \see MLT_PRODUCER_PROPERTIES */ mlt_properties mlt_producer_properties( mlt_producer this ) @@ -488,7 +489,7 @@ mlt_position mlt_producer_get_playtime( mlt_producer this ) return mlt_producer_get_out( this ) - mlt_producer_get_in( this ) + 1; } -/** Get the total length of the producer. +/** Get the total, unedited length of the producer. * * The value returned by a live streaming producer is unknown. * @@ -610,7 +611,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 @@ -1016,11 +1017,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 );