1 /** 2 * MltProducer.h - MLT Wrapper 3 * Copyright (C) 2004-2019 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_PRODUCER_H 21 #define MLTPP_PRODUCER_H 22 23 #include "MltConfig.h" 24 25 #include <framework/mlt.h> 26 27 #include "MltService.h" 28 29 namespace Mlt 30 { 31 class Service; 32 class Filter; 33 class Profile; 34 class Frame; 35 36 class MLTPP_DECLSPEC Producer : public Service 37 { 38 private: 39 mlt_producer instance; 40 Producer *parent_; 41 public: 42 Producer( ); 43 Producer( Profile& profile, const char *id, const char *service = NULL ); 44 Producer( mlt_profile profile, const char *id, const char *service = NULL ); 45 Producer( Service &producer ); 46 Producer( mlt_producer producer ); 47 Producer( Producer &producer ); 48 Producer( const Producer &producer ); 49 Producer( Producer *producer ); 50 virtual ~Producer( ); 51 Producer& operator=( const Producer &producer ); 52 virtual mlt_producer get_producer( ); 53 Producer &parent( ); 54 mlt_producer get_parent( ); 55 mlt_service get_service( ); 56 int seek( int position ); 57 int seek( const char* time ); 58 int position( ); 59 int frame( ); 60 char* frame_time( mlt_time_format = mlt_time_smpte_df ); 61 int set_speed( double speed ); 62 int pause( ); 63 double get_speed( ); 64 double get_fps( ); 65 int set_in_and_out( int in, int out ); 66 int get_in( ); 67 int get_out( ); 68 int get_length( ); 69 char* get_length_time( mlt_time_format = mlt_time_smpte_df ); 70 int get_playtime( ); 71 Producer *cut( int in = 0, int out = -1 ); 72 bool is_cut( ); 73 bool is_blank( ); 74 bool same_clip( Producer &that ); 75 bool runs_into( Producer &that ); 76 void optimise( ); 77 int clear( ); 78 int64_t get_creation_time( ); 79 void set_creation_time( int64_t creation_time ); 80 }; 81 } 82 83 #endif 84