Oskar Wickström
October 2018
|
![]() |
|
![]() |
gi-gtk
gi-gtk-declarative
gi-gtk
where neededUsing motor
and row-types
for typed state machines:
start
:: Name n
-> KeyMaps
-> Actions m '[ n !+ State m WelcomeScreenMode] r ()
returnToTimeline
:: ReturnsToTimeline mode
=> Name n
-> TimelineModel
-> Actions m '[ n := State m mode !--> State m TimelineMode] r ()
Currently being rewritten
data Mode
= WelcomeScreenMode
| TimelineMode
| LibraryMode
| ImportMode
data SMode m where
SWelcomeScreenMode :: SMode WelcomeScreenMode
STimelineMode :: SMode TimelineMode
SLibraryMode :: SMode LibraryMode
SImportMode :: SMode ImportMode
data Command (mode :: Mode) where
Cancel :: Command mode
Help :: Command mode
FocusCommand :: FocusCommand -> Command TimelineMode
JumpFocus :: Focus SequenceFocusType -> Command TimelineMode
-- ...
keymaps :: SMode m -> KeyMap (Command m)
keymaps =
\case
SWelcomeScreenMode ->
[ ([KeyChar 'q'], Mapping Cancel)
, ([KeyEscape], Mapping Cancel)
, ([KeyChar '?'], Mapping Help)
]
-- ...
Creates a producer of frames
readVideoFile :: MonadIO m => FilePath -> Producer (Timed Frame) m ()
Custom algorithm for classification
classifyMovement
:: Monad m
=> Time -- ^ Minimum segment duration
-> Producer (Timed RGB8Frame) m ()
-> Producer (Classified (Timed RGB8Frame)) m ()
classifyMovingScenes ::
Monad m
=> Duration -- ^ Full length of video
-> Producer (Classified (Timed RGB8Frame)) m ()
-> Producer ProgressUpdate m [TimeSpan]
sox
ffmpeg-light
IO operations with streaming progress notifications
importVideoFileAutoSplit
:: (MonadIO m, MonadSafe m)
=> VideoSettings
-> FilePath
-> FilePath
-> Producer ProgressUpdate m [VideoAsset]
pipes-safe
for handling resourcespipes-parse
for StateT
-based transformations