return mlt_properties_get_position( properties, "out" );
}
+/** Get the duration.
+ *
+ * \public \memberof mlt_filter_s
+ * \param self a filter
+ * \return the duration or zero if unlimited
+ */
+
+mlt_position mlt_filter_get_length( mlt_filter self )
+{
+ mlt_properties properties = MLT_SERVICE_PROPERTIES( &self->parent );
+ mlt_position in = mlt_properties_get_position( properties, "in" );
+ mlt_position out = mlt_properties_get_position( properties, "out" );
+ return ( out > 0 ) ? ( out - in + 1 ) : 0;
+}
+
/** Process the frame.
*
* \public \memberof mlt_filter_s
extern int mlt_filter_get_track( mlt_filter self );
extern mlt_position mlt_filter_get_in( mlt_filter self );
extern mlt_position mlt_filter_get_out( mlt_filter self );
+extern mlt_position mlt_filter_get_length( mlt_filter self );
extern void mlt_filter_close( mlt_filter );
#endif
return mlt_filter_get_out( get_filter( ) );
}
+int Filter::get_length( )
+{
+ return mlt_filter_get_length( get_filter( ) );
+}
+
int Filter::get_track( )
{
return mlt_filter_get_track( get_filter( ) );