31 #ifndef OPENSHOT_CLIP_H 32 #define OPENSHOT_CLIP_H 36 #include <QtGui/QImage> 47 #include "JuceHeader.h" 102 std::list<openshot::EffectBase*> effects;
106 juce::AudioSampleBuffer *audio_cache;
116 int64_t adjust_frame_number_minimum(int64_t frame_number);
119 std::shared_ptr<openshot::Frame> apply_effects(std::shared_ptr<openshot::Frame> frame);
122 std::string get_file_extension(std::string
path);
125 std::shared_ptr<openshot::Frame> GetOrCreateFrame(int64_t number);
128 void get_time_mapped_frame(std::shared_ptr<openshot::Frame> frame, int64_t frame_number);
131 void init_settings();
134 void init_reader_rotation();
140 void reverse_buffer(juce::AudioSampleBuffer* buffer);
171 std::list<openshot::EffectBase*>
Effects() {
return effects; };
177 std::shared_ptr<openshot::Frame> GetFrame(int64_t requested_frame);
191 void End(
float value) { end = value; }
194 std::string Json()
const override;
195 void SetJson(
const std::string value);
196 Json::Value JsonValue()
const override;
197 void SetJsonValue(
const Json::Value root);
201 std::string PropertiesJSON(int64_t requested_frame)
const override;
Header file for Fraction class.
Header file for ClipBase class.
This abstract class is the base class, used by all effects in libopenshot.
openshot::Keyframe perspective_c4_y
Curves representing Y for coordinate 4.
openshot::Keyframe time
Curve representing the frames over time to play (used for speed and direction of video) ...
openshot::Color wave_color
Curve representing the color of the audio wave form.
openshot::Keyframe has_video
An optional override to determine if this clip has video (-1=undefined, 0=no, 1=yes) ...
openshot::Keyframe perspective_c3_x
Curves representing X for coordinate 3.
Header file for ReaderBase class.
openshot::Keyframe location_y
Curve representing the relative Y position in percent based on the gravity (-1 to 1) ...
This header includes all commonly used effects for libopenshot, for ease-of-use.
openshot::Keyframe crop_x
Curve representing X offset in percent (-1.0=-100%, 0.0=0%, 1.0=100%)
bool operator()(openshot::EffectBase *lhs, openshot::EffectBase *rhs)
VolumeMixType
This enumeration determines the strategy when mixing audio with other clips.
openshot::GravityType gravity
The gravity of a clip determines where it snaps to its parent.
ScaleType
This enumeration determines how clips are scaled to fit their parent container.
openshot::Keyframe scale_x
Curve representing the horizontal scaling in percent (0 to 1)
This abstract class is the base class, used by all readers in libopenshot.
openshot::FrameDisplayType display
The format to display the frame number (if any)
openshot::Keyframe volume
Curve representing the volume (0 to 1)
openshot::Keyframe scale_y
Curve representing the vertical scaling in percent (0 to 1)
Header file for the Keyframe class.
openshot::Keyframe shear_x
Curve representing X shear angle in degrees (-45.0=left, 45.0=right)
std::list< openshot::EffectBase * > Effects()
Return the list of effects on the timeline.
This class represents a clip (used to arrange readers on the timeline)
bool Waveform()
Waveform property.
openshot::Keyframe channel_filter
Audio channel filter and mappings.
Header file for AudioResampler class.
openshot::Keyframe alpha
Curve representing the alpha (1 to 0)
FrameDisplayType
This enumeration determines the display format of the clip's frame number (if any). Useful for debugging.
openshot::Keyframe rotation
Curve representing the rotation (0 to 360)
openshot::Keyframe perspective_c1_x
Curves representing X for coordinate 1.
openshot::Keyframe has_audio
Override has_video and has_audio properties of clip (and their readers)
void End(float value)
Set end position (in seconds) of clip (trim end of video)
This abstract class is the base class, used by all clips in libopenshot.
openshot::Keyframe perspective_c4_x
Curves representing X for coordinate 4.
openshot::Keyframe perspective_c1_y
Curves representing Y for coordinate 1.
openshot::Keyframe channel_mapping
A number representing an audio channel to output (only works when filtering a channel) ...
openshot::Keyframe perspective_c2_x
Curves representing X for coordinate 2.
openshot::Keyframe perspective_c3_y
Curves representing Y for coordinate 3.
int Order() const
Get the order that this effect should be executed.
Header file for Color class.
AnchorType
This enumeration determines what parent a clip should be aligned to.
This class represents a color (used on the timeline and clips)
Header file for TextReader class.
This namespace is the default namespace for all code in the openshot library.
Header file for EffectBase class.
juce::CriticalSection getFrameCriticalSection
Section lock for multiple threads.
openshot::ScaleType scale
The scale determines how a clip should be resized to fit its parent.
openshot::GravityType crop_gravity
Cropping needs to have a gravity to determine what side we are cropping.
openshot::Keyframe crop_y
Curve representing Y offset in percent (-1.0=-100%, 0.0=0%, 1.0=100%)
openshot::Keyframe shear_y
Curve representing Y shear angle in degrees (-45.0=down, 45.0=up)
openshot::Keyframe location_x
Curve representing the relative X position in percent based on the gravity (-1 to 1) ...
float Position() const
Get position on timeline (in seconds)
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...
void Waveform(bool value)
Set the waveform property of this clip.
openshot::VolumeMixType mixing
What strategy should be followed when mixing audio with other clips.
openshot::AnchorType anchor
The anchor determines what parent a clip should snap to.
openshot::Keyframe crop_width
Curve representing width in percent (0.0=0%, 1.0=100%)
openshot::Keyframe crop_height
Curve representing height in percent (0.0=0%, 1.0=100%)
GravityType
This enumeration determines how clips are aligned to their parent container.
int Layer() const
Get layer of clip on timeline (lower number is covered by higher numbers)
openshot::Keyframe perspective_c2_y
Curves representing Y for coordinate 2.
This class is used to resample audio data for many sequential frames.