~mbranton/libopenshot/alpha-channel-fix

« back to all changes in this revision

Viewing changes to src/CacheMemory.cpp

  • Committer: Jonathan Thomas
  • Date: 2016-09-08 08:06:10 UTC
  • Revision ID: jonathan@openshot.org-20160908080610-a9gw400qvefsikkl
More logging for CacheMemory object, which is the cause of the crash

Show diffs side-by-side

added added

removed removed

Lines of Context:
63
63
void CacheMemory::CalculateRanges() {
64
64
        // Only calculate when something has changed
65
65
        if (needs_range_processing) {
 
66
                cout << "CacheMemory::CalculateRanges" << endl;
66
67
 
67
68
                // Create a scoped lock, to protect the cache from multiple threads
68
69
                const GenericScopedLock<CriticalSection> lock(*cacheCriticalSection);
127
128
// Add a Frame to the cache
128
129
void CacheMemory::Add(tr1::shared_ptr<Frame> frame)
129
130
{
 
131
        cout << "CacheMemory::Add " << frame->number << endl;
130
132
        // Create a scoped lock, to protect the cache from multiple threads
131
133
        const GenericScopedLock<CriticalSection> lock(*cacheCriticalSection);
132
134
        long int frame_number = frame->number;
214
216
// Remove range of frames
215
217
void CacheMemory::Remove(long int start_frame_number, long int end_frame_number)
216
218
{
 
219
        cout << "CacheMemory::Remove (" << start_frame_number << ", " << end_frame_number << ")" << endl;
217
220
        // Create a scoped lock, to protect the cache from multiple threads
218
221
        const GenericScopedLock<CriticalSection> lock(*cacheCriticalSection);
219
222
 
278
281
// Clear the cache of all frames
279
282
void CacheMemory::Clear()
280
283
{
 
284
        cout << "CacheMemory::Clear" << endl;
281
285
        // Create a scoped lock, to protect the cache from multiple threads
282
286
        const GenericScopedLock<CriticalSection> lock(*cacheCriticalSection);
283
287
 
299
303
// Clean up cached frames that exceed the number in our max_bytes variable
300
304
void CacheMemory::CleanUp()
301
305
{
 
306
        cout << "CacheMemory::CleanUp" << endl;
302
307
        // Create a scoped lock, to protect the cache from multiple threads
303
308
        const GenericScopedLock<CriticalSection> lock(*cacheCriticalSection);
304
309