-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathffplay_pause.drawio
94 lines (94 loc) · 17.6 KB
/
ffplay_pause.drawio
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
86
87
88
89
90
91
92
93
94
<mxfile host="65bd71144e">
<diagram id="CqIRds3xTX2TwXZJ1fw-" name="Page-1">
<mxGraphModel dx="562" dy="1143" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
<root>
<mxCell id="0"/>
<mxCell id="1" parent="0"/>
<mxCell id="4" style="edgeStyle=none;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="2" target="3">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="2" value="<div style="color: rgb(204, 204, 204); font-family: Menlo, Monaco, &quot;Courier New&quot;, monospace; font-size: 10.8px; line-height: 16px;"><div style=""><span style="color: rgb(197, 134, 192);">...</span></div><div style=""> <span style="color: #c586c0;">case</span> SDLK_p:</div><div style=""> <span style="color: #c586c0;">case</span> SDLK_SPACE:</div><div style=""> <span style="color: #dcdcaa;">toggle_pause</span>(cur_stream);</div><div style="">...</div></div>" style="rounded=0;whiteSpace=wrap;html=1;fillColor=#a20025;fontColor=#ffffff;strokeColor=#6F0000;" vertex="1" parent="1">
<mxGeometry x="40" y="60" width="170" height="90" as="geometry"/>
</mxCell>
<mxCell id="7" style="edgeStyle=none;html=1;exitX=0.5;exitY=1;exitDx=0;exitDy=0;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="3" target="6">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="3" value="<div style="color: rgb(204, 204, 204); font-family: Menlo, Monaco, &quot;Courier New&quot;, monospace; font-size: 10.8px; line-height: 16px;"><div style=""> <span style="color: rgb(220, 220, 170);">stream_toggle_pause</span>(is);</div><div style=""> <span style="color: rgb(156, 220, 254);">is</span>-&gt;<span style="color: rgb(156, 220, 254);">step</span> <span style="color: rgb(212, 212, 212);">=</span> <span style="color: rgb(181, 206, 168);">0</span>;</div></div>" style="rounded=1;whiteSpace=wrap;html=1;labelBackgroundColor=none;fillColor=#0050ef;fontColor=#ffffff;strokeColor=#001DBC;" vertex="1" parent="1">
<mxGeometry x="37.5" y="180" width="175" height="40" as="geometry"/>
</mxCell>
<mxCell id="10" style="edgeStyle=none;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="6" target="9">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="13" value="true" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="10">
<mxGeometry x="0.1414" y="-1" relative="1" as="geometry">
<mxPoint x="-5" y="-1" as="offset"/>
</mxGeometry>
</mxCell>
<mxCell id="12" style="edgeStyle=none;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="6" target="11">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="14" value="false" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" vertex="1" connectable="0" parent="12">
<mxGeometry x="0.2897" relative="1" as="geometry">
<mxPoint y="-9" as="offset"/>
</mxGeometry>
</mxCell>
<mxCell id="6" value="之前是暂停?" style="rhombus;whiteSpace=wrap;html=1;labelBackgroundColor=none;fillColor=#60a917;fontColor=#ffffff;strokeColor=#2D7600;" vertex="1" parent="1">
<mxGeometry x="50" y="250" width="150" height="40" as="geometry"/>
</mxCell>
<mxCell id="15" style="edgeStyle=none;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;" edge="1" parent="1" source="9" target="11">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="330" y="375"/>
</Array>
</mxGeometry>
</mxCell>
<mxCell id="9" value="<span style="font-family: Menlo, Monaco, &quot;Courier New&quot;, monospace; font-size: 10.8px; color: rgb(220, 220, 170);">set_clock</span><span style="color: rgb(204, 204, 204); font-family: Menlo, Monaco, &quot;Courier New&quot;, monospace; font-size: 10.8px;">(</span><span style="font-family: Menlo, Monaco, &quot;Courier New&quot;, monospace; font-size: 10.8px; color: rgb(212, 212, 212);">&amp;</span><span style="font-family: Menlo, Monaco, &quot;Courier New&quot;, monospace; font-size: 10.8px; color: rgb(156, 220, 254);">is</span><span style="color: rgb(204, 204, 204); font-family: Menlo, Monaco, &quot;Courier New&quot;, monospace; font-size: 10.8px;">-&gt;</span><span style="font-family: Menlo, Monaco, &quot;Courier New&quot;, monospace; font-size: 10.8px; color: rgb(156, 220, 254);">vidclk</span><span style="color: rgb(204, 204, 204); font-family: Menlo, Monaco, &quot;Courier New&quot;, monospace; font-size: 10.8px;">, ...)设置视频时钟</span>" style="rounded=1;whiteSpace=wrap;html=1;labelBackgroundColor=none;fillColor=#0050ef;fontColor=#ffffff;strokeColor=#001DBC;" vertex="1" parent="1">
<mxGeometry x="240" y="250" width="180" height="40" as="geometry"/>
</mxCell>
<mxCell id="17" style="edgeStyle=none;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;" edge="1" parent="1" source="11" target="16">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="11" value="<div style="color: rgb(204, 204, 204); font-family: Menlo, Monaco, &quot;Courier New&quot;, monospace; font-size: 10.8px; line-height: 16px;"><span style="color: rgb(220, 220, 170);">set_clock</span>(<span style="color: rgb(212, 212, 212);">&amp;</span><span style="color: rgb(156, 220, 254);">is</span>-&gt;<span style="color: rgb(156, 220, 254);">extclk, ...)设置外部时钟</span></div>" style="rounded=1;whiteSpace=wrap;html=1;labelBackgroundColor=none;fillColor=#0050ef;fontColor=#ffffff;strokeColor=#001DBC;" vertex="1" parent="1">
<mxGeometry x="32.5" y="350" width="185" height="50" as="geometry"/>
</mxCell>
<mxCell id="21" style="edgeStyle=none;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;dashed=1;" edge="1" parent="1" source="16" target="20">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="23" style="edgeStyle=none;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;dashed=1;" edge="1" parent="1" source="16" target="22">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="260" y="485"/>
<mxPoint x="260" y="635"/>
</Array>
</mxGeometry>
</mxCell>
<mxCell id="25" style="edgeStyle=none;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;dashed=1;fontColor=none;exitX=1;exitY=0.5;exitDx=0;exitDy=0;" edge="1" parent="1" source="16" target="24">
<mxGeometry relative="1" as="geometry">
<Array as="points">
<mxPoint x="260" y="485"/>
<mxPoint x="260" y="795"/>
</Array>
</mxGeometry>
</mxCell>
<mxCell id="27" style="edgeStyle=none;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;dashed=1;fontColor=none;" edge="1" parent="1" source="16" target="26">
<mxGeometry relative="1" as="geometry"/>
</mxCell>
<mxCell id="16" value="<div style="font-family: Menlo, Monaco, &quot;Courier New&quot;, monospace; font-size: 10.8px; line-height: 16px;"><span style="color: rgb(204, 204, 204);"><span style="color: rgb(156, 220, 254);">is</span>-&gt;<span style="color: rgb(156, 220, 254);">paused</span> <span style="color: rgb(212, 212, 212);">=</span>&nbsp;</span><font style="" color="#9cdcfe">...</font><font style="" color="#cccccc">&nbsp;</font><span style="color: rgb(212, 212, 212);">=</span> <span style="color: rgb(212, 212, 212);">!</span><span style="color: rgb(156, 220, 254);">is</span><font style="" color="#cccccc">-&gt;</font><span style="color: rgb(156, 220, 254);">paused</span><font style="" color="#cccccc">;切换暂停状态,同时根据is-&gt;paused设置三个时钟的paused</font></div>" style="rounded=1;whiteSpace=wrap;html=1;labelBackgroundColor=none;fillColor=#0050ef;fontColor=#ffffff;strokeColor=#001DBC;" vertex="1" parent="1">
<mxGeometry x="52.5" y="440" width="145" height="90" as="geometry"/>
</mxCell>
<mxCell id="20" value="<div style="color: rgb(204, 204, 204); font-family: Menlo, Monaco, &quot;Courier New&quot;, monospace; font-size: 10.8px; line-height: 16px;"><span style="color: rgb(220, 220, 170);">video_refresh()</span><span style="color: rgb(220, 220, 170); font-size: 10.8px;">{</span></div><div style="color: rgb(204, 204, 204); font-family: Menlo, Monaco, &quot;Courier New&quot;, monospace; font-size: 10.8px; line-height: 16px;"><span style="color: rgb(220, 220, 170); font-size: 10.8px;">...</span></div><div style="color: rgb(204, 204, 204); font-family: Menlo, Monaco, &quot;Courier New&quot;, monospace; font-size: 10.8px; line-height: 16px;"><span style="font-size: 10.8px; color: rgb(197, 134, 192);">if</span><span style="font-size: 10.8px;"> (</span><span style="font-size: 10.8px; color: rgb(156, 220, 254);">is</span><span style="font-size: 10.8px;">-&gt;</span><span style="font-size: 10.8px; color: rgb(156, 220, 254);">paused</span><span style="font-size: 10.8px;">)</span></div><div style="color: rgb(204, 204, 204); font-family: Menlo, Monaco, &quot;Courier New&quot;, monospace; font-size: 10.8px; line-height: 16px;"><div style=""> <span style="color: #c586c0;">goto</span> display;</div><div style=""><span style="font-size: 10.8px;">...}</span></div></div>" style="rounded=1;whiteSpace=wrap;html=1;labelBackgroundColor=none;fillColor=#647687;fontColor=#ffffff;strokeColor=#314354;" vertex="1" parent="1">
<mxGeometry x="320" y="440" width="120" height="90" as="geometry"/>
</mxCell>
<mxCell id="22" value="<div style="color: rgb(204, 204, 204); font-family: Menlo, Monaco, &quot;Courier New&quot;, monospace; font-size: 10.8px; line-height: 16px;"><div style="font-size: 10.8px; line-height: 16px;"><span style="color: rgb(220, 220, 170);">audio_decode_frame(){</span></div><div style="font-size: 10.8px; line-height: 16px;"><span style="color: rgb(220, 220, 170);">...</span></div><div style="font-size: 10.8px; line-height: 16px;"><div style=""> <span style="color: rgb(197, 134, 192);">if</span> (<span style="color: rgb(156, 220, 254);">is</span>-&gt;<span style="color: rgb(156, 220, 254);">paused</span>)</div></div><div style="font-size: 10.8px; line-height: 16px;"><span style="font-size: 10.8px;"> </span><span style="font-size: 10.8px; color: rgb(197, 134, 192);">return</span><span style="font-size: 10.8px;"> </span><span style="font-size: 10.8px; color: rgb(212, 212, 212);">-</span><span style="font-size: 10.8px; color: rgb(181, 206, 168);">1</span><span style="font-size: 10.8px;">;</span></div><div style="font-size: 10.8px; line-height: 16px;"><span style="color: rgb(220, 220, 170);">...}</span></div></div>" style="rounded=1;whiteSpace=wrap;html=1;labelBackgroundColor=none;fillColor=#647687;fontColor=#ffffff;strokeColor=#314354;" vertex="1" parent="1">
<mxGeometry x="320" y="590" width="140" height="90" as="geometry"/>
</mxCell>
<mxCell id="24" value="<div style="color: rgb(204, 204, 204); font-family: Menlo, Monaco, &quot;Courier New&quot;, monospace; font-size: 10.8px; line-height: 16px;"><span style="color: rgb(220, 220, 170);">read_thread(){</span></div><div style="color: rgb(204, 204, 204); font-family: Menlo, Monaco, &quot;Courier New&quot;, monospace; font-size: 10.8px; line-height: 16px;"><span style="color: #dcdcaa;">...</span></div><div style="font-family: Menlo, Monaco, &quot;Courier New&quot;, monospace; font-size: 10.8px; line-height: 16px;"><div style="color: rgb(204, 204, 204);"><span style="color: #c586c0;">if</span> (<span style="color: #9cdcfe;">is</span>-&gt;<span style="color: #9cdcfe;">paused</span> <span style="color: #d4d4d4;">!=</span> <span style="color: #9cdcfe;">is</span>-&gt;<span style="color: #9cdcfe;">last_paused</span>) {</div><div style=""><font color="#9cdcfe">...}</font></div><div style="color: rgb(204, 204, 204);"> <span style="color: #c586c0;">else</span></div><div style=""><font color="#dcdcaa">...</font></div></div><div style="color: rgb(204, 204, 204); font-family: Menlo, Monaco, &quot;Courier New&quot;, monospace; font-size: 10.8px; line-height: 16px;"><span style="font-size: 10.8px;"> }</span><span style="color: rgb(220, 220, 170);">}</span></div>" style="rounded=1;whiteSpace=wrap;html=1;labelBackgroundColor=none;fillColor=#647687;fontColor=#ffffff;strokeColor=#314354;" vertex="1" parent="1">
<mxGeometry x="320" y="730" width="250" height="130" as="geometry"/>
</mxCell>
<mxCell id="26" value="<div style="color: rgb(204, 204, 204); font-family: Menlo, Monaco, &quot;Courier New&quot;, monospace; font-size: 10.8px; line-height: 16px;"><span style="color: rgb(220, 220, 170);">get_clock(){</span></div><div style="color: rgb(204, 204, 204); font-family: Menlo, Monaco, &quot;Courier New&quot;, monospace; font-size: 10.8px; line-height: 16px;"><span style="color: #dcdcaa;">...</span></div><div style="color: rgb(204, 204, 204); font-family: Menlo, Monaco, &quot;Courier New&quot;, monospace; font-size: 10.8px; line-height: 16px;"><div style="font-size: 10.8px; line-height: 16px;"><div> <span style="color: #c586c0;">if</span> (<span style="color: #9cdcfe;">c</span>-&gt;<span style="color: #9cdcfe;">paused</span>)</div><div> {</div><div> <span style="color: #c586c0;">return</span> <span style="color: #9cdcfe;">c</span>-&gt;<span style="color: #9cdcfe;">pts</span>;</div><div> }</div></div></div><div style="color: rgb(204, 204, 204); font-family: Menlo, Monaco, &quot;Courier New&quot;, monospace; font-size: 10.8px; line-height: 16px;"><span style="color: rgb(220, 220, 170);">}</span></div>" style="rounded=1;whiteSpace=wrap;html=1;labelBackgroundColor=none;fontColor=#ffffff;fillColor=#647687;strokeColor=#314354;" vertex="1" parent="1">
<mxGeometry x="65" y="585" width="120" height="125" as="geometry"/>
</mxCell>
</root>
</mxGraphModel>
</diagram>
</mxfile>