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
52a9e3be5d
- Clip reader init should consider paths with a % to use FFmpegReader by default (i.e. image sequences)
...
- FFmpegReader info struct should not be initialized during Open() after it is initially populated - so our SetJson() method can properly override it's values
- FrameMapper Json() method should include it's mapped Reader JSON - even though it is not yet possible to read it back in yet
- New unit tests for Timeline ApplyJsonDiff, and verification that we can override FFmpegReader info struct (i.e. updating FPS, time bases, etc...)
- Some whitespace fixes
2023-02-13 16:42:21 -06:00
Jonathan Thomas
2f08ac0c1c
Allow waveform generation to happen before Clip effects are processed. Also, allow the Caption effect to add image data (i.e. waveform graphic) and allow Clip to detect that image to output it correctly. The result of all this: audio-only files now support the Caption effect, on top of the generated waveform image. Lastly, generated waveforms should use the entire Timeline size - and not a pre-determined 720x480 size.
2023-02-10 15:16:56 -06:00
Jonathan Thomas
520446c5e4
Fix whitespace
2022-11-26 22:47:28 -06:00
Jonathan Thomas
d8ff69c6ed
Fix a huge regression which invokes the avcodec_open() method twice for every call to FFmpegReader::Open(), leaving many threads running and never joined/closed. Also, adding some additional error message when attempting to call avcodec_open().
2022-11-26 22:47:04 -06:00
Jonathan Thomas
5a380485da
Fixing whitespace
2022-11-23 14:01:43 -06:00
Jonathan Thomas
1bd1fdcb2a
Silence audio data if repeating last frame in FFmpegReader (to prevent audio glitch for files with invalid durations)
2022-11-23 13:56:57 -06:00
Jonathan Thomas
70db06947d
Prevent seeking past end of stream, which causes a huge # of Seeks once EOF is reached, if we try and request frame #s too large for the file
2022-11-23 12:45:10 -06:00
Jonathan Thomas
fdcf9b9118
Renaming variable in FFmpegReader to make more sense
2022-11-16 15:17:03 -06:00
Jonathan Thomas
58dc99d1f9
Fixing whitespacae
2022-11-15 14:52:13 -06:00
Jonathan Thomas
e9aa87c3f3
Experimental refactor around sending/receiving packets with the decoder in FFmpegReader.
2022-11-15 10:57:33 -06:00
Jonathan Thomas
ab8cae8368
Additional FFmpegReader decoding logging for AV1
2022-11-14 15:48:16 -06:00
Jonathan Thomas
107918b7ad
Adding more debugging / logging to hardware acceleration
2022-11-10 16:33:22 -06:00
Jonathan Thomas
b874e91579
Always decode frames in GetAVFrame() method, even if send fails
2022-11-10 14:39:45 -06:00
Jonathan Thomas
7a1e7bd0b6
Always try and receive an AVFrame even if the sending fails (FFmpegReader) - to support some types of multi-threaded video codecs (AV1)
2022-11-10 12:45:14 -06:00
Jonathan Thomas
17eaca652e
Add additional decoding logging inside GetAVFrame method - failing on Windows and trying to debug
2022-11-10 11:46:38 -06:00
Jonathan Thomas
ea8ffb5bc1
Add fallback for AVFrame.pkt_dts, which is only used on certain codecs (AV1)
2022-10-31 18:57:51 -05:00
Jonathan Thomas
b70f89ff6c
Fixing whitespace
2022-10-24 15:03:10 -05:00
Jonathan Thomas
2bc1c28b75
Fixing whitespace
2022-10-24 15:02:25 -05:00
Jonathan Thomas
f207e48fe4
Support many image formats with our FFmpegReader, by safely protecting empty packets in GetPacketPTS, and generating a duration and setting the has_single_image property.
2022-10-24 14:43:10 -05:00
Jonathan Thomas
0800205e24
Remove regression causing blank audio on many audio files. Replacing the broken logic in a different way, to force a NULL packet to the ProcessAudioPacket() function at the end of stream / EOF.
2022-10-14 23:15:31 -05:00
Jonathan Thomas
b13865c0e4
Detect audio EOF when all packets are decoded - since not all audio streams get a NULL packet at the end of stream
2022-10-13 16:45:33 -05:00
Jonathan Thomas
87052b5a35
Fixing whitespace issues
2022-10-13 10:02:56 -05:00
Jonathan Thomas
5f9c4e06d8
Large performance regression fixed by moving mutex further into the Timeline::GetFrame method - only when generating a new frame (allowing cache to actually work freely). Adding mutex back to FFmpegReader::GetFrame. Removing redundant mutex from ReaderBase.h. Adding mutex to all methods that call shrink_to_fit().
2022-10-11 18:14:36 -05:00
Jonathan Thomas
32a89cfce9
Add lock to new Clear() method to prevent crashes
2022-10-06 21:59:11 -05:00