OpenShot Library | libopenshot
0.2.2
|
Go to the documentation of this file.
33 #include "../../include/OpenShot.h"
39 int main(
int argc,
char *argv[])
50 ImageReader b2(
"/home/jonathan/Pictures/trees.jpg");
51 ImageReader b3(
"/home/jonathan/Pictures/clouds.jpg");
52 ImageReader b4(
"/home/jonathan/Pictures/minecraft.png");
53 ImageReader b5(
"/home/jonathan/Pictures/colorpgg03.jpg");
57 int background_frame = 0;
58 int background_id = 1;
102 std::shared_ptr<Frame> f =
t.GetFrame(x);
105 if (x != 0 && x % 30 == 0)
109 if (x != 0 && x % 60 == 0)
112 timeinfo = localtime ( &rawtime );
114 stringstream timestamp;
115 timestamp << asctime (timeinfo);
117 stringstream filename;
118 filename <<
"/home/jonathan/Pictures/screenshots/detailed/" << timestamp.str() <<
".jpeg";
119 f->Save(filename.str(), 1.0);
120 stringstream filename_small;
121 filename_small <<
"/home/jonathan/Pictures/screenshots/thumbs/" << timestamp.str() <<
".jpeg";
122 f->Save(filename_small.str(), 0.15);
133 if (background_frame == 300)
135 background_frame = 0;
136 switch (background_id)
169 cout <<
"JUMPING AHEAD to " << x <<
", background moved to " << (float(x) / 30.0f) << endl;
This namespace is the default namespace for all code in the openshot library.
This class represents a clip (used to arrange readers on the timeline)
This class represents a fraction.
@ GRAVITY_TOP
Align clip to the top center of its parent.
This class uses the Blackmagic Decklink libraries, to send video streams to Blackmagic devices.
This class represents a timeline.
This class uses the ImageMagick++ libraries, to open image files, and return openshot::Frame objects ...
void Open()
Open device and video stream - which is called by the constructor automatically.
ScaleType scale
The scale determines how a clip should be resized to fit it's parent.
void WriteFrame(std::shared_ptr< Frame > frame)
This method is required for all derived classes of WriterBase. Write a Frame to the video file.
This class uses the Blackmagic Decklink libraries, to open video streams on Blackmagic devices.
int main(int argc, char *argv[])
unsigned long GetCurrentFrameNumber()
GravityType gravity
The gravity of a clip determines where it snaps to it's parent.
@ SCALE_NONE
Do not scale the clip.