From 3e2991e189a71045210d8c97458c452d6c2f02da Mon Sep 17 00:00:00 2001 From: lilo_booter Date: Fri, 5 Nov 2004 11:51:05 +0000 Subject: [PATCH] Added cut related methods git-svn-id: https://mlt.svn.sourceforge.net/svnroot/mlt/trunk/mlt++@508 d19143bc-622f-0410-bfdd-b5b2a6649095 --- mlt++/src/MltProducer.cpp | 10 ++++++++++ mlt++/src/MltProducer.h | 2 ++ 2 files changed, 12 insertions(+), 0 deletions(-) diff --git a/mlt++/src/MltProducer.cpp b/mlt++/src/MltProducer.cpp index ab0527c..31ace14 100644 --- a/mlt++/src/MltProducer.cpp +++ b/mlt++/src/MltProducer.cpp @@ -70,6 +70,11 @@ mlt_producer Producer::get_producer( ) return instance; } +mlt_producer Producer::get_parent( ) +{ + return get_producer( ) != NULL && mlt_producer_cut_parent( get_producer( ) ) != NULL ? mlt_producer_cut_parent( get_producer( ) ) : get_producer( ); +} + mlt_service Producer::get_service( ) { return mlt_producer_service( get_producer( ) ); @@ -138,6 +143,11 @@ Producer *Producer::cut( int in, int out ) return result; } +bool Producer::is_cut( ) +{ + return mlt_producer_is_cut( get_producer( ) ); +} + bool Producer::same_clip( Producer &that ) { return mlt_producer_cut_parent( get_producer( ) ) == mlt_producer_cut_parent( that.get_producer( ) ); diff --git a/mlt++/src/MltProducer.h b/mlt++/src/MltProducer.h index ca8f1d9..3015285 100644 --- a/mlt++/src/MltProducer.h +++ b/mlt++/src/MltProducer.h @@ -42,6 +42,7 @@ namespace Mlt Producer( Producer &producer ); virtual ~Producer( ); virtual mlt_producer get_producer( ); + mlt_producer get_parent( ); mlt_service get_service( ); int seek( int position ); int position( ); @@ -55,6 +56,7 @@ namespace Mlt int get_length( ); int get_playtime( ); Producer *cut( int in = 0, int out = -1 ); + bool is_cut( ); bool same_clip( Producer &that ); bool runs_into( Producer &that ); }; -- 1.7.4.4