Refactored the cache class to only apply the max frames against "previous" frames, and allow unlimited number of future frames, to account for different types of files (some which have hundreds of tiny frames, which need large future cache).

This commit is contained in:
Jonathan Thomas
2012-07-05 00:01:42 -05:00
parent 53e16efd63
commit 25b3d70a9a
5 changed files with 181 additions and 47 deletions

View File

@@ -14,9 +14,9 @@ void FrameReady(int number)
int main()
{
// openshot::FFmpegReader r("/home/jonathan/apps/libopenshot/src/examples/test.mp4");
// openshot::FFmpegReader r("/home/jonathan/apps/libopenshot/src/examples/test1.mp4");
// openshot::FFmpegReader r("/home/jonathan/apps/libopenshot/src/examples/piano.wav");
// openshot::FFmpegReader r("/home/jonathan/Apps/libopenshot/src/examples/test.mp4");
// openshot::FFmpegReader r("/home/jonathan/Apps/libopenshot/src/examples/test1.mp4");
// openshot::FFmpegReader r("/home/jonathan/Apps/libopenshot/src/examples/piano.wav");
// openshot::FFmpegReader r("/home/jonathan/Videos/sintel-1024-stereo.mp4");
// openshot::FFmpegReader r("/home/jonathan/Videos/00001.mts");
// openshot::FFmpegReader r("/home/jonathan/Videos/sintel_trailer-720p.mp4");
@@ -32,7 +32,7 @@ int main()
for (int repeat = 0; repeat <= 100; repeat++)
{
cout << "----------- REPEAT READER " << repeat << " ---------------" << endl;
for (int frame = 1; frame <= 100; frame++)
for (int frame = 300; frame <= 400; frame++)
{
Frame f = r.GetFrame(frame);
//f.Play();