~aleteoryx/muditaos

ref: 0e8b4c848e3f87f3bbb1f64ef7460cf56017b87f muditaos/module-bluetooth/doc/bt_pause_audio_handling.svg -rw-r--r-- 9.7 KiB
0e8b4c84 — Lefucjusz [BH-2108] Fix misaligned charging symbol 3 months ago
                                                                                
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
<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentScriptType="application/ecmascript" contentStyleType="text/css" height="472px" preserveAspectRatio="none" style="width:997px;height:472px;" version="1.1" viewBox="0 0 997 472" width="997px" zoomAndPan="magnify"><defs><filter height="300%" id="f11rr0enbm1wc6" width="300%" x="-1" y="-1"><feGaussianBlur result="blurOut" stdDeviation="2.0"/><feColorMatrix in="blurOut" result="blurOut2" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .4 0"/><feOffset dx="4.0" dy="4.0" in="blurOut2" result="blurOut3"/><feBlend in="SourceGraphic" in2="blurOut3" mode="normal"/></filter></defs><g><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="27" x2="27" y1="86.2969" y2="385.3594"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="190.5" x2="190.5" y1="86.2969" y2="385.3594"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="359.5" x2="359.5" y1="86.2969" y2="385.3594"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="553.5" x2="553.5" y1="86.2969" y2="385.3594"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="731" x2="731" y1="86.2969" y2="385.3594"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="888" x2="888" y1="86.2969" y2="385.3594"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="32" x="8" y="82.9951">User</text><ellipse cx="27" cy="13" fill="#FEFECE" filter="url(#f11rr0enbm1wc6)" rx="8" ry="8" style="stroke: #A80036; stroke-width: 2.0;"/><path d="M27,21 L27,48 M14,29 L40,29 M27,48 L14,63 M27,48 L40,63 " fill="none" filter="url(#f11rr0enbm1wc6)" style="stroke: #A80036; stroke-width: 2.0;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="32" x="8" y="397.3545">User</text><ellipse cx="27" cy="410.6563" fill="#FEFECE" filter="url(#f11rr0enbm1wc6)" rx="8" ry="8" style="stroke: #A80036; stroke-width: 2.0;"/><path d="M27,418.6563 L27,445.6563 M14,426.6563 L40,426.6563 M27,445.6563 L14,460.6563 M27,445.6563 L40,460.6563 " fill="none" filter="url(#f11rr0enbm1wc6)" style="stroke: #A80036; stroke-width: 2.0;"/><rect fill="#FEFECE" filter="url(#f11rr0enbm1wc6)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="85" x="146.5" y="51"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="71" x="153.5" y="70.9951">A2DP Sink</text><rect fill="#FEFECE" filter="url(#f11rr0enbm1wc6)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="85" x="146.5" y="384.3594"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="71" x="153.5" y="404.3545">A2DP Sink</text><rect fill="#FEFECE" filter="url(#f11rr0enbm1wc6)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="224" x="245.5" y="51"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="210" x="252.5" y="70.9951">Source's AVRCP event handler</text><rect fill="#FEFECE" filter="url(#f11rr0enbm1wc6)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="224" x="245.5" y="384.3594"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="210" x="252.5" y="404.3545">Source's AVRCP event handler</text><rect fill="#FEFECE" filter="url(#f11rr0enbm1wc6)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="136" x="483.5" y="51"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="122" x="490.5" y="70.9951">Service Bluetooth</text><rect fill="#FEFECE" filter="url(#f11rr0enbm1wc6)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="136" x="483.5" y="384.3594"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="122" x="490.5" y="404.3545">Service Bluetooth</text><rect fill="#FEFECE" filter="url(#f11rr0enbm1wc6)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="107" x="676" y="51"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="93" x="683" y="70.9951">Service Audio</text><rect fill="#FEFECE" filter="url(#f11rr0enbm1wc6)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="107" x="676" y="384.3594"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="93" x="683" y="404.3545">Service Audio</text><rect fill="#FEFECE" filter="url(#f11rr0enbm1wc6)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="179" x="797" y="51"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="165" x="804" y="70.9951">Application music player</text><rect fill="#FEFECE" filter="url(#f11rr0enbm1wc6)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="179" x="797" y="384.3594"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="165" x="804" y="404.3545">Application music player</text><polygon fill="#A80036" points="179,113.4297,189,117.4297,179,121.4297,183,117.4297" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="27" x2="185" y1="117.4297" y2="117.4297"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="140" x="34" y="112.3638">Pause button pressed</text><polygon fill="#A80036" points="347.5,142.5625,357.5,146.5625,347.5,150.5625,351.5,146.5625" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="191" x2="353.5" y1="146.5625" y2="146.5625"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="126" x="198" y="141.4966">AVRCP event pause</text><polygon fill="#A80036" points="541.5,171.6953,551.5,175.6953,541.5,179.6953,545.5,175.6953" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="359.5" x2="547.5" y1="175.6953" y2="175.6953"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="129" x="366.5" y="170.6294">Event play message</text><polygon fill="#A80036" points="719.5,200.8281,729.5,204.8281,719.5,208.8281,723.5,204.8281" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="553.5" x2="725.5" y1="204.8281" y2="204.8281"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="154" x="560.5" y="199.7622">Stream pause message</text><rect fill="#EEEEEE" filter="url(#f11rr0enbm1wc6)" height="3" style="stroke: #EEEEEE; stroke-width: 1.0;" width="982" x="3" y="233.3945"/><line style="stroke: #000000; stroke-width: 1.0;" x1="3" x2="985" y1="233.3945" y2="233.3945"/><line style="stroke: #000000; stroke-width: 1.0;" x1="3" x2="985" y1="236.3945" y2="236.3945"/><rect fill="#EEEEEE" filter="url(#f11rr0enbm1wc6)" height="23.1328" style="stroke: #000000; stroke-width: 2.0;" width="188" x="400" y="222.8281"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="174" x="406" y="238.895">Handle pause message</text><polygon fill="#FBFB77" filter="url(#f11rr0enbm1wc6)" points="685,260.9609,778,260.9609,788,271.9609,778,283.9609,685,283.9609,675,271.9609,685,260.9609" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="89" x="687" y="277.0278">Pause stream</text><rect fill="#EEEEEE" filter="url(#f11rr0enbm1wc6)" height="3" style="stroke: #EEEEEE; stroke-width: 1.0;" width="982" x="3" y="302.0938"/><line style="stroke: #000000; stroke-width: 1.0;" x1="3" x2="985" y1="302.0938" y2="302.0938"/><line style="stroke: #000000; stroke-width: 1.0;" x1="3" x2="985" y1="305.0938" y2="305.0938"/><polygon fill="#A80036" points="876.5,334.2266,886.5,338.2266,876.5,342.2266,880.5,338.2266" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="731.5" x2="882.5" y1="338.2266" y2="338.2266"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="87" x="738.5" y="333.1606">Audio paused</text><polygon fill="#A80036" points="38,363.3594,28,367.3594,38,371.3594,34,367.3594" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="32" x2="887.5" y1="367.3594" y2="367.3594"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="122" x="44" y="362.2935">Show state paused</text><!--
@startuml

actor User
participant "A2DP Sink" as sink
participant "Source's AVRCP event handler" as source
participant "Service Bluetooth" as bt
participant "Service Audio" as audio
participant "Application music player" as app 


User -> sink : Pause button pressed
sink -> source : AVRCP event pause 
source -> bt : Event play message
bt -> audio : Stream pause message
==Handle pause message==
hnote over audio
    Pause stream
endhnote
== ==
audio -> app : Audio paused
app -> User : Show state paused

@enduml

PlantUML version 1.2018.13(Mon Nov 26 18:11:51 CET 2018)
(GPL source distribution)
Java Runtime: OpenJDK Runtime Environment
JVM: OpenJDK 64-Bit Server VM
Java Version: 11.0.11+9-Ubuntu-0ubuntu2.20.04
Operating System: Linux
OS Version: 5.11.0-27-generic
Default Encoding: UTF-8
Language: en
Country: US
--></g></svg>