You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
Incorporated JSON library (http://jsoncpp.sourceforge.net/) into project, and tweaked build rules and headers to successfully integrate it. licensed under MIT license.
This commit is contained in:
16
src/Main.cpp
16
src/Main.cpp
@@ -5,6 +5,7 @@
|
||||
#include <queue>
|
||||
#include <tr1/memory>
|
||||
#include "../include/OpenShot.h"
|
||||
#include "../include/Json.h"
|
||||
#include <omp.h>
|
||||
|
||||
using namespace openshot;
|
||||
@@ -18,6 +19,21 @@ void FrameReady(int number)
|
||||
int main()
|
||||
{
|
||||
|
||||
// JSON Test Code
|
||||
Json::Value root; // will contains the root value after parsing.
|
||||
Json::Reader reader;
|
||||
bool parsingSuccessful = reader.parse( "{\"age\":34, \"listy\" : [1, \"abc\" , 12.3, -4]}", root );
|
||||
if ( !parsingSuccessful )
|
||||
{
|
||||
// report to the user the failure and their locations in the document.
|
||||
std::cout << "Failed to parse configuration\n"
|
||||
<< reader.getFormatedErrorMessages();
|
||||
}
|
||||
|
||||
cout << root["listy"][2].asDouble() << endl;
|
||||
|
||||
return 0;
|
||||
|
||||
// Chunk writer example
|
||||
FFmpegReader *r1 = new FFmpegReader("/home/jonathan/Videos/sintel_trailer-720p.mp4");
|
||||
r1->Open();
|
||||
|
||||
Reference in New Issue
Block a user