Commit Graph

71 Commits

Author SHA1 Message Date
Jonathan Thomas
a0b24c61f0 Fixed a huge memory leak related to cache objects, and incorrect frame sizes. It was caching way too many frames, and creating all sorts of issues. 2012-10-26 00:27:44 -05:00
Jonathan Thomas
651993ff60 Fixed a bug in the regression in the FFmpegReader class, which prevented frame 1 from loading 2012-10-22 23:59:36 -05:00
Jonathan Thomas
612bb25f5f Fixed the FFMpegReader to discard the first audio and video frames it finds after a seek, since they sometimes are missing information. This fixed many issues with the time mapping curves and audio reversing and fast forwarding. 2012-10-22 17:05:34 -05:00
Jonathan Thomas
48bef6b566 Removed some unneeded methods, due to the previous refactor involving shared_ptr objects. They no longer require some special overloads which "delete" the objects in the cache. 2012-10-14 21:09:22 -05:00
Jonathan Thomas
617088cebf Yet another huge refactor, to use shared_ptr objects instead of actual pointers, due to the difficulties in managing the lifecycle of pointers between the timeline, clip, and readers. Seems to work great, and solves all sorts of bugs. =) 2012-10-14 03:43:52 -05:00
Jonathan Thomas
b647ff77c8 Fixed a regression with audio files and seeking, added a few new methods, and more accurately detect the End() of clips. 2012-10-14 02:36:05 -05:00
Jonathan Thomas
eace9f5efd Fixed a regression with disabling seek on the FFmpegReader. It runs slower than seeking, but has no artifacts of seeking, and is frame accurate. 2012-10-12 20:50:28 -05:00
Jonathan Thomas
9347f2f88e Fixed the seeking and cache code to work correctly. Also fixed a huge memory leak with the new AVPicture structs. Now the time mapping works both directions, and with no major memory leaks! 2012-10-12 16:41:23 -05:00
Jonathan Thomas
a601bcef2d Another huge refactor and lots of big fixes! Time mapping now works... mostly. The jumpy / glitchy images have been solved by copying the AVFrame into an AVPicture, which does not get clobbered on the next decode.
Also, added a new frame number overaly (in the top, left part of the image), and a new AddColor() method, to change the size and color of the frame's image...

Padded the end of the FFmpegWriter / WriteTrailer() method, to avoid having a codec ignore the last many frames.
2012-10-12 00:54:53 -05:00
Jonathan Thomas
217c54a5ae Major refactor to the cache object (again)! It now uses bytes to determine how many frames to keep. 2012-10-11 17:30:32 -05:00
Jonathan Thomas
cebf9728c8 Refactored seek method a bit in the FFmpegReader, to fix some bugs. Also, being changing the cache object again, on how it cleans up pointers. Some debug code is checked in also. 2012-10-10 17:27:46 -05:00
Jonathan Thomas
b7792b04d8 Added new method to adjust the min value of a valid frame number, added a new unlimited cache option, and fixed a bug which was preventing the timeline from calling GetFrame correctly. Now timelines, clips, and readers are working together nicely. 2012-10-10 15:21:33 -05:00
Jonathan Thomas
9966f3571d Fixed a regression with the FFmpegReader, to always get frame 1 first, to calucate the PTS offsets, etc... Also, fixed a bug on the timeline, and now i'm 1 step closer to having it all work. =) 2012-10-10 14:49:33 -05:00
Jonathan Thomas
60e645da61 Added a FrameRate() method to the timeline, to get or set the fps. Also, added a unit test for that, and refactored some header files to be alphabetical. 2012-10-10 01:07:47 -05:00
Jonathan Thomas
d840297572 Refactored constructor() methods on readers again, to call Open() and then Close() methods automatically, to populate the info struct. And moved the GetFrame() call out of the Open() method, because it was unneeded and slowed down the Open() method. 2012-10-09 10:41:07 -05:00
Jonathan Thomas
1d89fd140a A big refactor of the Open() method on Readers, and the constructor of Readers. All resource consuming code has been moved into the Open() methods, so the Clips and Timeline can control them better. 2012-10-09 01:45:34 -05:00
Jonathan Thomas
8518071890 Protected the Open() and Close() methods better, so the FFmpegReader will not crash. Also, made the Open() method public, so the Timeline and Clip classes can control the reader better. 2012-10-08 15:02:52 -05:00
Jonathan Thomas
a23e32874e Tweaked the number of FFmpeg threads, to optimize codec performance. 2012-08-31 15:19:17 -05:00
Jonathan Thomas
8831dd0c49 Enabled multi-threading decoding and encoding with libavcodec, setting the thread_count property. This make a huge improvement in CPU performance, for codecs that support this property. 2012-08-28 22:53:12 -05:00
Jonathan Thomas
0f3758bc29 Fixed a big regression where the "omp" tag was not correct. Also, restructured the encoder to be much faster, and changed "omp master" to "omp single". 2012-08-28 15:53:18 -05:00
Jonathan Thomas
c564a15ced Improved the multi-threaded code, by requiring a minimum of 8 frames to be processed by the reader. 2012-08-26 02:44:05 -05:00
Jonathan Thomas
27d2cf629d Added a minimum # of packets to read in the FFmpegReader, which really helps utilize the multiple threads... and improved performance by 27% overall. 2012-08-24 17:03:23 -05:00
Jonathan Thomas
b4873d566f Refactored to allocate less memory when not resampling audio during encoding 2012-08-21 21:51:00 -05:00
Jonathan Thomas
87db694fcf Moved audio decoding outside of OMP task, and fixed all audio pops and crackles! 2012-08-21 15:31:52 -05:00
Jonathan Thomas
0e235b0efb Refactored some of the FFmpegReader audio class, trying to locate the pops and cracks in the audio. 2012-08-21 02:12:35 -05:00