1 /** 2 * MltAnimation.h - MLT Wrapper 3 * Copyright (C) 2015-2018 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_ANIMATION_H 21 #define MLTPP_ANIMATION_H 22 23 #include "MltConfig.h" 24 25 #include <framework/mlt.h> 26 27 namespace Mlt 28 { 29 class MLTPP_DECLSPEC Animation 30 { 31 private: 32 mlt_animation instance; 33 public: 34 Animation(); 35 Animation( mlt_animation animation ); 36 Animation( const Animation& ); 37 ~Animation(); 38 39 bool is_valid() const; 40 mlt_animation get_animation() const; 41 Animation& operator=( const Animation& ); 42 43 int length(); 44 int get_item( int position, bool& is_key, mlt_keyframe_type& ); 45 bool is_key( int position ); 46 mlt_keyframe_type keyframe_type( int position ); 47 int next_key( int position ); 48 int previous_key( int position ); 49 int key_count(); 50 int key_get( int index, int& frame, mlt_keyframe_type& ); 51 int key_get_frame( int index ); 52 mlt_keyframe_type key_get_type( int index ); 53 int key_set_type( int index, mlt_keyframe_type type ); 54 int key_set_frame( int index, int frame ); 55 void shift_frames( int shift ); 56 void set_length( int length ); 57 int remove( int position ); 58 void interpolate(); 59 char* serialize_cut( int in = -1, int out = -1 ); 60 char* serialize_cut( mlt_time_format format, int in = -1, int out = -1 ); 61 }; 62 } 63 64 #endif 65