2013-09-12 23:41:49 -05:00
|
|
|
/**
|
|
|
|
|
* @file
|
2015-02-07 16:48:43 -06:00
|
|
|
* @brief Source file for Example Executable (example app for libopenshot)
|
2013-09-12 23:41:49 -05:00
|
|
|
* @author Jonathan Thomas <jonathan@openshot.org>
|
|
|
|
|
*
|
2019-06-09 08:31:04 -04:00
|
|
|
* @ref License
|
|
|
|
|
*/
|
|
|
|
|
|
2021-10-16 01:26:26 -04:00
|
|
|
// Copyright (c) 2008-2019 OpenShot Studios, LLC
|
|
|
|
|
//
|
|
|
|
|
// SPDX-License-Identifier: LGPL-3.0-or-later
|
2011-10-11 08:44:27 -05:00
|
|
|
|
2012-07-19 15:03:55 -05:00
|
|
|
#include <fstream>
|
2011-10-11 08:44:27 -05:00
|
|
|
#include <iostream>
|
2017-08-20 17:37:39 -05:00
|
|
|
#include <memory>
|
2021-03-31 19:35:58 -04:00
|
|
|
#include "Clip.h"
|
|
|
|
|
#include "Frame.h"
|
|
|
|
|
#include "FFmpegReader.h"
|
|
|
|
|
#include "Timeline.h"
|
2013-11-17 15:12:08 -06:00
|
|
|
|
2011-10-11 08:44:27 -05:00
|
|
|
using namespace openshot;
|
|
|
|
|
|
2015-06-01 00:20:14 -07:00
|
|
|
|
2017-08-01 01:19:07 -05:00
|
|
|
int main(int argc, char* argv[]) {
|
2016-02-23 00:27:03 -06:00
|
|
|
|
2021-02-17 19:44:44 -06:00
|
|
|
// FFmpeg Reader performance test
|
2022-07-27 15:33:40 -05:00
|
|
|
FFmpegReader r9("/home/jonathan/Downloads/pts-test-files/broken-files/lady-talking-1.mp4");
|
2018-03-04 03:10:59 -06:00
|
|
|
r9.Open();
|
2022-07-27 15:33:40 -05:00
|
|
|
for (long int frame = 1; frame <= r9.info.video_length; frame++)
|
2018-03-04 03:10:59 -06:00
|
|
|
{
|
2022-07-27 15:33:40 -05:00
|
|
|
std::cout << "Requesting Frame: #: " << frame << std::endl;
|
2021-02-17 19:44:44 -06:00
|
|
|
std::shared_ptr<Frame> f = r9.GetFrame(frame);
|
2017-08-20 17:37:39 -05:00
|
|
|
}
|
2018-03-04 03:10:59 -06:00
|
|
|
r9.Close();
|
|
|
|
|
|
2022-07-27 15:33:40 -05:00
|
|
|
exit(0);
|
2019-08-05 02:54:59 -04:00
|
|
|
}
|