The CMake process will pick up Qt's Qt5Core_VERSION_STRING and
stick it in a cache variable (with forced updating each run),
and a new `#define` in the header exports it to the library and
to the Python bindings so that it can be queried at runtime.
BaseException is a python standard library exception class, so it's
not a great idea to redefine that name in our bindings. Renamed
to ExceptionBase, which is more in keeping with our class naming
system anyway.
- Reduced crazy-long line lengths by moving trailing comments to
previous line
- Added more openshot:: prefixing, which causes Doxygen to link to
the referenced object's documentation. (It doesn't always pick
up cross-class links, without the prefix.)
- The new ordering (with the frame rate AFTER width and height) doesn't
match the other signature, but it *is* consistent with the Timeline
constructor, and it just feels more natural
- Added overloaded-function notes to doxygen strings in FFmpegWriter.h
- Also added a warning about the argument order mismatch above
Add a new #define HAVE_HW_ACCEL, which is only set on FFmpeg 3.4+,
and use that to restrict the use of hw-accel features, leaving
IS_FFMPEG_3_2 to determine only whether code is compatible with
FFmpeg 3.2+.
- Parsing from string to Json::Value is now done by utility function
openshot::stringToJson() in Json.cpp, all SetJson() methods call it.
- Expand use of const member functions and args where appropriate.
- Use std::to_string() to format int/float values as strings.
- Correct mentions of nonexistent Json::JsonValue type in docstrings
A few headers contained #defines that were intended to work around
issues with the JUCE library headers, but those things are best
handled in other ways.
- GetValue() calculates the value at the given position now ondemand,
without caching values as previously. First, it uses binary search
to find the segment (start and end point) containing the given
position. Constant and linear interpolation are straightforward,
bezier curves are calculating by binary search between the end
points until a point on the curve is found with a X coordinate close
enough to the given position. That points Y coordinate is returned.
- IsIncreasing(), GetRepeatFraction(), GetDelta() use GetValue()
instead of accessing the (removed) Values vector.
- Removed now unused private functions, and the unused public
Process().
First test results show good performance improvements for the
"rendering case" (setting up the keyframe points at once, then getting
all values) and drastic performance improvements for the "preview
case" (changing keyframe points, mixed with getting values).
Returning a non constant reference is not possible; this allows
outside code to invalidate internal invariants (sorted order of
points) by modifying the returned point. To make updates the current
best approach is to remove the point by index, and then add it again.