Jonathan Thomas
1a44a6582c
Fixing mac unit test failures due to filesystem dependency again,ughh.
2026-02-24 13:05:39 -06:00
Jonathan Thomas
89350a0419
Setting has_static_image correctly when FFmpegReader opens image formats and a video_length == 1, so we have consistent behavior in OpenShot regardless of QtImageReader or FFmpegReader, when opening images.
2026-02-24 12:06:42 -06:00
Jonathan Thomas
7efc48006a
Modify all throw InvalidFile(...) callsites: each now has a distinct message string, and adding unit tests to verify this.
...
So a crash line will now be more like:
what(): FFmpegReader could not open media file. for file C:\...\TitleFileName%04d.png
instead of only File could not be opened.
2026-02-23 16:55:49 -06:00
Jonathan Thomas
b7c37b84e4
- Fix FFmpegReader first-frame black regression by anchoring PTS offset to video start (and correcting video offset to use packet PTS), so AAC preroll/skip-samples no longer shifts frame 1.
...
- Add examples/test_aac_preroll.mp4 fixture (small, deterministic AAC-preroll sample) for reproducing and testing the regression.
2026-02-15 15:22:11 -06:00
Jonathan Thomas
eea55982fd
FFmpegReader: add duration strategy modes and unify duration/frame calculations. This is a potentially breaking change, where we ensure all durations and video_length calculations coming from FFmpegReader are now fully consistent - even if we must slightly adjust a duration from the video or audio stream. This keeps the 2 attributes identical in meaning (video_length X FPS == duration, no exceptions). Unknown durations are no longer -1 video_length but 0, and 0 duration.
2025-12-08 17:07:21 -06:00
Jonathan Thomas
021c6ecc07
Adding unit tests to validate FFmpegReader, Clip, and Timeline frame accuracy of GIF files, plus GIF with time curves.
2025-09-12 22:57:26 -05:00
Jonathan Thomas
f544d84f48
Fixing memory leak on Clips, where we were not clearing cache on Close, or forcing Close on destruction. Especially noticeable on projects with a ton of clips. Tweaking unit tests to prevent crash due to new Clip destructor behavior when using stack variables.
2023-04-19 16:08:36 -05:00
Jonathan Thomas
4039851a66
Adding Invalid Codec exception to AV1 unittest
2022-11-16 17:11:30 -06:00
Jonathan Thomas
2c24d0ff32
Updating unit tests to ignore older versions of FFmpeg that do not support AV1 decoding.
2022-11-16 15:10:25 -06:00
Jonathan Thomas
58dc99d1f9
Fixing whitespacae
2022-11-15 14:52:13 -06:00
Jonathan Thomas
cbff18ad95
Update AV1 unit testing to verify pixel values, to ensure correct decoding
2022-11-15 14:33:03 -06:00
Jonathan Thomas
63ebc4f4f3
Adding test for AV1 sync verification on Windows builder
2022-11-14 12:03:33 -06:00
FeRD (Frank Dana)
677ed5f591
Tests: Switch test files to openshot_catch.h
2022-06-17 15:37:51 -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
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
FeRD (Frank Dana)
528919027c
Code formatting
2021-06-11 06:13:22 -04:00
FeRD (Frank Dana)
2a90aa09a9
ReaderBase: Make DisplayInfo testable
...
- The function now takes a pointer to the output stream it will
write to. The _default_ for that argument is a pointer to std::cout.
- Any unit tests which wish to test the functionality can capture
the output by passing an alternate buffer:
std::stringstream output;
reader.DisplayInfo(&output);
CHECK(output.str() == "Expected output");
2021-06-11 06:08:40 -04:00
FeRD (Frank Dana)
d9775d4a5e
Port unit tests to Catch2
2021-04-09 04:09:36 -04:00
FeRD (Frank Dana)
c68b16643e
Rename tests/*_Tests.cpp to tests/*.cpp
2021-04-07 23:41:04 -04:00