Commit e0424acb authored by luyikei's avatar luyikei

IMultiTrack: Implement a function to disable audio or video

parent e7b875f2
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#define IMULTITRACK_H #define IMULTITRACK_H
#include "IInput.h" #include "IInput.h"
#include "ITrack.h"
namespace Backend namespace Backend
{ {
...@@ -44,6 +45,7 @@ namespace Backend ...@@ -44,6 +45,7 @@ namespace Backend
virtual void addTransition( ITransition& transition, int aTrack = 0, int bTrack = 1 ) = 0; virtual void addTransition( ITransition& transition, int aTrack = 0, int bTrack = 1 ) = 0;
virtual void addFilter( IFilter& filter, int track = 0 ) = 0; virtual void addFilter( IFilter& filter, int track = 0 ) = 0;
virtual bool connect( IInput& input ) = 0; virtual bool connect( IInput& input ) = 0;
virtual void hide( HideType hideType, int index ) = 0;
}; };
} }
......
...@@ -139,3 +139,11 @@ MLTMultiTrack::connect( Backend::IInput& input ) ...@@ -139,3 +139,11 @@ MLTMultiTrack::connect( Backend::IInput& input )
assert( mltInput ); assert( mltInput );
return !tractor()->connect( *mltInput->producer() ); return !tractor()->connect( *mltInput->producer() );
} }
void
MLTMultiTrack::hide( Backend::HideType hydeType, int index )
{
auto prod = tractor()->track( index );
if ( prod )
prod->set( "hide", static_cast<int>( hydeType ) );
}
...@@ -58,6 +58,7 @@ namespace MLT ...@@ -58,6 +58,7 @@ namespace MLT
virtual void addTransition( ITransition& transition, int aTrack, int bTrack ) override; virtual void addTransition( ITransition& transition, int aTrack, int bTrack ) override;
virtual void addFilter( IFilter& filter, int track ) override; virtual void addFilter( IFilter& filter, int track ) override;
virtual bool connect( IInput& input ) override; virtual bool connect( IInput& input ) override;
virtual void hide( HideType hideType, int index ) override;
private: private:
Mlt::Tractor* m_tractor; Mlt::Tractor* m_tractor;
......
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