1 /** 2 * MltChain.h - Chain wrapper 3 * Copyright (C) 2020 Meltytech, LLC 4 * 5 * This library is free software; you can redistribute it and/or 6 * modify it under the terms of the GNU Lesser General Public 7 * License as published by the Free Software Foundation; either 8 * version 2.1 of the License, or (at your option) any later version. 9 * 10 * This library is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 13 * Lesser General Public License for more details. 14 * 15 * You should have received a copy of the GNU Lesser General Public 16 * License along with this library; if not, write to the Free Software 17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 18 */ 19 20 #ifndef MLTPP_CHAIN_H 21 #define MLTPP_CHAIN_H 22 23 #include "MltConfig.h" 24 25 #include <framework/mlt.h> 26 27 #include "MltLink.h" 28 #include "MltProducer.h" 29 #include "MltProfile.h" 30 31 namespace Mlt 32 { 33 class MLTPP_DECLSPEC Chain : public Producer 34 { 35 private: 36 mlt_chain instance; 37 public: 38 Chain( ); 39 Chain( Profile& profile, const char *id, const char *service = NULL ); 40 Chain( Mlt::Profile& profile ); 41 Chain( mlt_chain chain ); 42 Chain( Chain& chain ); 43 Chain( Chain* chain ); 44 Chain( Service& chain ); 45 virtual ~Chain( ); 46 virtual mlt_chain get_chain( ); 47 mlt_producer get_producer( ); 48 void set_source( Mlt::Producer& source ); 49 Mlt::Producer get_source( ); 50 int attach( Mlt::Link& link ); 51 int detach( Mlt::Link& link ); 52 int link_count() const; 53 bool move_link( int from, int to ); 54 Mlt::Link* link( int index ); 55 }; 56 } 57 58 #endif 59 60