summaryrefslogtreecommitdiffstats
path: root/media/libmedia/docs/paused.dot
blob: 11e17776b414d6f863e1ec2aff9f9f452e4d41c0 (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
73
74
75
76
77
78
79
80
81
82
83
84
85
digraph paused {
initial [label"INITIAL\n
mIgnoreNextPausedInt = false\n
mPaused = false\n
mPausedInt = false"];

resume_body [label"mIgnoreNextPausedInt = true\nif (mPaused || mPausedInt)"];
resume_paused [label"mPaused = false\nmPausedInt = false\nsignal()"];
resume_paused -> resume_merged
resume_merged [label"return"];

Application -> ATstop
ATstop [label"AudioTrack:stop()"];
ATstop -> pause
Application -> ATpause
ATpause [label"AudioTrack:pause()"];
ATpause -> pause
ATstart -> resume
ATstart [label"AudioTrack:start()"];
destructor [label"~AudioTrack()"];
destructor -> requestExit
requestExit [label"AudioTrackThread:requestExit()"];
requestExit -> resume
Application -> ATsetMarkerPosition
ATsetMarkerPosition [label"AudioTrack:setMarkerPosition()\nsets marker variables"];
ATsetMarkerPosition -> ATTwake
Application -> ATsetPositionUpdatePeriod
ATsetPositionUpdatePeriod [label"AudioTrack:setPositionUpdatePeriod()\nsets update period variables"];
ATsetPositionUpdatePeriod -> ATTwake
Application -> ATstart

resume [label"AudioTrackThread:resume()"];
resume -> resume_body

resume_body -> resume_paused [label"true"];
resume_body -> resume_merged [label"false"];

ATTwake [label"AudioTrackThread:wake()\nif (!mPaused && mPausedInt && mPausedNs > 0)"];
ATTwake-> ATTWake_wakeable [label"true"];
ATTWake_wakeable [label"mIgnoreNextPausedInt = true\nmPausedInt = false\nsignal()"];
ATTwake-> ATTWake_cannotwake [label"false"]
ATTWake_cannotwake [label"ignore"];

pause [label"mPaused = true"];
pause -> return

threadLoop [label"AudioTrackThread:threadLoop()\nENTRY"];
threadLoop -> threadLoop_1
threadLoop_1 [label"if (mPaused)"];
threadLoop_1 -> threadLoop_1_true [label"true"];
threadLoop_1 -> threadLoop_2 [label"false"];
threadLoop_1_true [label"wait()\nreturn true"];
threadLoop_2 [label"if (mIgnoreNextPausedInt)"];
threadLoop_2 -> threadLoop_2_true [label"true"];
threadLoop_2 -> threadLoop_3 [label"false"];
threadLoop_2_true [label"mIgnoreNextPausedInt = false\nmPausedInt = false"];
threadLoop_2_true -> threadLoop_3
threadLoop_3 [label"if (mPausedInt)"];
threadLoop_3 -> threadLoop_3_true [label"true"];
threadLoop_3 -> threadLoop_4 [label"false"];
threadLoop_3_true [label"wait()\nmPausedInt = false\nreturn true"];
threadLoop_4 [label"if (exitPending)"];
threadLoop_4 -> threadLoop_4_true [label"true"];
threadLoop_4 -> threadLoop_5 [label"false"];
threadLoop_4_true [label"return false"];
threadLoop_5 [label"ns = processAudioBuffer()"];
threadLoop_5 -> threadLoop_6
threadLoop_6 [label"case ns"];
threadLoop_6 -> threadLoop_6_0 [label"0"];
threadLoop_6 -> threadLoop_6_NS_INACTIVE [label"NS_INACTIVE"];
threadLoop_6 -> threadLoop_6_NS_NEVER [label"NS_NEVER"];
threadLoop_6 -> threadLoop_6_NS_WHENEVER [label"NS_WHENEVER"];
threadLoop_6 -> threadLoop_6_default [label"default"];
threadLoop_6_default [label"if (ns < 0)"];
threadLoop_6_default -> threadLoop_6_default_true [label"true"];
threadLoop_6_default -> threadLoop_6_default_false [label"false"];
threadLoop_6_default_true [label"FATAL"];
threadLoop_6_default_false [label"pauseInternal(ns) [wake()-able\nmPausedInternal = true\nmPausedNs = ns\nreturn true"];
threadLoop_6_0 [label"return true"];
threadLoop_6_NS_INACTIVE [label"pauseInternal()\nmPausedInternal = true\nmPausedNs = 0\nreturn true"];
threadLoop_6_NS_NEVER [label"return false"];
threadLoop_6_NS_WHENEVER [label"ns = 1s"];
threadLoop_6_NS_WHENEVER -> threadLoop_6_default_false

}