summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/phonon/phonon/stream-thoughts
blob: 5fb6711a27b1bbc8c4bd1f3c84a036a4f17b56b6 (plain)
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
there are two different kind of streams: 1. media files 2. live radio/television

The difference cannot reliably be determined by the backend so the application has to tell the
frontend.

This is the expected behaviour:
1. media files
==============
function | prev. state | action                                                         | new state
---------+-------------+----------------------------------------------------------------+----------
ctor     |             |                                                                | Loading
---------+-------------+----------------------------------------------------------------+----------
setUrl   | Loading     | refill buffers                                                 | Loading
         | Stopped     | refill buffers                                                 | Loading
---------+-------------+----------------------------------------------------------------+----------
play     | Loading     | continue buffering                                             | Buffering
         | Stopped     | start playing                                                  | Playing
         | Buffering   | continue buffering                                             | Buffering
         | Playing     |                                                                | Playing
         | Paused      | continue playback                                              | Playing
---------+-------------+----------------------------------------------------------------+----------
pause    | Loading     |                                                                | Loading
         | Stopped     |                                                                | Stopped
         | Buffering   | continue buffering                                             | Paused
         | Playing     | pause output and fill buffers to the max                       | Paused
         | Paused      |                                                                | Paused
---------+-------------+----------------------------------------------------------------+----------
stop     | Loading     |                                                                | Loading
         | Stopped     |                                                                | Stopped
         | Buffering   | restart buffering from the beginning of the file               | Loading
         | Playing     | stop output and refill buffers from the beginning of the file  | Loading
         | Paused      | restart buffering from the beginning of the file               | Loading

events
function | prev. state | event                                                          | new state
---------+-------------+----------------------------------------------------------------+----------
         | Buffering   | when the buffers are filled start playing                      | Playing
         | Loading     | when buffers are filled                                        | Stopped



2. live stream
==============
function | prev. state | action                                                         | new state
---------+-------------+----------------------------------------------------------------+----------
ctor     |             |                                                                | Loading
---------+-------------+----------------------------------------------------------------+----------
setUrl   | Loading     |                                                                | Stopped
         | Stopped     |                                                                | Stopped
---------+-------------+----------------------------------------------------------------+----------
play     | Loading     |                                                                | Error
         | Stopped     | start buffering                                                | Buffering
         | Buffering   | continue buffering                                             | Buffering
         | Playing     |                                                                | Playing
         | Paused      | continue playback                                              | Playing
---------+-------------+----------------------------------------------------------------+----------
pause    | Loading     |                                                                | Error
         | Stopped     |                                                                | Stopped
         | Buffering   | continue buffering                                             | Paused
         | Playing     | pause output and fill (ring-)buffers to the max                | Paused
         | Paused      |                                                                | Paused
---------+-------------+----------------------------------------------------------------+----------
stop     | Loading     |                                                                | Error
         | Stopped     |                                                                | Stopped
         | Buffering   | clear buffers                                                  | Stopped
         | Playing     | stop output and clear buffers                                  | Stopped
         | Paused      | clear buffers                                                  | Stopped

events
function | prev. state | event                                                          | new state
---------+-------------+----------------------------------------------------------------+----------
         | Buffering   | when the buffers are filled start playing                      | Playing