Commit Graph

106 Commits

Author SHA1 Message Date
FeRD (Frank Dana)
fe58e8028d Move some headers around 2021-11-01 11:04:31 -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
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
fbe0242837 FFmpeg: Create, use av_err2string() (#689)
- 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()`
2021-08-11 03:58:45 -04:00
FeRD (Frank Dana)
528919027c Code formatting 2021-06-11 06:13:22 -04:00
FeRD (Frank Dana)
9d79b394c4 Make remaining print functions testable 2021-06-11 06:10:12 -04:00
Jonathan Thomas
1dba02f5b0 Added new unit test which distributes audio samples between many different framerates (30/1, 24/1, 30000/1001, 119/4), and fixes a huge issue with mapping frame numbers incorrectly causing audio crackles/pops. Also fixes a bug which causes crashes on NON-STEREO channel layouts. 2021-04-08 22:34:48 -05:00
FeRD (Frank Dana)
2f3615f706 Move Exceptions.h includes to .cpp files 2021-01-26 10:52:04 -05:00
Frank Dana
6009a26e4c Eliminate TooManySeeks exception (#611)
Since commit bfa050409c (2015-08-24),
there is no code in libopenshot which ever throws TooManySeeks.

- Removed catch() statements for TooManySeeks from multiple functions
- Removed the exception from Exceptions.h
- in Qt/AudioPlaybackThread.h:
  - Removed the "SafeTimeSliceThread" class definition, as it only
    existed to catch TooManySeeks.
  - Replaced SafeTimeSliceThread with a standard juce::TimeSliceThread
2021-01-01 05:24:48 -05:00
Jonathan Thomas
e5d5d82050 - Simplifying the FrameMapper Clip::AdjustFrameNumber method
- Removing transformed == true boolean (Qt should be smart enough to optimize for blank transforms)
- Fixing regression from TimelineBase import
2020-10-20 13:03:10 -05:00
FeRD (Frank Dana)
a1e44edad4 Merge branch 'develop' into clip-refactor-keyframes 2020-10-19 16:28:49 -04:00
Jonathan Thomas
ab4916247b Replacing audio fix implementation with ParentClip(), to access clip start and position (if any) 2020-10-19 16:05:01 -04:00
Brenno
a4109419ac Implemented position remapper inside FrameMapper to fix audio noise when exporting to different fps
The FrameMapper class now receives the updated clip position and returns the correct amount of samples for a given frame number
2020-10-19 16:05:01 -04:00
FeRD (Frank Dana)
aa40ea29e0 Update include paths in all source/header files 2020-10-18 07:43:37 -04:00
Jonathan Thomas
8f6c64215e Merge pull request #556 from ferdnyc/use-make-shared
Use std::make_shared to allocate shared ptrs, instead of std::shared_ptr constructors
2020-10-16 14:48:14 -05:00
Jonathan Thomas
6537278c1c This padding is needed to not lose samples in the first frame of a resample. Apparently, we need enough padding, so we exceed the # of samples required for the first frame, and 20 was just too low for many frame rates / sample rates. 2020-09-14 03:13:54 -05:00
FeRD (Frank Dana)
3c2532b4de Use std::make_shared to allocate shared ptrs
std::make_shared does in a single allocation what the constructors
for std::shared_ptr usually take at least 2 allocations to do.
May give us an infinitesimal performance/memory improvement.

https://www.modernescpp.com/index.php/memory-and-performance-overhead-of-smart-pointer
2020-08-20 16:50:12 -04:00
Frank Dana
adab668486 Merge branch 'develop' into ffmpeg-writer 2020-07-08 17:26:38 -04:00
SuslikV
455b6e92bf Fix float to int16_t conversion in resampler
The backward conversion int16_t to float in libopenshot has range
(1.0; -1.0], thus conversion -1.0f to int16_t should be secured.

Float values can exceed the (1.0; -1.0) range. This can cause
distortion in audio instead of limiting values  at max/min for the
int16_t.
2020-03-26 10:17:22 +02:00
FeRD (Frank Dana)
3680144511 FrameMapper: Eliminate is_open member variable
It was being used uninitialized because it's never actually set,
therefore it serves no purpose.
2020-03-22 12:35:31 -04:00
Frank Dana
8ea7449363 Merge branch 'develop' into json-parsing 2020-01-20 15:25:40 -05:00
FeRD (Frank Dana)
22bf6edfba Enhance Json data handling
- Parsing from string to Json::Value is now done by utility function
  openshot::stringToJson() in Json.cpp, all SetJson() methods call it.
- Expand use of const member functions and args where appropriate.
- Use std::to_string() to format int/float values as strings.
- Correct mentions of nonexistent Json::JsonValue type in docstrings
2019-12-27 08:51:51 -05:00
FeRD (Frank Dana)
e502f97d8a Don't compare differently-signed types 2019-12-15 14:22:59 -05:00
Frank Dana
8bde07682c Merge branch 'develop' into std-prefixes 2019-10-22 21:00:27 -04:00
FeRD (Frank Dana)
366ff2c5e6 src: Don't pass "" file_path args to exceptions 2019-08-27 15:47:39 -04:00