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:
Jonathan Thomas
2013-07-31 16:18:54 -05:00
parent bcfbe60a4a
commit b8baaef658
19 changed files with 6542 additions and 1 deletions

View File

@@ -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();