Commit Graph

31 Commits

Author SHA1 Message Date
Jonathan Thomas
09ce05bbf2 Many improvements for smooth audio playback when 'time' keyframes are used for time remapping.
- Added new Frame::ReverseAudio() helper method - for time keyframe support playing backwards audio
- Fixed math rounding error on time keyframe Resampler, to use the rounded source samples value
- Removed some unused args and Frame audio methods
- Reset FrameMapper resample context when non-adjacent frames are requested
- Correctly reverse Frame audio if a time keyframe is present, and reversing audio
- Rewrite Keyframe::IsIncreasing() function, to give accurate direction of time keyframes at any index (special logic to support first and last indexes)
- Fixed Keyframe unit tests - since logic has changed a bit
- Improved time mapping unit tests
- Replace many c-style casts with static_cast
- Added new sine.wav test file
2023-03-10 01:15:14 -06:00
Jonathan Thomas
70e86ef044 Improved Profile Class (Helper methods, Sortable, Unit tests) (#895)
* Removing legacy profile property. Add new operators for Profile classes (for comparison). Also added new functions to generate different variations of the Profile data (key, short name, long name, long name w/description).

* Add empty constructor for Profile class, and new Profile unit tets

* Adding zero padding to profile Key function, for easier sorting: 01920x1080i2997_16:09

* Clear setfill flag after creating Key() output

* Updating example exe to load an *.osp project file via C++, which makes debugging complex broken projects much easier.

* - Add new unit test to FFmpegWriter to create an animated GIF and verify it can be wrapped with a FrameMapper (with no audio track)
- Improve FrameMapper to ignore missing audio data (i.e. when no audio samples present, don't try and find them or resample them)

* Fix some whitespace issues

* Fix inline documentation mistype

* Fixed missing reuse licensing on new example profile files

* Changing Profile::Key() format to exclude the : character, since Windows file names cannot contain that

* - Large memory leak fixed in FFmpegWriter when closing the video & audio contexts
- Reducing # of cached frames and rescalers to 1, since we no longer use OMP and this is unneeded - we need to refactor much of this code out eventually

* - Fixing whitespace issues
- Code clean-up / line wrapping / etc...
2023-02-02 16:29:38 -06:00
Jonathan Thomas
63ebc4f4f3 Adding test for AV1 sync verification on Windows builder 2022-11-14 12:03:33 -06:00
Jonathan Thomas
5ee38518da Experimental: Adding some fsanitize flags, a new example exe, a mutex on FFmpegReader::Close, and some additional clean-up code on AddImage (when a previous image exists) 2022-07-27 15:33:40 -05:00
Jonathan Thomas
7355ac3c55 Fix regression caused by https://github.com/OpenShot/libopenshot/pull/827, where we changed the class_name of Object Detector 2022-06-21 11:30:30 -05:00
Frank Dana
2d2a062bdc Remove (broken) BlackMagic DeckLink support (#760) 2021-10-20 06:49:08 -04:00
Frank Dana
59138ea3e4 Adopt license management via Reuse project/tool (#711)
* reuse-managed license/copyright headers

reuse is a tool for compliance with the REUSE recommendations. See
<https://reuse.software/> for more information, and
<https://reuse.readthedocs.io/> for the online documentation.

* Set jsoncpp license
* Add MIT license for Decklink sources
* Explicitly license examples/
  - Add headers to source files
  - Change blanket licensing in .reuse/dep5 to only cover binary media
  - Import CC-BY-3.0 license and assign to sintel_trailer
2021-10-16 01:26:26 -04:00
Brenno
d9e4f0450e Disabling Examples_opencv because it needs a deep refactor 2021-05-17 12:03:18 -03:00
Brenno
4d9d6ece9a Merge remote-tracking branch 'origin/develop' into effect-parenting 2021-04-21 13:34:49 -03:00
Frank Dana
4e4a95c648 Gitlab-CI: Update Windows builder configs, OpenShotAudio linking; enable Windows unit tests (#657)
* Remove no-longer-used cmake Modules

* Don't use OpenShot.h in ExampleHtml.cpp

When `#include`-ing the whole mess, building the file was leading
to what looked like out-of-memory errors. Replacing the monolithic
header with just the necessary ones cleared it up.

* .gitlab-ci.yml: Update for new Windows setup

* Make unit tests work under Windows

- Copying the built and depended (libopenshot-audio) DLLs into
  the unit test dir before building the tests ensures that when
  the test executables are run by the Catch.cmake module to
  discover their contents, the executables will find the DLLs
  they need in order to run.

* Gitlab-ci: Run unit tests on Windows

* Rename openshot-html-example

(The former name, openshot-html-test, was too close to the new
name format for all of our unit test executables, making things
unnecessarily confusing.)

* Rename JuceHeader.h to OpenShotAudio.h

* Github Actions: Install ALSA libs

With the switch to an EXPORTED CMake configuration for
libopenshot-audio, its dependencies become our dependencies.
Which means that CMake now correctly requires that the ALSA
libs be installed.
2021-04-19 15:59:52 -04:00
FeRD (Frank Dana)
d73da93fb5 Don't use OpenShot.h in OpenCV example 2021-04-18 00:32:03 -04:00
FeRD (Frank Dana)
c6aae47d50 Don't use OpenShot.h in ExampleHtml.cpp
When `#include`-ing the whole mess, building the file was leading
to what looked like out-of-memory errors. Replacing the monolithic
header with just the necessary ones cleared it up.
2021-04-17 21:28:43 -04:00
Brenno
99b5d1e7ab Fixed variable names and comments
thanks to Frank Dana
2021-04-12 21:18:21 -03:00
FeRD (Frank Dana)
c8c92b5c5d Merge branch 'develop' into effect-parenting 2021-04-10 19:26:22 -04:00
FeRD (Frank Dana)
8227a91502 Timeline: Add constructor accepting ReaderInfo 2021-03-31 20:20:16 -04:00
Brenno
8b861f0ff3 Merge remote-tracking branch 'origin/develop' into effect-parenting 2021-03-02 20:35:25 -03:00
Jonathan Thomas
8280e20aa5 Implementing Codacy improvements, removing some unused or pointless code 2021-02-18 18:07:07 -06:00
Jonathan Thomas
3daa5bdb7b Large refactor of OpenMP integration (or rather the removal of OpenMP on the Timeline and FFmpeg-related classes). The logic behind this decision, was based on profiling libopenshot and the amount of wasted CPU idle time on all the various threads. The slow code is still synchronous, and all the threads must wait on each other, adding additional overhead. So, removing lots of unneeded threads, and simplifying the underlying Timeline->Clip->FFmpegReader flow. Also, removed 2 calls to QPainter::drawImage, by improving the flexibility of Clip->GetFrame. 2021-02-17 19:44:44 -06:00
Jonathan Thomas
0c4e1bcce4 Improving performance after working with google-prof, to profile CPU. Calling OMP_MP_NUM_PROCESSORS less often, since it's quite expensive according to profiling. Adjusting Timeline final_cache to match the video caching thread max_frames, so one doesn't clobber the other. Also, fixing an issue with openshot-player, where a video file with no audio skips horribly. 2021-02-04 17:28:07 -06:00
Brenno
c0c2a82336 Merge branch 'develop' into keyframe-refactor 2021-02-01 14:22:41 -03:00
Jonathan Thomas
47afa205c7 Merge pull request #585 from OpenShot/opencv
3 New OpenCV Effects (Tracker, Stabilization, and Object Detection)
2021-01-28 17:28:15 -06:00
Jonathan Thomas
ea9e774f1e Fixing a big issue where SVG files are not correctly scaled to larger resolutions, for cases where the default size is smaller than the Timeline size (or preview size). Now SVG files are rescaled/re-rasterized larger when needed, and otherwise cached. 2021-01-28 15:46:39 -06:00
Brenno
a9d783c106 Updated include path on opencv examples 2020-11-28 18:01:58 -03:00
Brenno
1933d887e9 Fixed opencv example compilation on cmake 2020-11-28 18:00:38 -03:00
Brenno
01c9397b03 Merge remote-tracking branch 'origin/develop' into opencv 2020-10-27 21:30:24 -03:00