Commit Graph

2394 Commits

Author SHA1 Message Date
FeRD (Frank Dana)
ef77a27f39 Remove Doxyfile.in template 2021-10-16 12:13:52 -04:00
FeRD (Frank Dana)
68a6c589e9 Docs: Switch from UseDoxygen to doxygen_add_docs
Since CMake 3.11, the supported method of integrating Doxygen into
CMake projects has been via the doxygen_add_docs() CMake function,
which (crucially) can be passed a target name to create and doesn't
rely on tons of hardcoding like our UseDoxygen.cmake and its
Doxyfile.in template did.

This means our docs (only) now require CMake 3.11 to generate, but it
allows Doxygen to be configured/used multiple times in the same CMake
configuration, removing a major barrier to superproject builds.
2021-10-16 12:13:28 -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
Jonathan Thomas
111026d8a1 Merge pull request #753 from OpenShot/anomorphic-fix
Support for anamorphic profiles, i.e. non-square pixels (including waveform fixes)
2021-10-08 16:08:38 -05:00
Jonathan Thomas
9c668e4de9 Merge pull request #752 from OpenShot/duration-detection-improvements
Better detection of duration, especially for audio-only files
2021-10-08 16:08:08 -05:00
Jonathan Thomas
4c171cc15c Merge pull request #751 from OpenShot/prevent-cache-crash
Prevent crash when smallest frame detected in memory object is NULL
2021-10-08 16:01:14 -05:00
Frank Dana
ce8b08238c Enable Win builds without unit tests (#750) 2021-10-08 12:59:57 -04:00
Frank Dana
8e663e7295 Include either Resvg or QtSVG, not both (#756) 2021-10-08 01:26:37 -04:00
Jonathan Thomas
15e5285206 Support for anamorphic profiles, i.e. non-square pixels. Fixes include Frame::Display, Frame::Save, and Timeline::SetMaxSize, all which had various issues. Added sample_aspect_ratio to FFmpegWriter, so the exported videos will continue to be anamorphic.
Also fixed some waveform issues, which were not appearing, or appearing squished, and sometimes containing gaps.
2021-10-07 13:45:16 -05:00
Jonathan Thomas
7fa3782bdb Better detection of duration, especially for audio-only files. Improved PTS offset detection (for when start_time is used), mainly things recorded from streams. Better bitrate detection as well. 2021-10-07 13:40:31 -05:00
Jonathan Thomas
2e8c74e8aa Prevent crash when smallest frame detected in memory object is NULL 2021-10-07 13:34:00 -05:00
Frank Dana
d78ac099d6 CodeQL fixes, take 2 (#745)
* Protect values against integer overflow

When the code multiplies integer values in an rvalue context before
it's stored in a larger type, the on-the-fly math is stored as int.
The value can overflow before it reaches the wider memory space.

To prevent this, we explicitly cast the result of the arithmetic
to the destination type.

Issues flagged by GitHub CodeQL.

* Apply these fixes correctly
2021-10-03 07:01:56 -04:00
Frank Dana
ac956f05f1 CI: Add Windows and macOS builds, unit testing (#734)
- Switch to Windows lld for linking (faster)
- Exclude generated protobuf sources from coverage
- When setting EXE, SHARED linker flags, also set MODULE
- Windows clang++ builds are disabled (libopenshot-audio breaks)
- Coverage collection is disabled on macOS and Windows (path issues)
2021-09-29 01:36:51 -04:00
Frank Dana
3d18347e71 Protect values against integer overflow (#743)
When the code multiplies integer values in an rvalue context before
it's stored in a larger type, the on-the-fly math is stored as int.
The value can overflow before it reaches the wider memory space.

To prevent this, we explicitly cast the result of the arithmetic
to the destination type.

Issues flagged by GitHub CodeQL.
2021-09-27 20:36:56 -04:00
Frank Dana
e2e3a54c02 Don't use right-aligned std::boolalpha (#742)
Turns out, macOS's libc++ doesn't apply fill padding / alignment
the same way other libs do. (Known issue due to ambiguity in the
standard.) https://timsong-cpp.github.io/lwg-issues/2703
2021-09-27 11:08:12 -04:00
Frank Dana
88d3011455 Unit tests: Use == to compare strings (#741)
When there's a mismatch, Catch2 will output the contents of both
strings rather than a meaningless .compare() numeric value.
2021-09-27 07:14:48 -04:00
Frank Dana
b8b55050dc Merge pull request #661 from ferdnyc/redirect-print-fxns
Make console-output functions redirectable; add operator<< for Fraction, Point, Coordinate; new KeyFrame::PrintPoints & PrintValues with unit tests
2021-09-26 23:16:49 -04:00
Frank Dana
34f1264219 Merge pull request #688 from ferdnyc/unbreak-timeline-cache
Revert final_cache size breakage to unbreak OpenShot caching
2021-09-23 08:51:51 -04:00
Frank Dana
d4d200f14b CMake: Set -DDEBUG for debug builds (#739) 2021-09-23 03:03:08 -04:00
Jonathan Thomas
7bed726411 Merge pull request #738 from OpenShot/fix-caption-with-no-clip
Protecting a caption effect with no Clip (i.e. effect added directly to timeline)
2021-09-22 22:01:44 -05:00
Jonathan Thomas
c128b6caf1 Protecting a caption effect with no Clip (i.e. effect added directly to timeline) 2021-09-22 16:09:20 -05:00
Frank Dana
d41c482cb2 CI: Fix Clang builds, coverage (#736) 2021-09-22 01:37:58 -04:00
dependabot[bot]
3df837944b Bump codecov/codecov-action from 2.0.3 to 2.1.0 (#733)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 2.0.3 to 2.1.0.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v2.0.3...v2.1.0)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-21 21:11:48 -04:00
FeRD (Frank Dana)
e45d798c90 Revert final_cache size breakage
Reverting the "Adjusting Timeline final_cache to match the video
caching thread max_frames, so one doesn't clobber the other." part of
a previous commit.

Setting the cache size in SetMaxSize() ignores OpenShot's cache
preferences. It prevents using a cache larger than the preview
buffer, which is often a desirable thing.

This partially reverts commit 0c4e1bcce4.
2021-09-20 09:20:48 -04:00
Frank Dana
62b7370b02 Add explicit QtSvg dependency (#731)
* Add explicit QtSvg dependency
* Add QtSvg to CI dependencies
2021-09-16 12:34:05 -04:00