/**
* \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 <charles.yates@pandora.be>
*
* This library is free software; you can redistribute it and/or
#include "mlt_frame.h"
#include "mlt_parser.h"
#include "mlt_profile.h"
+#include "mlt_log.h"
#include <stdio.h>
#include <string.h>
* \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 )
* \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 )
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.
*
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
#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 );