Added new clip method that returns all properties for a given frame in JSON.

This commit is contained in:
Jonathan Thomas
2015-02-09 22:41:42 -06:00
parent 5290d0177b
commit 5145abdacb
4 changed files with 78 additions and 0 deletions

View File

@@ -102,6 +102,9 @@ namespace openshot {
/// Adjust frame number minimum value
int adjust_frame_number_minimum(int frame_number);
/// Generate JSON for a property
Json::Value add_property_json(string name, float value, string type, string memo, bool contains_point, float min_value, float max_value, bool readonly);
/// Get file extension
string get_file_extension(string path);
@@ -159,6 +162,9 @@ namespace openshot {
Json::Value JsonValue(); ///< Generate Json::JsonValue for this object
void SetJsonValue(Json::Value root); ///< Load Json::JsonValue into this object
/// Get all properties for a specific frame
string PropertiesJSON(int requested_frame);
/// Waveform property
bool Waveform() { return waveform; } ///< Get the waveform property of this clip
void Waveform(bool value) { waveform = value; } ///< Set the waveform property of this clip

View File

@@ -107,6 +107,9 @@ namespace openshot {
/// Add a new point on the key-frame, with a specific interpolation type
void AddPoint(float x, float y, InterpolationType interpolate);
/// Does this keyframe contain a specific point
bool Contains(Point p);
/// Set the handles, used for smooth curves. The handles are based on the surrounding points.
void SetHandles(Point current);