Commit 4e16dae8 authored by luyikei's avatar luyikei

MLTTrack: Implement replaceWithBlank

parent 4130bf78
......@@ -34,6 +34,7 @@ namespace Backend
virtual ~ITrack() = default;
virtual bool insertAt( IInput& input, int64_t startFrame ) = 0;
virtual void replaceWithBlank( int index ) = 0;
virtual bool append( IInput& input ) = 0;
virtual bool remove( int index ) = 0;
// src and dist are indexes.
......
......@@ -88,6 +88,13 @@ MLTTrack::insertAt( Backend::IInput& input, int64_t startFrame )
return !playlist()->insert_at( (int)startFrame, mltInput->producer(), 1 );
}
void
MLTTrack::replaceWithBlank( int index )
{
std::unique_ptr<Mlt::Producer> mltProducer( playlist()->replace_with_blank( index ) );
playlist()->consolidate_blanks( 0 );
}
bool
MLTTrack::append( Backend::IInput& input )
{
......
......@@ -52,6 +52,7 @@ 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 bool append( IInput& input ) override;
virtual bool remove( int index ) override;
virtual bool move( int src, int dist ) override;
......
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