28 #ifndef OPENSHOT_TIMELINE_H 29 #define OPENSHOT_TIMELINE_H 33 #include <QtGui/QImage> 34 #include <QtGui/QPainter> 150 list<Clip*> closing_clips;
151 map<Clip*, Clip*> open_clips;
152 list<EffectBase*> effects;
156 void add_layer(tr1::shared_ptr<Frame> new_frame,
Clip* source_clip,
long int clip_frame_number,
long int timeline_frame_number,
bool is_top_clip);
159 void apply_mapper_to_clip(
Clip* clip);
162 void apply_json_to_clips(Json::Value change)
throw(
InvalidJSONKey);
163 void apply_json_to_effects(Json::Value change)
throw(
InvalidJSONKey);
165 void apply_json_to_timeline(Json::Value change)
throw(
InvalidJSONKey);
168 float calculate_time(
long int number,
Fraction rate);
176 vector<Clip*> find_intersecting_clips(
long int requested_frame,
int number_of_frames,
bool include);
179 tr1::shared_ptr<Frame> GetOrCreateFrame(
Clip* clip,
long int number);
182 tr1::shared_ptr<Frame> apply_effects(tr1::shared_ptr<Frame> frame,
long int timeline_frame_number,
int layer);
185 bool isEqual(
double a,
double b);
194 void update_open_clips(
Clip *clip,
bool does_clip_intersect);
216 void ApplyMapperToClips();
225 list<Clip*>
Clips() {
return clips; };
231 list<EffectBase*>
Effects() {
return effects; };
257 string Name() {
return "Timeline"; };
262 Json::Value JsonValue();
276 void RemoveClip(
Clip* clip);
CacheBase * GetCache()
Get the cache object used by this reader.
Header file for Fraction class.
This abstract class is the base class, used by all effects in libopenshot.
Keyframe viewport_scale
Curve representing the scale of the viewport (0 to 100)
Header file for ReaderBase class.
bool AutoMapClips()
Determine if clips are automatically mapped to the timeline's framerate and samplerate.
Header file for OpenMPUtilities (set some common macros)
Header file for Point class.
This header includes all commonly used effects for libopenshot, for ease-of-use.
Keyframe viewport_y
Curve representing the y coordinate for the viewport.
This abstract class is the base class, used by all readers in libopenshot.
int Layer()
Get layer of clip on timeline (lower number is covered by higher numbers)
Exception when a reader is closed, and a frame is requested.
Header file for the Keyframe class.
Header file for CacheMemory class.
Exception for missing JSON Change key.
Header file for CacheBase class.
This class represents a clip (used to arrange readers on the timeline)
Header file for Frame class.
Exception for files that can not be found or opened.
Header file for Clip class.
float Position()
Get position on timeline (in seconds)
bool operator()(Clip *lhs, Clip *rhs)
This class represents a fraction.
Header file for the FrameMapper class.
All cache managers in libopenshot are based on this CacheBase class.
ChannelLayout
This enumeration determines the audio channel layout (such as stereo, mono, 5 point surround...
Header file for Color class.
void AutoMapClips(bool auto_map)
Automatically map all clips to the timeline's framerate and samplerate.
bool IsOpen()
Determine if reader is open or closed.
Exception for frames that are out of bounds.
This class represents a color (used on the timeline and clips)
This namespace is the default namespace for all code in the openshot library.
Header file for EffectBase class.
Exception for invalid JSON.
Keyframe viewport_x
Curve representing the x coordinate for the viewport.
Header file for CacheDisk class.
Header file for CrashHandler class.
Color color
Background color of timeline canvas.
string Name()
Return the type name of the class.
list< EffectBase * > Effects()
Return the list of effects on the timeline.
list< Clip * > Clips()
Return a list of clips on the timeline.
Header file for the EffectInfo class.
A Keyframe is a collection of Point instances, which is used to vary a number or property over time...
int Order()
Get the order that this effect should be executed.
bool operator()(EffectBase *lhs, EffectBase *rhs)
This class represents a timeline.