Commit Graph

128 Commits

Author SHA1 Message Date
FeRD (Frank Dana)
195b5762ee Make os_test use openshot-test target
By specifying `COMMAND openshot-test` for the custom target,
the path to the compiled executable is automatically used
and the openshot-test target is automatically made a dependency.
2019-04-06 20:09:20 -04:00
Jonathan Thomas
6e7b989b93 Removing policy experiment 2019-04-06 12:34:29 -05:00
Jonathan Thomas
496183ce90 change make test to make os_test (due to changes in cmake 3) 2019-04-06 11:05:59 -05:00
Jonathan Thomas
dbc6e8ec61 Attempt to fix cmake "test" reserved word error 2019-04-05 17:40:38 -05:00
Jonathan Thomas
b1f1df7dcd Attempt to fix cmake "test" reserved word error 2019-04-05 17:10:29 -05:00
FeRD (Frank Dana)
f26978d889 tests/CMakeLists.txt: Use generic PROJECT_SOURCE_DIR
(Previously it was using the variable `${openshot_SOURCE_DIR}`
which assumes the project name is "openshot" — but it changed.)
2019-04-05 01:08:38 -04:00
Jonathan Thomas
8f385c112a Improved Keyframe Performance (#197)
* Refactor of Coorindate and Keyframe optimized for performance (much faster than previously). Also refactored FrameMapper to not use a Keyframe, and to only process frame mapping when needed... speeding up Json loading of project files.

* Fixing FrameMapper linear calculation to match existing Keyframe calculation

* Fixing Keyframe to pass original unit tests, and correctly calculate the Keyframe repeat fractions and deltas.

* Small refactor of time mapped logic in Clip.cpp
2019-03-06 15:35:03 -06:00
Frank Dana
c4321f3f8e Some polishing for the cmake ReSVG discovery (#187)
* Search for libresvg.so in RESVGDIR also

This means that RESVGDIR can be pointed to the `target/release` dir 
where resvg was built, and both `libresvg.so` and `include/resvg.h` will 
be found.

* ReSVG: Fix up discovery module

`find_package_handle_standard_args` is supposed to set the `_FOUND` 
variable automatically (as the comment right above it says), as well as 
handling things like REQUIRED, QUIETLY, etc. It should always be run at 
the end of a module, for this reason.

This change removes the conditionals around the call, lets it handle 
what it's meant to handle, and defines a custom failure message for 
discovery that replaces the one in `src/CMakeList.txt`. 

In addition, the `REQRUIRED` is removed from `tests/CMakeLists.txt`, 
since it's _supposed_ to mark the module as required (which ReSVG is 
not), and was only working due to the aforementioned improper 
conditional wrapping of the module's cleanup.

* FindRESVG.cmake does not set RESVG_DEFINITIONS

Remove the comment that claims it does.
2019-01-24 13:43:40 -06:00
Jonathan Thomas
7b6eb9c21b Integration of resvg SVG library (optional during build) (#185)
* Integration of libresvg SVG library (optional during build)

* Major refactor of max_width and max_height for preview optimization

* Fixed many bugs related to preview resizing, with regards to cached frames

* Updating gitlab CI to find RESVGDIR correctly for windows, and adding svgz support

* Updating cmake findresvg module to search for windows locations first, to prevent an issue on our windows builders and updating some CMake output.

* Removing folder path from resvg header, since it could be installed in different named folders. This is an attempt to fix Windows include issues.

* Making call to AV_FREE_FRAME conditional for non windows systems (because it crashes on Windows for seemingly no reason). Needs more investigation.
2019-01-19 02:18:52 -06:00
Frank Dana
a49979ebf8 tests/CMakeLists: Use same dependencies as src/ (#163)
* tests/CMakeFiles: Use FFMpeg like src/

* Use system jsoncpp in tests, too

The tests/ build needs to use the same jsoncpp as the src/ build,
or tests in Clip_Tests.cpp can fail.

* Don't show FFMpeg version messages in tests/

Displaying the version-number messages twice seems like overkill
2019-01-14 15:25:33 -06:00
Jonathan Thomas
13bd272ead Adding new settings class to be used for changing realtime settings used by libopenshot, such as scaling mode for preview vs final render, or hardware decode, etc... 2019-01-09 16:50:40 -06:00
Jonathan Thomas
e879188a7d FFmpeg 3 & 4 support, Travis CI support, OpenMP schedule change (#160)
* FFmpeg4 support. Compile warnings fixes. Credit goes to many people, including ferdnyc, peterM, and other awesome folks!

* Adding environment checking to enable/disable omp taskwait after each video/audio frame is processed. This is experimental for some users with crashes.

* Moving `omp taskwait` to after the ProcessVideoPacket() method, since that is the only place it is useful.

* Fixing crashes on missing Clip source file, and changing FFmpeg scaling algorthm from SWS_BILINEAR to  SWS_LANCZOS (for higher quality scaling)

* Update FindFFmpeg.cmake module, and updating build script. Also enabling debug builds.

* Updating experimental travis build script

* Fixed unit test for newer version of FFmpeg (audio resampling)

* Experimental travis multiple jobs

* Adding OMP schedule hint (thanks PeterM), which prevents crashes in some circumstances.
2018-09-11 00:40:31 -05:00
Jonathan Thomas
d8aa28ba6e Adding python bindings to GitLab build artifacts (to prevent install target on build server) (#119)
* Make python install target overridable via env variable

* Fixing audio unit tests

* Making linux builds automatic again

* Another attempt to collect python installed files as artifacts

* Changing python windows powershell syntax

* Testing new powershell syntax
2018-06-17 10:29:17 -07:00
Jonathan Thomas
f46f06fa42 Fixing audio unit tests 2018-05-18 00:25:08 -05:00
Jonathan Thomas
2233496066 Changing some Seek values to be more accurate, and fixes a race condition with Timeline_Tests.cpp. Also increasing the default amount of cache in FFmpeg, based on the # of processors, to better support high framerate videos. 2018-04-14 16:25:13 -05:00
Jonathan Thomas
774eb365b3 FFMPEG 3.2 support for FFmpegReader (writer support coming soon) 2018-03-21 02:10:46 -05:00
Jonathan Thomas
92eefbe934 Merge pull request #45 from sbraz/testmedia
Properly set test media files path, fixes #36
2018-03-04 00:08:37 -06:00
Jonathan Thomas
7b13001bf7 Fixing assignement and copy operators on Frame class (to prevent crashes for unintiailized image and audio pointers), and ensuring both copy and assignment operators work as expected. Also fixing the color property of Frames, which was being lost on some constructors. 2018-01-21 23:49:07 -06:00
Louis Sautier
ef21871e30 Properly set test media files path, fixes #36
This overrides TEST_MEDIA_PATH so that it is no longer set to
"../../src/examples/"
2018-01-08 14:47:01 +01:00
Dr. Tobias Quathamer
4190bad952 Add missing type cast 2017-11-18 14:10:02 +01:00
Jonathan Thomas
2fcb35ddcc Removing throw statements from header files (thanks Peter) 2017-10-26 18:44:35 -05:00
Jonathan Thomas
c95db460d6 Big update! Updating all "long int" frame number types to int64_t, so all 3 OSes will produce the same depth and precision on frame numbers. Also removing variable bitrate support temporarily, since it causes more problems than it solves. 2017-09-28 16:03:01 -05:00
Jonathan Thomas
f12ffe692b Migrating tr1 to std, adding C++11 support to build scripts, fixing crash in FFmpegReader (caused by shared_ptr, buffer, and last_video_frame corruption). Much improved stability with this change. Thanks to Craig and Peter for the help! 2017-08-20 17:37:39 -05:00
Nelson Ho
47a63afeb7 Updated test expectations for new audio sample rate fixes for proper number of samples per frame, even for the first output frame. 2017-01-07 20:29:42 -05:00
Jonathan Thomas
ff77af11bb -DDISABLE_TESTS=1 now disables the entire "make test" target, and does not require unittest++ to be a build dependency 2016-12-13 17:17:21 -06:00