2011-10-11 08:44:27 -05:00
|
|
|
|
|
|
|
|
#include <iostream>
|
|
|
|
|
#include <map>
|
|
|
|
|
#include <queue>
|
|
|
|
|
#include "../include/OpenShot.h"
|
|
|
|
|
|
|
|
|
|
using namespace openshot;
|
|
|
|
|
|
|
|
|
|
void FrameReady(int number)
|
|
|
|
|
{
|
|
|
|
|
cout << "Frame #: " << number << " is ready!" << endl;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int main()
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
// openshot::FFmpegReader r("/home/jonathan/Aptana Studio Workspace/OpenShotLibrary/src/examples/test.mp4");
|
|
|
|
|
// openshot::FFmpegReader r("/home/jonathan/Aptana Studio Workspace/OpenShotLibrary/src/examples/test1.mp4");
|
2011-10-24 17:32:26 -05:00
|
|
|
// openshot::FFmpegReader r("/home/jonathan/Videos/OpenShot_Now_In_3d.mp4");
|
2011-10-26 14:34:14 -05:00
|
|
|
// openshot::FFmpegReader r("/home/jonathan/Videos/sintel-1024-stereo.mp4");
|
2011-10-27 09:40:03 -05:00
|
|
|
// openshot::FFmpegReader r("/home/jonathan/Videos/sintel_trailer-720p.mp4");
|
|
|
|
|
// openshot::FFmpegReader r("/home/jonathan/Music/beat.wav");
|
|
|
|
|
openshot::FFmpegReader r("/home/jonathan/Music/lonely island/B004YRCAOO_(disc_1)_09_-_Shy_Ronnie_2__Ronnie_&_Clyde_[Expli.mp3");
|
2011-10-11 08:44:27 -05:00
|
|
|
// openshot::FFmpegReader r("/home/jonathan/Documents/OpenShot Art/bannertemplate.png");
|
|
|
|
|
// openshot::FFmpegReader r("/home/jonathan/Aptana Studio Workspace/OpenShotLibrary/src/examples/CMakeLists.txt");
|
|
|
|
|
// openshot::FFmpegReader r("/home/jonathan/Aptana Studio Workspace/OpenShotLibrary/src/examples/asdf.wdf");
|
|
|
|
|
|
|
|
|
|
// Display debug info
|
|
|
|
|
r.DisplayInfo();
|
|
|
|
|
|
2011-10-27 09:40:03 -05:00
|
|
|
for (int frame = 990; frame < 2000; frame++)
|
2011-10-25 00:20:26 -05:00
|
|
|
{
|
|
|
|
|
Frame f = r.GetFrame(frame);
|
|
|
|
|
f.Play();
|
|
|
|
|
f.DisplayWaveform(false);
|
|
|
|
|
}
|
2011-10-14 09:47:05 -05:00
|
|
|
|
|
|
|
|
//Player g;
|
|
|
|
|
//g.SetReader(&r);
|
2011-10-11 08:44:27 -05:00
|
|
|
//g.SetFrameCallback(&FrameReady);
|
2011-10-14 09:47:05 -05:00
|
|
|
//g.Play();
|
2011-10-11 08:44:27 -05:00
|
|
|
|
|
|
|
|
// Get a frame
|
|
|
|
|
//Frame f = r.GetFrame(300);
|
|
|
|
|
//f = r.GetFrame(301);
|
|
|
|
|
//f = r.GetFrame(302);
|
|
|
|
|
//f = r.GetFrame(303);
|
|
|
|
|
//f.Display();
|
|
|
|
|
//f.Play();
|
|
|
|
|
|
|
|
|
|
//f.Display();
|
|
|
|
|
r.Close();
|
|
|
|
|
|
|
|
|
|
cout << "Successfully executed Main.cpp!" << endl;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|