Cleaned up timeline class a bit, and refactored some OpenMP multi-threading support. The timeline GetFrame() method can not fully support OpenMP at the moment, due to nested parallel regions in some conditional ImageMagick function calls. Also better protected the openshot::Clip.GetFrame() call.

This commit is contained in:
Jonathan Thomas
2015-03-15 02:28:28 -05:00
parent b07936e3b2
commit 88e65fecef
5 changed files with 157 additions and 194 deletions

View File

@@ -43,14 +43,24 @@ using namespace tr1;
int main(int argc, char* argv[])
{
Timeline t10(1280, 720, Fraction(24,1), 44100, 2);
t10.debug = false;
Clip c10("/home/jonathan/Videos/sintel_trailer-720p.mp4");
c10.rotation.AddPoint(1, 0.0);
c10.rotation.AddPoint(1000, 360.0);
c10.Open();
c10.Position(1.05);
Negate n;
c10.AddEffect(&n);
tr1::shared_ptr<Frame> f =c10.GetFrame(500);
f->Display();
// add clip to timeline
t10.AddClip(&c10);
for (int z = 0; z<1000; z++) {
t10.GetFrame(z);
cout << z << endl;
}
return 0;