Commit Graph

361 Commits

Author SHA1 Message Date
Jonathan Thomas
ec79c92f12 Refactor of packet counting and EOF detection. Instead of tracking overall packets read & decoded, we now track per stream (video and audio), so we can more accurately know when a packet is still pending for one of those streams (i.e. async decoding) 2022-09-26 19:06:03 -05:00
Jonathan Thomas
5f6998d933 Fixing whitespace 2022-09-24 14:49:53 -05:00
Jonathan Thomas
906a5af9b0 Increasing max_attempts to prevent failures on Seeking from far away positions 2022-09-24 14:36:26 -05:00
Jonathan Thomas
285b4952fe Fixing behavior of manual override of has_video or has_audio, to remove unused packets, and not get stuck in an endless loop due to 1 or 2 pending packets that are no longer needed after the override. 2022-09-24 14:06:36 -05:00
Jonathan Thomas
5f692f18d6 Protect video_length from being overwritten if CheckFPS overwrites it first 2022-09-02 09:36:06 -05:00
Jonathan Thomas
60805beec3 Adding support for detecting video_length (i.e. # of video frames) from the metadata, instead of calculating from duration * fps. This is occasionally different by a small amount, and in my testing, the metadata is more accurate. 2022-09-02 01:09:00 -05:00
Jonathan Thomas
2f145234da Fixing more whitespace and wrapping issues. Also removed some audio pts debug code. 2022-07-27 16:54:59 -05:00
Jonathan Thomas
c5f166a472 Removing debug log lines and more whitespace issues 2022-07-27 16:44:01 -05:00
Jonathan Thomas
694d86a41b Cleanup of debug logs and other whitespace issues 2022-07-27 16:33:01 -05:00
Jonathan Thomas
5ee38518da Experimental: Adding some fsanitize flags, a new example exe, a mutex on FFmpegReader::Close, and some additional clean-up code on AddImage (when a previous image exists) 2022-07-27 15:33:40 -05:00
Jonathan Thomas
01d16fe04a Experimental: Adding more QImage clean-up logging, to track buffer addresses 2022-07-26 21:40:28 -05:00
Jonathan Thomas
0164bd28be Experimental: Change method of copying QImage from previous frames to use qimage.copy method. 2022-07-26 15:40:57 -05:00
Jonathan Thomas
f2852e8c34 Experimental: additional logging around AddImage() calls 2022-07-26 15:21:25 -05:00
Jonathan Thomas
89321d3bae Experimental: adding debug logging to Frame destructor and QImage cleanup. Also, preventing processing of empty samples 2022-07-26 15:09:57 -05:00
Jonathan Thomas
297349033e Experimental FFmpegReader::Close changes, adding new drain decoder logic on Close 2022-07-25 16:27:31 -05:00
Jonathan Thomas
68f273d9d1 Experimental FFmpegReader::Close changes 2022-07-23 19:44:01 -05:00
Jonathan Thomas
3883d2d8aa Experimental FFmpegReader::Close changes 2022-07-23 18:47:42 -05:00
Jonathan Thomas
70bf0ade98 Refactoring FFmpegReader::Close, trying to prevent a crash on Windows 2022-07-22 18:00:28 -05:00
Jonathan Thomas
54971bac84 Removing some logic in FFmpegReader::Close which clears the video and audio stream - which can cause a crash if the decoder is still working on a packet. Reverting this code. 2022-07-22 17:04:52 -05:00
Jonathan Thomas
156fed2f49 Adding debugging to FFmpegReader::Close and removing a discard property that is probably unneeded 2022-07-22 16:50:02 -05:00
Jonathan Thomas
671e8ce455 Clean up of whitespace, and removal of unneeded logic on CheckWorkingFrames() method. It is okay to finalize a frame from a stream that has not decoded a packet yet... although it would be unlikely. 2022-07-21 16:50:23 -05:00
Jonathan Thomas
9202d94ee6 Fixing whitespace issues (converting spaces back to tabs... for now) 2022-07-21 15:00:08 -05:00
Jonathan Thomas
f200c00e4c Fixing Codacy issues 2022-07-21 14:21:44 -05:00
Jonathan Thomas
f4966b2567 Large refactor of timestamps on FFmpegReader (PTS / presentation time stamps):
- Improved PTS offset logic (to offset our streams so that at least one of them starts at position 0.0)
- Removed missing frame detection (no needed anymore)
- Use timestamps to reason about missing frames
- Fixed many async decoding issues (jumbled frames, missing beginning or ending frames)
- Much improved support for video/audio files with missing chunks/gaps (i.e. missing timestamps)
- Improved CheckWorkingFrames() method, to determine when working frames are ready to be finalized
- Improved FPS detection for invalid or missing FPS
2022-07-21 13:56:29 -05:00
nick black
99034feb4e constify some AVCodecIDs, necessary for new ffmpeg
Signed-off-by: nick black <dankamongmen@gmail.com>
2021-11-22 00:09:08 -05:00