diff --git a/src/KeyFrame.cpp b/src/KeyFrame.cpp index 5d8d4b41..952cf818 100644 --- a/src/KeyFrame.cpp +++ b/src/KeyFrame.cpp @@ -81,10 +81,6 @@ void Keyframe::AddPoint(Point p) { // Set Handles (used for smooth curves). SetHandles(p); - - // Check if it needs to be processed - if (needs_update) - Process(); } // Add a new point on the key-frame, with some defaults set (BEZIER, AUTO Handles, etc...) diff --git a/src/examples/Example.cpp b/src/examples/Example.cpp index a21a4c6b..dac6c851 100644 --- a/src/examples/Example.cpp +++ b/src/examples/Example.cpp @@ -42,6 +42,33 @@ using namespace tr1; int main(int argc, char* argv[]) { + // Test getting lots of JSON + cout << "starting..." << endl; + + Json::Value root; + root = Json::Value(Json::arrayValue); + for (int outer = 0; outer < 1000; outer++) { + openshot::Keyframe k; + //cout << "creating " << outer << endl; + for (int z = 0; z<10; z++) { + openshot::Point p(z * 10, 1 * z * outer); + k.AddPoint(p); + } + root.append(k.JsonValue()); + } + //cout << root.toStyledString() << endl; + + // Test loading lots of JSON + for (int z = 0; z<1000; z++) { + //cout << "loading " << z << endl; + Json::Value keyframe_json = root[z]; + openshot::Keyframe k; + k.SetJsonValue(keyframe_json); + } + + cout << "Successfully ended" << endl; + return 0; + // Reader FFmpegReader r9("/home/jonathan/Videos/sintel_trailer-720p.mp4"); r9.Open();