~aleteoryx/muditaos

muditaos/module-bluetooth/doc/bt_play_audio_handling.svg -rw-r--r-- 9.7 KiB
a405cad6Aleteoryx trim readme 6 days 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:994px;height:472px;" version="1.1" viewBox="0 0 994 472" width="994px" zoomAndPan="magnify"><defs><filter height="300%" id="f135jywboe54b7" 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="177.5" x2="177.5" y1="86.2969" y2="385.3594"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="346.5" x2="346.5" y1="86.2969" y2="385.3594"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="540.5" x2="540.5" y1="86.2969" y2="385.3594"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="728" x2="728" y1="86.2969" y2="385.3594"/><line style="stroke: #A80036; stroke-width: 1.0; stroke-dasharray: 5.0,5.0;" x1="885" x2="885" 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(#f135jywboe54b7)" 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(#f135jywboe54b7)" 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(#f135jywboe54b7)" 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(#f135jywboe54b7)" style="stroke: #A80036; stroke-width: 2.0;"/><rect fill="#FEFECE" filter="url(#f135jywboe54b7)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="85" x="133.5" y="51"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="71" x="140.5" y="70.9951">A2DP Sink</text><rect fill="#FEFECE" filter="url(#f135jywboe54b7)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="85" x="133.5" y="384.3594"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="71" x="140.5" y="404.3545">A2DP Sink</text><rect fill="#FEFECE" filter="url(#f135jywboe54b7)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="224" x="232.5" y="51"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="210" x="239.5" y="70.9951">Source's AVRCP event handler</text><rect fill="#FEFECE" filter="url(#f135jywboe54b7)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="224" x="232.5" y="384.3594"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="210" x="239.5" y="404.3545">Source's AVRCP event handler</text><rect fill="#FEFECE" filter="url(#f135jywboe54b7)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="136" x="470.5" y="51"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="122" x="477.5" y="70.9951">Service Bluetooth</text><rect fill="#FEFECE" filter="url(#f135jywboe54b7)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="136" x="470.5" y="384.3594"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="122" x="477.5" y="404.3545">Service Bluetooth</text><rect fill="#FEFECE" filter="url(#f135jywboe54b7)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="107" x="673" y="51"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="93" x="680" y="70.9951">Service Audio</text><rect fill="#FEFECE" filter="url(#f135jywboe54b7)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="107" x="673" y="384.3594"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="93" x="680" y="404.3545">Service Audio</text><rect fill="#FEFECE" filter="url(#f135jywboe54b7)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="179" x="794" y="51"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="165" x="801" y="70.9951">Application music player</text><rect fill="#FEFECE" filter="url(#f135jywboe54b7)" height="30.2969" style="stroke: #A80036; stroke-width: 1.5;" width="179" x="794" y="384.3594"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacingAndGlyphs" textLength="165" x="801" y="404.3545">Application music player</text><polygon fill="#A80036" points="166,113.4297,176,117.4297,166,121.4297,170,117.4297" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="27" x2="172" y1="117.4297" y2="117.4297"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="127" x="34" y="112.3638">Play button pressed</text><polygon fill="#A80036" points="334.5,142.5625,344.5,146.5625,334.5,150.5625,338.5,146.5625" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="178" x2="340.5" y1="146.5625" y2="146.5625"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="113" x="185" y="141.4966">AVRCP event play</text><polygon fill="#A80036" points="528.5,171.6953,538.5,175.6953,528.5,179.6953,532.5,175.6953" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="346.5" x2="534.5" y1="175.6953" y2="175.6953"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="129" x="353.5" y="170.6294">Event play message</text><polygon fill="#A80036" points="716.5,200.8281,726.5,204.8281,716.5,208.8281,720.5,204.8281" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="540.5" x2="722.5" y1="204.8281" y2="204.8281"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="164" x="547.5" y="199.7622">Stream resume message</text><rect fill="#EEEEEE" filter="url(#f135jywboe54b7)" height="3" style="stroke: #EEEEEE; stroke-width: 1.0;" width="979" x="3" y="233.3945"/><line style="stroke: #000000; stroke-width: 1.0;" x1="3" x2="982" y1="233.3945" y2="233.3945"/><line style="stroke: #000000; stroke-width: 1.0;" x1="3" x2="982" y1="236.3945" y2="236.3945"/><rect fill="#EEEEEE" filter="url(#f135jywboe54b7)" height="23.1328" style="stroke: #000000; stroke-width: 2.0;" width="174" x="405.5" y="222.8281"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacingAndGlyphs" textLength="160" x="411.5" y="238.895">Handle play message</text><polygon fill="#FBFB77" filter="url(#f135jywboe54b7)" points="675,260.9609,781,260.9609,791,271.9609,781,283.9609,675,283.9609,665,271.9609,675,260.9609" style="stroke: #A80036; stroke-width: 1.0;"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="102" x="677" y="277.0278">Resume stream</text><rect fill="#EEEEEE" filter="url(#f135jywboe54b7)" height="3" style="stroke: #EEEEEE; stroke-width: 1.0;" width="979" x="3" y="302.0938"/><line style="stroke: #000000; stroke-width: 1.0;" x1="3" x2="982" y1="302.0938" y2="302.0938"/><line style="stroke: #000000; stroke-width: 1.0;" x1="3" x2="982" y1="305.0938" y2="305.0938"/><polygon fill="#A80036" points="873.5,334.2266,883.5,338.2266,873.5,342.2266,877.5,338.2266" style="stroke: #A80036; stroke-width: 1.0;"/><line style="stroke: #A80036; stroke-width: 1.0;" x1="728.5" x2="879.5" y1="338.2266" y2="338.2266"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="97" x="735.5" y="333.1606">Audio resumed</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="884.5" y1="367.3594" y2="367.3594"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacingAndGlyphs" textLength="120" x="44" y="362.2935">Show state playing</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 : Play button pressed
sink -> source : AVRCP event play 
source -> bt : Event play message
bt -> audio : Stream resume message
==Handle play message==
hnote over audio
    Resume stream
endhnote
== ==
audio -> app : Audio resumed
app -> User : Show state playing

@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>