~mbranton/libopenshot/alpha-channel-fix

« back to all changes in this revision

Viewing changes to src/Qt/VideoCacheThread.cpp

  • Committer: Jonathan Thomas
  • Date: 2016-09-07 05:40:01 UTC
  • Revision ID: jonathan@openshot.org-20160907054001-v2tbe8uy8a7lk4qw
Added new CacheDisk class, which caches frames to the hard drive, dramatically speeding up preview speeds, at the expense of IO operations. New unittests for caching framework. Fixed a few bugs with Frame constructor, which was causing invalid # width & height. Integrated JSON into the cache framework, to quickly share the state of the cache (including ranges of cached frame numbers). Fixed a bug where some Timeline frames could have no audio samples.

Show diffs side-by-side

added added

removed removed

Lines of Context:
56
56
        current_display_frame = current_frame_number;
57
57
    }
58
58
 
59
 
        // Seek the audio thread
 
59
        // Seek the reader to a particular frame number
60
60
        void VideoCacheThread::Seek(int new_position)
61
61
        {
62
62
                position = new_position;
63
63
        }
64
64
 
65
 
        // Play the audio
 
65
        // Play the video
66
66
        void VideoCacheThread::Play() {
67
67
                // Start playing
68
68
                is_playing = true;