File: videostate.pystate

package info (click to toggle)
pyparsing 3.1.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,928 kB
  • sloc: python: 25,633; ansic: 422; makefile: 22
file content (32 lines) | stat: -rw-r--r-- 861 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#
# videostate.pystate
#
# Statemachine describing the playing of a video
#   [] = stop
#    > = play
#   || = pause
#   >> = fast forward
#   << = rewind

statemachine VideoState:
    # basic >, [], and || controls
    Stopped-(play)->Playing
    Playing-(pause)-> Paused
    Playing-(stop)-> Stopped
    Paused-(stop)-> Stopped
    Paused-(play)->Playing

    # add >> and << controls - different meanings if occur while playing or stopped
    Playing-(fast_forward)->FastForward
    FastForward-(play)->Playing
    FastForward-(pause)->Paused
    FastForward-(stop)->Stopped
    Stopped-(fast_forward)->Forwardwinding
    Forwardwinding-(stop)->Stopped

    Playing-(rewind)->ReversePlaying
    ReversePlaying-(play)->Playing
    ReversePlaying-(pause)->Paused
    ReversePlaying-(stop)->Stopped
    Stopped-(rewind)->Rewinding
    Rewinding-(stop)->Stopped