Commit 166f5128 authored by luyikei's avatar luyikei

MLTBackend: Rename replaceWithBlank to remove

parent 85c26318
......@@ -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;
......
......@@ -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 );
......@@ -103,14 +103,6 @@ MLTTrack::append( Backend::IInput& input )
return !playlist()->append( *mltInput->producer() );
}
bool
MLTTrack::remove( int index )
{
auto ret = playlist()->remove( index );
playlist()->consolidate_blanks( 0 );
return !ret;
}
bool
MLTTrack::move( int src, int dist )
{
......
......@@ -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;
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment