[vlmc-devel] MLTBackend: Rename replaceWithBlank to remove

Yikai Lu git at videolan.org
Fri Jul 29 18:14:20 CEST 2016


vlmc | branch: master | Yikai Lu <luyikei.qmltu at gmail.com> | Sat Jul 30 00:05:08 2016 +0900| [166f512855b672409bcb078112980aedaf945b4d] | committer: Yikai Lu

MLTBackend: Rename replaceWithBlank to remove

> https://code.videolan.org/videolan/vlmc/commit/166f512855b672409bcb078112980aedaf945b4d
---

 src/Backend/ITrack.h           |  3 +--
 src/Backend/MLT/MLTTrack.cpp   | 10 +---------
 src/Backend/MLT/MLTTrack.h     |  3 +--
 src/Workflow/TrackWorkflow.cpp |  2 +-
 4 files changed, 4 insertions(+), 14 deletions(-)

diff --git a/src/Backend/ITrack.h b/src/Backend/ITrack.h
index 1f2570e..1793193 100644
--- a/src/Backend/ITrack.h
+++ b/src/Backend/ITrack.h
@@ -34,9 +34,8 @@ namespace Backend
         virtual ~ITrack() = default;
 
         virtual bool        insertAt( IInput& input, int64_t startFrame ) = 0;
-        virtual void        replaceWithBlank( int index ) = 0;
+        virtual void        remove( int index ) = 0;
         virtual bool        append( IInput& input ) = 0;
-        virtual bool        remove( int index ) = 0;
         // src and dist are frames.
         virtual bool        move( int src, int dist ) = 0;
         virtual IInput*     clip( int index ) const = 0;
diff --git a/src/Backend/MLT/MLTTrack.cpp b/src/Backend/MLT/MLTTrack.cpp
index 89fc96a..a92338c 100644
--- a/src/Backend/MLT/MLTTrack.cpp
+++ b/src/Backend/MLT/MLTTrack.cpp
@@ -89,7 +89,7 @@ MLTTrack::insertAt( Backend::IInput& input, int64_t startFrame )
 }
 
 void
-MLTTrack::replaceWithBlank( int index )
+MLTTrack::remove( int index )
 {
     std::unique_ptr<Mlt::Producer> mltProducer( playlist()->replace_with_blank( index ) );
     playlist()->consolidate_blanks( 0 );
@@ -104,14 +104,6 @@ MLTTrack::append( Backend::IInput& input )
 }
 
 bool
-MLTTrack::remove( int index )
-{
-    auto ret = playlist()->remove( index );
-    playlist()->consolidate_blanks( 0 );
-    return !ret;
-}
-
-bool
 MLTTrack::move( int src, int dist )
 {
     std::unique_ptr<Mlt::Producer> prod(
diff --git a/src/Backend/MLT/MLTTrack.h b/src/Backend/MLT/MLTTrack.h
index dadd543..f23b1fc 100644
--- a/src/Backend/MLT/MLTTrack.h
+++ b/src/Backend/MLT/MLTTrack.h
@@ -52,9 +52,8 @@ class MLTTrack : public ITrack, public MLTInput
         virtual Mlt::Producer*  producer() const override;
 
         virtual bool        insertAt( IInput& input, int64_t startFrame ) override;
-        virtual void        replaceWithBlank( int index ) override;
+        virtual void        remove( int index ) override;
         virtual bool        append( IInput& input ) override;
-        virtual bool        remove( int index ) override;
         virtual bool        move( int src, int dist ) override;
         virtual IInput*  clip( int index ) const override;
         virtual IInput*  clipAt( int64_t position ) const override;
diff --git a/src/Workflow/TrackWorkflow.cpp b/src/Workflow/TrackWorkflow.cpp
index 7dc6a57..b78803d 100644
--- a/src/Workflow/TrackWorkflow.cpp
+++ b/src/Workflow/TrackWorkflow.cpp
@@ -194,7 +194,7 @@ TrackWorkflow::removeClip( const QUuid& id )
         {
             auto    clip = it.value();
             auto    track = trackFromFormats( clip->formats() );
-            track->replaceWithBlank( track->clipIndexAt( it.key() ) );
+            track->remove( track->clipIndexAt( it.key() ) );
             m_clips.erase( it );
             clip->disconnect( this );
             return clip;



More information about the Vlmc-devel mailing list