MCPcopy Create free account
hub / github.com/IENT/YUView / loadFrame

Method loadFrame

YUViewLib/src/video/videoHandler.cpp:338–370  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

336}
337
338void videoHandler::loadFrame(int frameIndex, bool loadToDoubleBuffer)
339{
340 DEBUG_VIDEO(
341 "videoHandler::loadFrame %d %s\n", frameIndex, (loadToDoubleBuffer) ? "toDoubleBuffer" : "");
342
343 if (requestedFrame_idx != frameIndex)
344 {
345 // Lock the mutex for requesting raw data (we share the requestedFrame buffer with the caching
346 // function)
347 QMutexLocker lock(&requestDataMutex);
348
349 // Request the image to be loaded
350 emit signalRequestFrame(frameIndex, false);
351
352 if (requestedFrame_idx != frameIndex)
353 // Loading failed
354 return;
355 }
356
357 if (loadToDoubleBuffer)
358 {
359 // Save the requested frame in the double buffer
360 doubleBufferImage = requestedFrame;
361 doubleBufferImageFrameIndex = frameIndex;
362 }
363 else
364 {
365 // Set the requested frame as the current frame
366 QMutexLocker imageLock(&currentImageSetMutex);
367 currentImage = requestedFrame;
368 currentImageIndex = frameIndex;
369 }
370}
371
372void videoHandler::loadFrameForCaching(int frameIndex, QImage &frameToCache)
373{

Callers 1

calculateDifferenceMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected