Commit Graph

93 Commits

Author SHA1 Message Date
Jonathan Thomas
bf93f6941e Fixed some major issues with the FFmpegWriter, which was not setting the correct PTS values 2012-10-26 17:15:17 -05:00
Jonathan Thomas
5fcead37f2 Added frame counter to writer class, to help generate a valid PTS 2012-10-26 02:11:39 -05:00
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
49f8376fb7 Fixed build issue with dummy reader 2012-10-22 22:47:15 -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
082efa23cc Fixed more audio sample issues with time mapping 2012-10-21 17:51:37 -05:00
Jonathan Thomas
b74e97c7d2 FIxed some big audio bugs, and finally got the audio reversing correctly working. Now, audio waves are reversed when a time map is moving backwards. There are still some pops and crackles, but I'll fix those later. 2012-10-21 05:29:29 -05:00
Jonathan Thomas
266bd45bde Added delta() to a coordinate, to track the change in unique value on the Y axis. This helps in time mapping, to track how many frames have been skipped. 2012-10-19 22:24:54 -05:00
Jonathan Thomas
3740ca0454 Added some new methods on the keyframe class, and added some unit tests for the keyframes. 2012-10-19 22:11:22 -05:00
Jonathan Thomas
f291700701 Updated keyframe system to only process them if they change, to improve performance. 2012-10-19 17:04:57 -05:00
Jonathan Thomas
9d97ecb6d2 Improved the Keyframe and Coordinate classes, to also track the direction and a fraction representing the number of times a frame is repeated. This will allow the time mapping to slow down audio and reverse the waveforms when necessary. 2012-10-19 16:53:18 -05:00
Jonathan Thomas
de40b97457 Added some experimental time mapping code, to resample slow or fast audio samples. 2012-10-19 01:49:48 -05:00
Jonathan Thomas
5e5ca2a55c Fixed a big bug on frame rate mapping, due to incorrect # of samples being copied into the new frame. Also, implemented interalacing support, and full pulldown support (in the frame mapper). 2012-10-18 02:58:09 -05:00
Jonathan Thomas
129a2fccd7 Many experimental changes, including a new FrameMapper that is based on FileReaderBase, and lots of debug code. 2012-10-17 09:57:02 -05:00
Jonathan Thomas
a57b81a734 Added a new DummyReader, which can be given any framerate, samplerate, width, height, etc... and used in unit tests, such as the FrameMap unit tests. 2012-10-16 16:45:31 -05:00
Jonathan Thomas
b78fca6090 Refactor of FrameMapper, and added in audio sample remapping.. 2012-10-15 17:45:20 -05:00
Jonathan Thomas
0bab75acc8 Started working on the FrameMapper, to correctly map audio samples to the target framerate. 2012-10-14 23:24:27 -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