1 /**
2  * @file
3  * @brief Header file for Timeline class
4  * @author Jonathan Thomas <jonathan@openshot.org>
5  *
6  * @ref License
7  */
8 
9 /* LICENSE
10  *
11  * Copyright (c) 2008-2019 OpenShot Studios, LLC
12  * <http://www.openshotstudios.com/>. This file is part of
13  * OpenShot Library (libopenshot), an open-source project dedicated to
14  * delivering high quality video editing and animation solutions to the
15  * world. For more information visit <http://www.openshot.org/>.
16  *
17  * OpenShot Library (libopenshot) is free software: you can redistribute it
18  * and/or modify it under the terms of the GNU Lesser General Public License
19  * as published by the Free Software Foundation, either version 3 of the
20  * License, or (at your option) any later version.
21  *
22  * OpenShot Library (libopenshot) is distributed in the hope that it will be
23  * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
24  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25  * GNU Lesser General Public License for more details.
26  *
27  * You should have received a copy of the GNU Lesser General Public License
28  * along with OpenShot Library. If not, see <http://www.gnu.org/licenses/>.
29  */
30 
31 #ifndef OPENSHOT_TIMELINE_BASE_H
32 #define OPENSHOT_TIMELINE_BASE_H
33 
34 #include <cstdint>
35 
36 
37 namespace openshot {
38     /**
39      * @brief This struct contains info about the current Timeline clip instance
40      *
41      * When the Timeline requests an openshot::Frame instance from a Clip, it passes
42      * this struct along, with some additional details from the Timeline, such as if this clip is
43      * above or below overlapping clips, etc... This info can help determine if a Clip should apply
44      * global effects from the Timeline, such as a global Transition/Mask effect.
45      */
46     struct TimelineInfoStruct
47     {
48         bool is_top_clip;                 ///< Is clip on top (if overlapping another clip)
49     };
50 
51 	/**
52 	 * @brief This class represents a timeline (used for building generic timeline implementations)
53 	 */
54 	class TimelineBase {
55 
56 	public:
57 		int preview_width; ///< Optional preview width of timeline image. If your preview window is smaller than the timeline, it's recommended to set this.
58 		int preview_height; ///< Optional preview width of timeline image. If your preview window is smaller than the timeline, it's recommended to set this.
59 
60 		/// Constructor for the base timeline
61 		TimelineBase();
62 
63 		/// This function will be overloaded in the Timeline class passing no arguments
64 		/// so we'll be able to access the Timeline::Clips() function from a pointer object of
65 		/// the TimelineBase class
66 		virtual void Clips(int test);
67 	};
68 }
69 
70 #endif
71