Commit Graph

201 Commits

Author SHA1 Message Date
Frank Dana
600e8844ee Merge branch 'develop' into add-features 2020-03-01 19:50:52 -05:00
Jonathan Thomas
5da706dc23 Bump dependency to OpenShotAudio to 0.2.0 2020-02-28 17:16:48 -06:00
Jonathan Thomas
4f591c7b94 Merge pull request #396 from ferdnyc/json-parsing
Behind-the-scenes code tidying for Json data handling
2020-02-27 15:32:05 -06:00
FeRD (Frank Dana)
7ab18fde9f Modernize FindUnitTest++.cmake, add pkg-config
The same old variables will be respected for setting the path, but the
PREFERRED method is defining `-DUnitTest++_ROOT=/path/to` on the
CMake command line. _ROOT variables are handled with extra intelligence
by CMake.

The find module will also attempt to locate the pkg-config file
UnitTest++.pc, and if found will import its data.
2020-02-26 05:28:14 -05:00
Frank Dana
96b4ac47c3 Clean up ENABLE/DISABLE_TESTS logic and handling 2020-02-26 05:28:13 -05:00
FeRD (Frank Dana)
85ca6c5744 CMake: Add features for docs, unit tests
- A new CMake option, ENABLE_TESTS, is created and defaults ON
  (Legacy -DDISABLE_TESTS=1 on the command line will override)
- Target info for docs and tests is shown in the FeatureSummary
2020-02-26 05:26:00 -05:00
FeRD (Frank Dana)
7867cf01b8 Reorder arguments in setVideoOptions overload
- 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
2020-02-14 11:53:28 -05:00
FeRD (Frank Dana)
bad0a34a65 Add unit test for overloads 2020-01-31 04:35:43 -05:00
Frank Dana
8ea7449363 Merge branch 'develop' into json-parsing 2020-01-20 15:25:40 -05:00
FeRD (Frank Dana)
6aa799cb51 FindRESVG: Modernize with targets 2020-01-08 16:45:19 -05:00
Jonathan Thomas
4cf322d21a Merge pull request #397 from ferdnyc/frame-copy
Frame: Copy has_audio_data correctly in DeepCopy
2020-01-02 17:45:32 -06:00
FeRD (Frank Dana)
f8d715ce76 tests: Don't use REQUIRE in unit tests
It's not supported in the older UnitTest++ version still in use on
Ubuntu Xenial.
2019-12-28 15:50:37 -05:00
FeRD (Frank Dana)
b1aff667e5 tests: Start Frame_Tests.cpp 2019-12-28 15:12:46 -05:00
FeRD (Frank Dana)
dc217a9bdf tests: Cast container.size() to int for comparison 2019-12-28 09:49:24 -05:00
FeRD (Frank Dana)
22bf6edfba Enhance Json data handling
- 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
2019-12-27 08:51:51 -05:00
Daniel Jour
89479bb01a Keyframe tests: Add test about large segment, including performance
This new test makes sure that a large segment is handled correctly and
also with reasonable performance.  The timeout of 10ms is still
relatively slow (on a mid-class laptop it takes 0.001ms currently) but
the test shouldn't fail when e.g. the build machine is under (mild to
heavy) load.
2019-12-06 01:35:31 +01:00
Daniel Jour
504fd0e3fa KeyFrame_Tests.cpp: Correct usage for CHECK_EQUAL
It's CHECK_EQUAL(expected, actual), not the other way around!
2019-11-24 21:12:33 +01:00
Daniel Jour
86c1df211a Update Keyframe test curve values; new curves are smoother
The curves generated by the new code are much smoother than the old
curves and align much better with what (at least gnuplot) says are the
"correct curves".  Some values therefore needed updating.
2019-11-24 21:00:37 +01:00
Daniel Jour
bd82403969 KeyFrame_Tests: Additional tests to correctly capture old behaviour 2019-11-22 22:34:22 +01:00
Daniel Jour
504ea0c1ff Make Keyframe::Values and Keyframe::Points vectors private
The Values vector should only be accessed from the outside through the
GetValue() function.  The Points vector should only be accessed using
the AddPoint(), RemovePoint(), .. functions.

This helps maintain internal invariants (e.g. keeping Points sorted)
and allows for future removal / lazy evaluation of Values.

The size() of the vectors had been accessed from various parts of the
code; the GetLength() (for Values) and GetCount() (for Points) member
functions provide access to this information and are already part of
the public API.
2019-11-19 23:43:28 +01:00
FeRD (Frank Dana)
750677c0c5 CMake: Manage sources and includes better
- Switch to AUTOMOC for Qt classes
- Eliminate globbing of source subdirs
- Call `include_directories()` in top-level CMakeLists
- Make header files PUBLIC library sources
- Make other sources PRIVATE
2019-11-04 03:59:34 -05:00
FeRD (Frank Dana)
dad3cad621 CMake: Switch to targets for Qt modules 2019-11-04 03:31:16 -05:00
Frank Dana
5c40094c08 Merge branch 'develop' into zmq-targets 2019-11-01 14:42:08 -04:00
Frank Dana
04724cfcd7 Merge branch 'develop' into zmq-targets 2019-10-30 05:01:24 -04:00
Frank Dana
2560409bb5 Merge branch 'develop' into system-jsoncpp 2019-10-30 03:24:32 -04:00