Files
libopenshot/examples/Example.cpp

38 lines
854 B
C++
Raw Normal View History

/**
* @file
* @brief Source file for Example Executable (example app for libopenshot)
* @author Jonathan Thomas <jonathan@openshot.org>
*
* @ref License
*/
// Copyright (c) 2008-2019 OpenShot Studios, LLC
//
// SPDX-License-Identifier: LGPL-3.0-or-later
2011-10-11 08:44:27 -05:00
#include <fstream>
2011-10-11 08:44:27 -05:00
#include <iostream>
#include <memory>
#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;
int main(int argc, char* argv[]) {
// FFmpeg Reader performance test
FFmpegReader r9("/home/jonathan/Downloads/pts-test-files/broken-files/lady-talking-1.mp4");
r9.Open();
for (long int frame = 1; frame <= r9.info.video_length; frame++)
{
std::cout << "Requesting Frame: #: " << frame << std::endl;
std::shared_ptr<Frame> f = r9.GetFrame(frame);
}
r9.Close();
exit(0);
2019-08-05 02:54:59 -04:00
}