* 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...
- The `fmt` class member, which was of type AVFormat*, was really
just an unnecessary copy of `(AVFormatContext*)oc->oformat`.
But we were ASSIGNING into its members, which we were definitely
not supposed to be doing. (And in recent FFmpegs, now that
`AVFormat` has been `const`d, we can't.) It's gone; now we just
use `oc->oformat` anywhere we used to access `fmt`.
- The preprocessor macro to allocate a new _stream_ was a mess of
cross purposes: It did allocate a stream, but then it also
allocated a new AvCodecCtx on newer FFmpeg releases. Worse (and
always galling to me), it proceeded to assign to a variable
that WASN'T passed in to the macro, just taking it on faith that
it would only be used where that variable was defined. That's
just... ugh. So I broke it apart into two steps (stream creation
and context allocation), realized the stream creation code was
the same for all ffmpeg versions and didn't need to be a macro
at all, and now a 4-parameter, 6-line magical macro has been
replaced with a simple, zero-side-effect one-liner.
- I also cleaned up the add_video_stream() code to be more like
the add_audio_stream() code, since they were bad-different for
no discernible reason.
- Replace all juce::CriticalSection with std::recursive_mutex
- Replace all juce::AudioSampleBuffer with juce::AudioBuffer<float>
- Eliminate implicit reliance on 'using namespace juce;'
- Replace OpenShotAudio.h includes with targeted juce modules
* 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
* 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
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.
- Previously 'av_make_error_string' was defined in FFmpegUtilities.h
for the sole purpose of redefining `av_err2str()` as a call to that
function. `av_err2str()` was then used in our code, often in string
contexts where its output was cast to `std::string`.
- Since that was excessively circular, instead the function is named
`av_err2string()`, and it's used directly in contexts where a
std::string is expected.
- `av_err2str()` is still #defined as `av_err2string(...).c_str()`