From 2d02e73eb917576fb4502e2104e85cba760f0d8d Mon Sep 17 00:00:00 2001 From: lilo_booter Date: Fri, 8 Oct 2004 09:26:48 +0000 Subject: [PATCH] Same and following clip identification git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt++@470 d19143bc-622f-0410-bfdd-b5b2a6649095 --- mlt++/src/MltProducer.cpp | 11 ++++++++++- mlt++/src/MltProducer.h | 2 ++ 2 files changed, 12 insertions(+), 1 deletions(-) diff --git a/mlt++/src/MltProducer.cpp b/mlt++/src/MltProducer.cpp index cb1f1c4..ab0527c 100644 --- a/mlt++/src/MltProducer.cpp +++ b/mlt++/src/MltProducer.cpp @@ -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 ); +} diff --git a/mlt++/src/MltProducer.h b/mlt++/src/MltProducer.h index 59e7b14..ca8f1d9 100644 --- a/mlt++/src/MltProducer.h +++ b/mlt++/src/MltProducer.h @@ -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 ); }; } -- 1.7.4.4