# GStreamer 插件架构

Source: [https://docs.qualcomm.com/doc/80-70022-50SC/topic/architecture.html](https://docs.qualcomm.com/doc/80-70022-50SC/topic/architecture.html)

Qualcomm IM SDK 将硬件的复杂性隐藏在插件架构内，并为应用程序提供了 API。使用此框架，您可以创建应用程序，而无需访问低层平台库和硬件详细信息，这些信息可能因平台而异。

[配置 Qualcomm GStreamer 插件](https://docs.qualcomm.com/doc/80-70022-50SC/topic/qim-sdk-plugins.html)包括视频编码/解码、摄像头 ISP、GPU、显示器、音频 DSP (aDSP) 和 AI/ML 加速器。

Figure : Qualcomm IM SDK GStreamer 插件架构
            
            <?xml version="1.0" encoding="UTF-8"?>
<svg id="Layer_2" data-name="Layer 2" xmlns="http://www.w3.org/2000/svg" width="1280" height="1144.043929691669291" viewbox="0 0 1280 1144.043929691669291">
  <g>
    <rect x=".5" y=".432513131837368" width="1279" height="1143.04345703125" rx="7.5" ry="7.5" style="fill: #fafafa;"></rect>
    <path d="M1272,.932330026368618c3.85986328125,0,7,3.14019775390625,7,7v1128.04400634765625c0,3.85980224609375-3.14013671875,7-7,7H8c-3.859832763671875,0-7-3.14019775390625-7-7V7.932330026368618C1,4.072527780274868,4.140167236328125.932330026368618,8,.932330026368618h1264M1272-.067669973631382H8C3.581665039061591-.067669973631382,0,3.514178170899868,0,7.932330026368618v1128.04400634765625c0,4.41815185546875,3.581665039061591,8,8,8h1264c4.418334960939319,0,8-3.58184814453125,8-8V7.932330026368618c0-4.41815185546875-3.581665039060681-8-8-8h0Z" style="fill: #d2d7e1;"></path>
  </g>
  <rect x="20" y="21.210683939899354" width="1240" height="50" rx="4" ry="4" style="fill: none; stroke: #4d4d4d; stroke-miterlimit: 10; stroke-width: 2px;"></rect>
  <rect x="20" y="91.210683939899354" width="1240" height="839.299903660448763" rx="4" ry="4" style="fill: none; stroke: #4d4d4d; stroke-miterlimit: 10; stroke-width: 2px;"></rect>
  <path d="M20,706.479118725467742v-192c0-2.209138999323841,1.790861000677069-4,4-4h1232c2.209138999320203,0,4,1.790861000676159,4,4v192" style="fill: none; stroke: #4d4d4d; stroke-miterlimit: 10; stroke-width: 2px;"></path>
  <text transform="translate(561.8671875 49.732653512696743)" style="font-family: Roboto-Bold, Roboto; font-size: 16px; font-weight: 700;"><tspan x="0" y="0">Customer Application</tspan></text>
  <text transform="translate(543.4921875 126.824541940431118)" style="font-family: Roboto-Bold, Roboto; font-size: 16px; font-weight: 700;"><tspan x="0" y="0">Qualcomm IM SDK Plugins</tspan></text>
  <text transform="translate(558.71484375 540.701769723634243)" style="font-family: Roboto-Bold, Roboto; font-size: 16px; font-weight: 700;"><tspan x="0" y="0">HAL/Platform libraries</tspan></text>
  <g>
    <g>
      <text transform="translate(175.17529296875 170.426958932618618)" style="font-family: Roboto-Medium, Roboto; font-size: 16px; font-weight: 500;"><tspan x="0" y="0">Multimedia subsytem</tspan></text>
      <g>
        <g>
          <rect x="49" y="184.731980833528723" width="210" height="40" rx="4" ry="4" style="fill: #2a2aea; stroke: #4d4d4d; stroke-miterlimit: 10;"></rect>
          <text transform="translate(75.6759033203125 209.407549752931118)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Audio encode/decode</tspan></text>
          <rect x="49" y="231.683090728646675" width="210" height="40" rx="4" ry="4" style="fill: #2a2aea;"></rect>
          <text transform="translate(99.9219970703125 256.358828439454555)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Camera source</tspan></text>
          <rect x="49" y="278.634200623765537" width="210" height="40" rx="4" ry="4" style="fill: #2a2aea;"></rect>
          <text transform="translate(85.5546875 303.310148133973598)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Socket source/sink</tspan></text>
          <rect x="49" y="325.585310518883489" width="210" height="40" rx="4" ry="4" style="fill: #2a2aea;"></rect>
          <text transform="translate(98.5 350.261149301270962)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Video compose</tspan></text>
          <rect x="49" y="372.53642041400235" width="210" height="40" rx="4" ry="4" style="fill: #2a2aea;"></rect>
          <text transform="translate(106.21484375 397.21213044140768)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Video overlay</tspan></text>
          <rect x="49" y="419.487530309120302" width="210" height="40" rx="4" ry="4" style="fill: #2a2aea;"></rect>
          <text transform="translate(116.56640625 444.163088693360805)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Video split</tspan></text>
        </g>
        <g>
          <rect x="266" y="184.731980833528723" width="210" height="40" rx="4" ry="4" style="fill: #2a2aea;"></rect>
          <text transform="translate(313.406005859375 209.407549752931118)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Video transform</tspan></text>
          <rect x="266" y="231.683090728646675" width="210" height="40" rx="4" ry="4" style="fill: #007884;"></rect>
          <text transform="translate(336.566162109375 256.358828439454555)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">File parse</tspan></text>
          <rect x="266" y="278.634200623765537" width="210" height="40" rx="4" ry="4" style="fill: #007884;"></rect>
          <text transform="translate(307.1954345703125 303.310148133973598)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Pulse source/sink</tspan></text>
          <rect x="266" y="325.585310518883489" width="210" height="40" rx="4" ry="4" style="fill: #007884;"></rect>
          <text transform="translate(278.3907470703125 350.261149301270962)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Stream muxers/demuxers</tspan></text>
          <rect x="266" y="372.53642041400235" width="210" height="40" rx="4" ry="4" style="fill: #007884;"></rect>
          <text transform="translate(292.9766845703125 397.21213044140768)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Video encode/decode</tspan></text>
          <rect x="266" y="419.487530309120302" width="210" height="40" rx="4" ry="4" style="fill: #007884;"></rect>
          <text transform="translate(326.0115966796875 444.163088693360805)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Waylandsink</tspan></text>
        </g>
      </g>
      <rect x="40" y="145.354277286473916" width="445" height="326.205922841178108" rx="4" ry="4" style="fill: none; stroke: #4d4d4d; stroke-miterlimit: 10;"></rect>
    </g>
    <text transform="translate(715.07122802734375 170.426958932618618)" style="font-family: Roboto-Medium, Roboto; font-size: 16px; font-weight: 500;"><tspan x="0" y="0">AI/ML subsystem</tspan></text>
    <text transform="translate(663.60174560546875 279.134287729005337)" style="font-family: Roboto-Medium, Roboto; font-size: 16px; font-weight: 500;"><tspan x="0" y="0">Tensor</tspan><tspan x="-30.3046875" y="19.2001953125">postprocessing</tspan></text>
    <g>
      <rect x="514" y="185.134200623765537" width="170" height="60" rx="4" ry="4" style="fill: #007884;"></rect>
      <text transform="translate(576.2032470703125 219.809771432618618)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">LiteRT</tspan></text>
    </g>
    <g>
      <rect x="693.398388174689899" y="185.134200623765537" width="170" height="60" rx="4" ry="4" style="fill: #2a2aea;"></rect>
      <text transform="translate(714.089569091796875 210.209681405763149)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Qualcomm Neural</tspan><tspan x="-1.55078125" y="19.2001953125">Processing Engine</tspan></text>
    </g>
    <g>
      <rect x="872.398388174689899" y="185.134200623765537" width="170" height="60" rx="4" ry="4" style="fill: #2a2aea;"></rect>
      <text transform="translate(903.257537841796875 210.209681405763149)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Video to tensor</tspan><tspan x="20.59765625" y="19.2001953125">converter</tspan></text>
    </g>
    <g>
      <rect x="872.398388174689899" y="254.134200623765537" width="170" height="60" rx="4" ry="4" style="fill: #2a2aea;"></rect>
      <text transform="translate(916.878570556640625 288.809779062013149)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Metamuxer</tspan></text>
    </g>
    <g>
      <rect x="872.398388174689899" y="323.134200623765537" width="170" height="60" rx="4" ry="4" style="fill: #2a2aea;"></rect>
      <text transform="translate(899.515289306640625 357.809767617921352)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Tensor demuxer</tspan></text>
    </g>
    <g>
      <rect x="872.398388174689899" y="392.134200623765537" width="170" height="60" rx="4" ry="4" style="fill: #2a2aea;"></rect>
      <text transform="translate(926.015350341796875 426.809756173829555)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Batching</tspan></text>
    </g>
    <g>
      <rect x="522.978973579876765" y="314.113119632414055" width="160" height="60" rx="4" ry="4" style="fill: #2a2aea;"></rect>
      <text transform="translate(568.924072265625 348.788687600831508)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Detection</tspan></text>
    </g>
    <g>
      <rect x="522.978973579876765" y="383.113119632414055" width="160" height="60" rx="4" ry="4" style="fill: #2a2aea;"></rect>
      <text transform="translate(545.213134765625 417.788676156739712)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Pose estimation</tspan></text>
    </g>
    <g>
      <rect x="691.978973579876765" y="314.113119632414055" width="160" height="60" rx="4" ry="4" style="fill: #2a2aea;"></rect>
      <text transform="translate(723.498260498046875 348.788687600831508)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Classification</tspan></text>
    </g>
    <g>
      <rect x="691.978973579876765" y="383.113119632414055" width="160" height="60" rx="4" ry="4" style="fill: #2a2aea;"></rect>
      <text transform="translate(722.345916748046875 417.788676156739712)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Segmentation</tspan></text>
    </g>
    <rect x="505" y="145.354277286473916" width="546.399857263761078" height="326.205922841178108" rx="4" ry="4" style="fill: none; stroke: #4d4d4d; stroke-miterlimit: 10;"></rect>
    <rect x="514" y="254.134200623765537" width="349.398388174689899" height="198" rx="4" ry="4" style="fill: none; stroke: #4d4d4d; stroke-miterlimit: 10;"></rect>
    <g>
      <text transform="translate(1084.477325439453125 170.427050485352993)" style="font-family: Roboto-Medium, Roboto; font-size: 16px; font-weight: 500;"><tspan x="0" y="0">Network subsystem</tspan></text>
      <g>
        <rect x="1085.699928631880539" y="185.134200623765537" width="140" height="60" rx="4" ry="4" style="fill: #007884;"></rect>
        <text transform="translate(1136.207595825195312 219.810168161134243)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">RTSP</tspan></text>
      </g>
      <rect x="1071.399857263759259" y="145.354277286473916" width="168.600142736240741" height="326.205922841178108" rx="4" ry="4" style="fill: none; stroke: #4d4d4d; stroke-miterlimit: 10;"></rect>
    </g>
  </g>
  <g>
    <rect x="58.99993896484375" y="560.136494792405756" width="220" height="60" rx="4" ry="4" style="fill: #2a2aea;"></rect>
    <text transform="translate(113.839599609375 594.812060250977993)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Camera service</tspan></text>
  </g>
  <g>
    <rect x="297.881713867188409" y="560.136494792405756" width="220" height="60" rx="4" ry="4" style="fill: #2a2aea;"></rect>
    <text transform="translate(353.80340576171875 594.812060250977993)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Camera source</tspan></text>
  </g>
  <g>
    <rect x="536.76348876953125" y="560.136494792405756" width="220" height="60" rx="4" ry="4" style="fill: #2a2aea;"></rect>
    <text transform="translate(607.7867431640625 585.212328805665493)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Qualcomm</tspan><tspan x="-18.08203125" y="19.2001953125">computer vision</tspan></text>
  </g>
  <g>
    <rect x="775.645263671875" y="560.136494792405756" width="220" height="60" rx="4.000000000000005" ry="4.000000000000005" style="fill: #2a2aea;"></rect>
    <text transform="translate(858.59429931640625 594.812060250977993)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Weston</tspan></text>
  </g>
  <g>
    <rect x="1014.52703857421875" y="560.136494792405756" width="220.000000000001819" height="60" rx="4" ry="4" style="fill: #2a2aea;"></rect>
    <text transform="translate(1093.83544921875 594.812060250977993)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">FastRPC</tspan></text>
  </g>
  <g>
    <rect x="58.99993896484375" y="630.479118725467742" width="220" height="60" rx="4.000000000000001" ry="4.000000000000001" style="fill: #2a2aea;"></rect>
    <text transform="translate(151.585693359375 665.154681100587368)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">GBM</tspan></text>
  </g>
  <g>
    <rect x="297.881713867188409" y="630.479118725467742" width="220" height="60" rx="4.000000000000003" ry="4.000000000000003" style="fill: #2a2aea;"></rect>
    <text transform="translate(357.38543701171875 665.154681100587368)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">GLES/OpenCL</tspan></text>
  </g>
  <g>
    <rect x="536.76348876953125" y="630.479118725467742" width="220" height="60" rx="4.000000000000007" ry="4.000000000000007" style="fill: #2a2aea;"></rect>
    <text transform="translate(601.3218994140625 665.154681100587368)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">CAMX/HAL3</tspan></text>
  </g>
  <g>
    <rect x="775.645263671875" y="630.479118725467742" width="220" height="60" rx="3.999999999999992" ry="3.999999999999992" style="fill: #2a2aea;"></rect>
    <text transform="translate(844.12554931640625 665.154681100587368)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Pulse audio</tspan></text>
  </g>
  <path d="M20,926.510587600348117v-192c0-2.209138999323841,1.790861000677069-4,4-4h1232c2.209138999320203,0,4,1.790861000676159,4,4v192" style="fill: none; stroke: #4d4d4d; stroke-miterlimit: 10; stroke-width: 2px;"></path>
  <text transform="translate(614.36328125 760.733233346681118)" style="font-family: Roboto-Bold, Roboto; font-size: 16px; font-weight: 700;"><tspan x="0" y="0">Drivers</tspan></text>
  <g>
    <rect x="58.99993896484375" y="780.167963667286131" width="220" height="60" rx="4" ry="4" style="fill: #2a2aea;"></rect>
    <text transform="translate(115.409912109375 814.843523874024868)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">CAMX/Camera</tspan></text>
  </g>
  <g>
    <rect x="297.881713867188409" y="780.167963667286131" width="220" height="60" rx="4" ry="4" style="fill: #2a2aea;"></rect>
    <text transform="translate(387.23699951171875 814.843523874024868)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Audio</tspan></text>
  </g>
  <g>
    <rect x="536.76348876953125" y="780.167963667286131" width="220" height="60" rx="4" ry="4" style="fill: #2a2aea;"></rect>
    <text transform="translate(620.8843994140625 814.843981637696743)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Display</tspan></text>
  </g>
  <g>
    <rect x="775.645263671875" y="780.167963667286131" width="220" height="60" rx="4" ry="4" style="fill: #2a2aea;"></rect>
    <text transform="translate(863.32086181640625 814.843523874024868)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">WLAN</tspan></text>
  </g>
  <g>
    <rect x="1014.52703857421875" y="780.167963667286131" width="220.000000000001819" height="60" rx="4" ry="4" style="fill: #2a2aea;"></rect>
    <text transform="translate(1105.03857421875 814.843523874024868)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">ALSA</tspan></text>
  </g>
  <g>
    <rect x="58.99993896484375" y="850.510587600348117" width="220" height="60" rx="4" ry="4" style="fill: #2a2aea;"></rect>
    <text transform="translate(153.316162109375 885.186175241212368)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">GPU</tspan></text>
  </g>
  <g>
    <rect x="297.881713867188409" y="850.510587600348117" width="220" height="60" rx="4" ry="4" style="fill: #2a2aea;"></rect>
    <text transform="translate(392.84246826171875 885.186175241212368)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">DSP</tspan></text>
  </g>
  <g>
    <rect x="536.76348876953125" y="850.510587600348117" width="220" height="60" rx="4" ry="4" style="fill: #2a2aea;"></rect>
    <text transform="translate(626.4195556640625 885.186175241212368)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Video</tspan></text>
  </g>
  <g>
    <rect x="775.645263671875" y="850.510587600348117" width="220" height="60" rx="4" ry="4" style="fill: #2a2aea;"></rect>
    <text transform="translate(851.52008056640625 885.186175241212368)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">ION/DMA</tspan></text>
  </g>
  <rect x="20" y="952.063895473308548" width="1240" height="130" rx="4" ry="4" style="fill: none; stroke: #4d4d4d; stroke-miterlimit: 10; stroke-width: 2px;"></rect>
  <text transform="translate(605.22265625 982.286517038087368)" style="font-family: Roboto-Bold, Roboto; font-size: 16px; font-weight: 700;"><tspan x="0" y="0">Hardware</tspan></text>
  <g>
    <rect x="58.99993896484375" y="1001.721271540246562" width="220" height="60" rx="4" ry="4" style="fill: #7c8aa3;"></rect>
    <text transform="translate(125.866943359375 1036.396807565431118)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Camera/ISP</tspan></text>
  </g>
  <g>
    <rect x="297.881713867188409" y="1001.721271540246562" width="220" height="60" rx="4" ry="4" style="fill: #7c8aa3;"></rect>
    <text transform="translate(349.80340576171875 1036.396807565431118)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Computer vision</tspan></text>
  </g>
  <g>
    <rect x="536.76348876953125" y="1001.721271540246562" width="220" height="60" rx="4" ry="4" style="fill: #7c8aa3;"></rect>
    <text transform="translate(617.8453369140625 1036.397295846681118)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Sensors</tspan></text>
  </g>
  <g>
    <rect x="775.645263671875" y="1001.721271540246562" width="220" height="60" rx="4" ry="4" style="fill: #7c8aa3;"></rect>
    <text transform="translate(865.00054931640625 1036.396807565431118)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Audio</tspan></text>
  </g>
  <g>
    <rect x="1014.52703857421875" y="1001.721271540246562" width="220.000000000001819" height="60" rx="4" ry="4" style="fill: #7c8aa3;"></rect>
    <text transform="translate(1104.18310546875 1036.396807565431118)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Video</tspan></text>
  </g>
  <text transform="translate(1169.15838623046875 1116.469317331056118)" style="font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">Hardware</tspan></text>
  <rect x="1148.540083384859827" y="1103.61720334626898" width="15.996000000001004" height="15.996000000001004" rx="2" ry="2" style="fill: #7c8aa3;"></rect>
  <g>
    <text transform="translate(942.5050048828125 1116.469317331056118)" style="font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">Qualcomm </tspan></text>
    <rect x="921.886713116187821" y="1103.61720334626898" width="15.99600000000828" height="15.996000000001004" rx="1.999999999999091" ry="1.999999999999091" style="fill: #2a2aea;"></rect>
    <text transform="translate(1051.40399169921875 1116.469317331056118)" style="font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">Open source</tspan></text>
    <rect x="1030.785694487420187" y="1103.61720334626898" width="15.996000000001004" height="15.996000000001004" rx="2" ry="2" style="fill: #007884;"></rect>
  </g>
</svg>

## 图像与显示架构

Source: [https://docs.qualcomm.com/doc/80-70022-50SC/topic/architecture.html](https://docs.qualcomm.com/doc/80-70022-50SC/topic/architecture.html)

Wayland 服务器使用 Wayland 协议来实现显示和图形服务器及其客户端之间的通信。显示与图形架构使用 Weston 服务器 (Weston)。

Weston 作为系统中的独立进程运行时，同时管理合成与显示。

Figure : Weston/Wayland 架构
            
            <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by Microsoft Visio, SVG Export weston_wayland_architecture.svg Layer_1 -->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:v="http://schemas.microsoft.com/visio/2003/SVGExtensions/" width="8.25758in" height="4.90835in" viewbox="0 0 594.546 353.401" xml:space="preserve" color-interpolation-filters="sRGB" class="st27"><v:documentproperties v:langid="1033" v:viewmarkup="false"></v:documentproperties>
<style>.svg-2 .st1 { fill: #fafafa; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-2 .st2 { fill: #d2d7e1; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-2 .st3 { fill: #ffffff; stroke: #6280cc; stroke-linecap: butt; stroke-width: 1.5 }
.svg-2 .st4 { fill: #000000; font-family: Roboto; font-size: 1.00001em }
.svg-2 .st5 { font-family: SimHei; font-size: 1em }
.svg-2 .st6 { fill: #007884; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-2 .st7 { fill: #ffffff; font-family: Roboto; font-size: 1.00001em }
.svg-2 .st8 { font-family: SimHei; font-size: 1em; letter-spacing: -0.00833327em }
.svg-2 .st9 { fill: #ffffff; font-family: Roboto; font-size: 1.00001em; letter-spacing: -0.0166665em }
.svg-2 .st10 { font-size: 1em; letter-spacing: -0.00833327em }
.svg-2 .st11 { font-size: 1em; letter-spacing: 0em }
.svg-2 .st12 { font-family: SimHei; font-size: 1em; letter-spacing: 0em }
.svg-2 .st13 { fill: #000000; font-family: Roboto; font-size: 1.00001em; letter-spacing: -0.0166665em }
.svg-2 .st14 { font-family: SimHei; font-size: 1em; letter-spacing: 0.00833327em }
.svg-2 .st15 { fill: none; stroke: #2a2aea; stroke-linecap: butt; stroke-width: 0.75 }
.svg-2 .st16 { fill: #2a2aea; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-2 .st17 { stroke: #ffffff; stroke-linecap: butt; stroke-width: 2.25 }
.svg-2 .st18 { stroke: #000000; stroke-linecap: butt; stroke-width: 0.75 }
.svg-2 .st19 { fill: #000000; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-2 .st20 { stroke: #000000; stroke-dasharray: 6, 3; stroke-linecap: butt; stroke-width: 0.75 }
.svg-2 .st21 { fill: none }
.svg-2 .st22 { stroke: #000000; stroke-dasharray: 3, 1.5; stroke-linecap: butt; stroke-width: 0.75 }
.svg-2 .st23 { fill: none; stroke: #d2d7e1; stroke-linecap: butt; stroke-width: 0.75 }
.svg-2 .st24 { fill: none; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-2 .st25 { fill: #000000; font-family: Roboto; font-size: 0.874992em }
.svg-2 .st26 { fill: #000000; font-family: SimHei; font-size: 0.874992em }
.svg-2 .st27 { fill: none; fill-rule: evenodd; font-size: 12px; overflow: visible; stroke-linecap: square; stroke-miterlimit: 3 }</style>
<g v:mid="0" v:index="1" v:groupcontext="foregroundPage">	<title>Layer_1</title>	<v:pageproperties v:drawingscale="1" v:pagescale="1" v:drawingunits="19" v:shadowoffsetx="9" v:shadowoffsety="-9"></v:pageproperties>	<g id="shape2-1" v:mid="2" v:groupcontext="shape" transform="translate(0.374908,-0.375183)">		<title>Sheet.2</title>		<path d="M0 347.78 A5.62513 5.62513 -180 0 0 5.62 353.4 L588.17 353.4 A5.62513 5.62513 -180 0 0 593.8 347.78 L593.8 6.38					 A5.62513 5.62513 -180 0 0 588.17 0.75 L5.62 0.75 A5.62513 5.62513 -180 0 0 -0 6.38 L0 347.78 Z" class="st1"></path>	</g>	<g id="shape3-3" v:mid="3" v:groupcontext="shape">		<title>Sheet.3</title>		<path d="M588.55 0.75 C591.44 0.75 593.8 3.11 593.8 6 L593.8 347.4 C593.8 350.3 591.44 352.65 588.55 352.65 L6 352.65					 C3.11 352.65 0.75 350.3 0.75 347.4 L0.75 6 C0.75 3.11 3.11 0.75 6 0.75 L588.55 0.75 ZM588.55 0 L6 0 C2.69					 0 0 2.69 0 6 L0 347.4 C0 350.72 2.69 353.4 6 353.4 L588.55 353.4 C591.86 353.4 594.55 350.72 594.55 347.4					 L594.55 6 C594.55 2.69 591.86 0 588.55 0 Z" class="st2"></path>	</g>	<g id="shape4-5" v:mid="4" v:groupcontext="shape" transform="translate(15,-156.348)">		<title>Sheet.4</title>		<desc>Weston 服务器</desc>		<v:textblock v:margins="rect(14.4,0,0,0)" v:verticalalign="0"></v:textblock>		<v:textrect cx="108.75" cy="262.375" width="217.5" height="182.053"></v:textrect>		<path d="M-0 350.4 A3.00007 3.00007 -180 0 0 3 353.4 L214.5 353.4 A3.00007 3.00007 -180 0 0 217.5 350.4 L217.5 174.35					 A3.00007 3.00007 -180 0 0 214.5 171.35 L3 171.35 A3.00007 3.00007 -180 0 0 -0 174.35 L0 350.4 Z" class="st3"></path>		<text x="68.98" y="195.73" class="st4" v:langid="1033"><v:paragraph v:spline="-1" v:horizalign="1"></v:paragraph><v:tablist></v:tablist>Weston <tspan class="st5">服务器</tspan></text>		</g>	<g id="shape5-9" v:mid="5" v:groupcontext="shape" transform="translate(26.25,-167.395)">		<title>Sheet.5</title>		<desc>DRM 后端</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="97.5" cy="299.875" width="195" height="107.053"></v:textrect>		<path d="M-0 350.4 A3.00007 3.00007 -180 0 0 3 353.4 L192 353.4 A3.00007 3.00007 -180 0 0 195 350.4 L195 249.35 A3.00007					 3.00007 -180 0 0 192 246.35 L3 246.35 A3.00007 3.00007 -180 0 0 -0 249.35 L0 350.4 Z" class="st6"></path>		<text x="71.2" y="303.87" class="st7" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>DRM <tspan class="st5">后</tspan><tspan class="st8">端</tspan></text>		</g>	<g id="shape6-14" v:mid="6" v:groupcontext="shape" transform="translate(362.028,-300.901)">		<title>Sheet.6</title>		<desc>Wayland / GLES 客户端</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="108.859" cy="334.651" width="217.72" height="37.5"></v:textrect>		<path d="M-0 350.4 A3.00007 3.00007 -180 0 0 3 353.4 L214.72 353.4 A3.00007 3.00007 -180 0 0 217.72 350.4 L217.72 318.9					 A3.00007 3.00007 -180 0 0 214.72 315.9 L3 315.9 A3.00007 3.00007 -180 0 0 -0 318.9 L0 350.4 Z" class="st6"></path>		<text x="46.95" y="338.65" class="st9" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>W<tspan class="st10">a</tspan><tspan class="st11">yland / GLES </tspan><tspan class="st12">客户端</tspan></text>		</g>	<g id="shape7-20" v:mid="7" v:groupcontext="shape" transform="translate(362.028,-157.377)">		<title>Sheet.7</title>		<desc>Weston 服务器</desc>		<v:textblock v:margins="rect(3.6,0,0,0)" v:verticalalign="0"></v:textblock>		<v:textrect cx="108.865" cy="285.438" width="217.74" height="135.928"></v:textrect>		<path d="M214.73 353.4 L3.02 353.4 C1.36 353.4 0.02 352.06 0.02 350.4 L0 220.47 C0 218.82 1.34 217.47 3 217.47 L214.71					 217.47 C216.37 217.47 217.71 218.82 217.71 220.47 L217.73 350.4 C217.73 352.06 216.39 353.4 214.73 353.4					 Z" class="st3"></path>		<text x="69.24" y="233.06" class="st13" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>W<tspan class="st11">es</tspan><tspan class="st10">t</tspan><tspan class="st11">on </tspan><tspan class="st12">服</tspan><tspan class="st14">务</tspan><tspan class="st8">器</tspan></text>		</g>	<g id="shape8-29" v:mid="8" v:groupcontext="shape" transform="translate(369.501,-164.877)">		<title>Sheet.8</title>		<desc>OpenGL ES</desc>		<v:textblock v:margins="rect(3.6,0,0,0)" v:verticalalign="0"></v:textblock>		<v:textrect cx="101.379" cy="300.438" width="202.76" height="105.928"></v:textrect>		<path d="M-0 350.4 A3.00007 3.00007 -180 0 0 3 353.4 L199.76 353.4 A3.00007 3.00007 -180 0 0 202.76 350.4 L202.76 250.47					 A3.00007 3.00007 -180 0 0 199.76 247.47 L3 247.47 A3.00007 3.00007 -180 0 0 0 250.47 L0 350.4 Z" class="st15"></path>		<text x="71.63" y="261.87" class="st4" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>OpenGL ES</text>		</g>	<g id="shape9-32" v:mid="9" v:groupcontext="shape" transform="translate(388.207,-179.877)">		<title>Sheet.9</title>		<desc>EGL 子驱动程序</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="328.59" width="120.01" height="49.6233"></v:textrect>		<path d="M0 350.61 A3.00007 2.79145 -180 0 0 3 353.4 L117 353.4 A3.00007 2.79145 -180 0 0 120 350.61 L120 306.57 A3.00007					 2.79145 -180 0 0 117 303.78 L3 303.78 A3.00007 2.79145 -180 0 0 0 306.57 L0 350.61 Z" class="st16"></path>		<text x="17.89" y="332.58" class="st7" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>EGL <tspan class="st5">子</tspan><tspan class="st8">驱动</tspan><tspan class="st5">程序</tspan></text>		</g>	<g id="shape17-38" v:mid="17" v:groupcontext="shape" transform="translate(48.75,-102.835)">		<title>Sheet.17</title>		<desc>libdrm</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="75" cy="338.401" width="150" height="30"></v:textrect>		<path d="M-0 350.4 A3.00007 3.00007 -180 0 0 3 353.4 L147 353.4 A3.00007 3.00007 -180 0 0 150 350.4 L150 326.4 A3.00007					 3.00007 -180 0 0 147 323.4 L3 323.4 A3.00007 3.00007 -180 0 0 -0 326.4 L0 350.4 Z" class="st6"></path>		<text x="58.05" y="342" class="st7" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>libdrm</text>		</g>	<g id="shape19-41" v:mid="19" v:groupcontext="shape" transform="translate(48.75,-42.4649)">		<title>Sheet.19</title>		<desc>DRM/KMS</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="75" cy="338.401" width="150" height="30"></v:textrect>		<path d="M-0 350.4 A3.00007 3.00007 -180 0 0 3 353.4 L147 353.4 A3.00007 3.00007 -180 0 0 150 350.4 L150 326.4 A3.00007					 3.00007 -180 0 0 147 323.4 L3 323.4 A3.00007 3.00007 -180 0 0 -0 326.4 L0 350.4 Z" class="st6"></path>		<text x="47.1" y="342" class="st7" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>DRM/KMS</text>		</g>	<g id="shape22-44" v:mid="22" v:groupcontext="shape" transform="translate(477.152,186.261) rotate(90)">		<title>Sheet.22</title>		<path d="M0 353.4 L33.47 353.4" class="st17"></path>	</g>	<g id="shape23-47" v:mid="23" v:groupcontext="shape" transform="translate(477.152,186.261) rotate(90)">		<title>Sheet.23</title>		<path d="M0 353.4 L33.47 353.4" class="st18"></path>	</g>	<g id="shape24-50" v:mid="24" v:groupcontext="shape" transform="translate(15,-87.8353)">		<title>Sheet.24</title>		<path d="M0 353.4 L565.84 353.4" class="st18"></path>	</g>	<g id="shape26-53" v:mid="26" v:groupcontext="shape" transform="translate(253.014,-300.901)">		<title>Sheet.26</title>		<desc>Wayland 协议</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="45" cy="334.651" width="90" height="37.5"></v:textrect>		<path d="M0 350.4 A3.00007 3.00007 -180 0 0 3 353.4 L87 353.4 A3.00007 3.00007 -180 0 0 90 350.4 L90 318.9 A3.00007 3.00007					 -180 0 0 87 315.9 L3 315.9 A3.00007 3.00007 -180 0 0 -0 318.9 L0 350.4 Z" class="st6"></path>		<text x="8.82" y="338.65" class="st9" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>W<tspan class="st10">a</tspan><tspan class="st11">yland </tspan><tspan class="st12">协议</tspan></text>		</g>	<g id="shape29-59" v:mid="29" v:groupcontext="shape" transform="translate(252.264,387.151) rotate(180)">		<title>Sheet.29</title>		<path d="M0 353.4 L14.44 353.4" class="st18"></path>	</g>	<g id="shape30-62" v:mid="30" v:groupcontext="shape" transform="translate(233.514,-316.66)">		<title>Sheet.30</title>		<path d="M5.18 347.42 L0 350.41 L5.18 353.4 L5.18 347.42 Z" class="st19"></path>	</g>	<g id="shape32-64" v:mid="32" v:groupcontext="shape" transform="translate(343.014,-319.651)">		<title>Sheet.32</title>		<path d="M0 353.4 L14.44 353.4" class="st18"></path>	</g>	<g id="shape33-67" v:mid="33" v:groupcontext="shape" transform="translate(356.583,-316.66)">		<title>Sheet.33</title>		<path d="M0 353.4 L5.18 350.41 L0 347.42 L0 353.4 Z" class="st19"></path>	</g>	<g id="shape35-69" v:mid="35" v:groupcontext="shape" transform="translate(253.014,-224.639)">		<title>Sheet.35</title>		<desc>Wayland 协议</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="45" cy="334.651" width="90" height="37.5"></v:textrect>		<path d="M0 350.4 A3.00007 3.00007 -180 0 0 3 353.4 L87 353.4 A3.00007 3.00007 -180 0 0 90 350.4 L90 318.9 A3.00007 3.00007					 -180 0 0 87 315.9 L3 315.9 A3.00007 3.00007 -180 0 0 -0 318.9 L0 350.4 Z" class="st6"></path>		<text x="8.82" y="338.65" class="st9" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>W<tspan class="st10">a</tspan><tspan class="st11">yland </tspan><tspan class="st12">协议</tspan></text>		</g>	<g id="shape38-75" v:mid="38" v:groupcontext="shape" transform="translate(252.264,463.414) rotate(180)">		<title>Sheet.38</title>		<path d="M0 353.4 L14.44 353.4" class="st18"></path>	</g>	<g id="shape39-78" v:mid="39" v:groupcontext="shape" transform="translate(233.514,-240.397)">		<title>Sheet.39</title>		<path d="M5.18 347.42 L0 350.41 L5.18 353.4 L5.18 347.42 Z" class="st19"></path>	</g>	<g id="shape41-80" v:mid="41" v:groupcontext="shape" transform="translate(343.014,-243.389)">		<title>Sheet.41</title>		<path d="M0 353.4 L32.96 353.4" class="st18"></path>	</g>	<g id="shape42-83" v:mid="42" v:groupcontext="shape" transform="translate(375.098,-240.397)">		<title>Sheet.42</title>		<path d="M0 353.4 L5.18 350.41 L0 347.42 L0 353.4 Z" class="st19"></path>	</g>	<g id="shape44-85" v:mid="44" v:groupcontext="shape" transform="translate(253.014,-153.627)">		<title>Sheet.44</title>		<desc>GPU 合成</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="45" cy="334.651" width="90" height="37.5"></v:textrect>		<path d="M0 350.4 A3.00007 3.00007 -180 0 0 3 353.4 L87 353.4 A3.00007 3.00007 -180 0 0 90 350.4 L90 318.9 A3.00007 3.00007					 -180 0 0 87 315.9 L3 315.9 A3.00007 3.00007 -180 0 0 -0 318.9 L0 350.4 Z" class="st6"></path>		<text x="19.75" y="338.65" class="st7" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>GPU <tspan class="st5">合成</tspan></text>		</g>	<g id="shape47-89" v:mid="47" v:groupcontext="shape" transform="translate(252.264,534.426) rotate(180)">		<title>Sheet.47</title>		<path d="M0 353.4 L26.71 353.4" class="st18"></path>	</g>	<g id="shape48-92" v:mid="48" v:groupcontext="shape" transform="translate(221.25,-169.385)">		<title>Sheet.48</title>		<path d="M5.18 347.42 L0 350.41 L5.18 353.4 L5.18 347.42 Z" class="st19"></path>	</g>	<g id="shape50-94" v:mid="50" v:groupcontext="shape" transform="translate(343.014,-172.377)">		<title>Sheet.50</title>		<path d="M0 353.4 L14.44 353.4" class="st18"></path>	</g>	<g id="shape51-97" v:mid="51" v:groupcontext="shape" transform="translate(356.583,-169.385)">		<title>Sheet.51</title>		<path d="M0 353.4 L5.18 350.41 L0 347.42 L0 353.4 Z" class="st19"></path>	</g>	<g id="shape53-99" v:mid="53" v:groupcontext="shape" transform="translate(477.152,250.566) rotate(90)">		<title>Sheet.53</title>		<path d="M0 353.4 L30 353.4" class="st17"></path>	</g>	<g id="shape54-102" v:mid="54" v:groupcontext="shape" transform="translate(477.152,250.566) rotate(90)">		<title>Sheet.54</title>		<path d="M0 353.4 L30 353.4" class="st20"></path>	</g>	<g id="shape55-105" v:mid="55" v:groupcontext="shape" transform="translate(429.746,-42.4649)">		<title>Sheet.55</title>		<desc>KGSL</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="75" cy="338.401" width="150" height="30"></v:textrect>		<path d="M0 350.4 A3.00007 3.00007 -180 0 0 3 353.4 L147 353.4 A3.00007 3.00007 -180 0 0 150 350.4 L150 326.4 A3.00007					 3.00007 -180 0 0 147 323.4 L3 323.4 A3.00007 3.00007 -180 0 0 -0 326.4 L0 350.4 Z" class="st6"></path>		<text x="60.46" y="342" class="st9" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>K<tspan class="st11">GSL</tspan></text>		</g>	<g id="shape58-109" v:mid="58" v:groupcontext="shape" transform="translate(504.746,-72.8353)">		<title>Sheet.58</title>		<path d="M39.24 215.96 L39.24 317.78 L0 317.78 L0 353.4 L39.24 215.96 Z" class="st21"></path>		<path d="M39.24 215.96 L39.24 317.78 L0 317.78 L0 353.4" class="st17"></path>	</g>	<g id="shape60-112" v:mid="60" v:groupcontext="shape" transform="translate(897.384,143.12) rotate(90)">		<title>Sheet.60</title>		<path d="M0 353.4 L2.25 353.4" class="st18"></path>	</g>	<g id="shape61-115" v:mid="61" v:groupcontext="shape" transform="translate(897.384,147.486) rotate(90)">		<title>Sheet.61</title>		<path d="M0 353.4 L5.29 353.4" class="st22"></path>	</g>	<g id="shape62-118" v:mid="62" v:groupcontext="shape" transform="translate(897.384,153.833) rotate(90)">		<title>Sheet.62</title>		<path d="M0 353.4 L87.8 353.4" class="st22"></path>	</g>	<g id="shape63-121" v:mid="63" v:groupcontext="shape" transform="translate(541.733,-108.456)">		<title>Sheet.63</title>		<path d="M2.25 351.15 L2.25 353.4 L0 353.4 L2.25 351.15 Z" class="st21"></path>		<path d="M2.25 351.15 L2.25 353.4 L0 353.4" class="st18"></path>	</g>	<g id="shape64-124" v:mid="64" v:groupcontext="shape" transform="translate(539.562,598.347) rotate(180)">		<title>Sheet.64</title>		<path d="M0 353.4 L5.43 353.4" class="st22"></path>	</g>	<g id="shape65-127" v:mid="65" v:groupcontext="shape" transform="translate(533.048,598.347) rotate(180)">		<title>Sheet.65</title>		<path d="M0 353.4 L24.97 353.4" class="st22"></path>	</g>	<g id="shape66-130" v:mid="66" v:groupcontext="shape" transform="translate(504.746,-106.206)">		<title>Sheet.66</title>		<path d="M2.25 351.15 L0 351.15 L0 353.4 L2.25 351.15 Z" class="st21"></path>		<path d="M2.25 351.15 L0 351.15 L0 353.4" class="st18"></path>	</g>	<g id="shape67-133" v:mid="67" v:groupcontext="shape" transform="translate(858.147,249.14) rotate(90)">		<title>Sheet.67</title>		<path d="M0 353.4 L4.86 353.4" class="st22"></path>	</g>	<g id="shape68-136" v:mid="68" v:groupcontext="shape" transform="translate(858.147,254.976) rotate(90)">		<title>Sheet.68</title>		<path d="M0 353.4 L22.37 353.4" class="st22"></path>	</g>	<g id="shape69-139" v:mid="69" v:groupcontext="shape" transform="translate(858.147,278.316) rotate(90)">		<title>Sheet.69</title>		<path d="M0 353.4 L2.25 353.4" class="st18"></path>	</g>	<g id="shape70-142" v:mid="70" v:groupcontext="shape" transform="translate(380.707,-172.377)">		<title>Sheet.70</title>		<desc>EGL</desc>		<v:textblock v:margins="rect(3.6,0,0,0)" v:verticalalign="0"></v:textblock>		<v:textrect cx="67.5" cy="314.401" width="135" height="78"></v:textrect>		<path d="M0 350.4 A3.00007 3.00007 -180 0 0 3 353.4 L132 353.4 A3.00007 3.00007 -180 0 0 135 350.4 L135 278.4 A3.00007					 3.00007 -180 0 0 132 275.4 L3 275.4 A3.00007 3.00007 -180 0 0 0 278.4 L0 350.4 Z" class="st23"></path>		<text x="56.77" y="289.8" class="st4" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>EGL</text>		</g>	<g id="shape71-145" v:mid="71" v:groupcontext="shape" transform="translate(523.207,-207)">		<title>Sheet.71</title>		<desc>GSL</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="20.7759" cy="342.151" width="41.56" height="22.5"></v:textrect>		<path d="M0 350.4 A3.00007 3.00007 -180 0 0 3 353.4 L38.55 353.4 A3.00007 3.00007 -180 0 0 41.55 350.4 L41.55 333.9 A3.00007					 3.00007 -180 0 0 38.55 330.9 L3 330.9 A3.00007 3.00007 -180 0 0 0 333.9 L0 350.4 Z" class="st6"></path>		<text x="9.9" y="345.75" class="st7" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>GSL</text>		</g>	<g id="group80-148" transform="translate(469.621,-14.8759)" v:mid="80" v:groupcontext="group">		<title>Sheet.80</title>		<g id="shape75-149" v:mid="75" v:groupcontext="shape" transform="translate(15.1882,5.68434E-14)">			<title>Sheet.75</title>			<desc>Qualcomm</desc>			<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>			<v:textrect cx="47.25" cy="347.101" width="94.5" height="12.6"></v:textrect>			<rect x="0" y="340.801" width="94.5" height="12.6" class="st24"></rect>			<text x="0" y="350.25" class="st25" v:langid="1033"><v:paragraph></v:paragraph><v:tablist></v:tablist>Qualcomm  </text>			</g>		<g id="shape76-152" v:mid="76" v:groupcontext="shape" transform="translate(3.09752E-14,-0.218605)">			<title>Sheet.76</title>			<path d="M0 351.9 A1.50003 1.50003 -180 0 0 1.5 353.4 L10.5 353.4 A1.50003 1.50003 -180 0 0 12 351.9 L12 342.9 A1.50003						 1.50003 -180 0 0 10.5 341.4 L1.5 341.4 A1.50003 1.50003 -180 0 0 0 342.9 L0 351.9 Z" class="st16"></path>		</g>		<g id="shape78-154" v:mid="78" v:groupcontext="shape" transform="translate(89.1246,5.68434E-14)">			<title>Sheet.78</title>			<desc>开源</desc>			<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>			<v:textrect cx="10.5" cy="347.101" width="21.01" height="12.6"></v:textrect>			<rect x="0" y="340.801" width="21" height="12.6" class="st24"></rect>			<text x="0" y="350.6" class="st26" v:langid="1033"><v:paragraph></v:paragraph><v:tablist></v:tablist>开源</text>			</g>		<g id="shape79-157" v:mid="79" v:groupcontext="shape" transform="translate(73.9363,-0.218605)">			<title>Sheet.79</title>			<path d="M0 351.9 A1.50003 1.50003 -180 0 0 1.5 353.4 L10.5 353.4 A1.50003 1.50003 -180 0 0 12 351.9 L12 342.9 A1.50003						 1.50003 -180 0 0 10.5 341.4 L1.5 341.4 A1.50003 1.50003 -180 0 0 0 342.9 L0 351.9 Z" class="st6"></path>		</g>	</g></g>
</svg>

Table : Weston/Wayland 组件

| 组件 | 说明 |
| --- | --- |
| Wayland/GLES 客户端 | 为 Weston 实施 Wayland 协议。 |
| Weston 服务器 | 实现 Wayland 合成器。 <ul class="ul" id="graphics-and-display__ul_nz1_vwy_rbc"><br>                                <li class="li">使用内核模式设置（KMS）设置显示。</li><br><br>                                <li class="li">使用 OpenGL ES 和 Direct Rendering Manager（DRM）执行合成</li><br><br>                            </ul> |
| 安全动态消息传递（SDM）后端 | <ul class="ul" id="graphics-and-display__ul_amz_bxy_rbc"><br>                                <li class="li">使用显示硬件抽象层（HAL）与显示硬件进行交互。</li><br><br>                                <li class="li">提供多个与平台相关的实现，其中一个用于 DRM 和 KMS。</li><br><br>                            </ul> |
| GBM 缓存管理库（libGBM） | <ul class="ul" id="graphics-and-display__ul_rdl_fxy_rbc"><br>                                <li class="li">包括 DMA 后端。</li><br><br>                                <li class="li">用于显示器和图形之间的 zero-copy 缓冲存共享。</li><br><br>                            </ul> |
| EGL 平台特定驱动程序（EGL 子驱动程序） | 与 GBM 和 Wayland 协议交互以与 Weston 合成器通信。 |

## 摄像头架构

Source: [https://docs.qualcomm.com/doc/80-70022-50SC/topic/architecture.html](https://docs.qualcomm.com/doc/80-70022-50SC/topic/architecture.html)

摄像头架构提供了关于底层摄像头驱动程序和硬件如何与 [qtiqmmfsrc](https://docs.qualcomm.com/doc/80-70022-50SC/topic/qtiqmmfsrc.html) 摄像头插件交互的高层抽象。

下图展示了摄像头架构，其中，qtimmfsrc 插件充当 Qualcomm 摄像头服务的客户端。

Figure : 摄像头 pipeline
            
            <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by Microsoft Visio, SVG Export camera_pipeline.svg Layer_1 -->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:v="http://schemas.microsoft.com/visio/2003/SVGExtensions/" width="5.52083in" height="5.59612in" viewbox="0 0 397.5 402.921" xml:space="preserve" color-interpolation-filters="sRGB" class="st18"><v:documentproperties v:langid="1033" v:viewmarkup="false"></v:documentproperties>
<style>.svg-3 .st1 { fill: #fafafa; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-3 .st2 { fill: #d2d7e1; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-3 .st3 { fill: none; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-3 .st4 { fill: #000000; font-family: Roboto; font-size: 1.00001em; font-weight: bold }
.svg-3 .st5 { fill: #2a2aea; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-3 .st6 { fill: #ffffff; font-family: Roboto; font-size: 1.00001em }
.svg-3 .st7 { stroke: #000000; stroke-linecap: butt; stroke-width: 0.75 }
.svg-3 .st8 { fill: #000000; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-3 .st9 { fill: #007884; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-3 .st10 { fill: #ffffff; font-family: SimHei; font-size: 1.00001em }
.svg-3 .st11 { stroke: #d2d7e1; stroke-linecap: butt; stroke-width: 0.75 }
.svg-3 .st12 { fill: none; stroke: #4d4d4d; stroke-linecap: butt; stroke-width: 1.5 }
.svg-3 .st13 { font-family: SimHei; font-size: 1em }
.svg-3 .st14 { stroke: #ffffff; stroke-linecap: butt; stroke-width: 2.25 }
.svg-3 .st15 { stroke: #000000; stroke-dasharray: 3, 1.5; stroke-linecap: butt; stroke-width: 0.75 }
.svg-3 .st16 { fill: #000000; font-family: Roboto; font-size: 0.874992em }
.svg-3 .st17 { fill: #000000; font-family: SimHei; font-size: 0.874992em }
.svg-3 .st18 { fill: none; fill-rule: evenodd; font-size: 12px; overflow: visible; stroke-linecap: square; stroke-miterlimit: 3 }</style>
<g v:mid="0" v:index="1" v:groupcontext="foregroundPage">	<title>Layer_1</title>	<v:pageproperties v:drawingscale="1" v:pagescale="1" v:drawingunits="19" v:shadowoffsetx="9" v:shadowoffsety="-9"></v:pageproperties>	<g id="shape2-1" v:mid="2" v:groupcontext="shape" transform="translate(0.374908,-0.375046)">		<title>Sheet.2</title>		<path d="M0 397.3 A5.62513 5.62513 -180 0 0 5.63 402.92 L391.12 402.92 A5.62513 5.62513 -180 0 0 396.75 397.3 L396.75					 6.38 A5.62513 5.62513 -180 0 0 391.12 0.75 L5.63 0.75 A5.62513 5.62513 -180 0 0 0 6.38 L0 397.3 Z" class="st1"></path>	</g>	<g id="shape3-3" v:mid="3" v:groupcontext="shape">		<title>Sheet.3</title>		<path d="M391.5 0.75 C394.39 0.75 396.75 3.11 396.75 6 L396.75 396.92 C396.75 399.82 394.39 402.17 391.5 402.17 L6 402.17					 C3.11 402.17 0.75 399.82 0.75 396.92 L0.75 6 C0.75 3.11 3.11 0.75 6 0.75 L391.5 0.75 ZM391.5 0 L6 0 C2.69					 0 0 2.69 0 6 L0 396.92 C0 400.23 2.69 402.92 6 402.92 L391.5 402.92 C394.81 402.92 397.5 400.23 397.5 396.92					 L397.5 6 C397.5 2.69 394.81 0 391.5 0 Z" class="st2"></path>	</g>	<g id="shape4-5" v:mid="4" v:groupcontext="shape" transform="translate(0,-374.976)">		<title>Sheet.4</title>		<desc>GST BIN</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="198" cy="395.721" width="396" height="14.4"></v:textrect>		<rect x="0" y="388.521" width="396" height="14.4" class="st3"></rect>		<text x="175.2" y="399.32" class="st4" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>GST BIN</text>		</g>	<g id="shape6-8" v:mid="6" v:groupcontext="shape" transform="translate(56.25,-327.411)">		<title>Sheet.6</title>		<desc>qmmfsrc</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="384.171" width="120.01" height="37.5"></v:textrect>		<path d="M-0 399.92 A3.00007 3.00007 -180 0 0 3 402.92 L117 402.92 A3.00007 3.00007 -180 0 0 120 399.92 L120 368.42 A3.00007					 3.00007 -180 0 0 117 365.42 L3 365.42 A3.00007 3.00007 -180 0 0 0 368.42 L0 399.92 Z" class="st5"></path>		<text x="35.72" y="387.77" class="st6" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>qmmfsrc</text>		</g>	<g id="shape9-11" v:mid="9" v:groupcontext="shape" transform="translate(176.25,-346.161)">		<title>Sheet.9</title>		<path d="M0 402.92 L81.73 402.92" class="st7"></path>	</g>	<g id="shape10-14" v:mid="10" v:groupcontext="shape" transform="translate(257.216,-343.543)">		<title>Sheet.10</title>		<path d="M0 402.92 L4.53 400.3 L0 397.69 L0 402.92 Z" class="st8"></path>	</g>	<g id="shape12-16" v:mid="12" v:groupcontext="shape" transform="translate(262.5,-327.411)">		<title>Sheet.12</title>		<desc>Waylandsink</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="384.171" width="120" height="37.5"></v:textrect>		<path d="M-0 399.92 A3.00007 3.00007 -180 0 0 3 402.92 L117 402.92 A3.00007 3.00007 -180 0 0 120 399.92 L120 368.42 A3.00007					 3.00007 -180 0 0 117 365.42 L3 365.42 A3.00007 3.00007 -180 0 0 0 368.42 L0 399.92 Z" class="st9"></path>		<text x="26.26" y="387.77" class="st6" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>Waylandsink</text>		</g>	<g id="shape16-19" v:mid="16" v:groupcontext="shape" transform="translate(15,-42)">		<title>Sheet.16</title>		<desc>传感器</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="30" cy="384.171" width="60.01" height="37.5"></v:textrect>		<path d="M0 399.92 A3.00007 3.00007 -180 0 0 3 402.92 L57 402.92 A3.00007 3.00007 -180 0 0 60 399.92 L60 368.42 A3.00007					 3.00007 -180 0 0 57 365.42 L3 365.42 A3.00007 3.00007 -180 0 0 0 368.42 L0 399.92 Z" class="st9"></path>		<text x="12" y="388.16" class="st10" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>传感器</text>		</g>	<g id="shape19-22" v:mid="19" v:groupcontext="shape" transform="translate(86.25,-42)">		<title>Sheet.19</title>		<desc>IFE</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="30" cy="384.171" width="60.01" height="37.5"></v:textrect>		<path d="M0 399.92 A3.00007 3.00007 -180 0 0 3 402.92 L57 402.92 A3.00007 3.00007 -180 0 0 60 399.92 L60 368.42 A3.00007					 3.00007 -180 0 0 57 365.42 L3 365.42 A3.00007 3.00007 -180 0 0 0 368.42 L0 399.92 Z" class="st9"></path>		<text x="21.64" y="387.77" class="st6" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>IFE</text>		</g>	<g id="shape22-25" v:mid="22" v:groupcontext="shape" transform="translate(157.5,-42)">		<title>Sheet.22</title>		<desc>IPE</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="30" cy="384.171" width="60.01" height="37.5"></v:textrect>		<path d="M0 399.92 A3.00007 3.00007 -180 0 0 3 402.92 L57 402.92 A3.00007 3.00007 -180 0 0 60 399.92 L60 368.42 A3.00007					 3.00007 -180 0 0 57 365.42 L3 365.42 A3.00007 3.00007 -180 0 0 0 368.42 L0 399.92 Z" class="st9"></path>		<text x="21.17" y="387.77" class="st6" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>IPE</text>		</g>	<g id="shape24-28" v:mid="24" v:groupcontext="shape" transform="translate(0.22936,-307.913)">		<title>Sheet.24</title>		<path d="M0 402.92 L397.27 402.92" class="st11"></path>	</g>	<g id="shape27-31" v:mid="27" v:groupcontext="shape" transform="translate(22.5,-119.144)">		<title>Sheet.27</title>		<desc>LE 摄像头服务</desc>		<v:textblock v:margins="rect(7.2,0,0,0)" v:verticalalign="0"></v:textblock>		<v:textrect cx="93.75" cy="318.405" width="187.51" height="169.03"></v:textrect>		<path d="M-0 399.92 A3.00007 3.00007 -180 0 0 3 402.92 L184.5 402.92 A3.00007 3.00007 -180 0 0 187.5 399.92 L187.5 236.89					 A3.00007 3.00007 -180 0 0 184.5 233.89 L3 233.89 A3.00007 3.00007 -180 0 0 -0 236.89 L0 399.92 Z" class="st12"></path>		<text x="55.51" y="253.07" class="st4" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>LE <tspan class="st13">摄像头服务</tspan></text>		</g>	<g id="shape28-35" v:mid="28" v:groupcontext="shape" transform="translate(33.75,-220.394)">		<title>Sheet.28</title>		<desc>Unix 域套接字 IPC</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="82.5" cy="384.171" width="165.01" height="37.5"></v:textrect>		<path d="M0 399.92 A3.00007 3.00007 -180 0 0 3 402.92 L162 402.92 A3.00007 3.00007 -180 0 0 165 399.92 L165 368.42 A3.00007					 3.00007 -180 0 0 162 365.42 L3 365.42 A3.00007 3.00007 -180 0 0 0 368.42 L0 399.92 Z" class="st9"></path>		<text x="34.58" y="388.16" class="st6" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>Unix <tspan class="st13">域套接字</tspan> IPC</text>		</g>	<g id="shape30-39" v:mid="30" v:groupcontext="shape" transform="translate(33.75,-130.394)">		<title>Sheet.30</title>		<desc>Camx</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="82.5" cy="384.171" width="165.01" height="37.5"></v:textrect>		<path d="M0 399.92 A3.00007 3.00007 -180 0 0 3 402.92 L162 402.92 A3.00007 3.00007 -180 0 0 165 399.92 L165 368.42 A3.00007					 3.00007 -180 0 0 162 365.42 L3 365.42 A3.00007 3.00007 -180 0 0 0 368.42 L0 399.92 Z" class="st5"></path>		<text x="67.1" y="387.77" class="st6" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>Camx</text>		</g>	<g id="shape32-42" v:mid="32" v:groupcontext="shape" transform="translate(33.75,-175.394)">		<title>Sheet.32</title>		<desc>摄像头适配器</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="39.375" cy="384.171" width="78.75" height="37.5"></v:textrect>		<path d="M-0 399.92 A3.00007 3.00007 -180 0 0 3 402.92 L75.75 402.92 A3.00007 3.00007 -180 0 0 78.75 399.92 L78.75 368.42					 A3.00007 3.00007 -180 0 0 75.75 365.42 L3 365.42 A3.00007 3.00007 -180 0 0 -0 368.42 L0 399.92 Z" class="st9"></path>		<text x="3.37" y="388.16" class="st10" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>摄像头适配器</text>		</g>	<g id="shape34-45" v:mid="34" v:groupcontext="shape" transform="translate(120,-175.394)">		<title>Sheet.34</title>		<desc>缓存管理</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="39.375" cy="384.171" width="78.75" height="37.5"></v:textrect>		<path d="M-0 399.92 A3.00007 3.00007 -180 0 0 3 402.92 L75.75 402.92 A3.00007 3.00007 -180 0 0 78.75 399.92 L78.75 368.42					 A3.00007 3.00007 -180 0 0 75.75 365.42 L3 365.42 A3.00007 3.00007 -180 0 0 -0 368.42 L0 399.92 Z" class="st9"></path>		<text x="15.37" y="388.16" class="st10" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>缓存管理</text>		</g>	<g id="shape37-48" v:mid="37" v:groupcontext="shape" transform="translate(519.171,76.6324) rotate(90)">		<title>Sheet.37</title>		<path d="M0 402.92 L36.75 402.92" class="st14"></path>	</g>	<g id="group38-51" transform="translate(113.258,-289.538)" v:mid="38" v:groupcontext="group">		<title>Sheet.38</title>		<g id="shape39-52" v:mid="39" v:groupcontext="shape" transform="translate(405.912,370.476) rotate(90)">			<title>Sheet.39</title>			<path d="M0 402.92 L28.14 402.92" class="st7"></path>		</g>		<g id="shape40-55" v:mid="40" v:groupcontext="shape" transform="translate(0,-31.5689)">			<title>Sheet.40</title>			<path d="M0 402.92 L2.99 397.74 L5.98 402.92 L0 402.92 Z" class="st8"></path>		</g>		<g id="shape41-57" v:mid="41" v:groupcontext="shape">			<title>Sheet.41</title>			<path d="M0 397.74 L2.99 402.92 L5.98 397.74 L0 397.74 Z" class="st8"></path>		</g>	</g>	<g id="shape42-59" v:mid="42" v:groupcontext="shape" transform="translate(0.22936,-99.4299)">		<title>Sheet.42</title>		<path d="M0 402.92 L397.27 402.92" class="st11"></path>	</g>	<g id="shape44-62" v:mid="44" v:groupcontext="shape" transform="translate(519.171,284.741) rotate(90)">		<title>Sheet.44</title>		<path d="M0 402.92 L37.5 402.92" class="st14"></path>	</g>	<g id="group45-65" transform="translate(116.25,-80.6799)" v:mid="45" v:groupcontext="group">		<title>Sheet.45</title>		<g id="shape46-66" v:mid="46" v:groupcontext="shape" transform="translate(402.921,365.421) rotate(90)">			<title>Sheet.46</title>			<path d="M0 402.92 L2.25 402.92" class="st7"></path>		</g>		<g id="shape47-69" v:mid="47" v:groupcontext="shape" transform="translate(402.921,369.733) rotate(90)">			<title>Sheet.47</title>			<path d="M0 402.92 L5.16 402.92" class="st15"></path>		</g>		<g id="shape48-72" v:mid="48" v:groupcontext="shape" transform="translate(402.921,375.921) rotate(90)">			<title>Sheet.48</title>			<path d="M0 402.92 L23.72 402.92" class="st15"></path>		</g>		<g id="shape49-75" v:mid="49" v:groupcontext="shape" transform="translate(402.921,400.671) rotate(90)">			<title>Sheet.49</title>			<path d="M0 402.92 L2.25 402.92" class="st7"></path>		</g>	</g>	<g id="group57-78" transform="translate(272.375,-14.7814)" v:mid="57" v:groupcontext="group">		<title>Sheet.57</title>		<g id="shape52-79" v:mid="52" v:groupcontext="shape" transform="translate(15.1883,0)">			<title>Sheet.52</title>			<desc>Qualcomm</desc>			<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>			<v:textrect cx="26.5723" cy="396.621" width="53.15" height="12.6"></v:textrect>			<rect x="0" y="390.321" width="53.1446" height="12.6" class="st3"></rect>			<text x="0" y="399.77" class="st16" v:langid="1033"><v:paragraph></v:paragraph><v:tablist></v:tablist>Qualcomm  </text>			</g>		<g id="shape53-82" v:mid="53" v:groupcontext="shape" transform="translate(-1.4988E-14,-0.218604)">			<title>Sheet.53</title>			<path d="M0 401.42 A1.50003 1.50003 -180 0 0 1.5 402.92 L10.5 402.92 A1.50003 1.50003 -180 0 0 12 401.42 L12 392.42						 A1.50003 1.50003 -180 0 0 10.5 390.92 L1.5 390.92 A1.50003 1.50003 -180 0 0 0 392.42 L0 401.42 Z" class="st5"></path>		</g>		<g id="shape55-84" v:mid="55" v:groupcontext="shape" transform="translate(89.1246,0)">			<title>Sheet.55</title>			<desc>开源</desc>			<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>			<v:textrect cx="10.5" cy="396.621" width="21" height="12.6"></v:textrect>			<rect x="0" y="390.321" width="21" height="12.6" class="st3"></rect>			<text x="-0" y="400.12" class="st17" v:langid="1033"><v:paragraph></v:paragraph><v:tablist></v:tablist>开源</text>			</g>		<g id="shape56-87" v:mid="56" v:groupcontext="shape" transform="translate(73.9363,-0.218604)">			<title>Sheet.56</title>			<path d="M0 401.42 A1.50003 1.50003 -180 0 0 1.5 402.92 L10.5 402.92 A1.50003 1.50003 -180 0 0 12 401.42 L12 392.42						 A1.50003 1.50003 -180 0 0 10.5 390.92 L1.5 390.92 A1.50003 1.50003 -180 0 0 0 392.42 L0 401.42 Z" class="st9"></path>		</g>	</g></g>
</svg>

Table : 摄像头 pipeline 组件

| 组件 | 说明 |
| --- | --- |
| Linux 嵌入式 (LE) 摄像头服务 | <ul class="ul" id="camera__ul_shy_bgx_rbc"><br>                                <li class="li">在系统中作为守护程序运行：<ul class="ul" id="camera__ul_x25_cgx_rbc"><br>                                        <li class="li">提供简单的远程过程调用（RPC）API 来控制摄像头。 </li><br><br>                                        <li class="li">公开在客户端和服务器之间执行 RPC 的帮助程序客户端 API。</li><br><br>                                    </ul><br></li><br><br>                                <li class="li">使用 HAL3 API，该 API 与摄像头后端（CamX）和摄像头驱动程序交互，以配置摄像头传感器和图像信号处理器（ISP）硬件。</li><br><br>                                <li class="li">使用 GBM 为每个摄像头流分配缓存并将其提交给 HAL3。</li><br><br>                            </ul> |
| 客户端/服务器架构 | 允许多客户端和多摄像头用例执行以下操作：<ul class="ul" id="camera__ul_yhd_2r4_kyb"><br>                                <li class="li">创建多个 qtiqmmfsrc 实例，一个插件实例对应一个物理或逻辑摄像头。</li><br><br>                                <li class="li">运行摄像头用例。根据用例，这些实例可以位于同一进程或不同进程中</li><br><br>                            </ul> |
| qtiqmmfsrc | <ul class="ul" id="camera__ul_wl5_ngx_rbc"><br>                                <li class="li">并行提供多个流（多个发送端口），每个流可以采用不同的格式（NV12/21 或 MJPEG）。<br>                                        <p class="p">例如，如果有三路并行流，则按如下方式处理：</p><br><ol class="ol" id="camera__ul_zbl_mr4_kyb"><br>                                        <li class="li">一个流用于本地存储。</li><br><br>                                        <li class="li">一个用于 YUV 流，用于在本地显示器上实时预览摄像头。</li><br><br>                                        <li class="li">一个用于网络流。</li><br><br>                                    </ol><br></li><br><br>                                <li class="li">支持 "N" 个并行流，其中 "N" 取决于摄像头 ISP 功能。</li><br><br>                            </ul> |
| [Waylandsink](https://docs.qualcomm.com/doc/80-70022-50SC/topic/waylandsink.html) | <ul class="ul" id="camera__ul_fvf_hs4_kyb"><br>                                <li class="li">使用原始 YUV（NV12/21）流输出将摄像头帧渲染到物理显示器。 </li><br><br>                                <li class="li">实现实时摄像头预览用例。</li><br><br>                                <li class="li">允许后处理元素提升质量。</li><br><br>                                <li class="li">允许 ML 推理元素对实时摄像头进行推理。</li><br><br>                            </ul> |
| 缓存 | <ul class="ul"><br>                                <li class="li">相同的缓存分发到客户端（qtiqmmfsrc）和 pipeline 中的其他插件。</li><br><br>                                <li class="li">缓存池管理缓存以避免按帧分配。</li><br><br>                            </ul> |

### 相关信息

[摄像头用例](https://docs.qualcomm.com/doc/80-70022-50SC/topic/camera.html)

## 视频架构

Source: [https://docs.qualcomm.com/doc/80-70022-50SC/topic/architecture.html](https://docs.qualcomm.com/doc/80-70022-50SC/topic/architecture.html)

[v4l2h264enc](https://docs.qualcomm.com/doc/80-70022-50SC/topic/v4l2h264enc.html) 和 [v4l2h265enc](https://docs.qualcomm.com/doc/80-70022-50SC/topic/v4l2h265enc.html) 视频编码插件与摄像头插件连接以实现高级视频编码（H.264 或 H.265）用例。[v4l2h264dec](https://docs.qualcomm.com/doc/80-70022-50SC/topic/v4l2h264dec.html) 和 [v4l2h265dec](https://docs.qualcomm.com/doc/80-70022-50SC/topic/v4l2h265dec.html) 视频解码插件与 Waylandsink 连接以实现视频播放用例。

### 编码

下图展示了视频编码的架构。将 v4l2h264enc 和 v4l2h265enc 插件连接到文件复用器（MP4 或 MPEGTS），从而将编码后的码流保存到文件系统中。

有关视频编码用例，请参见[视频编码与解码](https://docs.qualcomm.com/doc/80-70022-50SC/topic/camera-and-video-encode.html)。

Figure : 视频编码 pipeline
                
                <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by Microsoft Visio, SVG Export video_encode_pipeline.svg Layer_1 -->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:v="http://schemas.microsoft.com/visio/2003/SVGExtensions/" width="8.34518in" height="5.58333in" viewbox="0 0 600.853 402" xml:space="preserve" color-interpolation-filters="sRGB" class="st20"><v:documentproperties v:langid="1033" v:viewmarkup="false"></v:documentproperties>
<style>.svg-4 .st1 { fill: #fafafa; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-4 .st2 { fill: #000000; font-family: Roboto; font-size: 1.00001em; font-weight: bold }
.svg-4 .st3 { fill: #d2d7e1; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-4 .st4 { fill: #2a2aea; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-4 .st5 { fill: #ffffff; font-family: Roboto; font-size: 1.00001em }
.svg-4 .st6 { fill: #007884; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-4 .st7 { fill: #ffffff; font-family: SimHei; font-size: 1.00001em }
.svg-4 .st8 { font-family: SimHei; font-size: 1em }
.svg-4 .st9 { font-size: 1em }
.svg-4 .st10 { stroke: #000000; stroke-linecap: butt; stroke-width: 0.75 }
.svg-4 .st11 { fill: #000000; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-4 .st12 { stroke: #d2d7e1; stroke-linecap: butt; stroke-width: 0.75 }
.svg-4 .st13 { fill: none; stroke: #4d4d4d; stroke-linecap: butt; stroke-width: 1.5 }
.svg-4 .st14 { font-family: SimSun; font-size: 1em }
.svg-4 .st15 { stroke: #ffffff; stroke-linecap: butt; stroke-width: 2.25 }
.svg-4 .st16 { stroke: #000000; stroke-dasharray: 3, 1.5; stroke-linecap: butt; stroke-width: 0.75 }
.svg-4 .st17 { fill: none; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-4 .st18 { fill: #000000; font-family: Roboto; font-size: 0.874992em }
.svg-4 .st19 { fill: #000000; font-family: SimHei; font-size: 0.874992em }
.svg-4 .st20 { fill: none; fill-rule: evenodd; font-size: 12px; overflow: visible; stroke-linecap: square; stroke-miterlimit: 3 }</style>
<g v:mid="0" v:index="1" v:groupcontext="foregroundPage">	<title>Layer_1</title>	<v:pageproperties v:drawingscale="1" v:pagescale="1" v:drawingunits="19" v:shadowoffsetx="9" v:shadowoffsety="-9"></v:pageproperties>	<g id="shape2-1" v:mid="2" v:groupcontext="shape" transform="translate(0.375034,-0.375046)">		<title>Sheet.2</title>		<desc>GST BIN</desc>		<v:textblock v:margins="rect(7.2,0,0,0)" v:verticalalign="0"></v:textblock>		<v:textrect cx="300.051" cy="201.375" width="600.11" height="401.25"></v:textrect>		<path d="M0 396.37 A5.62513 5.62513 -180 0 0 5.63 402 L594.48 402 A5.62513 5.62513 -180 0 0 600.1 396.38 L600.1 6.37					 A5.62513 5.62513 -180 0 0 594.48 0.75 L5.62 0.75 A5.62513 5.62513 -180 0 0 -0 6.37 L0 396.37 Z" class="st1"></path>		<text x="277.26" y="18.75" class="st2" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>GST BIN</text>		</g>	<g id="shape3-4" v:mid="3" v:groupcontext="shape">		<title>Sheet.3</title>		<path d="M594.85 0.75 C597.75 0.75 600.1 3.11 600.1 6 L600.1 396 C600.1 398.89 597.75 401.25 594.85 401.25 L6 401.25					 C3.11 401.25 0.75 398.89 0.75 396 L0.75 6 C0.75 3.11 3.11 0.75 6 0.75 L594.85 0.75 ZM594.85 0 L6 0 C2.69					 0 0 2.69 0 6 L0 396 C0 399.31 2.69 402 6 402 L594.85 402 C598.17 402 600.85 399.31 600.85 396 L600.85 6					 C600.85 2.69 598.17 0 594.85 0 Z" class="st3"></path>	</g>	<g id="shape6-6" v:mid="6" v:groupcontext="shape" transform="translate(48.75,-326.49)">		<title>Sheet.6</title>		<desc>qmmfsrc</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="383.25" width="120.01" height="37.5"></v:textrect>		<path d="M-0 399 A3.00007 3.00007 -180 0 0 3 402 L117 402 A3.00007 3.00007 -180 0 0 120 399 L120 367.5 A3.00007 3.00007					 -180 0 0 117 364.5 L3 364.5 A3.00007 3.00007 -180 0 0 0 367.5 L0 399 Z" class="st4"></path>		<text x="35.72" y="386.85" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>qmmfsrc</text>		</g>	<g id="shape9-9" v:mid="9" v:groupcontext="shape" transform="translate(187.927,-326.49)">		<title>Sheet.9</title>		<desc>视频编码</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="383.25" width="120" height="37.5"></v:textrect>		<path d="M0 399 A3.00007 3.00007 -180 0 0 3 402 L117 402 A3.00007 3.00007 -180 0 0 120 399 L120 367.5 A3.00007 3.00007					 -180 0 0 117 364.5 L3 364.5 A3.00007 3.00007 -180 0 0 0 367.5 L0 399 Z" class="st6"></path>		<text x="36" y="387.24" class="st7" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>视频编码</text>		</g>	<g id="shape12-12" v:mid="12" v:groupcontext="shape" transform="translate(326.677,-326.49)">		<title>Sheet.12</title>		<desc>H264/H265 解析</desc>		<v:textblock v:margins="rect(0.72,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="383.25" width="120" height="37.5"></v:textrect>		<path d="M0 399 A3.00007 3.00007 -180 0 0 3 402 L117 402 A3.00007 3.00007 -180 0 0 120 399 L120 367.5 A3.00007 3.00007					 -180 0 0 117 364.5 L3 364.5 A3.00007 3.00007 -180 0 0 0 367.5 L0 399 Z" class="st6"></path>		<text x="28.76" y="379.22" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>H264/H265<v:newlinechar></v:newlinechar><tspan x="48" dy="1.298em" class="st8">解析</tspan></text>		</g>	<g id="shape15-16" v:mid="15" v:groupcontext="shape" transform="translate(465.853,-326.49)">		<title>Sheet.15</title>		<desc>Filemux (MP4 或 MPEGTS)</desc>		<v:textblock v:margins="rect(0.72,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="383.25" width="120" height="37.5"></v:textrect>		<path d="M-0 399 A3.00007 3.00007 -180 0 0 3 402 L117 402 A3.00007 3.00007 -180 0 0 120 399 L120 367.5 A3.00007 3.00007					 -180 0 0 117 364.5 L3 364.5 A3.00007 3.00007 -180 0 0 0 367.5 L0 399 Z" class="st6"></path>		<text x="39.05" y="379.22" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>Filemux<v:newlinechar></v:newlinechar><tspan x="10.84" dy="1.298em" class="st9">(MP4 </tspan><tspan class="st8">或</tspan> MPEGTS)</text>		</g>	<g id="shape18-21" v:mid="18" v:groupcontext="shape" transform="translate(168.75,-345.24)">		<title>Sheet.18</title>		<path d="M0 402 L14.98 402" class="st10"></path>	</g>	<g id="shape19-24" v:mid="19" v:groupcontext="shape" transform="translate(182.967,-342.622)">		<title>Sheet.19</title>		<path d="M0 402 L4.53 399.38 L0 396.76 L0 402 Z" class="st11"></path>	</g>	<g id="shape21-26" v:mid="21" v:groupcontext="shape" transform="translate(307.927,-345.24)">		<title>Sheet.21</title>		<path d="M0 402 L14.98 402" class="st10"></path>	</g>	<g id="shape22-29" v:mid="22" v:groupcontext="shape" transform="translate(322.144,-342.622)">		<title>Sheet.22</title>		<path d="M0 402 L4.53 399.38 L0 396.76 L0 402 Z" class="st11"></path>	</g>	<g id="shape24-31" v:mid="24" v:groupcontext="shape" transform="translate(446.25,-345.24)">		<title>Sheet.24</title>		<path d="M0 402 L14.98 402" class="st10"></path>	</g>	<g id="shape25-34" v:mid="25" v:groupcontext="shape" transform="translate(460.467,-342.622)">		<title>Sheet.25</title>		<path d="M0 402 L4.53 399.38 L0 396.76 L0 402 Z" class="st11"></path>	</g>	<g id="shape27-36" v:mid="27" v:groupcontext="shape" transform="translate(48.75,-41.7235)">		<title>Sheet.27</title>		<desc>摄像头驱动程序</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="383.25" width="120.01" height="37.5"></v:textrect>		<path d="M0 399 A3.00007 3.00007 -180 0 0 3 402 L117 402 A3.00007 3.00007 -180 0 0 120 399 L120 367.5 A3.00007 3.00007					 -180 0 0 117 364.5 L3 364.5 A3.00007 3.00007 -180 0 0 0 367.5 L0 399 Z" class="st6"></path>		<text x="18" y="387.24" class="st7" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>摄像头驱动程序</text>		</g>	<g id="shape29-39" v:mid="29" v:groupcontext="shape" transform="translate(0.427012,-307.74)">		<title>Sheet.29</title>		<path d="M0 402 L600.06 402" class="st12"></path>	</g>	<g id="shape32-42" v:mid="32" v:groupcontext="shape" transform="translate(15,-118.223)">		<title>Sheet.32</title>		<desc>LE 摄像头服务</desc>		<v:textblock v:margins="rect(7.2,0,0,0)" v:verticalalign="0"></v:textblock>		<v:textrect cx="93.75" cy="317.485" width="187.51" height="169.03"></v:textrect>		<path d="M-0 399 A3.00007 3.00007 -180 0 0 3 402 L184.5 402 A3.00007 3.00007 -180 0 0 187.5 399 L187.5 235.97 A3.00007					 3.00007 -180 0 0 184.5 232.97 L3 232.97 A3.00007 3.00007 -180 0 0 -0 235.97 L0 399 Z" class="st13"></path>		<text x="55.51" y="252.15" class="st2" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>LE <tspan class="st14">摄像头服务</tspan></text>		</g>	<g id="shape33-46" v:mid="33" v:groupcontext="shape" transform="translate(26.25,-219.473)">		<title>Sheet.33</title>		<desc>Unix 域套接字 IPC</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="82.5" cy="383.25" width="165.01" height="37.5"></v:textrect>		<path d="M0 399 A3.00007 3.00007 -180 0 0 3 402 L162 402 A3.00007 3.00007 -180 0 0 165 399 L165 367.5 A3.00007 3.00007					 -180 0 0 162 364.5 L3 364.5 A3.00007 3.00007 -180 0 0 0 367.5 L0 399 Z" class="st6"></path>		<text x="34.58" y="387.24" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>Unix <tspan class="st8">域套接字</tspan> IPC</text>		</g>	<g id="shape35-50" v:mid="35" v:groupcontext="shape" transform="translate(26.25,-129.473)">		<title>Sheet.35</title>		<desc>Camx</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="82.5" cy="383.25" width="165.01" height="37.5"></v:textrect>		<path d="M0 399 A3.00007 3.00007 -180 0 0 3 402 L162 402 A3.00007 3.00007 -180 0 0 165 399 L165 367.5 A3.00007 3.00007					 -180 0 0 162 364.5 L3 364.5 A3.00007 3.00007 -180 0 0 0 367.5 L0 399 Z" class="st4"></path>		<text x="67.1" y="386.85" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>Camx</text>		</g>	<g id="shape37-53" v:mid="37" v:groupcontext="shape" transform="translate(26.25,-174.473)">		<title>Sheet.37</title>		<desc>摄像头 适配器</desc>		<v:textblock v:margins="rect(0.72,0,0,0)"></v:textblock>		<v:textrect cx="39.375" cy="383.25" width="78.75" height="37.5"></v:textrect>		<path d="M-0 399 A3.00007 3.00007 -180 0 0 3 402 L75.75 402 A3.00007 3.00007 -180 0 0 78.75 399 L78.75 367.5 A3.00007					 3.00007 -180 0 0 75.75 364.5 L3 364.5 A3.00007 3.00007 -180 0 0 -0 367.5 L0 399 Z" class="st6"></path>		<text x="21.37" y="379.62" class="st7" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>摄像头<v:newlinechar></v:newlinechar><tspan x="21.37" dy="1.331em" class="st9">适配器</tspan></text>		</g>	<g id="shape39-57" v:mid="39" v:groupcontext="shape" transform="translate(112.5,-174.473)">		<title>Sheet.39</title>		<desc>缓存 管理</desc>		<v:textblock v:margins="rect(0.72,0,0,0)"></v:textblock>		<v:textrect cx="39.375" cy="383.25" width="78.75" height="37.5"></v:textrect>		<path d="M-0 399 A3.00007 3.00007 -180 0 0 3 402 L75.75 402 A3.00007 3.00007 -180 0 0 78.75 399 L78.75 367.5 A3.00007					 3.00007 -180 0 0 75.75 364.5 L3 364.5 A3.00007 3.00007 -180 0 0 -0 367.5 L0 399 Z" class="st6"></path>		<text x="27.37" y="379.62" class="st7" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>缓存<v:newlinechar></v:newlinechar><tspan x="27.37" dy="1.331em" class="st9">管理</tspan></text>		</g>	<g id="shape41-61" v:mid="41" v:groupcontext="shape" transform="translate(0.427012,-99.4735)">		<title>Sheet.41</title>		<path d="M0 402 L600.14 402" class="st12"></path>	</g>	<g id="shape43-64" v:mid="43" v:groupcontext="shape" transform="translate(510.75,284.741) rotate(90)">		<title>Sheet.43</title>		<path d="M0 402 L37.5 402" class="st15"></path>	</g>	<g id="shape45-67" v:mid="45" v:groupcontext="shape" transform="translate(510.75,284.741) rotate(90)">		<title>Sheet.45</title>		<path d="M0 402 L2.25 402" class="st10"></path>	</g>	<g id="shape46-70" v:mid="46" v:groupcontext="shape" transform="translate(510.75,289.053) rotate(90)">		<title>Sheet.46</title>		<path d="M0 402 L5.16 402" class="st16"></path>	</g>	<g id="shape47-73" v:mid="47" v:groupcontext="shape" transform="translate(510.75,295.241) rotate(90)">		<title>Sheet.47</title>		<path d="M0 402 L23.72 402" class="st16"></path>	</g>	<g id="shape48-76" v:mid="48" v:groupcontext="shape" transform="translate(510.75,319.991) rotate(90)">		<title>Sheet.48</title>		<path d="M0 402 L2.25 402" class="st10"></path>	</g>	<g id="shape50-79" v:mid="50" v:groupcontext="shape" transform="translate(187.927,-41.7235)">		<title>Sheet.50</title>		<desc>v42ldriver</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="383.25" width="120" height="37.5"></v:textrect>		<path d="M0 399 A3.00007 3.00007 -180 0 0 3 402 L117 402 A3.00007 3.00007 -180 0 0 120 399 L120 367.5 A3.00007 3.00007					 -180 0 0 117 364.5 L3 364.5 A3.00007 3.00007 -180 0 0 -0 367.5 L0 399 Z" class="st6"></path>		<text x="33.91" y="386.85" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>v42ldriver</text>		</g>	<g id="shape53-82" v:mid="53" v:groupcontext="shape" transform="translate(510.75,76.6324) rotate(90)">		<title>Sheet.53</title>		<path d="M0 402 L36.75 402" class="st15"></path>	</g>	<g id="shape55-85" v:mid="55" v:groupcontext="shape" transform="translate(510.75,80.9382) rotate(90)">		<title>Sheet.55</title>		<path d="M0 402 L28.14 402" class="st10"></path>	</g>	<g id="shape56-88" v:mid="56" v:groupcontext="shape" transform="translate(105.758,-320.186)">		<title>Sheet.56</title>		<path d="M0 402 L2.99 396.82 L5.98 402 L0 402 Z" class="st11"></path>	</g>	<g id="shape57-90" v:mid="57" v:groupcontext="shape" transform="translate(105.758,-288.618)">		<title>Sheet.57</title>		<path d="M0 396.82 L2.99 402 L5.98 396.82 L0 396.82 Z" class="st11"></path>	</g>	<g id="shape59-92" v:mid="59" v:groupcontext="shape" transform="translate(649.927,76.6324) rotate(90)">		<title>Sheet.59</title>		<path d="M0 402 L245.61 402" class="st15"></path>	</g>	<g id="shape61-95" v:mid="61" v:groupcontext="shape" transform="translate(649.927,80.9382) rotate(90)">		<title>Sheet.61</title>		<path d="M0 402 L237 402" class="st10"></path>	</g>	<g id="shape62-98" v:mid="62" v:groupcontext="shape" transform="translate(244.935,-320.186)">		<title>Sheet.62</title>		<path d="M0 402 L2.99 396.82 L5.98 402 L0 402 Z" class="st11"></path>	</g>	<g id="shape63-100" v:mid="63" v:groupcontext="shape" transform="translate(244.935,-79.7593)">		<title>Sheet.63</title>		<path d="M0 396.82 L2.99 402 L5.98 396.82 L0 396.82 Z" class="st11"></path>	</g>	<g id="group71-102" transform="translate(475.728,-14.7814)" v:mid="71" v:groupcontext="group">		<title>Sheet.71</title>		<g id="shape66-103" v:mid="66" v:groupcontext="shape" transform="translate(15.1882,0)">			<title>Sheet.66</title>			<desc>Qualcomm</desc>			<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>			<v:textrect cx="47.25" cy="395.7" width="94.5" height="12.6"></v:textrect>			<rect x="0" y="389.4" width="94.5" height="12.6" class="st17"></rect>			<text x="0" y="398.85" class="st18" v:langid="1033"><v:paragraph></v:paragraph><v:tablist></v:tablist>Qualcomm  </text>			</g>		<g id="shape67-106" v:mid="67" v:groupcontext="shape" transform="translate(6.29496E-14,-0.21861)">			<title>Sheet.67</title>			<path d="M0 400.5 A1.50003 1.50003 -180 0 0 1.5 402 L10.5 402 A1.50003 1.50003 -180 0 0 12 400.5 L12 391.5 A1.50003						 1.50003 -180 0 0 10.5 390 L1.5 390 A1.50003 1.50003 -180 0 0 0 391.5 L0 400.5 Z" class="st4"></path>		</g>		<g id="shape69-108" v:mid="69" v:groupcontext="shape" transform="translate(89.1246,0)">			<title>Sheet.69</title>			<desc>开源</desc>			<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>			<v:textrect cx="10.5" cy="395.7" width="21" height="12.6"></v:textrect>			<rect x="0" y="389.4" width="21" height="12.6" class="st17"></rect>			<text x="0" y="399.19" class="st19" v:langid="1033"><v:paragraph></v:paragraph><v:tablist></v:tablist>开源</text>			</g>		<g id="shape70-111" v:mid="70" v:groupcontext="shape" transform="translate(73.9363,-0.21861)">			<title>Sheet.70</title>			<path d="M0 400.5 A1.50003 1.50003 -180 0 0 1.5 402 L10.5 402 A1.50003 1.50003 -180 0 0 12 400.5 L12 391.5 A1.50003						 1.50003 -180 0 0 10.5 390 L1.5 390 A1.50003 1.50003 -180 0 0 0 391.5 L0 400.5 Z" class="st6"></path>		</g>	</g></g>
</svg>

Table : 视频编码组件

| 组件 | 说明 |
| --- | --- |
| qtiqmmfsrc | 并行采集和提供多个视频流。有关摄像头服务的更多信息，请参见[摄像头架构](https://docs.qualcomm.com/doc/80-70022-50SC/topic/architecture.html#camera)。 |
| 视频编码插件 | 使用 V4L2 驱动程序和 API 对视频流进行编码。 <ul class="ul" id="video__ul_yz1_5jx_rbc"><br>                                    <li class="li"><a href="https://docs.qualcomm.com/doc/80-70022-50SC/topic/v4l2h264enc.html">v4l2h264enc</a>：编码视频为 AVC (H.264) 格式。</li><br><br>                                    <li class="li"><a href="https://docs.qualcomm.com/doc/80-70022-50SC/topic/v4l2h265enc.html">v4l2h265enc</a>：将视频编码为 HEVC (H.265) 格式。</li><br><br>                                </ul> |
| H.264/H.265 parse | 渲染视频流。 |
| Filemux | 多路复用编码的视频流并保存到文件中。 |

### 解码

下图展示了视频解码的架构，其中对来自文件的视频流进行解复用、解码，并显示在本地设备上。

解码参数作为属性公开给应用程序，以提供对视频解码 pipeline 的控制。

Figure : 视频解码 pipeline
                
                <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by Microsoft Visio, SVG Export video_decode_pipeline.svg video_decode_pipeline -->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:v="http://schemas.microsoft.com/visio/2003/SVGExtensions/" width="7.91667in" height="5.25177in" viewbox="0 0 570 378.128" xml:space="preserve" color-interpolation-filters="sRGB" class="st15"><v:documentproperties v:langid="1033" v:viewmarkup="false"></v:documentproperties>
<style>.svg-5 .st1 { fill: #fafafa; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-5 .st2 { fill: #000000; font-family: Roboto; font-size: 1.00001em; font-weight: bold }
.svg-5 .st3 { fill: #d2d7e1; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-5 .st4 { stroke: #d2d7e1; stroke-linecap: butt; stroke-width: 0.75 }
.svg-5 .st5 { fill: #007884; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-5 .st6 { fill: #ffffff; font-family: Roboto; font-size: 1.00001em }
.svg-5 .st7 { fill: #ffffff; font-family: SimHei; font-size: 1.00001em }
.svg-5 .st8 { stroke: #000000; stroke-linecap: butt; stroke-width: 0.75 }
.svg-5 .st9 { fill: #000000; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-5 .st10 { font-family: SimHei; font-size: 1em }
.svg-5 .st11 { stroke: #ffffff; stroke-linecap: butt; stroke-width: 2.25 }
.svg-5 .st12 { stroke: #000000; stroke-dasharray: 3, 1.5; stroke-linecap: butt; stroke-width: 0.75 }
.svg-5 .st13 { fill: none; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-5 .st14 { fill: #000000; font-family: SimHei; font-size: 0.874992em }
.svg-5 .st15 { fill: none; fill-rule: evenodd; font-size: 12px; overflow: visible; stroke-linecap: square; stroke-miterlimit: 3 }</style>
<g v:mid="0" v:index="1" v:groupcontext="foregroundPage">	<title>video_decode_pipeline</title>	<v:pageproperties v:drawingscale="1" v:pagescale="1" v:drawingunits="19" v:shadowoffsetx="9" v:shadowoffsety="-9"></v:pageproperties>	<g id="shape3-1" v:mid="3" v:groupcontext="shape" transform="translate(0.374908,-0.375229)">		<title>Sheet.3</title>		<desc>GST BIN</desc>		<v:textblock v:margins="rect(7.2,0,0,0)" v:verticalalign="0"></v:textblock>		<v:textrect cx="284.625" cy="189.439" width="569.26" height="377.377"></v:textrect>		<path d="M0 372.5 A5.62513 5.62513 -180 0 0 5.63 378.13 L563.63 378.13 A5.62513 5.62513 -180 0 0 569.25 372.5 L569.25					 6.38 A5.62513 5.62513 -180 0 0 563.63 0.75 L5.62 0.75 A5.62513 5.62513 -180 0 0 -0 6.38 L0 372.5 Z" class="st1"></path>		<text x="261.83" y="18.75" class="st2" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>GST BIN</text>		</g>	<g id="shape4-4" v:mid="4" v:groupcontext="shape">		<title>Sheet.4</title>		<path d="M564 0.75 C566.89 0.75 569.25 3.11 569.25 6 L569.25 372.13 C569.25 375.02 566.89 377.38 564 377.38 L6 377.38					 C3.11 377.38 0.75 375.02 0.75 372.13 L0.75 6 C0.75 3.11 3.11 0.75 6 0.75 L564 0.75 ZM564 0 L6 0 C2.69 0					 0 2.69 0 6 L0 372.13 C0 375.44 2.69 378.13 6 378.13 L564 378.13 C567.31 378.13 570 375.44 570 372.13 L570					 6 C570 2.69 567.31 0 564 0 Z" class="st3"></path>	</g>	<g id="shape5-6" v:mid="5" v:groupcontext="shape" transform="translate(-0.369405,-279.368)">		<title>Sheet.5</title>		<path d="M0 378.13 L570 378.13" class="st4"></path>	</g>	<g id="shape6-9" v:mid="6" v:groupcontext="shape" transform="translate(-2.28882E-05,-90.069)">		<title>Sheet.6</title>		<path d="M0 378.13 L570 378.13" class="st4"></path>	</g>	<g id="shape8-12" v:mid="8" v:groupcontext="shape" transform="translate(16.4486,-302.618)">		<title>Sheet.8</title>		<desc>Filesrc</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="359.378" width="120.01" height="37.5"></v:textrect>		<path d="M-0 375.13 A3.00007 3.00007 -180 0 0 3 378.13 L117 378.13 A3.00007 3.00007 -180 0 0 120 375.13 L120 343.63 A3.00007					 3.00007 -180 0 0 117 340.63 L3 340.63 A3.00007 3.00007 -180 0 0 -0 343.63 L0 375.13 Z" class="st5"></path>		<text x="42.33" y="362.98" class="st6" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>Filesrc</text>		</g>	<g id="shape10-15" v:mid="10" v:groupcontext="shape" transform="translate(155.626,-302.618)">		<title>Sheet.10</title>		<desc>流解复用器</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="359.378" width="120.01" height="37.5"></v:textrect>		<path d="M0 375.13 A3.00007 3.00007 -180 0 0 3 378.13 L117 378.13 A3.00007 3.00007 -180 0 0 120 375.13 L120 343.63 A3.00007					 3.00007 -180 0 0 117 340.63 L3 340.63 A3.00007 3.00007 -180 0 0 0 343.63 L0 375.13 Z" class="st5"></path>		<text x="30" y="363.37" class="st7" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>流解复用器</text>		</g>	<g id="shape12-18" v:mid="12" v:groupcontext="shape" transform="translate(294.376,-302.618)">		<title>Sheet.12</title>		<desc>视频解码</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="359.378" width="120.01" height="37.5"></v:textrect>		<path d="M0 375.13 A3.00007 3.00007 -180 0 0 3 378.13 L117 378.13 A3.00007 3.00007 -180 0 0 120 375.13 L120 343.63 A3.00007					 3.00007 -180 0 0 117 340.63 L3 340.63 A3.00007 3.00007 -180 0 0 0 343.63 L0 375.13 Z" class="st5"></path>		<text x="36" y="363.37" class="st7" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>视频解码</text>		</g>	<g id="shape14-21" v:mid="14" v:groupcontext="shape" transform="translate(433.551,-302.618)">		<title>Sheet.14</title>		<desc>Waylandsink</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="359.378" width="120.01" height="37.5"></v:textrect>		<path d="M0 375.13 A3.00007 3.00007 -180 0 0 3 378.13 L117 378.13 A3.00007 3.00007 -180 0 0 120 375.13 L120 343.63 A3.00007					 3.00007 -180 0 0 117 340.63 L3 340.63 A3.00007 3.00007 -180 0 0 0 343.63 L0 375.13 Z" class="st5"></path>		<text x="26.26" y="362.98" class="st6" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>Waylandsink</text>		</g>	<g id="shape17-24" v:mid="17" v:groupcontext="shape" transform="translate(136.449,-321.368)">		<title>Sheet.17</title>		<path d="M0 378.13 L14.98 378.13" class="st8"></path>	</g>	<g id="shape18-27" v:mid="18" v:groupcontext="shape" transform="translate(150.665,-318.75)">		<title>Sheet.18</title>		<path d="M0 378.13 L4.53 375.51 L0 372.89 L0 378.13 Z" class="st9"></path>	</g>	<g id="shape20-29" v:mid="20" v:groupcontext="shape" transform="translate(275.626,-321.368)">		<title>Sheet.20</title>		<path d="M0 378.13 L14.98 378.13" class="st8"></path>	</g>	<g id="shape21-32" v:mid="21" v:groupcontext="shape" transform="translate(289.842,-318.75)">		<title>Sheet.21</title>		<path d="M0 378.13 L4.53 375.51 L0 372.89 L0 378.13 Z" class="st9"></path>	</g>	<g id="shape23-34" v:mid="23" v:groupcontext="shape" transform="translate(413.949,-321.368)">		<title>Sheet.23</title>		<path d="M0 378.13 L14.98 378.13" class="st8"></path>	</g>	<g id="shape24-37" v:mid="24" v:groupcontext="shape" transform="translate(428.165,-318.75)">		<title>Sheet.24</title>		<path d="M0 378.13 L4.53 375.51 L0 372.89 L0 378.13 Z" class="st9"></path>	</g>	<g id="shape25-39" v:mid="25" v:groupcontext="shape" transform="translate(294.376,-35.8511)">		<title>Sheet.25</title>		<desc>V4l2 驱动程序</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="359.378" width="120.01" height="37.5"></v:textrect>		<path d="M0 375.13 A3.00007 3.00007 -180 0 0 3 378.13 L117 378.13 A3.00007 3.00007 -180 0 0 120 375.13 L120 343.63 A3.00007					 3.00007 -180 0 0 117 340.63 L3 340.63 A3.00007 3.00007 -180 0 0 0 343.63 L0 375.13 Z" class="st5"></path>		<text x="22.5" y="363.37" class="st6" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>V4l2 <tspan class="st10">驱动程序</tspan></text>		</g>	<g id="shape28-43" v:mid="28" v:groupcontext="shape" transform="translate(871.679,280.25) rotate(90)">		<title>Sheet.28</title>		<path d="M0 378.13 L23.99 378.13" class="st11"></path>	</g>	<g id="group29-46" transform="translate(493.551,-73.8869)" v:mid="29" v:groupcontext="group">		<title>Sheet.29</title>		<g id="shape30-47" v:mid="30" v:groupcontext="shape" transform="translate(378.128,354.137) rotate(90)">			<title>Sheet.30</title>			<path d="M0 378.13 L2.25 378.13" class="st8"></path>		</g>		<g id="shape31-50" v:mid="31" v:groupcontext="shape" transform="translate(378.128,358.336) rotate(90)">			<title>Sheet.31</title>			<path d="M0 378.13 L4.87 378.13" class="st12"></path>		</g>		<g id="shape32-53" v:mid="32" v:groupcontext="shape" transform="translate(378.128,364.183) rotate(90)">			<title>Sheet.32</title>			<path d="M0 378.13 L10.72 378.13" class="st12"></path>		</g>		<g id="shape33-56" v:mid="33" v:groupcontext="shape" transform="translate(378.128,375.878) rotate(90)">			<title>Sheet.33</title>			<path d="M0 378.13 L2.25 378.13" class="st8"></path>		</g>	</g>	<g id="shape34-59" v:mid="34" v:groupcontext="shape" transform="translate(433.551,-35.8511)">		<title>Sheet.34</title>		<desc>DRM/KMS</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="359.378" width="120.01" height="37.5"></v:textrect>		<path d="M0 375.13 A3.00007 3.00007 -180 0 0 3 378.13 L117 378.13 A3.00007 3.00007 -180 0 0 120 375.13 L120 343.63 A3.00007					 3.00007 -180 0 0 117 340.63 L3 340.63 A3.00007 3.00007 -180 0 0 0 343.63 L0 375.13 Z" class="st5"></path>		<text x="32.1" y="362.98" class="st6" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>DRM/KMS</text>		</g>	<g id="shape36-62" v:mid="36" v:groupcontext="shape" transform="translate(433.551,-229.868)">		<title>Sheet.36</title>		<desc>Weston</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="359.378" width="120.01" height="37.5"></v:textrect>		<path d="M0 375.13 A3.00007 3.00007 -180 0 0 3 378.13 L117 378.13 A3.00007 3.00007 -180 0 0 120 375.13 L120 343.63 A3.00007					 3.00007 -180 0 0 117 340.63 L3 340.63 A3.00007 3.00007 -180 0 0 0 343.63 L0 375.13 Z" class="st5"></path>		<text x="39.71" y="362.98" class="st6" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>Weston</text>		</g>	<g id="shape38-65" v:mid="38" v:groupcontext="shape" transform="translate(433.551,-163.873)">		<title>Sheet.38</title>		<desc>DRM</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="359.378" width="120.01" height="37.5"></v:textrect>		<path d="M0 375.13 A3.00007 3.00007 -180 0 0 3 378.13 L117 378.13 A3.00007 3.00007 -180 0 0 120 375.13 L120 343.63 A3.00007					 3.00007 -180 0 0 117 340.63 L3 340.63 A3.00007 3.00007 -180 0 0 0 343.63 L0 375.13 Z" class="st5"></path>		<text x="47.13" y="362.98" class="st6" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>DRM</text>		</g>	<g id="shape40-68" v:mid="40" v:groupcontext="shape" transform="translate(433.551,-97.8774)">		<title>Sheet.40</title>		<desc>libdrm</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="359.378" width="120.01" height="37.5"></v:textrect>		<path d="M0 375.13 A3.00007 3.00007 -180 0 0 3 378.13 L117 378.13 A3.00007 3.00007 -180 0 0 120 375.13 L120 343.63 A3.00007					 3.00007 -180 0 0 117 340.63 L3 340.63 A3.00007 3.00007 -180 0 0 0 343.63 L0 375.13 Z" class="st5"></path>		<text x="43.05" y="362.98" class="st6" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>libdrm</text>		</g>	<g id="shape43-71" v:mid="43" v:groupcontext="shape" transform="translate(871.679,76.2597) rotate(90)">		<title>Sheet.43</title>		<path d="M0 378.13 L33.75 378.13" class="st11"></path>	</g>	<g id="group44-74" transform="translate(490.56,-268.118)" v:mid="44" v:groupcontext="group">		<title>Sheet.44</title>		<g id="shape45-75" v:mid="45" v:groupcontext="shape" transform="translate(381.119,348.683) rotate(90)">			<title>Sheet.45</title>			<path d="M0 378.13 L25.14 378.13" class="st8"></path>		</g>		<g id="shape46-78" v:mid="46" v:groupcontext="shape" transform="translate(-7.09433E-14,-28.5689)">			<title>Sheet.46</title>			<path d="M0 378.13 L2.99 372.95 L5.98 378.13 L0 378.13 Z" class="st9"></path>		</g>		<g id="shape47-80" v:mid="47" v:groupcontext="shape">			<title>Sheet.47</title>			<path d="M0 372.95 L2.99 378.13 L5.98 372.95 L0 372.95 Z" class="st9"></path>		</g>	</g>	<g id="shape49-82" v:mid="49" v:groupcontext="shape" transform="translate(732.503,76.2597) rotate(90)">		<title>Sheet.49</title>		<path d="M0 378.13 L227.98 378.13" class="st11"></path>	</g>	<g id="group50-85" transform="translate(351.384,-73.8869)" v:mid="50" v:groupcontext="group">		<title>Sheet.50</title>		<g id="shape51-86" v:mid="51" v:groupcontext="shape" transform="translate(381.119,154.452) rotate(90)">			<title>Sheet.51</title>			<path d="M0 378.13 L219.37 378.13" class="st8"></path>		</g>		<g id="shape52-89" v:mid="52" v:groupcontext="shape" transform="translate(9.49241E-15,-222.8)">			<title>Sheet.52</title>			<path d="M0 378.13 L2.99 372.95 L5.98 378.13 L0 378.13 Z" class="st9"></path>		</g>		<g id="shape53-91" v:mid="53" v:groupcontext="shape">			<title>Sheet.53</title>			<path d="M0 372.95 L2.99 378.13 L5.98 372.95 L0 372.95 Z" class="st9"></path>		</g>	</g>	<g id="shape55-93" v:mid="55" v:groupcontext="shape" transform="translate(871.679,149.01) rotate(90)">		<title>Sheet.55</title>		<path d="M0 378.13 L27.74 378.13" class="st11"></path>	</g>	<g id="group56-96" transform="translate(490.56,-201.377)" v:mid="56" v:groupcontext="group">		<title>Sheet.56</title>		<g id="shape57-97" v:mid="57" v:groupcontext="shape" transform="translate(381.119,354.693) rotate(90)">			<title>Sheet.57</title>			<path d="M0 378.13 L19.13 378.13" class="st8"></path>		</g>		<g id="shape58-100" v:mid="58" v:groupcontext="shape" transform="translate(-7.09433E-14,-22.5593)">			<title>Sheet.58</title>			<path d="M0 378.13 L2.99 372.95 L5.98 378.13 L0 378.13 Z" class="st9"></path>		</g>		<g id="shape59-102" v:mid="59" v:groupcontext="shape">			<title>Sheet.59</title>			<path d="M0 372.95 L2.99 378.13 L5.98 372.95 L0 372.95 Z" class="st9"></path>		</g>	</g>	<g id="shape61-104" v:mid="61" v:groupcontext="shape" transform="translate(871.679,214.632) rotate(90)">		<title>Sheet.61</title>		<path d="M0 378.13 L27.74 378.13" class="st11"></path>	</g>	<g id="group62-107" transform="translate(490.56,-135.755)" v:mid="62" v:groupcontext="group">		<title>Sheet.62</title>		<g id="shape63-108" v:mid="63" v:groupcontext="shape" transform="translate(381.119,354.693) rotate(90)">			<title>Sheet.63</title>			<path d="M0 378.13 L19.13 378.13" class="st8"></path>		</g>		<g id="shape64-111" v:mid="64" v:groupcontext="shape" transform="translate(-7.09433E-14,-22.5593)">			<title>Sheet.64</title>			<path d="M0 378.13 L2.99 372.95 L5.98 378.13 L0 378.13 Z" class="st9"></path>		</g>		<g id="shape65-113" v:mid="65" v:groupcontext="shape">			<title>Sheet.65</title>			<path d="M0 372.95 L2.99 378.13 L5.98 372.95 L0 372.95 Z" class="st9"></path>		</g>	</g>	<g id="group79-115" transform="translate(517.363,-11.909)" v:mid="79" v:groupcontext="group">		<title>Sheet.79</title>		<g id="shape67-116" v:mid="67" v:groupcontext="shape" transform="translate(15.1883,0)">			<title>Sheet.67</title>			<desc>开源</desc>			<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>			<v:textrect cx="10.5" cy="371.828" width="21.01" height="12.6"></v:textrect>			<rect x="0" y="365.528" width="21" height="12.6" class="st13"></rect>			<text x="0" y="375.32" class="st14" v:langid="1033"><v:paragraph></v:paragraph><v:tablist></v:tablist>开源</text>			</g>		<g id="shape68-119" v:mid="68" v:groupcontext="shape" transform="translate(-9.99201E-16,-0.218604)">			<title>Sheet.68</title>			<path d="M0 376.63 A1.50003 1.50003 -180 0 0 1.5 378.13 L10.5 378.13 A1.50003 1.50003 -180 0 0 12 376.63 L12 367.63						 A1.50003 1.50003 -180 0 0 10.5 366.13 L1.5 366.13 A1.50003 1.50003 -180 0 0 0 367.63 L0 376.63 Z" class="st5"></path>		</g>	</g></g>
</svg>

有关视频解码用例，请参见[视频播放用例](https://docs.qualcomm.com/doc/80-70022-50SC/topic/video-playback-use-cases.html)。

Table : 视频解码组件

| 组件 | 说明 |
| --- | --- |
| 视频解码插件 | 使用 V4L2 驱动程序和 API 来解码视频流，并与 Waylandsink 插件连接。 <ul class="ul" id="video__ul_brg_w4y_rbc"><br>                                    <li class="li"><a href="https://docs.qualcomm.com/doc/80-70022-50SC/topic/v4l2h264dec.html">v4l2h264dec</a>：解码视频为 AVC (H.264) 格式。</li><br><br>                                    <li class="li"><a href="https://docs.qualcomm.com/doc/80-70022-50SC/topic/v4l2h265dec.html">v4l2h265dec</a>：将视频解码为 HEVC (H.265) 格式。</li><br><br>                                </ul> |
| Waylandsink | <ol class="ol" id="video__ol_xzc_spy_rbc"><br>                                    <li class="li"> 接收 GBM 缓存（解码缓存）作为输入。</li><br><br>                                    <li class="li">将它们发送至 Weston 服务器（通过 Wayland 协议）进行显示合成。</li><br><br>                                </ol> |

## 音频架构

Source: [https://docs.qualcomm.com/doc/80-70022-50SC/topic/architecture.html](https://docs.qualcomm.com/doc/80-70022-50SC/topic/architecture.html)

对于音频采集和播放，请使用 [pulsesrc](https://docs.qualcomm.com/doc/80-70022-50SC/topic/pulsesrc.html) 和 [pulsesink](https://docs.qualcomm.com/doc/80-70022-50SC/topic/pulsesink.html) GStreamer 插件。借助开源软件，您能够对音频进行编码和解码。

### 采集

下图展示了使用 pulsesrc 插件采集音频的过程。然后，处理音频流并将其写入文件。

Figure : 音频采集 pipeline
                
                <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by Microsoft Visio, SVG Export audio_capture_pipeline.svg audio_capture_pipeline -->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:v="http://schemas.microsoft.com/visio/2003/SVGExtensions/" width="5.94343in" height="3.61376in" viewbox="0 0 427.927 260.191" xml:space="preserve" color-interpolation-filters="sRGB" class="st14"><v:documentproperties v:langid="1033" v:viewmarkup="false"></v:documentproperties>
<style>.svg-6 .st1 { fill: #fafafa; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-6 .st2 { fill: #d2d7e1; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-6 .st3 { stroke: #d2d7e1; stroke-linecap: butt; stroke-width: 0.75 }
.svg-6 .st4 { fill: none; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-6 .st5 { fill: #000000; font-family: Roboto; font-size: 1.00001em; font-weight: bold }
.svg-6 .st6 { fill: #007884; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-6 .st7 { fill: #ffffff; font-family: Roboto; font-size: 1.00001em }
.svg-6 .st8 { stroke: #000000; stroke-linecap: butt; stroke-width: 0.75 }
.svg-6 .st9 { fill: #000000; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-6 .st10 { font-family: SimHei; font-size: 1em }
.svg-6 .st11 { stroke: #ffffff; stroke-linecap: butt; stroke-width: 2.25 }
.svg-6 .st12 { stroke: #000000; stroke-dasharray: 3, 1.5; stroke-linecap: butt; stroke-width: 0.75 }
.svg-6 .st13 { fill: #000000; font-family: SimHei; font-size: 0.874992em }
.svg-6 .st14 { fill: none; fill-rule: evenodd; font-size: 12px; overflow: visible; stroke-linecap: square; stroke-miterlimit: 3 }</style>
<g v:mid="0" v:index="1" v:groupcontext="foregroundPage">	<title>audio_capture_pipeline</title>	<v:pageproperties v:drawingscale="1" v:pagescale="1" v:drawingunits="19" v:shadowoffsetx="9" v:shadowoffsety="-9"></v:pageproperties>	<v:layer v:name="Connector" v:index="0"></v:layer>	<g id="group2-1" v:mid="2" v:groupcontext="group">		<title>Sheet.2</title>		<g id="shape3-2" v:mid="3" v:groupcontext="shape" transform="translate(0.374926,-0.375)">			<title>Sheet.3</title>			<path d="M0 254.57 A5.62513 5.62513 -180 0 0 5.63 260.19 L421.55 260.19 A5.62513 5.62513 -180 0 0 427.18 254.57 L427.18						 6.37 A5.62513 5.62513 -180 0 0 421.55 0.75 L5.63 0.75 A5.62513 5.62513 -180 0 0 0 6.37 L0 254.57 Z" class="st1"></path>		</g>		<g id="shape4-4" v:mid="4" v:groupcontext="shape">			<title>Sheet.4</title>			<path d="M421.93 0.75 C424.82 0.75 427.18 3.11 427.18 6 L427.18 254.19 C427.18 257.09 424.82 259.44 421.93 259.44						 L6 259.44 C3.11 259.44 0.75 257.09 0.75 254.19 L0.75 6 C0.75 3.11 3.11 0.75 6 0.75 L421.93 0.75 ZM421.93						 0 L6 0 C2.69 0 0 2.69 0 6 L0 254.19 C0 257.5 2.69 260.19 6 260.19 L421.93 260.19 C425.24 260.19 427.93						 257.5 427.93 254.19 L427.93 6 C427.93 2.69 425.24 0 421.93 0 Z" class="st2"></path>		</g>	</g>	<g id="shape5-6" v:mid="5" v:groupcontext="shape" transform="translate(0.253817,-161.629)">		<title>Sheet.5</title>		<path d="M0 260.19 L427.18 260.19" class="st3"></path>	</g>	<g id="shape6-9" v:mid="6" v:groupcontext="shape" transform="translate(0.296949,-76.7132)">		<title>Sheet.6</title>		<path d="M0 260.19 L427.13 260.19" class="st3"></path>	</g>	<g id="shape7-12" v:mid="7" v:groupcontext="shape" transform="translate(172.177,-233.055)">		<title>Sheet.7</title>		<desc>GST BIN</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="42" cy="252.991" width="84" height="14.4"></v:textrect>		<rect x="0" y="245.791" width="84" height="14.4" class="st4"></rect>		<text x="19.2" y="256.59" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>GST BIN</text>		</g>	<g id="shape8-15" v:mid="8" v:groupcontext="shape" transform="translate(15,-185.49)">		<title>Sheet.8</title>		<desc>Pulsesrc</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="241.441" width="120.01" height="37.5"></v:textrect>		<path d="M-0 257.19 A3.00007 3.00007 -180 0 0 3 260.19 L117 260.19 A3.00007 3.00007 -180 0 0 120 257.19 L120 225.69 A3.00007					 3.00007 -180 0 0 117 222.69 L3 222.69 A3.00007 3.00007 -180 0 0 0 225.69 L0 257.19 Z" class="st6"></path>		<text x="36.91" y="245.04" class="st7" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>Pulsesrc</text>		</g>	<g id="shape10-18" v:mid="10" v:groupcontext="shape" transform="translate(154.177,-185.49)">		<title>Sheet.10</title>		<desc>PCM</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="241.441" width="120.01" height="37.5"></v:textrect>		<path d="M0 257.19 A3.00007 3.00007 -180 0 0 3 260.19 L117 260.19 A3.00007 3.00007 -180 0 0 120 257.19 L120 225.69 A3.00007					 3.00007 -180 0 0 117 222.69 L3 222.69 A3.00007 3.00007 -180 0 0 0 225.69 L0 257.19 Z" class="st6"></path>		<text x="47.07" y="245.04" class="st7" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>PCM</text>		</g>	<g id="shape12-21" v:mid="12" v:groupcontext="shape" transform="translate(292.927,-185.49)">		<title>Sheet.12</title>		<desc>filesink</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="241.441" width="120.01" height="37.5"></v:textrect>		<path d="M0 257.19 A3.00007 3.00007 -180 0 0 3 260.19 L117 260.19 A3.00007 3.00007 -180 0 0 120 257.19 L120 225.69 A3.00007					 3.00007 -180 0 0 117 222.69 L3 222.69 A3.00007 3.00007 -180 0 0 0 225.69 L0 257.19 Z" class="st6"></path>		<text x="40.92" y="245.04" class="st7" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>filesink</text>		</g>	<g id="group14-24" transform="translate(135,-201.622)" v:mid="14" v:groupcontext="group">		<title>Sheet.14</title>		<g id="shape15-25" v:mid="15" v:groupcontext="shape" transform="translate(0,-2.61782)">			<title>Sheet.15</title>			<path d="M0 260.19 L14.98 260.19" class="st8"></path>		</g>		<g id="shape16-28" v:mid="16" v:groupcontext="shape" transform="translate(14.2165,0)">			<title>Sheet.16</title>			<path d="M0 260.19 L4.53 257.57 L0 254.96 L0 260.19 Z" class="st9"></path>		</g>	</g>	<g id="group17-30" transform="translate(274.177,-201.622)" v:mid="17" v:groupcontext="group">		<title>Sheet.17</title>		<g id="shape18-31" v:mid="18" v:groupcontext="shape" transform="translate(0,-2.61782)">			<title>Sheet.18</title>			<path d="M0 260.19 L14.98 260.19" class="st8"></path>		</g>		<g id="shape19-34" v:mid="19" v:groupcontext="shape" transform="translate(14.2165,0)">			<title>Sheet.19</title>			<path d="M0 260.19 L4.53 257.57 L0 254.96 L0 260.19 Z" class="st9"></path>		</g>	</g>	<g id="shape20-36" v:mid="20" v:groupcontext="shape" transform="translate(15,-14.7234)">		<title>Sheet.20</title>		<desc>ALSA</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="241.441" width="120.01" height="37.5"></v:textrect>		<path d="M0 257.19 A3.00007 3.00007 -180 0 0 3 260.19 L117 260.19 A3.00007 3.00007 -180 0 0 120 257.19 L120 225.69 A3.00007					 3.00007 -180 0 0 117 222.69 L3 222.69 A3.00007 3.00007 -180 0 0 -0 225.69 L0 257.19 Z" class="st6"></path>		<text x="45.38" y="245.04" class="st7" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>ALSA</text>		</g>	<g id="shape22-39" v:mid="22" v:groupcontext="shape" transform="translate(15,-100.107)">		<title>Sheet.22</title>		<desc>PulseAudio 服务器</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="241.441" width="120.01" height="37.5"></v:textrect>		<path d="M0 257.19 A3.00007 3.00007 -180 0 0 3 260.19 L117 260.19 A3.00007 3.00007 -180 0 0 120 257.19 L120 225.69 A3.00007					 3.00007 -180 0 0 117 222.69 L3 222.69 A3.00007 3.00007 -180 0 0 -0 225.69 L0 257.19 Z" class="st6"></path>		<text x="29.69" y="237.05" class="st7" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>PulseAudio<v:newlinechar></v:newlinechar><tspan x="42" dy="1.298em" class="st10">服务器</tspan></text>		</g>	<g id="group24-43" transform="translate(72.0082,-138.517)" v:mid="24" v:groupcontext="group">		<title>Sheet.24</title>		<g id="shape25-44" v:mid="25" v:groupcontext="shape" transform="translate(263.183,213.968) rotate(90)">			<title>Sheet.25</title>			<path d="M0 260.19 L46.22 260.19" class="st11"></path>		</g>		<g id="group26-47" transform="translate(1.0042E-13,-7.17372E-07)" v:mid="26" v:groupcontext="group">			<title>Sheet.26</title>			<g id="shape27-48" v:mid="27" v:groupcontext="shape" transform="translate(263.183,218.273) rotate(90)">				<title>Sheet.27</title>				<path d="M0 260.19 L37.61 260.19" class="st8"></path>			</g>			<g id="shape28-51" v:mid="28" v:groupcontext="shape" transform="translate(1.0042E-13,-41.0421)">				<title>Sheet.28</title>				<path d="M0 260.19 L2.99 255.01 L5.98 260.19 L0 260.19 Z" class="st9"></path>			</g>			<g id="shape29-53" v:mid="29" v:groupcontext="shape">				<title>Sheet.29</title>				<path d="M0 255.01 L2.99 260.19 L5.98 255.01 L0 255.01 Z" class="st9"></path>			</g>		</g>	</g>	<g id="group30-55" transform="translate(74.6989,-53.3196)" v:mid="30" v:groupcontext="group">		<title>Sheet.30</title>		<g id="shape31-56" v:mid="31" v:groupcontext="shape" transform="translate(260.191,213.404) rotate(90)">			<title>Sheet.31</title>			<path d="M0 260.19 L46.79 260.19" class="st11"></path>		</g>		<g id="group32-59" transform="translate(0,-5.8402E-06)" v:mid="32" v:groupcontext="group">			<title>Sheet.32</title>			<g id="shape33-60" v:mid="33" v:groupcontext="shape" transform="translate(260.191,213.404) rotate(90)">				<title>Sheet.33</title>				<path d="M0 260.19 L2.25 260.19" class="st8"></path>			</g>			<g id="shape34-63" v:mid="34" v:groupcontext="shape" transform="translate(260.191,217.576) rotate(90)">				<title>Sheet.34</title>				<path d="M0 260.19 L4.81 260.19" class="st12"></path>			</g>			<g id="shape35-66" v:mid="35" v:groupcontext="shape" transform="translate(260.191,223.342) rotate(90)">				<title>Sheet.35</title>				<path d="M0 260.19 L33.64 260.19" class="st12"></path>			</g>			<g id="shape36-69" v:mid="36" v:groupcontext="shape" transform="translate(260.191,257.941) rotate(90)">				<title>Sheet.36</title>				<path d="M0 260.19 L2.25 260.19" class="st8"></path>			</g>		</g>	</g>	<g id="group42-72" transform="translate(376.739,-6.62948)" v:mid="42" v:groupcontext="group">		<title>Sheet.42</title>		<g id="shape38-73" v:mid="38" v:groupcontext="shape" transform="translate(15.1883,0)">			<title>Sheet.38</title>			<desc>开源</desc>			<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>			<v:textrect cx="10.5" cy="253.891" width="21" height="12.6"></v:textrect>			<rect x="0" y="247.591" width="21" height="12.6" class="st4"></rect>			<text x="0" y="257.39" class="st13" v:langid="1033"><v:paragraph></v:paragraph><v:tablist></v:tablist>开源</text>			</g>		<g id="shape39-76" v:mid="39" v:groupcontext="shape" transform="translate(6.29496E-14,-0.218603)">			<title>Sheet.39</title>			<path d="M0 258.69 A1.50003 1.50003 -180 0 0 1.5 260.19 L10.5 260.19 A1.50003 1.50003 -180 0 0 12 258.69 L12 249.69						 A1.50003 1.50003 -180 0 0 10.5 248.19 L1.5 248.19 A1.50003 1.50003 -180 0 0 0 249.69 L0 258.69 Z" class="st6"></path>		</g>	</g></g>
</svg>

Table : 音频采集组件

| 组件 | 说明 |
| --- | --- |
| Pulsesrc | <ul class="ul" id="audio__ul_xcf_2ry_rbc"><br>                                    <li class="li">采集音频并将其与底层 PulseAudio 服务器共享。</li><br><br>                                    <li class="li">设置从中采集脉冲编码调制（PCM）音频样本的音频源。</li><br><br>                                    <li class="li">将 PCM 示例保存到文件中。</li><br><br>                                </ul> |
| PulseAudio server | <ul class="ul" id="audio__ul_lfh_vqy_rbc"><br>                                    <li class="li">与 Qualcomm 硬件交互。</li><br><br>                                    <li class="li">使用可插拔模块与 ALSA 驱动程序交互以处理音频数据。</li><br><br>                                </ul> |

### Playback

可使用 pulsesink 插件实现音频播放。这是一个上游插件，可播放来自各种音频源（实时源或经过编码的音频文件）的音频。

Figure : 音频播放 pipeline
                
                <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by Microsoft Visio, SVG Export audio_playback_pipeline.svg Layer_1 -->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:v="http://schemas.microsoft.com/visio/2003/SVGExtensions/" width="5.94343in" height="3.96829in" viewbox="0 0 427.927 285.717" xml:space="preserve" color-interpolation-filters="sRGB" class="st14"><v:documentproperties v:langid="1033" v:viewmarkup="false"></v:documentproperties>
<style>.svg-7 .st1 { fill: #fafafa; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-7 .st2 { fill: #d2d7e1; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-7 .st3 { stroke: #d2d7e1; stroke-linecap: butt; stroke-width: 0.75 }
.svg-7 .st4 { fill: none; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-7 .st5 { fill: #000000; font-family: Roboto; font-size: 1.00001em; font-weight: bold }
.svg-7 .st6 { fill: #007884; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-7 .st7 { fill: #ffffff; font-family: Roboto; font-size: 1.00001em }
.svg-7 .st8 { stroke: #000000; stroke-linecap: butt; stroke-width: 0.75 }
.svg-7 .st9 { fill: #000000; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-7 .st10 { font-family: SimHei; font-size: 1em }
.svg-7 .st11 { stroke: #ffffff; stroke-linecap: butt; stroke-width: 2.25 }
.svg-7 .st12 { stroke: #000000; stroke-dasharray: 3, 1.5; stroke-linecap: butt; stroke-width: 0.75 }
.svg-7 .st13 { fill: #000000; font-family: SimHei; font-size: 0.874992em }
.svg-7 .st14 { fill: none; fill-rule: evenodd; font-size: 12px; overflow: visible; stroke-linecap: square; stroke-miterlimit: 3 }</style>
<g v:mid="0" v:index="1" v:groupcontext="foregroundPage">	<title>Layer_1</title>	<v:pageproperties v:drawingscale="1" v:pagescale="1" v:drawingunits="19" v:shadowoffsetx="9" v:shadowoffsety="-9"></v:pageproperties>	<g id="shape2-1" v:mid="2" v:groupcontext="shape" transform="translate(0.374891,-0.375229)">		<title>Sheet.2</title>		<path d="M0 280.09 A5.62513 5.62513 -180 0 0 5.63 285.72 L421.55 285.72 A5.62513 5.62513 -180 0 0 427.18 280.09 L427.18					 6.38 A5.62513 5.62513 -180 0 0 421.55 0.75 L5.63 0.75 A5.62513 5.62513 -180 0 0 -0 6.38 L0 280.09 Z" class="st1"></path>	</g>	<g id="shape3-3" v:mid="3" v:groupcontext="shape">		<title>Sheet.3</title>		<path d="M421.93 0.75 C424.82 0.75 427.18 3.11 427.18 6 L427.18 279.72 C427.18 282.61 424.82 284.97 421.93 284.97 L6					 284.97 C3.11 284.97 0.75 282.61 0.75 279.72 L0.75 6 C0.75 3.11 3.11 0.75 6 0.75 L421.93 0.75 ZM421.93 0					 L6 0 C2.69 0 0 2.69 0 6 L0 279.72 C0 283.03 2.69 285.72 6 285.72 L421.93 285.72 C425.24 285.72 427.93 283.03					 427.93 279.72 L427.93 6 C427.93 2.69 425.24 0 421.93 0 Z" class="st2"></path>	</g>	<g id="shape4-5" v:mid="4" v:groupcontext="shape" transform="translate(-1.65515E-05,-186.072)">		<title>Sheet.4</title>		<path d="M0 285.72 L427.93 285.72" class="st3"></path>	</g>	<g id="shape5-8" v:mid="5" v:groupcontext="shape" transform="translate(-1.65515E-05,-97.6095)">		<title>Sheet.5</title>		<path d="M0 285.72 L427.93 285.72" class="st3"></path>	</g>	<g id="shape6-11" v:mid="6" v:groupcontext="shape" transform="translate(156.174,-258.683)">		<title>Sheet.6</title>		<desc>GST BIN</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="58.0025" cy="278.517" width="116.01" height="14.4"></v:textrect>		<rect x="0" y="271.317" width="116.005" height="14.4" class="st4"></rect>		<text x="35.21" y="282.12" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>GST BIN</text>		</g>	<g id="shape8-14" v:mid="8" v:groupcontext="shape" transform="translate(15,-211.118)">		<title>Sheet.8</title>		<desc>filesrc</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="266.967" width="120.01" height="37.5"></v:textrect>		<path d="M-0 282.72 A3.00007 3.00007 -180 0 0 3 285.72 L117 285.72 A3.00007 3.00007 -180 0 0 120 282.72 L120 251.22 A3.00007					 3.00007 -180 0 0 117 248.22 L3 248.22 A3.00007 3.00007 -180 0 0 0 251.22 L0 282.72 Z" class="st6"></path>		<text x="43.56" y="270.57" class="st7" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>filesrc</text>		</g>	<g id="shape11-17" v:mid="11" v:groupcontext="shape" transform="translate(154.177,-211.118)">		<title>Sheet.11</title>		<desc>PCM</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="266.967" width="120" height="37.5"></v:textrect>		<path d="M0 282.72 A3.00007 3.00007 -180 0 0 3 285.72 L117 285.72 A3.00007 3.00007 -180 0 0 120 282.72 L120 251.22 A3.00007					 3.00007 -180 0 0 117 248.22 L3 248.22 A3.00007 3.00007 -180 0 0 0 251.22 L0 282.72 Z" class="st6"></path>		<text x="47.07" y="270.57" class="st7" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>PCM</text>		</g>	<g id="shape14-20" v:mid="14" v:groupcontext="shape" transform="translate(292.927,-211.118)">		<title>Sheet.14</title>		<desc>Pulsesink</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="266.967" width="120.01" height="37.5"></v:textrect>		<path d="M0 282.72 A3.00007 3.00007 -180 0 0 3 285.72 L117 285.72 A3.00007 3.00007 -180 0 0 120 282.72 L120 251.22 A3.00007					 3.00007 -180 0 0 117 248.22 L3 248.22 A3.00007 3.00007 -180 0 0 0 251.22 L0 282.72 Z" class="st6"></path>		<text x="34.28" y="270.57" class="st7" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>Pulsesink</text>		</g>	<g id="shape17-23" v:mid="17" v:groupcontext="shape" transform="translate(135,-229.868)">		<title>Sheet.17</title>		<path d="M0 285.72 L14.98 285.72" class="st8"></path>	</g>	<g id="shape18-26" v:mid="18" v:groupcontext="shape" transform="translate(149.216,-227.25)">		<title>Sheet.18</title>		<path d="M0 285.72 L4.53 283.1 L0 280.48 L0 285.72 Z" class="st9"></path>	</g>	<g id="shape20-28" v:mid="20" v:groupcontext="shape" transform="translate(274.177,-229.868)">		<title>Sheet.20</title>		<path d="M0 285.72 L14.98 285.72" class="st8"></path>	</g>	<g id="shape21-31" v:mid="21" v:groupcontext="shape" transform="translate(288.393,-227.25)">		<title>Sheet.21</title>		<path d="M0 285.72 L4.53 283.1 L0 280.48 L0 285.72 Z" class="st9"></path>	</g>	<g id="shape23-33" v:mid="23" v:groupcontext="shape" transform="translate(292.927,-34.1932)">		<title>Sheet.23</title>		<desc>ALSA</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="266.967" width="120" height="37.5"></v:textrect>		<path d="M0 282.72 A3.00007 3.00007 -180 0 0 3 285.72 L117 285.72 A3.00007 3.00007 -180 0 0 120 282.72 L120 251.22 A3.00007					 3.00007 -180 0 0 117 248.22 L3 248.22 A3.00007 3.00007 -180 0 0 0 251.22 L0 282.72 Z" class="st6"></path>		<text x="45.38" y="270.57" class="st7" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>ALSA</text>		</g>	<g id="shape26-36" v:mid="26" v:groupcontext="shape" transform="translate(292.927,-123.526)">		<title>Sheet.26</title>		<desc>PulseAudio 服务器</desc>		<v:textblock v:margins="rect(3.6,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="266.967" width="120.01" height="37.5"></v:textrect>		<path d="M0 282.72 A3.00007 3.00007 -180 0 0 3 285.72 L117 285.72 A3.00007 3.00007 -180 0 0 120 282.72 L120 251.22 A3.00007					 3.00007 -180 0 0 117 248.22 L3 248.22 A3.00007 3.00007 -180 0 0 0 251.22 L0 282.72 Z" class="st6"></path>		<text x="29.69" y="265.11" class="st7" v:langid="1033"><v:paragraph v:spline="-1" v:horizalign="1"></v:paragraph><v:tablist></v:tablist>PulseAudio<v:newlinechar></v:newlinechar><tspan x="42" dy="1.082em" class="st10">服务器</tspan></text>		</g>	<g id="shape29-40" v:mid="29" v:groupcontext="shape" transform="translate(638.644,74.8951) rotate(90)">		<title>Sheet.29</title>		<path d="M0 285.72 L49.5 285.72" class="st11"></path>	</g>	<g id="group30-43" transform="translate(349.935,-161.322)" v:mid="30" v:groupcontext="group">		<title>Sheet.30</title>		<g id="shape31-44" v:mid="31" v:groupcontext="shape" transform="translate(288.709,240.523) rotate(90)">			<title>Sheet.31</title>			<path d="M0 285.72 L40.89 285.72" class="st8"></path>		</g>		<g id="shape32-47" v:mid="32" v:groupcontext="shape" transform="translate(-5.9952E-14,-44.3189)">			<title>Sheet.32</title>			<path d="M0 285.72 L2.99 280.54 L5.98 285.72 L0 285.72 Z" class="st9"></path>		</g>		<g id="shape33-49" v:mid="33" v:groupcontext="shape">			<title>Sheet.33</title>			<path d="M0 280.54 L2.99 285.72 L5.98 280.54 L0 280.54 Z" class="st9"></path>		</g>	</g>	<g id="shape35-51" v:mid="35" v:groupcontext="shape" transform="translate(638.644,163.358) rotate(90)">		<title>Sheet.35</title>		<path d="M0 285.72 L49.5 285.72" class="st11"></path>	</g>	<g id="group36-54" transform="translate(352.927,-72.8595)" v:mid="36" v:groupcontext="group">		<title>Sheet.36</title>		<g id="shape37-55" v:mid="37" v:groupcontext="shape" transform="translate(285.717,236.217) rotate(90)">			<title>Sheet.37</title>			<path d="M0 285.72 L2.25 285.72" class="st8"></path>		</g>		<g id="shape38-58" v:mid="38" v:groupcontext="shape" transform="translate(285.717,240.512) rotate(90)">			<title>Sheet.38</title>			<path d="M0 285.72 L5.11 285.72" class="st12"></path>		</g>		<g id="shape39-61" v:mid="39" v:groupcontext="shape" transform="translate(285.717,246.649) rotate(90)">			<title>Sheet.39</title>			<path d="M0 285.72 L35.8 285.72" class="st12"></path>		</g>		<g id="shape40-64" v:mid="40" v:groupcontext="shape" transform="translate(285.717,283.467) rotate(90)">			<title>Sheet.40</title>			<path d="M0 285.72 L2.25 285.72" class="st8"></path>		</g>	</g>	<g id="group44-67" transform="translate(376.739,-10.7308)" v:mid="44" v:groupcontext="group">		<title>Sheet.44</title>		<g id="shape42-68" v:mid="42" v:groupcontext="shape" transform="translate(15.1883,0)">			<title>Sheet.42</title>			<desc>开源</desc>			<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>			<v:textrect cx="10.5" cy="279.417" width="21" height="12.6"></v:textrect>			<rect x="0" y="273.117" width="21" height="12.6" class="st4"></rect>			<text x="-0" y="282.91" class="st13" v:langid="1033"><v:paragraph></v:paragraph><v:tablist></v:tablist>开源</text>			</g>		<g id="shape43-71" v:mid="43" v:groupcontext="shape" transform="translate(3.09752E-14,-0.218607)">			<title>Sheet.43</title>			<path d="M0 284.22 A1.50003 1.50003 -180 0 0 1.5 285.72 L10.5 285.72 A1.50003 1.50003 -180 0 0 12 284.22 L12 275.22						 A1.50003 1.50003 -180 0 0 10.5 273.72 L1.5 273.72 A1.50003 1.50003 -180 0 0 0 275.22 L0 284.22 Z" class="st6"></path>		</g>	</g></g>
</svg>

Table : 音频播放组件

| 组件 | 说明 |
| --- | --- |
| Pulsesink | <ul class="ul" id="audio__ul_v3g_msy_rbc"><br>                                    <li class="li">与底层 PulseAudio 服务器交互。</li><br><br>                                    <li class="li">设置用于播放音频的音频播放接收端。</li><br><br>                                    <li class="li">仅播放 PCM 数据。</li><br><br>                                </ul> |
| PulseAudio server | <ul class="ul" id="audio__ul_ohn_lsy_rbc"><br>                                    <li class="li">与 Qualcomm 硬件交互。</li><br><br>                                    <li class="li">使用可插拔模块与 ALSA 驱动程序交互，以处理用于播放的音频数据。</li><br><br>                                </ul> |

### 编码

您可以使用开源音频编码器插件对音频进行编码。
Figure : 音频编码 pipeline
                    
                    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by Microsoft Visio, SVG Export audio_encode_pipeline.svg audio_encode_pipeline -->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:v="http://schemas.microsoft.com/visio/2003/SVGExtensions/" width="7.87652in" height="3.88398in" viewbox="0 0 567.109 279.647" xml:space="preserve" color-interpolation-filters="sRGB" class="st16"><v:documentproperties v:langid="1033" v:viewmarkup="false"></v:documentproperties>
<style>.svg-8 .st1 { fill: #fafafa; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-8 .st2 { fill: #d2d7e1; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-8 .st3 { stroke: #d2d7e1; stroke-linecap: butt; stroke-width: 0.75 }
.svg-8 .st4 { fill: none; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-8 .st5 { fill: #000000; font-family: Roboto; font-size: 1.00001em; font-weight: bold }
.svg-8 .st6 { fill: #007884; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-8 .st7 { fill: #ffffff; font-family: Roboto; font-size: 1.00001em }
.svg-8 .st8 { fill: #ffffff; font-family: SimHei; font-size: 1.00001em }
.svg-8 .st9 { font-size: 1em }
.svg-8 .st10 { font-family: SimHei; font-size: 1em }
.svg-8 .st11 { stroke: #000000; stroke-linecap: butt; stroke-width: 0.75 }
.svg-8 .st12 { fill: #000000; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-8 .st13 { stroke: #ffffff; stroke-linecap: butt; stroke-width: 2.25 }
.svg-8 .st14 { stroke: #000000; stroke-dasharray: 3, 1.5; stroke-linecap: butt; stroke-width: 0.75 }
.svg-8 .st15 { fill: #000000; font-family: SimHei; font-size: 0.874992em }
.svg-8 .st16 { fill: none; fill-rule: evenodd; font-size: 12px; overflow: visible; stroke-linecap: square; stroke-miterlimit: 3 }</style>
<g v:mid="0" v:index="1" v:groupcontext="foregroundPage">	<title>audio_encode_pipeline</title>	<v:pageproperties v:drawingscale="1" v:pagescale="1" v:drawingunits="19" v:shadowoffsetx="9" v:shadowoffsety="-9"></v:pageproperties>	<g id="group2-1" v:mid="2" v:groupcontext="group">		<title>Sheet.2</title>		<g id="shape3-2" v:mid="3" v:groupcontext="shape" transform="translate(0.375183,-0.375)">			<title>Sheet.3</title>			<path d="M0 274.02 A5.62513 5.62513 -180 0 0 5.63 279.65 L560.73 279.65 A5.62513 5.62513 -180 0 0 566.36 274.02 L566.36						 6.38 A5.62513 5.62513 -180 0 0 560.73 0.75 L5.62 0.75 A5.62513 5.62513 -180 0 0 0 6.38 L0 274.02 Z" class="st1"></path>		</g>		<g id="shape4-4" v:mid="4" v:groupcontext="shape">			<title>Sheet.4</title>			<path d="M561.11 0.75 C564 0.75 566.36 3.11 566.36 6 L566.36 273.65 C566.36 276.54 564 278.9 561.11 278.9 L6 278.9						 C3.11 278.9 0.75 276.54 0.75 273.65 L0.75 6 C0.75 3.11 3.11 0.75 6 0.75 L561.11 0.75 ZM561.11 0 L6 0						 C2.69 0 0 2.69 0 6 L0 273.65 C0 276.96 2.69 279.65 6 279.65 L561.11 279.65 C564.42 279.65 567.11 276.96						 567.11 273.65 L567.11 6 C567.11 2.69 564.42 0 561.11 0 Z" class="st2"></path>		</g>	</g>	<g id="shape5-6" v:mid="5" v:groupcontext="shape" transform="translate(2.2975E-05,-179.359)">		<title>Sheet.5</title>		<path d="M0 279.65 L567.11 279.65" class="st3"></path>	</g>	<g id="shape6-9" v:mid="6" v:groupcontext="shape" transform="translate(2.2975E-05,-90.947)">		<title>Sheet.6</title>		<path d="M0 279.65 L567.11 279.65" class="st3"></path>	</g>	<g id="shape7-12" v:mid="7" v:groupcontext="shape" transform="translate(18,-252.395)">		<title>Sheet.7</title>		<desc>GST BIN</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="265.5" cy="272.447" width="531" height="14.4"></v:textrect>		<rect x="0" y="265.247" width="531" height="14.4" class="st4"></rect>		<text x="242.7" y="276.05" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>GST BIN</text>		</g>	<g id="shape9-15" v:mid="9" v:groupcontext="shape" transform="translate(15.0068,-204.83)">		<title>Sheet.9</title>		<desc>Pulsesrc</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="260.897" width="120.01" height="37.5"></v:textrect>		<path d="M0 276.65 A3.00007 3.00007 -180 0 0 3 279.65 L117 279.65 A3.00007 3.00007 -180 0 0 120 276.65 L120 245.15 A3.00007					 3.00007 -180 0 0 117 242.15 L3 242.15 A3.00007 3.00007 -180 0 0 0 245.15 L0 276.65 Z" class="st6"></path>		<text x="36.91" y="264.5" class="st7" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>Pulsesrc</text>		</g>	<g id="shape12-18" v:mid="12" v:groupcontext="shape" transform="translate(154.184,-204.83)">		<title>Sheet.12</title>		<desc>音频编码</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="260.897" width="120.01" height="37.5"></v:textrect>		<path d="M0 276.65 A3.00007 3.00007 -180 0 0 3 279.65 L117 279.65 A3.00007 3.00007 -180 0 0 120 276.65 L120 245.15 A3.00007					 3.00007 -180 0 0 117 242.15 L3 242.15 A3.00007 3.00007 -180 0 0 0 245.15 L0 276.65 Z" class="st6"></path>		<text x="36" y="264.89" class="st8" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>音频编码</text>		</g>	<g id="shape15-21" v:mid="15" v:groupcontext="shape" transform="translate(292.934,-204.83)">		<title>Sheet.15</title>		<desc>解析</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="260.897" width="120.01" height="37.5"></v:textrect>		<path d="M0 276.65 A3.00007 3.00007 -180 0 0 3 279.65 L117 279.65 A3.00007 3.00007 -180 0 0 120 276.65 L120 245.15 A3.00007					 3.00007 -180 0 0 117 242.15 L3 242.15 A3.00007 3.00007 -180 0 0 0 245.15 L0 276.65 Z" class="st6"></path>		<text x="48" y="264.89" class="st8" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>解析</text>		</g>	<g id="shape18-24" v:mid="18" v:groupcontext="shape" transform="translate(432.109,-204.83)">		<title>Sheet.18</title>		<desc>FileMux (MP4 或 MPEGTS)</desc>		<v:textblock v:margins="rect(3.6,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="260.897" width="120" height="37.5"></v:textrect>		<path d="M0 276.65 A3.00007 3.00007 -180 0 0 3 279.65 L117 279.65 A3.00007 3.00007 -180 0 0 120 276.65 L120 245.15 A3.00007					 3.00007 -180 0 0 117 242.15 L3 242.15 A3.00007 3.00007 -180 0 0 0 245.15 L0 276.65 Z" class="st6"></path>		<text x="39.07" y="259.04" class="st7" v:langid="1033"><v:paragraph v:spline="-1" v:horizalign="1"></v:paragraph><v:tablist></v:tablist>FileMux<v:newlinechar></v:newlinechar><tspan x="10.84" dy="1.082em" class="st9">(MP4 </tspan><tspan class="st10">或</tspan> MPEGTS)</text>		</g>	<g id="group20-29" transform="translate(135.007,-220.962)" v:mid="20" v:groupcontext="group">		<title>Sheet.20</title>		<g id="shape21-30" v:mid="21" v:groupcontext="shape" transform="translate(0,-2.61782)">			<title>Sheet.21</title>			<path d="M0 279.65 L14.98 279.65" class="st11"></path>		</g>		<g id="shape22-33" v:mid="22" v:groupcontext="shape" transform="translate(14.2165,5.68434E-14)">			<title>Sheet.22</title>			<path d="M0 279.65 L4.53 277.03 L0 274.41 L0 279.65 Z" class="st12"></path>		</g>	</g>	<g id="group23-35" transform="translate(274.184,-220.962)" v:mid="23" v:groupcontext="group">		<title>Sheet.23</title>		<g id="shape24-36" v:mid="24" v:groupcontext="shape" transform="translate(0,-2.61782)">			<title>Sheet.24</title>			<path d="M0 279.65 L14.23 279.65" class="st11"></path>		</g>		<g id="shape25-39" v:mid="25" v:groupcontext="shape" transform="translate(13.4665,5.68434E-14)">			<title>Sheet.25</title>			<path d="M0 279.65 L4.53 277.03 L0 274.41 L0 279.65 Z" class="st12"></path>		</g>	</g>	<g id="group26-41" transform="translate(412.507,-220.962)" v:mid="26" v:groupcontext="group">		<title>Sheet.26</title>		<g id="shape27-42" v:mid="27" v:groupcontext="shape" transform="translate(0,-2.61782)">			<title>Sheet.27</title>			<path d="M0 279.65 L14.98 279.65" class="st11"></path>		</g>		<g id="shape28-45" v:mid="28" v:groupcontext="shape" transform="translate(14.2165,5.68434E-14)">			<title>Sheet.28</title>			<path d="M0 279.65 L4.53 277.03 L0 274.41 L0 279.65 Z" class="st12"></path>		</g>	</g>	<g id="shape30-47" v:mid="30" v:groupcontext="shape" transform="translate(15.0068,-27.2553)">		<title>Sheet.30</title>		<desc>ALSA</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="260.897" width="120.01" height="37.5"></v:textrect>		<path d="M0 276.65 A3.00007 3.00007 -180 0 0 3 279.65 L117 279.65 A3.00007 3.00007 -180 0 0 120 276.65 L120 245.15 A3.00007					 3.00007 -180 0 0 117 242.15 L3 242.15 A3.00007 3.00007 -180 0 0 0 245.15 L0 276.65 Z" class="st6"></path>		<text x="45.38" y="264.5" class="st7" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>ALSA</text>		</g>	<g id="shape33-50" v:mid="33" v:groupcontext="shape" transform="translate(15.0068,-116.043)">		<title>Sheet.33</title>		<desc>PulseAudio 服务器</desc>		<v:textblock v:margins="rect(3.6,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="260.897" width="120" height="37.5"></v:textrect>		<path d="M0 276.65 A3.00007 3.00007 -180 0 0 3 279.65 L117 279.65 A3.00007 3.00007 -180 0 0 120 276.65 L120 245.15 A3.00007					 3.00007 -180 0 0 117 242.15 L3 242.15 A3.00007 3.00007 -180 0 0 0 245.15 L0 276.65 Z" class="st6"></path>		<text x="29.69" y="259.04" class="st7" v:langid="1033"><v:paragraph v:spline="-1" v:horizalign="1"></v:paragraph><v:tablist></v:tablist>PulseAudio<v:newlinechar></v:newlinechar><tspan x="42" dy="1.082em" class="st10">服务器</tspan></text>		</g>	<g id="group35-54" transform="translate(72.015,-154.639)" v:mid="35" v:groupcontext="group">		<title>Sheet.35</title>		<g id="shape36-55" v:mid="36" v:groupcontext="shape" transform="translate(282.639,230.206) rotate(90)">			<title>Sheet.36</title>			<path d="M0 279.65 L49.44 279.65" class="st13"></path>		</g>		<g id="group37-58" transform="translate(9.99201E-15,-8.05452E-06)" v:mid="37" v:groupcontext="group">			<title>Sheet.37</title>			<g id="shape38-59" v:mid="38" v:groupcontext="shape" transform="translate(282.639,234.511) rotate(90)">				<title>Sheet.38</title>				<path d="M0 279.65 L40.83 279.65" class="st11"></path>			</g>			<g id="shape39-62" v:mid="39" v:groupcontext="shape" transform="translate(9.99201E-15,-44.2599)">				<title>Sheet.39</title>				<path d="M0 279.65 L2.99 274.47 L5.98 279.65 L0 279.65 Z" class="st12"></path>			</g>			<g id="shape40-64" v:mid="40" v:groupcontext="shape">				<title>Sheet.40</title>				<path d="M0 274.47 L2.99 279.65 L5.98 274.47 L0 274.47 Z" class="st12"></path>			</g>		</g>	</g>	<g id="shape42-66" v:mid="42" v:groupcontext="shape" transform="translate(154.184,-116.043)">		<title>Sheet.42</title>		<desc>软件编码</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="260.897" width="120.01" height="37.5"></v:textrect>		<path d="M0 276.65 A3.00007 3.00007 -180 0 0 3 279.65 L117 279.65 A3.00007 3.00007 -180 0 0 120 276.65 L120 245.15 A3.00007					 3.00007 -180 0 0 117 242.15 L3 242.15 A3.00007 3.00007 -180 0 0 0 245.15 L0 276.65 Z" class="st6"></path>		<text x="36" y="264.89" class="st8" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>软件编码</text>		</g>	<g id="group44-69" transform="translate(211.192,-154.639)" v:mid="44" v:groupcontext="group">		<title>Sheet.44</title>		<g id="shape45-70" v:mid="45" v:groupcontext="shape" transform="translate(282.639,230.206) rotate(90)">			<title>Sheet.45</title>			<path d="M0 279.65 L49.44 279.65" class="st13"></path>		</g>		<g id="group46-73" transform="translate(0,-8.05452E-06)" v:mid="46" v:groupcontext="group">			<title>Sheet.46</title>			<g id="shape47-74" v:mid="47" v:groupcontext="shape" transform="translate(282.639,234.511) rotate(90)">				<title>Sheet.47</title>				<path d="M0 279.65 L40.83 279.65" class="st11"></path>			</g>			<g id="shape48-77" v:mid="48" v:groupcontext="shape" transform="translate(0,-44.2599)">				<title>Sheet.48</title>				<path d="M0 279.65 L2.99 274.47 L5.98 279.65 L0 279.65 Z" class="st12"></path>			</g>			<g id="shape49-79" v:mid="49" v:groupcontext="shape">				<title>Sheet.49</title>				<path d="M0 274.47 L2.99 279.65 L5.98 274.47 L0 274.47 Z" class="st12"></path>			</g>		</g>	</g>	<g id="group51-81" transform="translate(75.0068,-65.8515)" v:mid="51" v:groupcontext="group">		<title>Sheet.51</title>		<g id="shape52-82" v:mid="52" v:groupcontext="shape" transform="translate(279.647,229.456) rotate(90)">			<title>Sheet.52</title>			<path d="M0 279.65 L50.19 279.65" class="st13"></path>		</g>		<g id="group53-85" transform="translate(0,-1.13504E-05)" v:mid="53" v:groupcontext="group">			<title>Sheet.53</title>			<g id="shape54-86" v:mid="54" v:groupcontext="shape" transform="translate(279.647,229.456) rotate(90)">				<title>Sheet.54</title>				<path d="M0 279.65 L2.25 279.65" class="st11"></path>			</g>			<g id="shape55-89" v:mid="55" v:groupcontext="shape" transform="translate(279.647,233.783) rotate(90)">				<title>Sheet.55</title>				<path d="M0 279.65 L5.19 279.65" class="st14"></path>			</g>			<g id="shape56-92" v:mid="56" v:groupcontext="shape" transform="translate(279.647,240.013) rotate(90)">				<title>Sheet.56</title>				<path d="M0 279.65 L36.35 279.65" class="st14"></path>			</g>			<g id="shape57-95" v:mid="57" v:groupcontext="shape" transform="translate(279.647,277.397) rotate(90)">				<title>Sheet.57</title>				<path d="M0 279.65 L2.25 279.65" class="st11"></path>			</g>		</g>	</g>	<g id="group61-98" transform="translate(515.921,-12.0367)" v:mid="61" v:groupcontext="group">		<title>Sheet.61</title>		<g id="shape59-99" v:mid="59" v:groupcontext="shape" transform="translate(15.1883,0)">			<title>Sheet.59</title>			<desc>开源</desc>			<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>			<v:textrect cx="10.5" cy="273.347" width="21" height="12.6"></v:textrect>			<rect x="0" y="267.047" width="21" height="12.6" class="st4"></rect>			<text x="0" y="276.84" class="st15" v:langid="1033"><v:paragraph></v:paragraph><v:tablist></v:tablist>开源</text>			</g>		<g id="shape60-102" v:mid="60" v:groupcontext="shape" transform="translate(3.09752E-14,-0.218599)">			<title>Sheet.60</title>			<path d="M0 278.15 A1.50003 1.50003 -180 0 0 1.5 279.65 L10.5 279.65 A1.50003 1.50003 -180 0 0 12 278.15 L12 269.15						 A1.50003 1.50003 -180 0 0 10.5 267.65 L1.5 267.65 A1.50003 1.50003 -180 0 0 -0 269.15 L0 278.15 Z" class="st6"></path>		</g>	</g></g>
</svg>

Table : 音频编码组件

| 组件 | 说明 |
| --- | --- |
| Pulsesrc | 采集音频并将其与底层 PulseAudio 服务器共享。 |
| PulseAudio server | 与 ALSA 驱动程序交互以处理音频数据以进行编码。 |
| Encode | 使用开源软件对音频数据进行编码。 |
| Parse | 解析音频数据。 |
| Filemux | 多路复用并将其保存在 MP4 或 MPEGTS 容器中。 |

### 解码

您可以使用开源音频解码器插件对音频进行解码。

Figure : 音频解码 pipeline
                
                <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by Microsoft Visio, SVG Export audio_decode_pipeline.svg Layer_1 -->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:v="http://schemas.microsoft.com/visio/2003/SVGExtensions/" width="7.87643in" height="3.77232in" viewbox="0 0 567.103 271.607" xml:space="preserve" color-interpolation-filters="sRGB" class="st15"><v:documentproperties v:langid="1033" v:viewmarkup="false"></v:documentproperties>
<style>.svg-9 .st1 { fill: #fafafa; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-9 .st2 { fill: #d2d7e1; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-9 .st3 { stroke: #d2d7e1; stroke-linecap: butt; stroke-width: 0.75 }
.svg-9 .st4 { fill: none; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-9 .st5 { fill: #000000; font-family: Roboto; font-size: 1.00001em; font-weight: bold }
.svg-9 .st6 { fill: #007884; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-9 .st7 { fill: #ffffff; font-family: Roboto; font-size: 1.00001em }
.svg-9 .st8 { fill: #ffffff; font-family: SimHei; font-size: 1.00001em }
.svg-9 .st9 { stroke: #000000; stroke-linecap: butt; stroke-width: 0.75 }
.svg-9 .st10 { fill: #000000; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-9 .st11 { stroke: #ffffff; stroke-linecap: butt; stroke-width: 2.25 }
.svg-9 .st12 { font-family: SimHei; font-size: 1em }
.svg-9 .st13 { stroke: #000000; stroke-dasharray: 6, 3; stroke-linecap: butt; stroke-width: 0.75 }
.svg-9 .st14 { fill: #000000; font-family: SimHei; font-size: 0.874992em }
.svg-9 .st15 { fill: none; fill-rule: evenodd; font-size: 12px; overflow: visible; stroke-linecap: square; stroke-miterlimit: 3 }</style>
<g v:mid="0" v:index="1" v:groupcontext="foregroundPage">	<title>Layer_1</title>	<v:pageproperties v:drawingscale="1" v:pagescale="1" v:drawingunits="19" v:shadowoffsetx="9" v:shadowoffsety="-9"></v:pageproperties>	<g id="shape2-1" v:mid="2" v:groupcontext="shape" transform="translate(0.375034,-0.375183)">		<title>Sheet.2</title>		<path d="M0 265.98 A5.62513 5.62513 -180 0 0 5.62 271.61 L560.73 271.61 A5.62513 5.62513 -180 0 0 566.35 265.98 L566.35					 6.38 A5.62513 5.62513 -180 0 0 560.73 0.75 L5.62 0.75 A5.62513 5.62513 -180 0 0 -0 6.38 L0 265.98 Z" class="st1"></path>	</g>	<g id="shape3-3" v:mid="3" v:groupcontext="shape">		<title>Sheet.3</title>		<path d="M561.1 0.75 C564 0.75 566.35 3.11 566.35 6 L566.35 265.61 C566.35 268.5 564 270.86 561.1 270.86 L6 270.86 C3.11					 270.86 0.75 268.5 0.75 265.61 L0.75 6 C0.75 3.11 3.11 0.75 6 0.75 L561.1 0.75 ZM561.1 0 L6 0 C2.69 0 0 2.69					 0 6 L0 265.61 C0 268.92 2.69 271.61 6 271.61 L561.1 271.61 C564.42 271.61 567.1 268.92 567.1 265.61 L567.1					 6 C567.1 2.69 564.42 0 561.1 0 Z" class="st2"></path>	</g>	<g id="shape4-5" v:mid="4" v:groupcontext="shape" transform="translate(0.396905,-178.157)">		<title>Sheet.4</title>		<path d="M0 271.61 L566.22 271.61" class="st3"></path>	</g>	<g id="shape5-8" v:mid="5" v:groupcontext="shape" transform="translate(0.338888,-89.8899)">		<title>Sheet.5</title>		<path d="M0 271.61 L566.16 271.61" class="st3"></path>	</g>	<g id="shape6-11" v:mid="6" v:groupcontext="shape" transform="translate(18,-244.472)">		<title>Sheet.6</title>		<desc>GST BIN</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="265.5" cy="264.407" width="531.01" height="14.4"></v:textrect>		<rect x="0" y="257.207" width="531" height="14.4" class="st4"></rect>		<text x="242.7" y="268.01" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>GST BIN</text>		</g>	<g id="shape8-14" v:mid="8" v:groupcontext="shape" transform="translate(15,-196.907)">		<title>Sheet.8</title>		<desc>filesrc</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="252.857" width="120.01" height="37.5"></v:textrect>		<path d="M-0 268.61 A3.00007 3.00007 -180 0 0 3 271.61 L117 271.61 A3.00007 3.00007 -180 0 0 120 268.61 L120 237.11 A3.00007					 3.00007 -180 0 0 117 234.11 L3 234.11 A3.00007 3.00007 -180 0 0 0 237.11 L0 268.61 Z" class="st6"></path>		<text x="43.56" y="256.46" class="st7" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>filesrc</text>		</g>	<g id="shape11-17" v:mid="11" v:groupcontext="shape" transform="translate(154.177,-196.907)">		<title>Sheet.11</title>		<desc>流解复用器</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="252.857" width="120" height="37.5"></v:textrect>		<path d="M0 268.61 A3.00007 3.00007 -180 0 0 3 271.61 L117 271.61 A3.00007 3.00007 -180 0 0 120 268.61 L120 237.11 A3.00007					 3.00007 -180 0 0 117 234.11 L3 234.11 A3.00007 3.00007 -180 0 0 0 237.11 L0 268.61 Z" class="st6"></path>		<text x="30" y="256.85" class="st8" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>流解复用器</text>		</g>	<g id="shape14-20" v:mid="14" v:groupcontext="shape" transform="translate(292.927,-196.907)">		<title>Sheet.14</title>		<desc>音频解码</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="252.857" width="120" height="37.5"></v:textrect>		<path d="M0 268.61 A3.00007 3.00007 -180 0 0 3 271.61 L117 271.61 A3.00007 3.00007 -180 0 0 120 268.61 L120 237.11 A3.00007					 3.00007 -180 0 0 117 234.11 L3 234.11 A3.00007 3.00007 -180 0 0 0 237.11 L0 268.61 Z" class="st6"></path>		<text x="36" y="256.85" class="st8" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>音频解码</text>		</g>	<g id="shape17-23" v:mid="17" v:groupcontext="shape" transform="translate(432.103,-196.907)">		<title>Sheet.17</title>		<desc>Pulsesink</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="252.857" width="120.01" height="37.5"></v:textrect>		<path d="M-0 268.61 A3.00007 3.00007 -180 0 0 3 271.61 L117 271.61 A3.00007 3.00007 -180 0 0 120 268.61 L120 237.11 A3.00007					 3.00007 -180 0 0 117 234.11 L3 234.11 A3.00007 3.00007 -180 0 0 0 237.11 L0 268.61 Z" class="st6"></path>		<text x="34.28" y="256.46" class="st7" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>Pulsesink</text>		</g>	<g id="shape20-26" v:mid="20" v:groupcontext="shape" transform="translate(135,-215.657)">		<title>Sheet.20</title>		<path d="M0 271.61 L14.98 271.61" class="st9"></path>	</g>	<g id="shape21-29" v:mid="21" v:groupcontext="shape" transform="translate(149.217,-213.039)">		<title>Sheet.21</title>		<path d="M0 271.61 L4.53 268.99 L0 266.37 L0 271.61 Z" class="st10"></path>	</g>	<g id="shape23-31" v:mid="23" v:groupcontext="shape" transform="translate(274.177,-215.657)">		<title>Sheet.23</title>		<path d="M0 271.61 L14.89 271.61" class="st9"></path>	</g>	<g id="shape24-34" v:mid="24" v:groupcontext="shape" transform="translate(288.304,-213.039)">		<title>Sheet.24</title>		<path d="M0 271.61 L4.53 268.99 L0 266.37 L0 271.61 Z" class="st10"></path>	</g>	<g id="shape26-36" v:mid="26" v:groupcontext="shape" transform="translate(412.927,-215.657)">		<title>Sheet.26</title>		<path d="M0 271.61 L15.1 271.61" class="st9"></path>	</g>	<g id="shape27-39" v:mid="27" v:groupcontext="shape" transform="translate(427.262,-213.039)">		<title>Sheet.27</title>		<path d="M0 271.61 L4.53 268.99 L0 266.37 L0 271.61 Z" class="st10"></path>	</g>	<g id="shape29-41" v:mid="29" v:groupcontext="shape" transform="translate(292.927,-114.523)">		<title>Sheet.29</title>		<desc>软件编码</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="252.857" width="120" height="37.5"></v:textrect>		<path d="M0 268.61 A3.00007 3.00007 -180 0 0 3 271.61 L117 271.61 A3.00007 3.00007 -180 0 0 120 268.61 L120 237.11 A3.00007					 3.00007 -180 0 0 117 234.11 L3 234.11 A3.00007 3.00007 -180 0 0 0 237.11 L0 268.61 Z" class="st6"></path>		<text x="36" y="256.85" class="st8" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>软件编码</text>		</g>	<g id="shape32-44" v:mid="32" v:groupcontext="shape" transform="translate(624.534,75.6016) rotate(90)">		<title>Sheet.32</title>		<path d="M0 271.61 L42.89 271.61" class="st11"></path>	</g>	<g id="group33-47" transform="translate(349.935,-153.119)" v:mid="33" v:groupcontext="group">		<title>Sheet.33</title>		<g id="shape34-48" v:mid="34" v:groupcontext="shape" transform="translate(274.599,233.027) rotate(90)">			<title>Sheet.34</title>			<path d="M0 271.61 L34.27 271.61" class="st9"></path>		</g>		<g id="shape35-51" v:mid="35" v:groupcontext="shape" transform="translate(-5.94524E-14,-37.7051)">			<title>Sheet.35</title>			<path d="M0 271.61 L2.99 266.43 L5.98 271.61 L0 271.61 Z" class="st10"></path>		</g>		<g id="shape36-53" v:mid="36" v:groupcontext="shape">			<title>Sheet.36</title>			<path d="M0 266.43 L2.99 271.61 L5.98 266.43 L0 266.43 Z" class="st10"></path>		</g>	</g>	<g id="shape38-55" v:mid="38" v:groupcontext="shape" transform="translate(432.103,-32.1399)">		<title>Sheet.38</title>		<desc>ALSA</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="252.857" width="120.01" height="37.5"></v:textrect>		<path d="M0 268.61 A3.00007 3.00007 -180 0 0 3 271.61 L117 271.61 A3.00007 3.00007 -180 0 0 120 268.61 L120 237.11 A3.00007					 3.00007 -180 0 0 117 234.11 L3 234.11 A3.00007 3.00007 -180 0 0 0 237.11 L0 268.61 Z" class="st6"></path>		<text x="45.38" y="256.46" class="st7" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>ALSA</text>		</g>	<g id="shape41-58" v:mid="41" v:groupcontext="shape" transform="translate(432.103,-114.523)">		<title>Sheet.41</title>		<desc>PulseAudio 服务器</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="60" cy="252.857" width="120" height="37.5"></v:textrect>		<path d="M0 268.61 A3.00007 3.00007 -180 0 0 3 271.61 L117 271.61 A3.00007 3.00007 -180 0 0 120 268.61 L120 237.11 A3.00007					 3.00007 -180 0 0 117 234.11 L3 234.11 A3.00007 3.00007 -180 0 0 0 237.11 L0 268.61 Z" class="st6"></path>		<text x="29.69" y="248.47" class="st7" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>PulseAudio<v:newlinechar></v:newlinechar><tspan x="42" dy="1.298em" class="st12">服务器</tspan></text>		</g>	<g id="shape44-62" v:mid="44" v:groupcontext="shape" transform="translate(763.71,75.6016) rotate(90)">		<title>Sheet.44</title>		<path d="M0 271.61 L42.89 271.61" class="st11"></path>	</g>	<g id="group45-65" transform="translate(489.111,-153.119)" v:mid="45" v:groupcontext="group">		<title>Sheet.45</title>		<g id="shape46-66" v:mid="46" v:groupcontext="shape" transform="translate(274.599,233.027) rotate(90)">			<title>Sheet.46</title>			<path d="M0 271.61 L34.27 271.61" class="st9"></path>		</g>		<g id="shape47-69" v:mid="47" v:groupcontext="shape" transform="translate(0,-37.7051)">			<title>Sheet.47</title>			<path d="M0 271.61 L2.99 266.43 L5.98 271.61 L0 271.61 Z" class="st10"></path>		</g>		<g id="shape48-71" v:mid="48" v:groupcontext="shape">			<title>Sheet.48</title>			<path d="M0 266.43 L2.99 271.61 L5.98 266.43 L0 266.43 Z" class="st10"></path>		</g>	</g>	<g id="shape50-73" v:mid="50" v:groupcontext="shape" transform="translate(763.71,157.886) rotate(90)">		<title>Sheet.50</title>		<path d="M0 271.61 L43.03 271.61" class="st11"></path>	</g>	<g id="group51-76" transform="translate(492.103,-70.6906)" v:mid="51" v:groupcontext="group">		<title>Sheet.51</title>		<g id="shape52-77" v:mid="52" v:groupcontext="shape" transform="translate(271.607,228.577) rotate(90)">			<title>Sheet.52</title>			<path d="M0 271.61 L2.25 271.61" class="st9"></path>		</g>		<g id="shape53-80" v:mid="53" v:groupcontext="shape" transform="translate(271.607,233.235) rotate(90)">			<title>Sheet.53</title>			<path d="M0 271.61 L6.02 271.61" class="st13"></path>		</g>		<g id="shape54-83" v:mid="54" v:groupcontext="shape" transform="translate(271.607,240.459) rotate(90)">			<title>Sheet.54</title>			<path d="M0 271.61 L27.69 271.61" class="st13"></path>		</g>		<g id="shape55-86" v:mid="55" v:groupcontext="shape" transform="translate(271.607,269.357) rotate(90)">			<title>Sheet.55</title>			<path d="M0 271.61 L2.25 271.61" class="st9"></path>		</g>	</g>	<g id="group61-89" transform="translate(514.765,-8.88986)" v:mid="61" v:groupcontext="group">		<title>Sheet.61</title>		<g id="shape57-90" v:mid="57" v:groupcontext="shape" transform="translate(15.1883,0)">			<title>Sheet.57</title>			<desc>开源</desc>			<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>			<v:textrect cx="11.0746" cy="265.307" width="22.15" height="12.6"></v:textrect>			<rect x="0" y="259.007" width="22.1492" height="12.6" class="st4"></rect>			<text x="0" y="268.8" class="st14" v:langid="1033"><v:paragraph></v:paragraph><v:tablist></v:tablist>开源</text>			</g>		<g id="shape58-93" v:mid="58" v:groupcontext="shape">			<title>Sheet.58</title>			<path d="M0 270.11 A1.50003 1.50003 -180 0 0 1.5 271.61 L10.5 271.61 A1.50003 1.50003 -180 0 0 12 270.11 L12 261.11						 A1.50003 1.50003 -180 0 0 10.5 259.61 L1.5 259.61 A1.50003 1.50003 -180 0 0 0 261.11 L0 270.11 Z" class="st6"></path>		</g>	</g></g>
</svg>

Table : 音频解码组件

| 组件 | 说明 |
| --- | --- |
| Filesrc | 读取音频数据。 |
| Stream demux | 对音频数据进行解复用。 |
| Decode | 使用开源软件解码音频数据。 |
| Pulsesink | 与底层 PulseAudio 服务器交互并播放解码的音频。 |
| PulseAudio server | 与 ALSA 驱动程序交互以处理音频数据进行解码。 |

## 机器学习架构

Source: [https://docs.qualcomm.com/doc/80-70022-50SC/topic/architecture.html](https://docs.qualcomm.com/doc/80-70022-50SC/topic/architecture.html)

Qualcomm IM SDK 支持包含视频预处理、模型推理、输出张量后处理以及将推理结果叠加到流的机器学习用例。

机器学习框架提供以下类型的视频分析：

- 图像分类
- 目标检测
- 图像分割

使用框架中的机器学习插件，使用以下命令进行推理：

- [LiteRT](https://ai.google.dev/edge/litert)（或 TFLite）
- [Qualcomm Neural Processing SDK](https://docs.qualcomm.com/bundle/publicresource/topics/80-63442-2/overview.html)

对于每个引擎，delegate 可加速模型推理性能。

### ML pipeline 处理

下图描述了采集的视频/音频流由预处理、推理和后处理插件进行处理的 pipeline。

Figure : ML pipeline
                
                <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!-- Generated by Microsoft Visio, SVG Export ml_pipeline.svg ml_pipeline -->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:v="http://schemas.microsoft.com/visio/2003/SVGExtensions/" width="11.8924in" height="6.63829in" viewbox="0 0 856.249 477.957" xml:space="preserve" color-interpolation-filters="sRGB" class="st26"><v:documentproperties v:langid="1033" v:viewmarkup="false"></v:documentproperties>
<style>.svg-10 .st1 { fill: #fafafa; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-10 .st2 { fill: #d2d7e1; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-10 .st3 { stroke: #d2d7e1; stroke-linecap: butt; stroke-width: 0.75 }
.svg-10 .st4 { fill: #007884; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-10 .st5 { fill: #ffffff; font-family: SimHei; font-size: 1.00001em }
.svg-10 .st6 { fill: #ffffff; font-family: Roboto; font-size: 1.00001em }
.svg-10 .st7 { font-family: SimHei; font-size: 1em }
.svg-10 .st8 { stroke: #000000; stroke-linecap: butt; stroke-width: 0.75 }
.svg-10 .st9 { fill: #000000; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-10 .st10 { stroke: #ffffff; stroke-linecap: butt; stroke-width: 2.25 }
.svg-10 .st11 { stroke: #000000; stroke-dasharray: 6, 3; stroke-linecap: butt; stroke-width: 0.75 }
.svg-10 .st12 { stroke: #000000; stroke-dasharray: 3, 1.5; stroke-linecap: butt; stroke-width: 0.75 }
.svg-10 .st13 { fill: none; stroke: #4d4d4d; stroke-linecap: butt; stroke-width: 0.75 }
.svg-10 .st14 { fill: #000000; font-family: Roboto; font-size: 1.00001em; font-weight: bold }
.svg-10 .st15 { fill: #ffffff; font-family: Roboto; font-size: 1.00001em; font-weight: bold }
.svg-10 .st16 { fill: none; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-10 .st17 { font-family: SimHei; font-size: 1em; font-weight: normal }
.svg-10 .st18 { font-size: 1em; font-weight: normal }
.svg-10 .st19 { font-size: 1em }
.svg-10 .st20 { font-family: SimSun; font-size: 1em; font-weight: normal }
.svg-10 .st21 { stroke: #b3b7bf; stroke-linecap: butt; stroke-width: 0.75 }
.svg-10 .st22 { fill: none }
.svg-10 .st23 { font-family: Calibri; font-size: 1em; font-weight: normal }
.svg-10 .st24 { fill: #000000; font-family: SimHei; font-size: 1.00001em }
.svg-10 .st25 { fill: #000000; font-family: SimHei; font-size: 0.874992em }
.svg-10 .st26 { fill: none; fill-rule: evenodd; font-size: 12px; overflow: visible; stroke-linecap: square; stroke-miterlimit: 3 }</style>
<g v:mid="0" v:index="1" v:groupcontext="foregroundPage">	<title>ml_pipeline</title>	<v:pageproperties v:drawingscale="1" v:pagescale="1" v:drawingunits="19" v:shadowoffsetx="9" v:shadowoffsety="-9"></v:pageproperties>	<g id="shape3-1" v:mid="3" v:groupcontext="shape" transform="translate(0.374886,-0.374725)">		<title>Sheet.3</title>		<path d="M0 472.33 A5.62513 5.62513 -180 0 0 5.62 477.96 L849.87 477.96 A5.62513 5.62513 -180 0 0 855.5 472.33 L855.5					 6.37 A5.62513 5.62513 -180 0 0 849.87 0.75 L5.62 0.75 A5.62513 5.62513 -180 0 0 -0 6.37 L0 472.33 Z" class="st1"></path>	</g>	<g id="shape4-3" v:mid="4" v:groupcontext="shape">		<title>Sheet.4</title>		<path d="M850.25 0.75 C853.14 0.75 855.5 3.11 855.5 6 L855.5 471.96 C855.5 474.85 853.14 477.21 850.25 477.21 L6 477.21					 C3.11 477.21 0.75 474.85 0.75 471.96 L0.75 6 C0.75 3.11 3.11 0.75 6 0.75 L850.25 0.75 ZM850.25 0 L6 0 C2.69					 0 0 2.69 0 6 L0 471.96 C0 475.27 2.69 477.96 6 477.96 L850.25 477.96 C853.56 477.96 856.25 475.27 856.25					 471.96 L856.25 6 C856.25 2.69 853.56 0 850.25 0 Z" class="st2"></path>	</g>	<g id="shape5-5" v:mid="5" v:groupcontext="shape" transform="translate(319.745,-73.7864)">		<title>Sheet.5</title>		<path d="M0 477.96 L521.22 477.96" class="st3"></path>	</g>	<g id="shape8-8" v:mid="8" v:groupcontext="shape" transform="translate(327.027,-273.053)">		<title>Sheet.8</title>		<desc>视频/音频源</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="52.5" cy="459.207" width="105" height="37.5"></v:textrect>		<path d="M-0 474.96 A3.00007 3.00007 -180 0 0 3 477.96 L102 477.96 A3.00007 3.00007 -180 0 0 105 474.96 L105 443.46 A3.00007					 3.00007 -180 0 0 102 440.46 L3 440.46 A3.00007 3.00007 -180 0 0 -0 443.46 L0 474.96 Z" class="st4"></path>		<text x="19.5" y="463.2" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>视频/音频源</text>		</g>	<g id="shape11-11" v:mid="11" v:groupcontext="shape" transform="translate(460.374,-273.053)">		<title>Sheet.11</title>		<desc>预处理插件</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="52.5" cy="459.207" width="105" height="37.5"></v:textrect>		<path d="M-0 474.96 A3.00007 3.00007 -180 0 0 3 477.96 L102 477.96 A3.00007 3.00007 -180 0 0 105 474.96 L105 443.46 A3.00007					 3.00007 -180 0 0 102 440.46 L3 440.46 A3.00007 3.00007 -180 0 0 -0 443.46 L0 474.96 Z" class="st4"></path>		<text x="22.5" y="463.2" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>预处理插件</text>		</g>	<g id="shape14-14" v:mid="14" v:groupcontext="shape" transform="translate(593.72,-273.053)">		<title>Sheet.14</title>		<desc>ML 推理插件</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="52.5" cy="459.207" width="105" height="37.5"></v:textrect>		<path d="M0 474.96 A3.00007 3.00007 -180 0 0 3 477.96 L102 477.96 A3.00007 3.00007 -180 0 0 105 474.96 L105 443.46 A3.00007					 3.00007 -180 0 0 102 440.46 L3 440.46 A3.00007 3.00007 -180 0 0 0 443.46 L0 474.96 Z" class="st4"></path>		<text x="18.55" y="463.2" class="st6" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>ML <tspan class="st7">推理插件</tspan></text>		</g>	<g id="shape17-18" v:mid="17" v:groupcontext="shape" transform="translate(727.066,-273.053)">		<title>Sheet.17</title>		<desc>后处理插件</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="52.5" cy="459.207" width="105" height="37.5"></v:textrect>		<path d="M0 474.96 A3.00007 3.00007 -180 0 0 3 477.96 L102 477.96 A3.00007 3.00007 -180 0 0 105 474.96 L105 443.46 A3.00007					 3.00007 -180 0 0 102 440.46 L3 440.46 A3.00007 3.00007 -180 0 0 0 443.46 L0 474.96 Z" class="st4"></path>		<text x="22.5" y="463.2" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>后处理插件</text>		</g>	<g id="shape20-21" v:mid="20" v:groupcontext="shape" transform="translate(431.348,-291.803)">		<title>Sheet.20</title>		<path d="M0 477.96 L24.72 477.96" class="st8"></path>	</g>	<g id="shape21-24" v:mid="21" v:groupcontext="shape" transform="translate(455.192,-288.811)">		<title>Sheet.21</title>		<path d="M0 477.96 L5.18 474.97 L0 471.97 L0 477.96 Z" class="st9"></path>	</g>	<g id="shape23-26" v:mid="23" v:groupcontext="shape" transform="translate(565.374,-291.803)">		<title>Sheet.23</title>		<path d="M0 477.96 L24.04 477.96" class="st8"></path>	</g>	<g id="shape24-29" v:mid="24" v:groupcontext="shape" transform="translate(588.539,-288.811)">		<title>Sheet.24</title>		<path d="M0 477.96 L5.18 474.97 L0 471.97 L0 477.96 Z" class="st9"></path>	</g>	<g id="shape26-31" v:mid="26" v:groupcontext="shape" transform="translate(698.72,-291.803)">		<title>Sheet.26</title>		<path d="M0 477.96 L23.29 477.96" class="st8"></path>	</g>	<g id="shape27-34" v:mid="27" v:groupcontext="shape" transform="translate(721.135,-288.811)">		<title>Sheet.27</title>		<path d="M0 477.96 L5.18 474.97 L0 471.97 L0 477.96 Z" class="st9"></path>	</g>	<g id="shape28-36" v:mid="28" v:groupcontext="shape" transform="translate(460.374,-16.0364)">		<title>Sheet.28</title>		<desc>GPU</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="52.5" cy="459.207" width="105" height="37.5"></v:textrect>		<path d="M0 474.96 A3.00007 3.00007 -180 0 0 3 477.96 L102 477.96 A3.00007 3.00007 -180 0 0 105 474.96 L105 443.46 A3.00007					 3.00007 -180 0 0 102 440.46 L3 440.46 A3.00007 3.00007 -180 0 0 0 443.46 L0 474.96 Z" class="st4"></path>		<text x="40.74" y="462.81" class="st6" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>GPU</text>		</g>	<g id="shape31-39" v:mid="31" v:groupcontext="shape" transform="translate(1124.18,379.923) rotate(90)">		<title>Sheet.31</title>		<path d="M0 477.96 L43.96 477.96" class="st10"></path>	</g>	<g id="group32-42" transform="translate(646.22,-54.0722)" v:mid="32" v:groupcontext="group">		<title>Sheet.32</title>		<g id="shape33-43" v:mid="33" v:groupcontext="shape" transform="translate(477.957,433.995) rotate(90)">			<title>Sheet.33</title>			<path d="M0 477.96 L2.25 477.96" class="st8"></path>		</g>		<g id="shape34-46" v:mid="34" v:groupcontext="shape" transform="translate(477.957,438.711) rotate(90)">			<title>Sheet.34</title>			<path d="M0 477.96 L6.17 477.96" class="st11"></path>		</g>		<g id="shape35-49" v:mid="35" v:groupcontext="shape" transform="translate(477.957,446.111) rotate(90)">			<title>Sheet.35</title>			<path d="M0 477.96 L28.36 477.96" class="st11"></path>		</g>		<g id="shape36-52" v:mid="36" v:groupcontext="shape" transform="translate(477.957,475.707) rotate(90)">			<title>Sheet.36</title>			<path d="M0 477.96 L2.25 477.96" class="st8"></path>		</g>	</g>	<g id="shape38-55" v:mid="38" v:groupcontext="shape" transform="translate(990.831,306.154) rotate(90)">		<title>Sheet.38</title>		<path d="M0 477.96 L117.73 477.96" class="st10"></path>	</g>	<g id="group39-58" transform="translate(512.874,-54.0722)" v:mid="39" v:groupcontext="group">		<title>Sheet.39</title>		<g id="shape40-59" v:mid="40" v:groupcontext="shape" transform="translate(477.957,360.226) rotate(90)">			<title>Sheet.40</title>			<path d="M0 477.96 L2.25 477.96" class="st8"></path>		</g>		<g id="shape41-62" v:mid="41" v:groupcontext="shape" transform="translate(477.957,364.654) rotate(90)">			<title>Sheet.41</title>			<path d="M0 477.96 L5.44 477.96" class="st12"></path>		</g>		<g id="shape42-65" v:mid="42" v:groupcontext="shape" transform="translate(477.957,371.186) rotate(90)">			<title>Sheet.42</title>			<path d="M0 477.96 L103.43 477.96" class="st12"></path>		</g>		<g id="shape43-68" v:mid="43" v:groupcontext="shape" transform="translate(477.957,475.707) rotate(90)">			<title>Sheet.43</title>			<path d="M0 477.96 L2.25 477.96" class="st8"></path>		</g>	</g>	<g id="shape44-71" v:mid="44" v:groupcontext="shape" transform="translate(593.72,-16.0364)">		<title>Sheet.44</title>		<desc>DSP/GPU/NPU</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="52.5" cy="459.207" width="105" height="37.5"></v:textrect>		<path d="M0 474.96 A3.00007 3.00007 -180 0 0 3 477.96 L102 477.96 A3.00007 3.00007 -180 0 0 105 474.96 L105 443.46 A3.00007					 3.00007 -180 0 0 102 440.46 L3 440.46 A3.00007 3.00007 -180 0 0 -0 443.46 L0 474.96 Z" class="st4"></path>		<text x="12.56" y="462.81" class="st6" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>DSP/GPU/NPU</text>		</g>	<g id="shape47-74" v:mid="47" v:groupcontext="shape" transform="translate(727.066,-171.803)">		<title>Sheet.47</title>		<desc>子模块</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="52.5" cy="459.207" width="105" height="37.5"></v:textrect>		<path d="M0 474.96 A3.00007 3.00007 -180 0 0 3 477.96 L102 477.96 A3.00007 3.00007 -180 0 0 105 474.96 L105 443.46 A3.00007					 3.00007 -180 0 0 102 440.46 L3 440.46 A3.00007 3.00007 -180 0 0 0 443.46 L0 474.96 Z" class="st4"></path>		<text x="34.5" y="462.81" class="st5" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>子模块</text>		</g>	<g id="shape51-77" v:mid="51" v:groupcontext="shape" transform="translate(558.449,-105.048)">		<title>Sheet.51</title>		<desc>QNN</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="27.0884" cy="464.832" width="54.18" height="26.25"></v:textrect>		<path d="M0 474.96 A3.00007 3.00007 -180 0 0 3 477.96 L51.18 477.96 A3.00007 3.00007 -180 0 0 54.18 474.96 L54.18 454.71					 A3.00007 3.00007 -180 0 0 51.18 451.71 L3 451.71 A3.00007 3.00007 -180 0 0 0 454.71 L0 474.96 Z" class="st4"></path>		<text x="14.41" y="468.43" class="st6" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>QNN</text>		</g>	<g id="shape53-80" v:mid="53" v:groupcontext="shape" transform="translate(619.131,-105.048)">		<title>Sheet.53</title>		<desc>TFLite</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="27.0884" cy="464.832" width="54.18" height="26.25"></v:textrect>		<path d="M-0 474.96 A3.00007 3.00007 -180 0 0 3 477.96 L51.18 477.96 A3.00007 3.00007 -180 0 0 54.18 474.96 L54.18 454.71					 A3.00007 3.00007 -180 0 0 51.18 451.71 L3 451.71 A3.00007 3.00007 -180 0 0 0 454.71 L0 474.96 Z" class="st4"></path>		<text x="10.37" y="468.43" class="st6" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>TFLite</text>		</g>	<g id="shape55-83" v:mid="55" v:groupcontext="shape" transform="translate(679.814,-105.048)">		<title>Sheet.55</title>		<desc>SNPE</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="27.0884" cy="464.832" width="54.18" height="26.25"></v:textrect>		<path d="M-0 474.96 A3.00007 3.00007 -180 0 0 3 477.96 L51.18 477.96 A3.00007 3.00007 -180 0 0 54.18 474.96 L54.18 454.71					 A3.00007 3.00007 -180 0 0 51.18 451.71 L3 451.71 A3.00007 3.00007 -180 0 0 0 454.71 L0 474.96 Z" class="st4"></path>		<text x="12.06" y="468.43" class="st6" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>SNPE</text>		</g>	<g id="shape57-86" v:mid="57" v:groupcontext="shape" transform="translate(554.357,-99.4233)">		<title>Sheet.57</title>		<path d="M0 474.96 A3.00007 3.00007 -180 0 0 3 477.96 L180.73 477.96 A3.00007 3.00007 -180 0 0 183.73 474.96 L183.73					 443.46 A3.00007 3.00007 -180 0 0 180.73 440.46 L3 440.46 A3.00007 3.00007 -180 0 0 0 443.46 L0 474.96 Z" class="st13"></path>	</g>	<g id="shape59-88" v:mid="59" v:groupcontext="shape" transform="translate(460.374,-171.803)">		<title>Sheet.59</title>		<desc>OpenGL ES</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="52.5" cy="459.207" width="105.01" height="37.5"></v:textrect>		<path d="M-0 474.96 A3.00007 3.00007 -180 0 0 3 477.96 L102 477.96 A3.00007 3.00007 -180 0 0 105 474.96 L105 443.46 A3.00007					 3.00007 -180 0 0 102 440.46 L3 440.46 A3.00007 3.00007 -180 0 0 -0 443.46 L0 474.96 Z" class="st4"></path>		<text x="22.75" y="462.81" class="st6" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>OpenGL ES</text>		</g>	<g id="shape61-91" v:mid="61" v:groupcontext="shape" transform="translate(319.745,-257.87)">		<title>Sheet.61</title>		<desc>GST BIN</desc>		<v:textblock v:margins="rect(7.2,0,0,0)" v:verticalalign="0"></v:textblock>		<v:textrect cx="260.752" cy="436.675" width="521.51" height="82.5653"></v:textrect>		<path d="M0 474.96 A3.00007 3.00007 -180 0 0 3 477.96 L518.5 477.96 A3.00007 3.00007 -180 0 0 521.5 474.96 L521.5 398.39					 A3.00007 3.00007 -180 0 0 518.5 395.39 L3 395.39 A3.00007 3.00007 -180 0 0 -0 398.39 L0 474.96 Z" class="st13"></path>		<text x="237.96" y="411.59" class="st14" v:langid="1033"><v:paragraph v:spline="-1" v:horizalign="1"></v:paragraph><v:tablist></v:tablist>GST BIN</text>		</g>	<g id="shape63-94" v:mid="63" v:groupcontext="shape" transform="translate(1257.52,205.654) rotate(90)">		<title>Sheet.63</title>		<path d="M0 477.96 L62.25 477.96" class="st10"></path>	</g>	<g id="group64-97" transform="translate(776.574,-210.053)" v:mid="64" v:groupcontext="group">		<title>Sheet.64</title>		<g id="shape65-98" v:mid="65" v:groupcontext="shape" transform="translate(480.949,420.013) rotate(90)">			<title>Sheet.65</title>			<path d="M0 477.96 L53.64 477.96" class="st8"></path>		</g>		<g id="shape66-101" v:mid="66" v:groupcontext="shape" transform="translate(-6.29496E-14,-57.0689)">			<title>Sheet.66</title>			<path d="M0 477.96 L2.99 472.78 L5.98 477.96 L0 477.96 Z" class="st9"></path>		</g>		<g id="shape67-103" v:mid="67" v:groupcontext="shape">			<title>Sheet.67</title>			<path d="M0 472.78 L2.99 477.96 L5.98 472.78 L0 472.78 Z" class="st9"></path>		</g>	</g>	<g id="shape69-105" v:mid="69" v:groupcontext="shape" transform="translate(990.831,205.654) rotate(90)">		<title>Sheet.69</title>		<path d="M0 477.96 L62.25 477.96" class="st10"></path>	</g>	<g id="group70-108" transform="translate(509.882,-210.053)" v:mid="70" v:groupcontext="group">		<title>Sheet.70</title>		<g id="shape71-109" v:mid="71" v:groupcontext="shape" transform="translate(480.949,420.013) rotate(90)">			<title>Sheet.71</title>			<path d="M0 477.96 L53.64 477.96" class="st8"></path>		</g>		<g id="shape72-112" v:mid="72" v:groupcontext="shape" transform="translate(8.79297E-14,-57.0689)">			<title>Sheet.72</title>			<path d="M0 477.96 L2.99 472.78 L5.98 477.96 L0 477.96 Z" class="st9"></path>		</g>		<g id="shape73-114" v:mid="73" v:groupcontext="shape">			<title>Sheet.73</title>			<path d="M0 472.78 L2.99 477.96 L5.98 472.78 L0 472.78 Z" class="st9"></path>		</g>	</g>	<g id="shape75-116" v:mid="75" v:groupcontext="shape" transform="translate(1124.18,205.654) rotate(90)">		<title>Sheet.75</title>		<path d="M0 477.96 L133.75 477.96" class="st10"></path>	</g>	<g id="group76-119" transform="translate(643.228,-138.555)" v:mid="76" v:groupcontext="group">		<title>Sheet.76</title>		<g id="shape77-120" v:mid="77" v:groupcontext="shape" transform="translate(480.949,348.515) rotate(90)">			<title>Sheet.77</title>			<path d="M0 477.96 L125.14 477.96" class="st8"></path>		</g>		<g id="shape78-123" v:mid="78" v:groupcontext="shape" transform="translate(-6.29496E-14,-128.567)">			<title>Sheet.78</title>			<path d="M0 477.96 L2.99 472.78 L5.98 477.96 L0 477.96 Z" class="st9"></path>		</g>		<g id="shape79-125" v:mid="79" v:groupcontext="shape">			<title>Sheet.79</title>			<path d="M0 472.78 L2.99 477.96 L5.98 472.78 L0 472.78 Z" class="st9"></path>		</g>	</g>	<g id="shape81-127" v:mid="81" v:groupcontext="shape" transform="translate(14.8309,-14.9999)">		<title>Sheet.81</title>		<desc>GstMLTensorMeta</desc>		<v:textblock v:margins="rect(7.2,0,0,0)" v:verticalalign="0"></v:textblock>		<v:textrect cx="135.642" cy="348.77" width="271.29" height="258.375"></v:textrect>		<path d="M0 474.83 A3.00007 3.12588 -180 0 0 3 477.96 L268.28 477.96 A3.00007 3.12588 -180 0 0 271.28 474.83 L271.28					 222.71 A3.00007 3.12588 -180 0 0 268.28 219.58 L3 219.58 A3.00007 3.12588 -180 0 0 -0 222.71 L0 474.83 Z" class="st4"></path>		<text x="85.21" y="237.58" class="st15" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>GstMLTensorMeta</text>		</g>	<g id="shape83-130" v:mid="83" v:groupcontext="shape" transform="translate(18,-123.72)">		<title>Sheet.83</title>		<desc>+ id: 对应于 GstBuffer 中 GstMemory 索引的识别号。 + type: 张量类型UINT8、FLO...</desc>		<v:textblock v:margins="rect(0,0,0,0)" v:verticalalign="0"></v:textblock>		<v:textrect cx="135.701" cy="418.317" width="271.41" height="119.28"></v:textrect>		<rect x="0" y="358.677" width="271.402" height="119.28" class="st16"></rect>		<text x="0" y="370.66" class="st15" v:langid="1033"><v:paragraph></v:paragraph><v:tablist></v:tablist>+ id:<v:tabchar></v:tabchar><tspan dx="1.094em" class="st17">对应于</tspan><tspan class="st18"> </tspan><tspan class="st18">GstBuffer </tspan><tspan class="st17">中</tspan><tspan class="st18"> </tspan><tspan class="st18">GstMemory<v:tabchar></v:tabchar></tspan><tspan x="36" dy="1.331em" class="st17">索引的识别号</tspan><tspan class="st17">。<v:newlinechar></v:newlinechar></tspan><tspan x="0" dy="1.233em" class="st19">+ type:<v:newlinechar></v:newlinechar><v:tabchar></v:tabchar></tspan><tspan x="36" dy="1.298em" class="st17">张量类型</tspan><tspan class="st17">（</tspan><tspan class="st18">UINT8</tspan><tspan class="st20">、</tspan><tspan class="st18">FLOAT32</tspan><tspan class="st17"> </tspan><tspan class="st17">等</tspan><tspan class="st17">）<v:newlinechar></v:newlinechar></tspan><tspan x="0" dy="1.233em" class="st19">+ dimensions[CMAX]:<v:newlinechar></v:newlinechar><v:tabchar></v:tabchar></tspan><tspan x="36" dy="1.2em" class="st17">包含张量维度的数组</tspan><tspan class="st17">（</tspan><tspan class="st17">例如</tspan><tspan class="st17">，1</tspan><tspan class="st17">x513x513x3</tspan><tspan class="st17">）<v:newlinechar></v:newlinechar></tspan><tspan x="0" dy="1.2em" class="st19">+ n_dimensions:<v:newlinechar></v:newlinechar><v:tabchar></v:tabchar></tspan><tspan x="36" dy="1.298em" class="st17">维度的实际数量</tspan><tspan class="st17">（</tspan><tspan class="st17">例如</tspan><tspan class="st17">，3 </tspan><tspan class="st17">表示三维</tspan><tspan class="st17">）</tspan></text>		</g>	<g id="shape84-164" v:mid="84" v:groupcontext="shape" transform="translate(14.8309,-247.154)">		<title>Sheet.84</title>		<path d="M0 477.96 L271.28 477.96" class="st21"></path>	</g>	<g id="shape85-167" v:mid="85" v:groupcontext="shape" transform="translate(18,-18)">		<title>Sheet.85</title>		<desc>+ gst_buffer_add_ml_tensor_meta(): 将 meta 添加到 GstBuffer + gst...</desc>		<v:textblock v:margins="rect(0,0,0,0)" v:verticalalign="0"></v:textblock>		<v:textrect cx="131.201" cy="431.377" width="262.41" height="93.1596"></v:textrect>		<rect x="0" y="384.798" width="262.402" height="93.1596" class="st16"></rect>		<text x="0" y="395.6" class="st15" v:langid="1033"><v:paragraph></v:paragraph><v:tablist></v:tablist>+ gst_buffer_add_ml_tensor_meta():<v:newlinechar></v:newlinechar><v:tabchar></v:tabchar><tspan x="36" dy="1.298em" class="st17">将</tspan><tspan class="st18"> </tspan><tspan class="st18">meta </tspan><tspan class="st17">添加到</tspan><tspan class="st18"> </tspan><tspan class="st18">GstBuffer<v:newlinechar></v:newlinechar></tspan><tspan x="0" dy="1.233em" class="st19">+ gst_buffer_get_ml_tensor_meta():<v:newlinechar></v:newlinechar><v:tabchar></v:tabchar></tspan><tspan x="36" dy="1.298em" class="st17">获取第一个</tspan><tspan class="st18"> </tspan><tspan class="st18">meta </tspan><tspan class="st17">条目</tspan><tspan x="0" dy="1.233em" class="st19">+ gst_buffer_get_ml_tensor_meta_id():</tspan><tspan x="36" dy="1.298em" class="st17">获取第<v:newlinechar></v:newlinechar></tspan><tspan class="st18"> </tspan><tspan class="st18">n </tspan><tspan class="st17">个</tspan><tspan class="st18"> </tspan><tspan class="st18">meta </tspan><tspan class="st17">条目</tspan></text>		</g>	<g id="shape86-189" v:mid="86" v:groupcontext="shape" transform="translate(14.8309,-118.954)">		<title>Sheet.86</title>		<path d="M0 477.96 L271.28 477.96" class="st21"></path>	</g>	<g id="shape88-192" v:mid="88" v:groupcontext="shape" transform="translate(14.8309,-311.998)">		<title>Sheet.88</title>		<desc>GstBuffer</desc>		<v:textblock v:margins="rect(7.2,0,0,0)" v:verticalalign="0"></v:textblock>		<v:textrect cx="135.442" cy="404.017" width="270.89" height="147.88"></v:textrect>		<path d="M0 475.2 A3.00007 2.76069 -180 0 0 3 477.96 L267.88 477.96 A3.00007 2.76069 -180 0 0 270.88 475.2 L270.88 332.84					 A3.00007 2.76069 -180 0 0 267.88 330.08 L3 330.08 A3.00007 2.76069 -180 0 0 0 332.84 L0 475.2 Z" class="st4"></path>		<text x="109.32" y="348.08" class="st15" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>GstBuffer</text>		</g>	<g id="shape95-195" v:mid="95" v:groupcontext="shape" transform="translate(14.8309,-432)">		<title>Sheet.95</title>		<path d="M0 477.96 L270.88 477.96" class="st21"></path>	</g>	<g id="shape96-198" v:mid="96" v:groupcontext="shape" transform="translate(14.8309,-360)">		<title>Sheet.96</title>		<path d="M0 477.96 L270.88 477.96" class="st21"></path>	</g>	<g id="shape97-201" v:mid="97" v:groupcontext="shape" transform="translate(319.745,-349.49)">		<title>Sheet.97</title>		<desc>neural-network/tensors GstCaps 具有以下共同规则 维度GstArray 是由‘,’分隔的张量...</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="260.752" cy="421.262" width="521.51" height="113.39"></v:textrect>		<path d="M0 474.96 A3.00007 3.00007 -180 0 0 3 477.96 L518.5 477.96 A3.00007 3.00007 -180 0 0 521.5 474.96 L521.5 367.57					 A3.00007 3.00007 -180 0 0 518.5 364.57 L3 364.57 A3.00007 3.00007 -180 0 0 0 367.57 L0 474.96 Z" class="st2"></path>		<text x="7.2" y="380.48" class="st14" v:langid="1033"><v:paragraph v:indentleft="7.2"></v:paragraph><v:tablist></v:tablist>neural-network/tensors<tspan class="st18"> </tspan><tspan class="st18">GstCaps </tspan><tspan class="st17">具有以下共同规则</tspan><tspan class="st17">：<v:newlinechar></v:newlinechar></tspan><tspan x="7.2" dy="1.331em" class="st7">维度</tspan><tspan class="st7">：</tspan><tspan class="st18">GstArray </tspan><tspan class="st17">是由</tspan><tspan class="st17">‘,’</tspan><tspan class="st17">分隔的张量维度值</tspan><tspan class="st17">，</tspan><tspan class="st17">并用分隔符标记</tspan><tspan class="st17">，</tspan><tspan class="st17">以</tspan><tspan class="st17">‘&#60;’</tspan><tspan class="st17">开头</tspan><tspan class="st17">，</tspan><tspan class="st17">以</tspan><tspan class="st17">‘&#62;’</tspan><tspan class="st17">结尾</tspan><tspan class="st17">。<v:newlinechar></v:newlinechar></tspan><tspan x="7.2" dy="1.233em" class="st17">#</tspan><tspan class="st17">示例</tspan><tspan class="st17">-</tspan><tspan class="st17">&#62;  &#60; &#60;5, 300, 300, 1&#62;、&#60;1, 1, 1000, 1&#62; &#62;<v:newlinechar></v:newlinechar></tspan><tspan x="7.2" dy="1.2em" class="st17">#<v:newlinechar></v:newlinechar></tspan><tspan x="7.2" dy="1.2em" class="st17">#<v:newlinechar></v:newlinechar></tspan><tspan x="7.2" dy="1.2em" class="st7">类型</tspan><tspan class="st7">：</tspan><tspan class="st17">（</tspan><tspan class="st17">字符串</tspan><tspan class="st17">）<v:newlinechar></v:newlinechar></tspan><tspan x="7.2" dy="1.298em" class="st18">{UINT8, INT8, UINT16, INT16, UINT32, INT32, UINT64, INT64, FLOAT32, FLOAT64}</tspan> </text>		</g>	<g id="shape103-237" v:mid="103" v:groupcontext="shape" transform="translate(285.715,-239.457)">		<title>Sheet.103</title>		<path d="M0 313.89 L17.01 313.89 L17.01 477.96 L427.23 477.96 L427.23 464.64 L0 313.89 Z" class="st22"></path>		<path d="M0 313.89 L17.01 313.89 L17.01 477.96 L427.23 477.96 L427.23 464.64" class="st8"></path>	</g>	<g id="shape104-240" v:mid="104" v:groupcontext="shape" transform="translate(709.952,-251.897)">		<title>Sheet.104</title>		<path d="M5.98 477.96 L2.99 472.78 L0 477.96 L5.98 477.96 Z" class="st9"></path>	</g>	<g id="shape106-242" v:mid="106" v:groupcontext="shape" transform="translate(101.59,238.5) rotate(-90)">		<title>Sheet.106</title>		<path d="M0 477.96 L13.32 477.96" class="st8"></path>	</g>	<g id="shape107-245" v:mid="107" v:groupcontext="shape" transform="translate(576.555,-251.897)">		<title>Sheet.107</title>		<path d="M5.98 477.96 L2.99 472.78 L0 477.96 L5.98 477.96 Z" class="st9"></path>	</g>	<g id="shape137-247" v:mid="137" v:groupcontext="shape" transform="translate(18,-363.283)">		<title>Sheet.137</title>		<desc>+ GstMemory: 包含单个张量 示例1x513x513x3 + GstMemory: 下一个张量等… + ...</desc>		<v:textblock v:margins="rect(0,0,0,0)" v:verticalalign="0"></v:textblock>		<v:textrect cx="124.557" cy="445.24" width="249.12" height="65.4342"></v:textrect>		<rect x="0" y="412.523" width="249.115" height="65.4342" class="st16"></rect>		<text x="0" y="424.5" class="st15" v:langid="1033"><v:paragraph></v:paragraph><v:tablist></v:tablist>+ GstMemory:<v:tabchar></v:tabchar><tspan dx="2.675em" class="st17">包含单个张量<v:newlinechar></v:newlinechar><v:paragraph v:indentleft="79.2"></v:paragraph><v:tabchar></v:tabchar></tspan><tspan x="108" dy="1.331em" class="st17">示例</tspan><tspan class="st17">：1</tspan><tspan class="st17">x513x513x3<v:newlinechar></v:newlinechar><v:paragraph></v:paragraph></tspan><tspan x="0" dy="1.331em" class="st19">+ GstMemory:<v:tabchar></v:tabchar></tspan><tspan dx="2.675em" class="st17">下一个张量等</tspan><tspan class="st17">…<v:newlinechar></v:newlinechar></tspan><tspan x="0" dy="1.233em" class="st19">+ ...</tspan></text>		</g>	<g id="shape138-258" v:mid="138" v:groupcontext="shape" transform="translate(18,-315)">		<title>Sheet.138</title>		<desc>+ GstVideoMeta: 描述 raw 数据单个张量的 + GstVideoMeta: 下一个张量条目的 meta</desc>		<v:textblock v:margins="rect(0,0,0,0)" v:verticalalign="0"></v:textblock>		<v:textrect cx="124.557" cy="459.173" width="249.12" height="37.5685"></v:textrect>		<rect x="0" y="440.389" width="249.115" height="37.5685" class="st16"></rect>		<text x="0" y="452.37" class="st15" v:langid="1033"><v:paragraph></v:paragraph><v:tablist></v:tablist>+ GstVideoMeta:<v:tabchar></v:tabchar><tspan dx="1.511em" class="st17">描述</tspan><tspan class="st18"> </tspan><tspan class="st18">raw </tspan><tspan class="st17">数据单个张量的<v:newlinechar></v:newlinechar></tspan><tspan x="0" dy="1.331em" class="st19">+ GstVideoMeta:<v:tabchar></v:tabchar></tspan><tspan dx="1.511em" class="st17">下一个张量条目的</tspan><tspan class="st23"> </tspan><tspan class="st18">meta</tspan></text>		</g>	<g id="group140-269" transform="translate(147.281,-273.375)" v:mid="140" v:groupcontext="group">		<title>Sheet.140</title>		<g id="shape100-270" v:mid="100" v:groupcontext="shape" transform="translate(-474.965,477.957) rotate(-90)">			<title>Sheet.100</title>			<path d="M0 477.96 L34.32 477.96" class="st8"></path>		</g>		<g id="shape101-273" v:mid="101" v:groupcontext="shape" transform="translate(0,-33.4422)">			<title>Sheet.101</title>			<path d="M5.98 477.96 L2.99 472.78 L0 477.96 L5.98 477.96 Z" class="st9"></path>		</g>	</g>	<g id="shape153-275" v:mid="153" v:groupcontext="shape" transform="translate(408.375,-385.537)">		<title>Sheet.153</title>		<desc>第一张量</desc>		<v:textblock v:margins="rect(0,0,0,0)" v:verticalalign="0"></v:textblock>		<v:textrect cx="30" cy="470.757" width="60" height="14.4"></v:textrect>		<rect x="0" y="463.557" width="60" height="14.4" class="st16"></rect>		<text x="6" y="474.36" class="st24" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>第一张量</text>		</g>	<g id="shape154-278" v:mid="154" v:groupcontext="shape" transform="translate(497.625,-386.437)">		<title>Sheet.154</title>		<desc>第二张量</desc>		<v:textblock v:margins="rect(0,0,0,0)" v:verticalalign="0"></v:textblock>		<v:textrect cx="37.5" cy="471.207" width="75" height="13.5"></v:textrect>		<rect x="0" y="464.457" width="75" height="13.5" class="st16"></rect>		<text x="13.5" y="475.26" class="st24" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>第二张量</text>		</g>	<g id="group155-281" transform="translate(435.383,-400.611)" v:mid="155" v:groupcontext="group">		<title>Sheet.155</title>		<g id="shape148-282" v:mid="148" v:groupcontext="shape" transform="translate(480.949,463.106) rotate(90)">			<title>Sheet.148</title>			<path d="M0 477.96 L10.08 477.96" class="st8"></path>		</g>		<g id="shape149-285" v:mid="149" v:groupcontext="shape">			<title>Sheet.149</title>			<path d="M0 472.78 L2.99 477.96 L5.98 472.78 L0 472.78 Z" class="st9"></path>		</g>	</g>	<g id="group156-287" transform="translate(532.133,-400.611)" v:mid="156" v:groupcontext="group">		<title>Sheet.156</title>		<g id="shape151-288" v:mid="151" v:groupcontext="shape" transform="translate(480.949,463.798) rotate(90)">			<title>Sheet.151</title>			<path d="M0 477.96 L10.08 477.96" class="st8"></path>		</g>		<g id="shape152-291" v:mid="152" v:groupcontext="shape">			<title>Sheet.152</title>			<path d="M0 472.78 L2.99 477.96 L5.98 472.78 L0 472.78 Z" class="st9"></path>		</g>	</g>	<g id="group157-293" transform="translate(805.061,-16.0364)" v:mid="157" v:groupcontext="group">		<title>Sheet.157</title>		<g id="shape109-294" v:mid="109" v:groupcontext="shape" transform="translate(15.1882,0)">			<title>Sheet.109</title>			<desc>开源</desc>			<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>			<v:textrect cx="10.5" cy="471.657" width="21" height="12.6"></v:textrect>			<rect x="0" y="465.357" width="21" height="12.6" class="st16"></rect>			<text x="0" y="474.81" class="st25" v:langid="1033"><v:paragraph></v:paragraph><v:tablist></v:tablist>开源</text>			</g>		<g id="shape110-297" v:mid="110" v:groupcontext="shape" transform="translate(1.26898E-13,-0.218617)">			<title>Sheet.110</title>			<path d="M0 476.46 A1.50003 1.50003 -180 0 0 1.5 477.96 L10.5 477.96 A1.50003 1.50003 -180 0 0 12 476.46 L12 467.46						 A1.50003 1.50003 -180 0 0 10.5 465.96 L1.5 465.96 A1.50003 1.50003 -180 0 0 0 467.46 L0 476.46 Z" class="st4"></path>		</g>	</g></g>
</svg>

下表列出了采集、处理视频/音频流以及将输出显示在屏幕上或保存到文件中的顺序阶段。

Table : ML pipeline 处理阶段

| 处理过程 | 说明 |
| --- | --- |
| 采集 | <ul class="ul" id="machine-learning__ul_t1g_f3v_y1c"><br>                                    <li class="li"><a href="https://docs.qualcomm.com/doc/80-70022-50SC/topic/qtiqmmfsrc.html">qtiqmmfsrc</a> 从实时摄像头源采集 YUV 流。 </li><br><br>                                    <li class="li">filesrc 插件从需要格式转换的离线视频中采集任何格式。 </li><br><br>                                </ul> |
| 预处理 | [qtimlvconverter](https://docs.qualcomm.com/doc/80-70022-50SC/topic/qtimlvconverter.html)执行以下操作以准备用于推理的视频流：<ul class="ul" id="machine-learning__ul_sj1_nbz_rbc"><br>                                    <li class="li">颜色转换</li><br><br>                                    <li class="li">调整大小</li><br><br>                                    <li class="li">均值减法</li><br><br>                                </ul> |
| 推理 | <ol class="ol" id="machine-learning__ol_x3m_1cz_rbc"><br>                                    <li class="li">预处理的数据以张量格式发送到推理插件。</li><br><br>                                    <li class="li">推理插件将此数据发送到机器学习引擎：<ul class="ul" id="machine-learning__ol_jg1_ccz_rbc"><br>                                            <li class="li">LiteRT 引擎使用 <a href="https://docs.qualcomm.com/doc/80-70022-50SC/topic/qtimltflite.html">qtimltflite</a>。</li><br><br>                                            <li class="li">Qualcomm Neural Processing SDK 引擎使用 <a href="https://docs.qualcomm.com/doc/80-70022-50SC/topic/qtimlsnpe.html">qtimlsnpe</a>。</li><br><br>                                        </ul><br></li><br><br>                                </ol> |
| 后处理 | 输出张量被传递到后处理插件：<ul class="ul" id="machine-learning__ul_qqj_fgt_5zb"><br>                                    <li class="li">目标检测 - <a href="https://docs.qualcomm.com/doc/80-70022-50SC/topic/qtimlvdetection.html">qtimlvdetection</a></li><br><br>                                    <li class="li">图像分类 - <a href="https://docs.qualcomm.com/doc/80-70022-50SC/topic/qtimlvclassification.html">qtimlvclassification</a></li><br><br>                                    <li class="li">图像分割 - <a href="https://docs.qualcomm.com/doc/80-70022-50SC/topic/qtimlvsegmentation.html">qtimlvsegmentation</a></li><br><br>                                </ul> |
| 叠加层 | 解释机器学习元数据的覆盖插件。<br><ol class="ol" id="machine-learning__ol_t3l_2dz_rbc"><br>                                    <li class="li"><a href="https://docs.qualcomm.com/doc/80-70022-50SC/topic/qtioverlay.html">qtivoverlay</a> 在缓存上绘制适当的叠加层，以便实时可视化推理结果。 </li><br><br>                                    <li class="li">流可以呈现到显示器上，通过网络流传输，或者编码并存储到本地存储。</li><br><br>                                </ol> |
| 发送 | <ul class="ul" id="machine-learning__ul_vlx_v1z_rbc"><br>                                    <li class="li"><a href="https://docs.qualcomm.com/doc/80-70022-50SC/topic/waylandsink.html">Waylandsink</a> 用于在屏幕上显示输出。 </li><br><br>                                    <li class="li">Filesink 用于将推断的视频保存至本地存储。</li><br><br>                                </ul> |

### 相关信息

[运行机器学习用例](https://docs.qualcomm.com/doc/80-70022-50SC/topic/machine-learning-use-cases.html)

Last Published: Nov 05, 2025

[Previous Topic
Qualcomm GStreamer 架构和插件](https://docs.qualcomm.com/bundle/publicresource/80-70022-50SC/topics/gst-plugin-architecture.md) [Next Topic
配置 Qualcomm GStreamer 插件](https://docs.qualcomm.com/bundle/publicresource/80-70022-50SC/topics/qim-sdk-plugins.md)