|
Krita Source Code Documentation
|
Krita's base animation playback engine for producing image frame changes and associated audio. More...
#include <KisPlaybackEngine.h>
Inheritance diagram for KisPlaybackEngine:Classes | |
| struct | PlaybackStats |
| struct | Private |
Public Slots | |
| bool | dropFrames () const |
| virtual void | firstFrame () |
| virtual bool | isMute ()=0 |
| virtual void | lastFrame () |
| virtual void | nextFrame () |
| virtual void | nextKeyframe () |
| virtual void | nextMatchingKeyframe () |
| virtual void | nextUnfilteredKeyframe () |
| virtual void | pause () |
| virtual void | play () |
| virtual PlaybackStats | playbackStatistics () const =0 |
| virtual void | playPause () |
| virtual void | previousFrame () |
| virtual void | previousKeyframe () |
| virtual void | previousMatchingKeyframe () |
| previousMatchingKeyframe && nextMatchingKeyframe Navigate to the next keyframe that has the same color-label as the current keyframe. Useful to quickly navigate to user-specified 'similar' keyframes. E.g. Contact points in an animation might have a specific color to specify importance and be quickly swapped between. | |
| virtual void | previousUnfilteredKeyframe () |
| previousUnfilteredKeyframe && nextUnfilteredKeyframe Navigate to keyframes based on the current onion skin filtration. This lets users easily navigate to the next visible "onion-skinned" keyframe on the active layer. | |
| virtual void | seek (int frameIndex, SeekOptionFlags options=SEEK_FINALIZE|SEEK_PUSH_AUDIO)=0 |
| virtual void | setDropFramesMode (bool value) |
| virtual void | setMute (bool val)=0 |
| virtual void | stop () |
| virtual bool | supportsAudio ()=0 |
| virtual bool | supportsVariablePlaybackSpeed ()=0 |
Signals | |
| void | sigDropFramesModeChanged (bool value) |
Public Member Functions | |
| KisPlaybackEngine (QObject *parent=nullptr) | |
| ~KisPlaybackEngine () | |
Public Member Functions inherited from KoCanvasObserverBase | |
| KoCanvasObserverBase () | |
| KoCanvasBase * | observedCanvas () const |
| virtual QString | observerName () |
| void | setObservedCanvas (KoCanvasBase *canvas) |
| void | unsetObservedCanvas () |
| virtual | ~KoCanvasObserverBase () |
Protected Slots | |
| virtual void | setCanvas (KoCanvasBase *p_canvas) override |
| virtual void | unsetCanvas () override |
Protected Member Functions | |
| class KisCanvas2 * | activeCanvas () const |
| int | frameWrap (int frame, int startFrame, int endFrame) |
Protected Member Functions inherited from KoCanvasObserverBase | |
| virtual void | setCanvas (KoCanvasBase *canvas)=0 |
| virtual void | unsetCanvas ()=0 |
Private Member Functions | |
| void | moveActiveFrameBy (int frames) |
| Move the active frame of the animation player forwards or backwards by some number of frames. | |
| void | nextKeyframeWithColor (const QSet< int > &validColors) |
| void | nextKeyframeWithColor (int color) |
| void | previousKeyframeWithColor (const QSet< int > &validColors) |
| void | previousKeyframeWithColor (int color) |
Private Attributes | |
| QScopedPointer< Private > | m_d |
Krita's base animation playback engine for producing image frame changes and associated audio.
Krita stores a main playback engine in KisPart (a singleton) to be used by the active document's canvas. It can be thought of as being just below the GUI layer of Krita's animation system, responding to various GUI events, controlling transport controls (play, stop, next, etc.), and generally driving the playback of animation within Krita.
It's implemented by KisPlaybackEngineQT and KisPlaybackEngineMLT, one of which is typically selected at compile time depending on available dependencies. Specific implementations may or may not support certain features (audio, speed, dropping frames, etc.) and have other different characteristics.
Definition at line 42 of file KisPlaybackEngine.h.
| KisPlaybackEngine::KisPlaybackEngine | ( | QObject * | parent = nullptr | ) |
Definition at line 34 of file KisPlaybackEngine.cpp.
References KisConfig::animationDropFrames(), and m_d.
| KisPlaybackEngine::~KisPlaybackEngine | ( | ) |
Definition at line 42 of file KisPlaybackEngine.cpp.
|
protected |
Definition at line 290 of file KisPlaybackEngine.cpp.
References m_d.
|
slot |
Definition at line 271 of file KisPlaybackEngine.cpp.
References m_d.
|
virtualslot |
Definition at line 177 of file KisPlaybackEngine.cpp.
References KisImageAnimationInterface::activePlaybackRange(), KisImage::animationInterface(), KisImageAnimationInterface::image(), KIS_SAFE_ASSERT_RECOVER_RETURN, m_d, KisCanvasAnimationState::playbackState(), seek(), SEEK_FINALIZE, SEEK_PUSH_AUDIO, KisTimeSpan::start(), stop(), and STOPPED.
|
protected |
Definition at line 276 of file KisPlaybackEngine.cpp.
|
pure virtualslot |
Implemented in KisPlaybackEngineQT.
|
virtualslot |
Definition at line 193 of file KisPlaybackEngine.cpp.
References KisImageAnimationInterface::activePlaybackRange(), KisImage::animationInterface(), KisTimeSpan::end(), KisImageAnimationInterface::image(), KIS_SAFE_ASSERT_RECOVER_RETURN, m_d, KisCanvasAnimationState::playbackState(), seek(), SEEK_FINALIZE, SEEK_PUSH_AUDIO, stop(), and STOPPED.
|
private |
Move the active frame of the animation player forwards or backwards by some number of frames.
| The | signed number of frames to move. Negative frames move backwards in time (left on a left-to-right system). |
Definition at line 333 of file KisPlaybackEngine.cpp.
References KisFrameDisplayProxy::activeFrame(), KisImageAnimationInterface::activePlaybackRange(), KisImage::animationInterface(), KisCanvasAnimationState::displayProxy(), KisTimeSpan::end(), frameWrap(), KisImageAnimationInterface::image(), KIS_SAFE_ASSERT_RECOVER_RETURN, m_d, KisCanvasAnimationState::playbackState(), seek(), SEEK_FINALIZE, SEEK_PUSH_AUDIO, KisTimeSpan::start(), stop(), and STOPPED.
|
virtualslot |
Definition at line 98 of file KisPlaybackEngine.cpp.
References moveActiveFrameBy().
|
virtualslot |
Definition at line 134 of file KisPlaybackEngine.cpp.
References KisFrameDisplayProxy::activeFrame(), KisKeyframeChannel::activeKeyframeAt(), KisKeyframeChannel::activeKeyframeTime(), KisCanvasAnimationState::displayProxy(), KisBaseNode::getKeyframeChannel(), KisKeyframeChannel::keyframeAt(), KIS_SAFE_ASSERT_RECOVER_RETURN, m_d, KisKeyframeChannel::nextKeyframeTime(), KisCanvasAnimationState::playbackState(), KisKeyframeChannel::previousKeyframeTime(), KisKeyframeChannel::Raster, seek(), SEEK_FINALIZE, SEEK_PUSH_AUDIO, stop(), and STOPPED.
|
private |
Definition at line 363 of file KisPlaybackEngine.cpp.
References KisFrameDisplayProxy::activeFrame(), KisKeyframeChannel::activeKeyframeAt(), KisKeyframeChannel::activeKeyframeTime(), KisCanvasAnimationState::displayProxy(), KisBaseNode::getKeyframeChannel(), KisKeyframeChannel::keyframeAt(), KIS_SAFE_ASSERT_RECOVER_RETURN, m_d, KisKeyframeChannel::nextKeyframeTime(), KisCanvasAnimationState::playbackState(), KisKeyframeChannel::Raster, seek(), SEEK_FINALIZE, SEEK_PUSH_AUDIO, stop(), and STOPPED.
|
private |
Definition at line 356 of file KisPlaybackEngine.cpp.
References nextKeyframeWithColor().
|
virtualslot |
Definition at line 230 of file KisPlaybackEngine.cpp.
References KisFrameDisplayProxy::activeFrame(), KisKeyframeChannel::activeKeyframeAt(), KisKeyframeChannel::activeKeyframeTime(), KisCanvasAnimationState::displayProxy(), KisBaseNode::getKeyframeChannel(), KisKeyframeChannel::keyframeAt(), KIS_SAFE_ASSERT_RECOVER_RETURN, m_d, nextKeyframeWithColor(), and KisKeyframeChannel::Raster.
|
virtualslot |
Definition at line 258 of file KisPlaybackEngine.cpp.
References KisOnionSkinCompositor::instance(), and nextKeyframeWithColor().
|
virtualslot |
Definition at line 52 of file KisPlaybackEngine.cpp.
References activeCanvas(), KisFrameDisplayProxy::activeFrame(), KisCanvas2::animationState(), KisCanvasAnimationState::displayProxy(), KIS_SAFE_ASSERT_RECOVER_RETURN, PAUSED, seek(), SEEK_FINALIZE, and KisCanvasAnimationState::setPlaybackState().
|
virtualslot |
Definition at line 46 of file KisPlaybackEngine.cpp.
References activeCanvas(), KisCanvas2::animationState(), KIS_SAFE_ASSERT_RECOVER_RETURN, PLAYING, and KisCanvasAnimationState::setPlaybackState().
|
pure virtualslot |
Implemented in KisPlaybackEngineQT.
|
virtualslot |
Definition at line 62 of file KisPlaybackEngine.cpp.
References activeCanvas(), KisCanvas2::animationState(), KIS_SAFE_ASSERT_RECOVER_RETURN, pause(), play(), KisCanvasAnimationState::playbackState(), and PLAYING.
|
virtualslot |
Definition at line 93 of file KisPlaybackEngine.cpp.
References moveActiveFrameBy().
|
virtualslot |
Definition at line 103 of file KisPlaybackEngine.cpp.
References KisFrameDisplayProxy::activeFrame(), KisKeyframeChannel::activeKeyframeTime(), KisCanvasAnimationState::displayProxy(), KisBaseNode::getKeyframeChannel(), KisKeyframeChannel::keyframeAt(), KIS_SAFE_ASSERT_RECOVER_RETURN, m_d, KisCanvasAnimationState::playbackState(), KisKeyframeChannel::previousKeyframeTime(), KisKeyframeChannel::Raster, seek(), SEEK_FINALIZE, SEEK_PUSH_AUDIO, stop(), and STOPPED.
|
private |
Definition at line 406 of file KisPlaybackEngine.cpp.
References KisFrameDisplayProxy::activeFrame(), KisKeyframeChannel::activeKeyframeTime(), KisCanvasAnimationState::displayProxy(), KisBaseNode::getKeyframeChannel(), KisKeyframeChannel::keyframeAt(), KIS_SAFE_ASSERT_RECOVER_RETURN, m_d, KisCanvasAnimationState::playbackState(), KisKeyframeChannel::previousKeyframeTime(), KisKeyframeChannel::Raster, seek(), SEEK_FINALIZE, SEEK_PUSH_AUDIO, stop(), and STOPPED.
|
private |
Definition at line 399 of file KisPlaybackEngine.cpp.
References previousKeyframeWithColor().
|
virtualslot |
previousMatchingKeyframe && nextMatchingKeyframe Navigate to the next keyframe that has the same color-label as the current keyframe. Useful to quickly navigate to user-specified 'similar' keyframes. E.g. Contact points in an animation might have a specific color to specify importance and be quickly swapped between.
Definition at line 209 of file KisPlaybackEngine.cpp.
References KisFrameDisplayProxy::activeFrame(), KisKeyframeChannel::activeKeyframeTime(), KisCanvasAnimationState::displayProxy(), KisBaseNode::getKeyframeChannel(), KisKeyframeChannel::keyframeAt(), KIS_SAFE_ASSERT_RECOVER_RETURN, m_d, previousKeyframeWithColor(), and KisKeyframeChannel::Raster.
|
virtualslot |
previousUnfilteredKeyframe && nextUnfilteredKeyframe Navigate to keyframes based on the current onion skin filtration. This lets users easily navigate to the next visible "onion-skinned" keyframe on the active layer.
Definition at line 253 of file KisPlaybackEngine.cpp.
References KisOnionSkinCompositor::instance(), and previousKeyframeWithColor().
|
pure virtualslot |
Implemented in KisPlaybackEngineQT.
|
overrideprotectedvirtualslot |
TODO: This forced updates causes image recalculation on every document switch, which is weird and even causes some crashes on closing many documents at once (which is a separate bug it seems). Why document switch should forcefully regeneare the canvas?
Reimplemented in KisPlaybackEngineQT.
Definition at line 295 of file KisPlaybackEngine.cpp.
References connect(), KIS_SAFE_ASSERT_RECOVER_RETURN, m_d, KisCanvasAnimationState::sigCancelPlayback(), and stop().
|
virtualslot |
Reimplemented in KisPlaybackEngineQT.
Definition at line 263 of file KisPlaybackEngine.cpp.
References m_d, sigDropFramesModeChanged(), and value().
|
pure virtualslot |
Implemented in KisPlaybackEngineQT.
|
signal |
|
virtualslot |
Definition at line 74 of file KisPlaybackEngine.cpp.
References activeCanvas(), KisFrameDisplayProxy::activeFrame(), KisImage::animationInterface(), KisCanvas2::animationState(), KisCanvasAnimationState::displayProxy(), KisImageAnimationInterface::documentPlaybackRange(), firstFrame(), KisCanvas2::image(), KIS_SAFE_ASSERT_RECOVER_RETURN, KisCanvasAnimationState::playbackOrigin(), KisCanvasAnimationState::playbackState(), seek(), SEEK_FINALIZE, SEEK_PUSH_AUDIO, KisCanvasAnimationState::setPlaybackState(), KisTimeSpan::start(), and STOPPED.
|
pure virtualslot |
Implemented in KisPlaybackEngineQT.
|
pure virtualslot |
Implemented in KisPlaybackEngineQT.
|
overrideprotectedvirtualslot |
Reimplemented in KisPlaybackEngineQT.
Definition at line 328 of file KisPlaybackEngine.cpp.
References m_d.
|
private |
Definition at line 127 of file KisPlaybackEngine.h.