|
Krita Source Code Documentation
|
#include "KisPlaybackEngineMLT.h"#include <QMap>#include <QMutex>#include <QMutexLocker>#include <QElapsedTimer>#include <QWaitCondition>#include "kis_canvas2.h"#include "KisCanvasAnimationState.h"#include "kis_image_animation_interface.h"#include "kis_raster_keyframe_channel.h"#include "kis_signal_compressor_with_param.h"#include "animation/KisFrameDisplayProxy.h"#include "KisViewManager.h"#include "kis_onion_skin_compositor.h"#include <mlt++/Mlt.h>#include <mlt++/MltConsumer.h>#include <mlt++/MltFrame.h>#include <mlt++/MltFilter.h>#include <mlt-7/framework/mlt_service.h>#include "KisRollingMeanAccumulatorWrapper.h"#include "KisRollingSumAccumulatorWrapper.h"#include "kis_debug.h"#include "KisMLTProducerKrita.h"Go to the source code of this file.
Classes | |
| struct | KisPlaybackEngineMLT::FrameWaitingInterface |
| struct | KisPlaybackEngineMLT::Private |
| struct | KisPlaybackEngineMLT::StopAndResume |
| The StopAndResumeConsumer struct is used to encapsulate optional stop-and-then-resume behavior of a consumer. Using RAII, we can stop a consumer at construction and simply resume it when it exits scope. More... | |
Functions | |
| static void | mltOnConsumerFrameShow (mlt_consumer c, void *p_self, mlt_frame p_frame) |
Variables | |
| const float | SCRUB_AUDIO_SECONDS = 0.128f |
This static function responds to MLT consumer requests for frames. This may continue to be called even when playback is stopped due to it running simultaneously in a separate thread.
This function is called from the non-gui thread owned by MLT, so we should wait until the frame would be really rendered. This way MLT will have information about frame rendering speed and will be able to drop frames accordingly.
NOTE: we cannot use BlockingQueuedConnection here because it would deadlock on any stream property change, when the the GUI thread would call consumer->stop().
Definition at line 113 of file KisPlaybackEngineMLT.cpp.
References KisPlaybackEngineMLT::frameWaitingInterface(), KIS_SAFE_ASSERT_RECOVER_RETURN, KisPlaybackEngineMLT::FrameWaitingInterface::renderingAllowed, KisPlaybackEngineMLT::FrameWaitingInterface::renderingControlMutex, KisPlaybackEngineMLT::FrameWaitingInterface::renderingWaitCondition, KisPlaybackEngineMLT::sigChangeActiveCanvasFrame(), and KisPlaybackEngineMLT::FrameWaitingInterface::waitingForFrame.
| const float SCRUB_AUDIO_SECONDS = 0.128f |
Definition at line 80 of file KisPlaybackEngineMLT.cpp.