Properties::Properties( Properties &properties ) :
instance( properties.get_properties( ) )
{
- fprintf( stderr, "Incrementing ref count on properties #1\n" );
inc_ref( );
}
Properties::Properties( mlt_properties properties ) :
instance( properties )
{
- fprintf( stderr, "Incrementing ref count on properties #2\n" );
inc_ref( );
}
return mlt_properties_dec_ref( get_properties( ) );
}
+int Properties::ref_count( )
+{
+ return mlt_properties_ref_count( get_properties( ) );
+}
+
void Properties::block( void *object )
{
mlt_events_block( get_properties( ), object );
mlt_events_unblock( get_properties( ), object );
}
+void Properties::fire_event( const char *event )
+{
+ mlt_events_fire( get_properties( ), ( char * )event, NULL );
+}
+
bool Properties::is_valid( )
{
return get_properties( ) != NULL;
virtual ~Properties( );
int inc_ref( );
int dec_ref( );
+ int ref_count( );
void block( void *object = NULL );
void unblock( void *object = NULL );
+ void fire_event( const char *event );
bool is_valid( );
int count( );
char *get( char *name );
#include "MltField.h"
#include "MltTransition.h"
#include "MltFilter.h"
+#include "MltPlaylist.h"
using namespace Mlt;
Tractor::Tractor( ) :
mlt_field_plant_filter( mlt_tractor_field( get_tractor( ) ), filter->get_filter( ), track );
}
+bool Tractor::locate_cut( Producer *producer, int &track, int &cut )
+{
+ bool found = false;
+
+ for ( track = 0; producer != NULL && !found && track < count( ); track ++ )
+ {
+ Playlist playlist( ( mlt_playlist )mlt_tractor_get_track( get_tractor( ), track ) );
+ for ( cut = 0; !found && cut < playlist.count( ); cut ++ )
+ {
+ Producer *clip = playlist.get_clip( cut );
+ found = producer->get_producer( ) == clip->get_producer( );
+ delete clip;
+ }
+ }
+
+ track --;
+ cut --;
+
+ return found;
+}
void plant_transition( Transition *transition, int a_track = 0, int b_track = 1 );
void plant_filter( Filter &filter, int track = 0 );
void plant_filter( Filter *filter, int track = 0 );
+ bool locate_cut( Producer *producer, int &track, int &cut );
};
}