[vlmc-devel] MLTTrack: Implement replaceWithBlank
Hugo Beauzée-Luyssen
hugo at beauzee.fr
Fri Jul 29 15:24:54 CEST 2016
On 07/28/2016 02:39 PM, Yikai Lu wrote:
> vlmc | branch: master | Yikai Lu <luyikei.qmltu at gmail.com> | Thu Jul 28 20:57:17 2016 +0900| [4e16dae848732a1496673e0c5d66417b25011e2f] | committer: Yikai Lu
>
> MLTTrack: Implement replaceWithBlank
>
>> https://code.videolan.org/videolan/vlmc/commit/4e16dae848732a1496673e0c5d66417b25011e2f
> ---
>
> src/Backend/ITrack.h | 1 +
> src/Backend/MLT/MLTTrack.cpp | 7 +++++++
> src/Backend/MLT/MLTTrack.h | 1 +
> 3 files changed, 9 insertions(+)
>
> diff --git a/src/Backend/ITrack.h b/src/Backend/ITrack.h
> index 9e2b836..bf9b9d1 100644
> --- a/src/Backend/ITrack.h
> +++ b/src/Backend/ITrack.h
> @@ -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.
> diff --git a/src/Backend/MLT/MLTTrack.cpp b/src/Backend/MLT/MLTTrack.cpp
> index 033e0af..bf546f3 100644
> --- a/src/Backend/MLT/MLTTrack.cpp
> +++ b/src/Backend/MLT/MLTTrack.cpp
> @@ -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 )
> {
> diff --git a/src/Backend/MLT/MLTTrack.h b/src/Backend/MLT/MLTTrack.h
> index 1e77c7b..dadd543 100644
> --- a/src/Backend/MLT/MLTTrack.h
> +++ b/src/Backend/MLT/MLTTrack.h
> @@ -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;
>
> _______________________________________________
> Vlmc-devel mailing list
> Vlmc-devel at videolan.org
> https://mailman.videolan.org/listinfo/vlmc-devel
>
Out of curiosity, what's this method purpose? Or more specifically, I
suppose it's replacing a media with a blank area, but what's the
difference with deleting a media?
Regards,
More information about the Vlmc-devel
mailing list