Same and following clip identification
authorlilo_booter <lilo_booter@d19143bc-622f-0410-bfdd-b5b2a6649095>
Fri, 8 Oct 2004 09:26:48 +0000 (09:26 +0000)
committerlilo_booter <lilo_booter@d19143bc-622f-0410-bfdd-b5b2a6649095>
Fri, 8 Oct 2004 09:26:48 +0000 (09:26 +0000)
git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt++@470 d19143bc-622f-0410-bfdd-b5b2a6649095

mlt++/src/MltProducer.cpp
mlt++/src/MltProducer.h

index cb1f1c4..ab0527c 100644 (file)
@@ -39,7 +39,7 @@ Producer::Producer( char *id, char *service ) :
 Producer::Producer( Service &producer ) :
        instance( NULL )
 {
-       service_type type = producer.type( );
+       mlt_service_type type = producer.type( );
        if ( type == producer_type || type == playlist_type || 
                 type == tractor_type || type == multitrack_type )
        {
@@ -138,3 +138,12 @@ Producer *Producer::cut( int in, int out )
        return result;
 }
 
+bool Producer::same_clip( Producer &that )
+{
+       return mlt_producer_cut_parent( get_producer( ) ) == mlt_producer_cut_parent( that.get_producer( ) );
+}
+
+bool Producer::runs_into( Producer &that )
+{
+       return same_clip( that ) && get_out( ) == ( that.get_in( ) - 1 );
+}
index 59e7b14..ca8f1d9 100644 (file)
@@ -55,6 +55,8 @@ namespace Mlt
                        int get_length( );
                        int get_playtime( );
                        Producer *cut( int in = 0, int out = -1 );
+                       bool same_clip( Producer &that );
+                       bool runs_into( Producer &that );
        };
 }