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()
|
|
|
|
|
{
|
2012-07-09 00:41:17 -05:00
|
|
|
// openshot::FFmpegReader r("/home/jonathan/Apps/libopenshot/src/examples/test.mp4");
|
|
|
|
|
// openshot::FFmpegReader r("/home/jonathan/Apps/libopenshot/src/examples/test1.mp4");
|
2012-07-09 15:18:24 -05:00
|
|
|
openshot::FFmpegReader r("/home/jonathan/apps/libopenshot/src/examples/piano.wav");
|
|
|
|
|
// openshot::FFmpegReader r("/home/jonathan/Videos/sintel-1024-stereo.mp4");
|
2012-06-17 23:15:47 -05:00
|
|
|
// openshot::FFmpegReader r("/home/jonathan/Videos/00001.mts");
|
2012-07-07 00:58:05 -05:00
|
|
|
// openshot::FFmpegReader r("/home/jonathan/Videos/sintel_trailer-720p.mp4");
|
2011-12-11 20:42:50 -06:00
|
|
|
// openshot::FFmpegReader r("/home/jonathan/Aptana Studio Workspace/OpenShotLibrary/src/examples/piano.wav");
|
2012-07-08 23:26:44 -05:00
|
|
|
// openshot::FFmpegReader r("/home/jonathan/Music/Army of Lovers/Crucified/Army of Lovers - Crucified [Single Version].mp3");
|
2012-02-26 16:45:50 -06:00
|
|
|
// openshot::FFmpegReader r("/home/jonathan/Documents/OpenShot Art/test.jpeg");
|
2011-10-27 11:27:44 -05:00
|
|
|
// openshot::FFmpegReader r("/home/jonathan/Videos/60fps.mp4");
|
2011-10-11 08:44:27 -05:00
|
|
|
// openshot::FFmpegReader r("/home/jonathan/Aptana Studio Workspace/OpenShotLibrary/src/examples/asdf.wdf");
|
|
|
|
|
|
|
|
|
|
// Display debug info
|
|
|
|
|
r.DisplayInfo();
|
|
|
|
|
|
2012-07-07 00:58:05 -05:00
|
|
|
for (int repeat = 0; repeat <= 10; repeat++)
|
2011-10-25 00:20:26 -05:00
|
|
|
{
|
2012-07-03 16:58:07 -05:00
|
|
|
cout << "----------- REPEAT READER " << repeat << " ---------------" << endl;
|
2012-07-09 15:18:24 -05:00
|
|
|
for (int frame = 1; frame <= 400; frame++)
|
2012-07-03 16:58:07 -05:00
|
|
|
{
|
|
|
|
|
Frame f = r.GetFrame(frame);
|
2012-07-08 23:26:44 -05:00
|
|
|
f.Play();
|
|
|
|
|
f.Display();
|
|
|
|
|
f.DisplayWaveform(false);
|
2012-07-03 16:58:07 -05:00
|
|
|
}
|
|
|
|
|
|
2012-07-06 16:52:13 -05:00
|
|
|
cout << "SLEEPING..." << endl;
|
|
|
|
|
sleep(3);
|
2011-10-25 00:20:26 -05:00
|
|
|
}
|
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);
|
2011-12-11 20:42:50 -06:00
|
|
|
// f = r.GetFrame(301);
|
|
|
|
|
// f = r.GetFrame(302);
|
|
|
|
|
// f = r.GetFrame(303);
|
|
|
|
|
// f.Display();
|
|
|
|
|
// f.DisplayWaveform(false);
|
|
|
|
|
// f.Play();
|
2011-10-11 08:44:27 -05:00
|
|
|
|
|
|
|
|
r.Close();
|
|
|
|
|
|
|
|
|
|
cout << "Successfully executed Main.cpp!" << endl;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|