# GStreamer plugin architecture

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

The Qualcomm IM SDK hides the complexity of the hardware within the plugin
        architecture and provides APIs to applications. Using this framework, you can create
        applications without the need to access the low-level platform libraries and hardware
        details, which can vary across platforms.

The [Configure Qualcomm GStreamer plugins](https://docs.qualcomm.com/doc/80-70022-50/topic/qim-sdk-plugins.html) include video encoding/decoding, camera ISP, GPU,
            display, audio DSP (aDSP), and AI/ML accelerators.

Figure : Qualcomm IM SDK GStreamer plugin architecture
            
            <?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>

## Graphics and display architecture

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

The Wayland server uses the Wayland protocol to enable communication between the
        display and graphics servers, and its clients. The display and graphics architecture uses
        the Weston server (Weston).

Weston manages both composition and display while it runs as a separate process in the
            system.

Figure : Weston/Wayland architecture
            
            <?xml version="1.0" encoding="UTF-8"?>
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" width="792.727478027344659" height="471.201980590820312" viewbox="0 0 792.727478027344659 471.201980590820312">
  <g>
    <rect x=".499877929688409" y=".500076293945312" width="791.7275390625" height="470.20166015625" rx="7.499999999999916" ry="7.499999999999916" style="fill: #fafafa;"></rect>
    <path d="M784.727478027344659,1c3.85980224609375,0,7,3.14019775390625,7,7v455.201980590820312c0,3.85980224609375-3.14019775390625,7-7,7H8.000000000000909c-3.85980224609375,0-7.000000000000909-3.14019775390625-7.000000000000909-7V8c0-3.85980224609375,3.140197753907159-7,7.000000000000909-7h776.72747802734375M784.727478027344659,0H8.000000000000909C3.581802368164972,0,0,3.581695556640625,0,8v455.201980590820312c0,4.4183349609375,3.581802368164972,8,8.000000000000909,8h776.72747802734375c4.4183349609375,0,8-3.5816650390625,8-8V8c0-4.418304443359375-3.5816650390625-8-8-8h0Z" style="fill: #d2d7e1;"></path>
  </g>
  <rect x="20.000040690113565" y="20.000003571206435" width="290" height="242.737468962987805" rx="4" ry="4" style="fill: #fff; stroke: #6280cc; stroke-miterlimit: 10; stroke-width: 2px;"></rect>
  <rect x="35.000040690113565" y="105.271514892578125" width="260" height="142.737468962988714" rx="4" ry="4" style="fill: #007884;"></rect>
  <rect x="482.704137166349938" y="20.000003571206435" width="290.290500074710508" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
  <path d="M769.011309937109218,261.366328296074244h-282.286539019052725c-2.209138999323841,0-4-1.790861000677069-4-4l-.020633751706555-173.236997635930493c0-2.209138999323841,1.790861000676159-4,4-4h282.286539019052725c2.209138999323841,0,4,1.790861000676159,4,4l.020633751706555,173.236997635930493c0,2.209138999322931-1.790861000676159,4-4,4Z" style="fill: #fff; stroke: #6280cc; stroke-miterlimit: 10; stroke-width: 2px;"></path>
  <rect x="492.667449042327462" y="110.129330660143751" width="270.343860894781756" height="141.236997635930493" rx="4" ry="4" style="fill: none; stroke: #2a2aea; stroke-miterlimit: 10;"></rect>
  <rect x="517.608930505836724" y="160.257088929756719" width="160" height="71.109239366317524" rx="3.999999999999996" ry="3.999999999999996" style="fill: #2a2aea;"></rect>
  <text transform="translate(577.634963989258722 99.715179443359375)" style="font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0" style="letter-spacing: -.01513671875em;">W</tspan><tspan x="13.953125" y="0">es</tspan><tspan x="30.6796875" y="0" style="letter-spacing: -.009765625em;">t</tspan><tspan x="35.75" y="0">on se</tspan><tspan x="74.39111328125" y="0" style="letter-spacing: .0087890625em;">r</tspan><tspan x="79.94580078125" y="0" style="letter-spacing: -.00634765625em;">v</tspan><tspan x="87.59423828125" y="0">er </tspan></text>
  <text transform="translate(548.669769287110284 48.747238159179688)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0" style="letter-spacing: -.01611328125em;">W</tspan><tspan x="13.9375" y="0" style="letter-spacing: -.00732421875em;">a</tspan><tspan x="22.5234375" y="0">yland / GLES Client </tspan></text>
  <text transform="translate(588.690826416016534 128.921722412109375)" style="font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">OpenGL ES </tspan></text>
  <text transform="translate(583.307952880860284 155.89794921875)" style="font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">EGL</tspan></text>
  <text transform="translate(113.714752197266534 181.315948486328125)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">DRM bac</tspan><tspan x="64.32861328125" y="0" style="letter-spacing: -.009765625em;">k</tspan><tspan x="72.28173828125" y="0">end </tspan></text>
  <text transform="translate(114.257614135743097 80.129104614257812)" style="font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0" style="letter-spacing: -.01513671875em;">W</tspan><tspan x="13.953125" y="0">es</tspan><tspan x="30.6796875" y="0" style="letter-spacing: -.009765625em;">t</tspan><tspan x="35.75" y="0">on se</tspan><tspan x="74.39111328125" y="0" style="letter-spacing: .0087890625em;">r</tspan><tspan x="79.94580078125" y="0" style="letter-spacing: -.00634765625em;">v</tspan><tspan x="87.59423828125" y="0">er</tspan></text>
  <text transform="translate(548.374496459961847 200.48724365234375)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">EGL subdri</tspan><tspan x="76.93017578125" y="0" style="letter-spacing: -.00634765625em;">v</tspan><tspan x="84.57861328125" y="0">er</tspan></text>
  <rect x="65.000040690113565" y="294.088218508615682" width="200" height="40" rx="4" ry="4" style="fill: #007884;"></rect>
  <text transform="translate(142.398132324219659 319.752109527587891)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">libdrm</tspan></text>
  <rect x="65.000040690113565" y="374.582099628238211" width="200" height="40" rx="4" ry="4" style="fill: #007884;"></rect>
  <text transform="translate(127.800476074219659 399.258228302001953)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">DRM/KMS</tspan></text>
  <g>
    <line x1="165.000040690113565" y1="248.347671485895262" x2="165.000040690113565" y2="292.974470170127461" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 3px;"></line>
    <line x1="165.000040690113565" y1="248.347671485895262" x2="165.000040690113565" y2="292.974470170127461" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
  </g>
  <line x1="20.000040690113565" y1="354.088218508615682" x2="774.454976399762927" y2="354.088218508615682" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
  <g>
    <rect x="337.352088928232661" y="20.000003571206435" width="120" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
    <text transform="translate(367.086072921753839 40.075759887695312)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0" style="letter-spacing: -.01611328125em;">W</tspan><tspan x="13.9375" y="0" style="letter-spacing: -.00732421875em;">a</tspan><tspan x="22.5234375" y="0">yland</tspan><tspan x=".796875" y="19.2001953125">p</tspan><tspan x="9.7734375" y="19.2001953125" style="letter-spacing: -.009765625em;">r</tspan><tspan x="15.03125" y="19.2001953125">o</tspan><tspan x="24.15625" y="19.2001953125" style="letter-spacing: -.009765625em;">t</tspan><tspan x="29.2265625" y="19.2001953125">ocol</tspan></text>
    <g>
      <line x1="336.352096557618097" y1="45" x2="317.093078613282159" y2="45" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="318.260269165039972 41.010940551758722 311.352096557618097 45 318.260269165039972 48.98907470703125 318.260269165039972 41.010940551758722"></polygon>
    </g>
    <g>
      <line x1="457.352081298829034" y1="45.000015258789062" x2="476.611114501954034" y2="45" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="475.443908691407159 48.989059448242188 482.352081298829034 45 475.443908691407159 41.010940551758722 475.443908691407159 48.989059448242188"></polygon>
    </g>
  </g>
  <g>
    <rect x="337.352088928232661" y="121.683165933640339" width="120" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
    <text transform="translate(367.086072921753839 141.7589111328125)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0" style="letter-spacing: -.01611328125em;">W</tspan><tspan x="13.9375" y="0" style="letter-spacing: -.00732421875em;">a</tspan><tspan x="22.5234375" y="0">yland</tspan><tspan x=".796875" y="19.2001953125">p</tspan><tspan x="9.7734375" y="19.2001953125" style="letter-spacing: -.009765625em;">r</tspan><tspan x="15.03125" y="19.2001953125">o</tspan><tspan x="24.15625" y="19.2001953125" style="letter-spacing: -.009765625em;">t</tspan><tspan x="29.2265625" y="19.2001953125">ocol</tspan></text>
    <g>
      <line x1="336.352096557618097" y1="146.683151245117188" x2="317.093078613282159" y2="146.683151245117188" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="318.260269165039972 142.694107055664062 311.352096557618097 146.683151245117188 318.260269165039972 150.672225952148438 318.260269165039972 142.694107055664062"></polygon>
    </g>
    <g>
      <line x1="457.352081298829034" y1="146.683181762695312" x2="501.297607421875909" y2="146.683151245117188" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="500.130432128907159 150.672225952148438 507.038604736329034 146.683151245117188 500.130432128907159 142.694107055664062 500.130432128907159 150.672225952148438"></polygon>
    </g>
  </g>
  <g>
    <rect x="337.352088928232661" y="216.366328296074244" width="120" height="50.000000000000909" rx="4" ry="4" style="fill: #007884;"></rect>
    <text transform="translate(381.668104171753839 236.442085266113281)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">GPU</tspan><tspan x="-28.7265625" y="19.2001953125">composition</tspan></text>
    <g>
      <line x1="336.352096557618097" y1="241.366317749023438" x2="300.741027832032159" y2="241.366317749023438" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="301.908218383789972 237.377273559570312 295.000045776368097 241.366317749023438 301.908218383789972 245.355392456054688 301.908218383789972 237.377273559570312"></polygon>
    </g>
    <g>
      <line x1="457.352081298829034" y1="241.366317749023438" x2="476.611114501954034" y2="241.366317749023438" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="475.443908691407159 245.355392456054688 482.352081298829034 241.366317749023438 475.443908691407159 237.377273559570312 475.443908691407159 245.355392456054688"></polygon>
    </g>
  </g>
  <g>
    <line x1="165.000040690113565" y1="334.088218508615682" x2="165.000040690113565" y2="374.088218508615682" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 3px;"></line>
    <line x1="165.000040690113565" y1="334.088218508615682" x2="165.000040690113565" y2="374.088218508615682" style="fill: none; stroke: #000; stroke-dasharray: 6 3 6 3; stroke-miterlimit: 10;"></line>
  </g>
  <rect x="572.994637241060445" y="374.582099628238211" width="200" height="40" rx="4" ry="4" style="fill: #007884;"></rect>
  <text transform="translate(653.600006103516534 399.258228302001953)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0" style="letter-spacing: -.01513671875em;">K</tspan><tspan x="9.7890625" y="0">GSL</tspan></text>
  <g>
    <polyline points="725.310120221472062 190.826710969550732 725.310120221472062 326.593801721797718 672.994637241060445 326.593801721797718 672.994637241060445 374.088218508615682" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 3px;"></polyline>
    <g>
      <line x1="725.310119628907159" y1="190.826705932617188" x2="725.310119628907159" y2="193.826705932617188" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <line x1="725.310119628907159" y1="196.647720336914062" x2="725.310119628907159" y2="203.700302124023438" style="fill: none; stroke: #000; stroke-dasharray: 5.64204740524292 2.82102370262146; stroke-miterlimit: 10;"></line>
      <line x1="725.310119628907159" y1="205.110794067383722" x2="725.310119628907159" y2="322.183303833007812" style="fill: none; stroke: #000; stroke-dasharray: 5.64204740524292 2.82102370262146 5.64204740524292 2.82102370262146; stroke-miterlimit: 10;"></line>
      <polyline points="725.310119628907159 323.593795776367188 725.310119628907159 326.593795776367188 722.310119628907159 326.593795776367188" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></polyline>
      <line x1="719.415405273438409" y1="326.593795776367188" x2="712.178588867188409" y2="326.593795776367188" style="fill: none; stroke: #000; stroke-dasharray: 5.789435386657715 2.894717693328857; stroke-miterlimit: 10;"></line>
      <line x1="710.731262207032159" y1="326.593795776367188" x2="677.442016601563409" y2="326.593795776367188" style="fill: none; stroke: #000; stroke-dasharray: 5.789435386657715 2.894717693328857 5.789435386657715 2.894717693328857; stroke-miterlimit: 10;"></line>
      <polyline points="675.994628906250909 326.593795776367188 672.994628906250909 326.593795776367188 672.994628906250909 329.593795776367188" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></polyline>
      <line x1="672.994628906250909" y1="332.187210083007812" x2="672.994628906250909" y2="338.670700073242188" style="fill: none; stroke: #000; stroke-dasharray: 5.186801910400391 2.593400955200195; stroke-miterlimit: 10;"></line>
      <line x1="672.994628906250909" y1="339.967391967773438" x2="672.994628906250909" y2="369.791519165039062" style="fill: none; stroke: #000; stroke-dasharray: 5.186801910400391 2.593400955200195 5.186801910400391 2.593400955200195; stroke-miterlimit: 10;"></line>
      <line x1="672.994628906250909" y1="371.088211059570312" x2="672.994628906250909" y2="374.088211059570312" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
    </g>
  </g>
  <rect x="507.608930505836724" y="137.366328296074244" width="180" height="104" rx="4" ry="4" style="fill: none; stroke: #d2d7e1; stroke-miterlimit: 10;"></rect>
  <rect x="697.608930505836724" y="160.257088929756719" width="55.402379431272493" height="30" rx="4" ry="4" style="fill: #007884;"></rect>
  <text transform="translate(710.809997558594659 179.933059692382812)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">GSL</tspan></text>
  <g>
    <g>
      <text transform="translate(592.282287597657159 447.167453765869141)" style="font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">Qualcomm </tspan></text>
      <rect x="572.031294151186557" y="435.07598074786074" width="16" height="16" rx="2" ry="2" style="fill: #2a2aea;"></rect>
    </g>
    <g>
      <text transform="translate(690.864135742188409 447.167453765869141)" style="font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">Open source</tspan></text>
      <rect x="670.613075564045175" y="435.07598074786074" width="16" height="16" rx="2" ry="2" style="fill: #007884;"></rect>
    </g>
  </g>
</svg>

Table : Weston/Wayland components

| Component | Description |
| --- | --- |
| Wayland/ GLES client | Implements the Wayland protocol for Weston. |
| Weston server | Implements the Wayland compositor. <ul class="ul" id="graphics-and-display__ul_nz1_vwy_rbc"><br>                                <li class="li">Uses the Kernel Mode Setting (KMS) to set up the display.</li><br><br>                                <li class="li">Performs the compositing using OpenGL ES and Direct Rendering<br>                                    Manager (DRM).</li><br><br>                            </ul> |
| Secure dynamic messaging (SDM) back-end | <ul class="ul" id="graphics-and-display__ul_amz_bxy_rbc"><br>                                <li class="li">Uses display hardware abstraction layer (HAL) to interact with<br>                                    the display hardware.</li><br><br>                                <li class="li">Provides several platform-dependent implementations with one of<br>                                    it designated for DRM and KMS.</li><br><br>                            </ul> |
| GBM buffer management library (libGBM) | <ul class="ul" id="graphics-and-display__ul_rdl_fxy_rbc"><br>                                <li class="li">Includes DMA back-end.</li><br><br>                                <li class="li">Used for zero-copy buffer sharing between display and<br>                                    graphics.</li><br><br>                            </ul> |
| EGL platform-specific driver (EGL sub-driver) | Interacts with GBM and Wayland protocol to communicate with the<br>                            Weston compositor. |

## Camera architecture

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

The camera architecture provides a high-level abstraction on how the underlying
        camera driver and hardware interact with the [qtiqmmfsrc](https://docs.qualcomm.com/doc/80-70022-50/topic/qtiqmmfsrc.html) camera
        plugin.

The following figure shows the camera architecture, where the qtimmfsrc plugin acts as a
            client to the Qualcomm Camera Service.

Figure : Camera pipeline
            
            <?xml version="1.0" encoding="UTF-8"?>
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" width="530" height="537.227554321289062" viewbox="0 0 530 537.227554321289062">
  <g>
    <rect x=".4998779296875" y=".499954223632812" width="529" height="536.2275390625" rx="7.499999999999998" ry="7.499999999999998" style="fill: #fafafa;"></rect>
    <path d="M522,1c3.85980224609375,0,7,3.140213012696222,7,7v521.227554321289062c0,3.85980224609375-3.14019775390625,7-7,7H8c-3.859786033630371,0-7-3.14019775390625-7-7V8c0-3.859786987303778,3.140213966369629-7,7-7h514M522,0H8C3.581714630126953,0,0,3.581710815429688,0,8v521.227554321289062c0,4.41827392578125,3.581714630126953,8,8,8h514c4.41827392578125,0,8-3.58172607421875,8-8V8c0-4.418289184570312-3.58172607421875-8-8-8h0Z" style="fill: #d2d7e1;"></path>
  </g>
  <text transform="translate(234.60540771484375 32.459865570068359)" style="font-family: Roboto-Bold, Roboto; font-size: 16px; font-weight: 700;"><tspan x="0" y="0">GST BIN</tspan></text>
  <g>
    <rect x="74.999969482438246" y="50.679661840506924" width="160" height="50" rx="4" ry="4" style="fill: #2a2aea;"></rect>
    <text transform="translate(122.632827758789062 79.186370849609375)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">qmmfsrc</tspan></text>
  </g>
  <g>
    <line x1="234.999969482421875" y1="75.679656982421875" x2="343.97662353515625" y2="75.679656982421875" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
    <polygon points="342.955322265625 79.170089721679688 348.999969482421875 75.679656982421875 342.955322265625 72.189224243164062 342.955322265625 79.170089721679688"></polygon>
  </g>
  <g>
    <rect x="349.999969482436427" y="50.679661840506924" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
    <text transform="translate(385.01171875 79.186370849609375)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Waylandsink</tspan></text>
  </g>
  <g>
    <g>
      <rect x="19.999969482438246" y="431.227566436453344" width="80" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
      <text transform="translate(35.207035064697266 459.734298706054688)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Sensor</tspan></text>
    </g>
    <g>
      <rect x="114.999969482438246" y="431.227566436453344" width="80" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
      <text transform="translate(143.855476379394531 459.734298706054688)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">IFE</tspan></text>
    </g>
    <g>
      <rect x="209.999969482438246" y="431.227566436453344" width="80" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
      <text transform="translate(238.23046875 459.734298706054688)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">IPE</tspan></text>
    </g>
  </g>
  <line x1=".305813928363023" y1="126.67655890684" x2="529.999969482436427" y2="126.67655890684" style="fill: none; stroke: #d2d7e1; stroke-miterlimit: 10;"></line>
  <g>
    <text transform="translate(89.249832153320312 179.270217895507812)" style="font-family: Roboto-Bold, Roboto; font-size: 16px; font-weight: 700;"><tspan x="0" y="0">LE camera service</tspan></text>
    <rect x="29.999969482438246" y="152.994942465011263" width="250" height="225.373790286141229" rx="4" ry="4" style="fill: none; stroke: #4d4d4d; stroke-miterlimit: 10; stroke-width: 2px;"></rect>
    <rect x="44.999969482438246" y="193.368732751147945" width="220" height="50.000000000000909" rx="4" ry="4" style="fill: #007884;"></rect>
    <text transform="translate(70.546981811523438 221.875442504882812)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Unix domain socket IPC</tspan></text>
    <rect x="44.999969482438246" y="313.368732751150674" width="220" height="50.000000000001819" rx="4" ry="4" style="fill: #2a2aea;"></rect>
    <text transform="translate(134.464950561523438 341.875442504882812)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Camx</tspan></text>
    <rect x="44.999969482438246" y="253.368732751148855" width="105" height="50.000000000001819" rx="3.999999999999999" ry="3.999999999999999" style="fill: #007884;"></rect>
    <text transform="translate(69.632976531982422 273.444656372070312)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Camera</tspan><tspan x=".60546875" y="19.2001953125">adapter</tspan></text>
    <rect x="159.999969482438246" y="253.368732751148855" width="105" height="50.000000000001819" rx="4" ry="4" style="fill: #007884;"></rect>
    <text transform="translate(190.609527587890625 273.444229125976562)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Buffer</tspan><tspan x="-9.671875" y="19.2001953125">manager</tspan></text>
  </g>
  <g>
    <line x1="154.999969482438246" y1="102.17655890684" x2="154.999969482438246" y2="151.17655890684" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 3px;"></line>
    <g>
      <line x1="154.999969482421875" y1="107.917556762696222" x2="154.999969482421875" y2="145.435562133789062" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="151.010910034179688 109.084732055664062 154.999969482421875 102.176559448242188 158.989028930664062 109.084732055664062 151.010910034179688 109.084732055664062"></polygon>
      <polygon points="151.010910034179688 144.268386840821222 154.999969482421875 151.176559448242188 158.989028930664062 144.268386840821222 151.010910034179688 144.268386840821222"></polygon>
    </g>
  </g>
  <line x1=".305813928363023" y1="404.654288719673787" x2="529.999969482436427" y2="404.654288719673787" style="fill: none; stroke: #d2d7e1; stroke-miterlimit: 10;"></line>
  <g>
    <line x1="154.999969482438246" y1="379.654288719673787" x2="154.999969482438246" y2="429.654288719673787" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 3px;"></line>
    <g>
      <line x1="154.999969482421875" y1="379.654312133789062" x2="154.999969482421875" y2="382.654312133789062" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <line x1="154.999969482421875" y1="385.404312133789062" x2="154.999969482421875" y2="392.279312133789062" style="fill: none; stroke: #000; stroke-dasharray: 5.5 2.75; stroke-miterlimit: 10;"></line>
      <line x1="154.999969482421875" y1="393.654312133789062" x2="154.999969482421875" y2="425.279312133789062" style="fill: none; stroke: #000; stroke-dasharray: 5.5 2.75 5.5 2.75; stroke-miterlimit: 10;"></line>
      <line x1="154.999969482421875" y1="426.654312133789062" x2="154.999969482421875" y2="429.654312133789062" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
    </g>
  </g>
  <g>
    <g>
      <text transform="translate(331.1405029296875 513.319026947021484)" style="font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">Qualcomm </tspan></text>
      <rect x="310.889447072539042" y="501.227554321289062" width="16" height="16" rx="2" ry="2" style="fill: #2a2aea;"></rect>
    </g>
    <g>
      <text transform="translate(429.7222900390625 513.319026947021484)" style="font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">Open source</tspan></text>
      <rect x="409.471228485395841" y="501.227554321289062" width="16" height="16" rx="2" ry="2" style="fill: #007884;"></rect>
    </g>
  </g>
</svg>

Table : Camera pipeline components

| Component | Description |
| --- | --- |
| Linux embedded (LE) camera service | <ul class="ul" id="camera__ul_shy_bgx_rbc"><br>                                <li class="li">Runs as a daemon in the system:<ul class="ul" id="camera__ul_x25_cgx_rbc"><br>                                        <li class="li">Provides easy remote procedure call (RPC) APIs to<br>                                            control the camera. </li><br><br>                                        <li class="li">Exposes helper client APIs, which perform RPC between<br>                                            client and server.</li><br><br>                                    </ul><br></li><br><br>                                <li class="li">Uses the HAL3 API, which interacts with the camera back-end<br>                                    (CamX) and camera driver to configure camera sensor and image<br>                                    signal processor (ISP) hardware.</li><br><br>                                <li class="li">Uses GBM to assign buffers for each camera stream and submits<br>                                    them to HAL3.</li><br><br>                            </ul> |
| Client/server architecture | Allows the multi-client and multi-camera use cases to do the<br>                                following:<ul class="ul" id="camera__ul_yhd_2r4_kyb"><br>                                <li class="li">Create many instances of qtiqmmfsrc where one instance of the<br>                                    plugin corresponds to one physical or logical camera.</li><br><br>                                <li class="li">Implement camera use cases. These instances can be in the same<br>                                    process or different processes depending upon the use case</li><br><br>                            </ul> |
| qtiqmmfsrc | <ul class="ul" id="camera__ul_wl5_ngx_rbc"><br>                                <li class="li">Provides several streams in parallel (many source pads), and<br>                                    each stream can be of different formats (NV12/21 or MJPEG).<br>                                        <p class="p">For example, if there are three parallel streams, they're<br>                                        processed as follows:</p><br><ol class="ol" id="camera__ul_zbl_mr4_kyb"><br>                                        <li class="li">One stream for local storage.</li><br><br>                                        <li class="li">One stream for YUV stream for live camera preview on a<br>                                            local display.</li><br><br>                                        <li class="li">One for network streaming.</li><br><br>                                    </ol><br></li><br><br>                                <li class="li">Supports ‘N’ number of parallel streams, where 'N' depends on<br>                                    camera ISP capability.</li><br><br>                            </ul> |
| [Waylandsink](https://docs.qualcomm.com/doc/80-70022-50/topic/waylandsink.html) | <ul class="ul" id="camera__ul_fvf_hs4_kyb"><br>                                <li class="li">Uses the raw YUV (NV12/21) stream output to render the camera<br>                                    frames to a physical display. </li><br><br>                                <li class="li">Achieves a live camera preview use case.</li><br><br>                                <li class="li">Allows the postprocessing element to improve the quality.</li><br><br>                                <li class="li">Allows the ML inferencing elements to do inferencing on a live<br>                                    camera.</li><br><br>                            </ul> |
| Buffers | <ul class="ul"><br>                                <li class="li">The same buffers are circulated to the clients (qtiqmmfsrc) and<br>                                    other plugins in the pipeline.</li><br><br>                                <li class="li">The buffer pools manage the buffers to avoid per-frame<br>                                    allocation.</li><br><br>                            </ul> |

### Related information

[Camera use cases](https://docs.qualcomm.com/doc/80-70022-50/topic/camera.html)

## Video architecture

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

The [v4l2h264enc](https://docs.qualcomm.com/doc/80-70022-50/topic/v4l2h264enc.html) and [v4l2h265enc](https://docs.qualcomm.com/doc/80-70022-50/topic/v4l2h265enc.html) video encode
        plugins connect with the camera plugin to implement the advance video encode (H.264 or
        H.265) use cases. The [v4l2h264dec](https://docs.qualcomm.com/doc/80-70022-50/topic/v4l2h264dec.html) and [v4l2h265dec](https://docs.qualcomm.com/doc/80-70022-50/topic/v4l2h265dec.html)
        video decode plugins connect with Waylandsink to implement the video playback use
        cases.

### Encode

The following figure shows the architecture for video encoding. The v4l2h264enc and
                v4l2h265enc plugins are connected to a file multiplexer (MP4 or MPEGTS) to save the
                encode bitstream to the file system.

For video encode use cases, see [Video encode and decode](https://docs.qualcomm.com/doc/80-70022-50/topic/camera-and-video-encode.html).

Figure : Video encode pipeline
                
                <?xml version="1.0" encoding="UTF-8"?>
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" width="801.137008666992188" height="536" viewbox="0 0 801.137008666992188 536">
  <g>
    <rect x=".500045776367188" y=".49993896484375" width="800.13671875" height="535" rx="7.499999999999986" ry="7.499999999999986" style="fill: #fafafa;"></rect>
    <path d="M793.137008666992188,1c3.85980224609375,0,7,3.140197753907159,7,7v520c0,3.85980224609375-3.14019775390625,7-7,7H8c-3.85980224609375,0-7-3.14019775390625-7-7V8c0-3.859802246092841,3.14019775390625-7,7-7h785.137008666992188M793.137008666992188,0H8C3.581794738769531,0,0,3.581695556640625,0,8v520c0,4.41827392578125,3.581794738769531,8,8,8h785.137008666992188c4.418212890625,0,8-3.58172607421875,8-8V8c0-4.418304443359375-3.581787109375-8-8-8h0Z" style="fill: #d2d7e1;"></path>
  </g>
  <text transform="translate(370.173934936523438 32.459850311279297)" style="font-family: Roboto-Bold, Roboto; font-size: 16px; font-weight: 700;"><tspan x="0" y="0">GST BIN</tspan></text>
  <g>
    <rect x="65.000025318178814" y="50.679646581717861" width="160" height="50" rx="4" ry="4" style="fill: #2a2aea;"></rect>
    <text transform="translate(112.632884979248047 79.186355590820312)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">qmmfsrc</tspan></text>
  </g>
  <g>
    <rect x="250.569349036696622" y="50.679646581717861" width="159.999999999999091" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
    <text transform="translate(310.225387573242188 70.755222320556641)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Video</tspan><tspan x="-5.80859375" y="19.2001953125">encode</tspan></text>
  </g>
  <g>
    <rect x="435.569349036695712" y="50.679646581717861" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
    <text transform="translate(473.913375854492188 70.755222320556641)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">H264/H265</tspan><tspan x="21.74609375" y="19.2001953125">parse</tspan></text>
  </g>
  <g>
    <rect x="621.136968090053415" y="50.679646581717861" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
    <text transform="translate(673.207565307617188 70.755222320556641)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Filemux</tspan><tspan x="-36.88671875" y="19.2001953125">(MP4 or MPEGTS)</tspan></text>
  </g>
  <g>
    <line x1="225.000022888183594" y1="75.679641723632812" x2="244.976661682128906" y2="75.679641723632812" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
    <polygon points="243.955368041992188 79.170074462890625 250.000022888183594 75.679641723632812 243.955368041992188 72.189208984375 243.955368041992188 79.170074462890625"></polygon>
  </g>
  <g>
    <line x1="410.569351196289062" y1="75.679641723632812" x2="430.545974731445312" y2="75.679641723632812" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
    <polygon points="429.524703979492188 79.170074462890625 435.569351196289062 75.679641723632812 429.524703979492188 72.189208984375 429.524703979492188 79.170074462890625"></polygon>
  </g>
  <g>
    <line x1="595.000015258789062" y1="75.679641723632812" x2="614.976669311523438" y2="75.679641723632812" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
    <polygon points="613.955368041992188 79.170074462890625 620.000015258789062 75.679641723632812 613.955368041992188 72.189208984375 613.955368041992188 79.170074462890625"></polygon>
  </g>
  <g>
    <rect x="65.000025318178814" y="430.368717492359792" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
    <text transform="translate(95.171924591064453 458.87542724609375)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Camera driver</tspan></text>
  </g>
  <line x1=".569349036696622" y1="125.679646581717861" x2="800.644458297983874" y2="125.679646581717861" style="fill: #fafafa; stroke: #d2d7e1; stroke-miterlimit: 10;"></line>
  <g>
    <text transform="translate(79.249893188476562 179.27020263671875)" style="font-family: Roboto-Bold, Roboto; font-size: 16px; font-weight: 700;"><tspan x="0" y="0">LE camera service</tspan></text>
    <rect x="20.000025318178814" y="152.994927206222201" width="250" height="225.373790286141229" rx="4" ry="4" style="fill: none; stroke: #4d4d4d; stroke-miterlimit: 10; stroke-width: 2px;"></rect>
    <rect x="35.000025318178814" y="193.368717492358883" width="220" height="50.000000000000909" rx="4" ry="4" style="fill: #007884;"></rect>
    <text transform="translate(60.547035217285156 221.87542724609375)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Unix domain socket IPC</tspan></text>
    <rect x="35.000025318178814" y="313.368717492361611" width="220" height="50.000000000001819" rx="4" ry="4" style="fill: #2a2aea;"></rect>
    <text transform="translate(124.465003967285156 341.87542724609375)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Camx</tspan></text>
    <rect x="35.000025318178814" y="253.368717492359792" width="105" height="50.000000000001819" rx="4.000000000000001" ry="4.000000000000001" style="fill: #007884;"></rect>
    <text transform="translate(59.633026123046875 273.44464111328125)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Camera</tspan><tspan x=".60546875" y="19.2001953125">adapter</tspan></text>
    <rect x="150.000025318178814" y="253.368717492359792" width="105" height="50.000000000001819" rx="3.999999999999999" ry="3.999999999999999" style="fill: #007884;"></rect>
    <text transform="translate(180.609586715698242 273.4442138671875)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Buffer</tspan><tspan x="-9.671875" y="19.2001953125">manager</tspan></text>
  </g>
  <line x1=".569349036696622" y1="403.368717492361611" x2="800.74969328251791" y2="403.368717492361611" style="fill: #fafafa; stroke: #d2d7e1; stroke-miterlimit: 10;"></line>
  <g>
    <line x1="145.000025318178814" y1="379.654273460884724" x2="145.000025318178814" y2="429.654273460884724" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 3px;"></line>
    <g>
      <line x1="145.000024795532227" y1="379.654296875" x2="145.000024795532227" y2="382.654296875" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <line x1="145.000024795532227" y1="385.404296875" x2="145.000024795532227" y2="392.279296875" style="fill: none; stroke: #000; stroke-dasharray: 5.5 2.75; stroke-miterlimit: 10;"></line>
      <line x1="145.000024795532227" y1="393.654296875" x2="145.000024795532227" y2="425.279296875" style="fill: none; stroke: #000; stroke-dasharray: 5.5 2.75 5.5 2.75; stroke-miterlimit: 10;"></line>
      <line x1="145.000024795532227" y1="426.654296875" x2="145.000024795532227" y2="429.654296875" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
    </g>
  </g>
  <g>
    <rect x="250.569349036696622" y="430.368717492359792" width="159.999999999999091" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
    <text transform="translate(295.788116455078125 458.87542724609375)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">v42ldriver</tspan></text>
  </g>
  <g>
    <line x1="145.000025318178814" y1="102.176543648050938" x2="145.000025318178814" y2="151.176543648050938" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 3px;"></line>
    <g>
      <line x1="145.000024795532227" y1="107.917541503907159" x2="145.000024795532227" y2="145.435546875" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="141.010961532592773 109.084716796875 145.000024795532227 102.176544189453125 148.989089965820312 109.084716796875 141.010961532592773 109.084716796875"></polygon>
      <polygon points="141.010961532592773 144.268371582032159 145.000024795532227 151.176544189453125 148.989089965820312 144.268371582032159 141.010961532592773 144.268371582032159"></polygon>
    </g>
  </g>
  <g>
    <line x1="330.569349036696622" y1="102.176543648050938" x2="330.569349036696622" y2="429.654273460884724" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 3px;"></line>
    <g>
      <line x1="330.569351196289062" y1="107.917541503907159" x2="330.569351196289062" y2="423.91326904296875" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="326.580291748046875 109.084716796875 330.569351196289062 102.176544189453125 334.55841064453125 109.084716796875 326.580291748046875 109.084716796875"></polygon>
      <polygon points="326.580291748046875 422.74609375 330.569351196289062 429.654296875 334.55841064453125 422.74609375 326.580291748046875 422.74609375"></polygon>
    </g>
  </g>
  <g>
    <g>
      <text transform="translate(601.018356323242188 512.091480255126953)" style="font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">Qualcomm </tspan></text>
      <rect x="580.767356853091769" y="500" width="16" height="16" rx="2" ry="2" style="fill: #2a2aea;"></rect>
    </g>
    <g>
      <text transform="translate(699.600143432617188 512.091480255126953)" style="font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">Open source</tspan></text>
      <rect x="679.349138265950387" y="500" width="16" height="16" rx="2" ry="2" style="fill: #007884;"></rect>
    </g>
  </g>
</svg>

Table : Video encode components

| Components | Description |
| --- | --- |
| qtiqmmfsrc | Captures and provides several video streams in parallel. For more<br>                                information about the camera service, see [Camera architecture](https://docs.qualcomm.com/doc/80-70022-50/topic/architecture.html#camera). |
| Video encode plugins | Uses the V4L2 driver and APIs to encode the video stream. <ul class="ul" id="video__ul_yz1_5jx_rbc"><br>                                    <li class="li"><a href="https://docs.qualcomm.com/doc/80-70022-50/topic/v4l2h264enc.html">v4l2h264enc</a>: Encodes the video for AVC<br>                                        (H.264) format.</li><br><br>                                    <li class="li"><a href="https://docs.qualcomm.com/doc/80-70022-50/topic/v4l2h265enc.html">v4l2h265enc</a>: Encodes the video for HEVC<br>                                        (H.265) format.</li><br><br>                                </ul> |
| H.264/H.265 parse | Parses the video stream. |
| Filemux | Multiplexes encoded video stream and saves to a file. |

### Decode

The following figure shows the architecture for video decoding where the video stream
                from a file is demultiplexed, decoded, and displayed on a local device.

The decode parameters are exposed as a property to the application to provide control
                over the video decode pipeline.

Figure : Video decode pipeline
                
                <?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="760" height="504.170181274414062" viewbox="0 0 760 504.170181274414062">
  <g id="Layer_1" data-name="Layer 1">
    <g>
      <rect x=".4998779296875" y=".499954223632812" width="759" height="503.169921875" rx="7.499999999999999" ry="7.499999999999999" style="fill: #fafafa;"></rect>
      <path d="M752,1c3.85980224609375,0,7,3.14019775390625,7,7v488.170181274414062c0,3.85980224609375-3.14019775390625,7-7,7H8c-3.85980224609375,0-7-3.14019775390625-7-7V8c0-3.85980224609375,3.14019775390625-7,7-7h744M752,0H8C3.581703186035156,0,0,3.581695556640625,0,8v488.170181274414062c0,4.4183349609375,3.581703186035156,8,8,8h744c4.41827392578125,0,8-3.5816650390625,8-8V8c0-4.418304443359375-3.58172607421875-8-8-8h0Z" style="fill: #d2d7e1;"></path>
    </g>
    <line x1="-.492540309632204" y1="131.679661840507833" x2="759.507459690368705" y2="131.679661840507833" style="fill: #fafafa; stroke: #d2d7e1; stroke-miterlimit: 10;"></line>
    <line x1="-.000030517561754" y1="384.078176130989959" x2="759.999969482438246" y2="384.078176130989959" style="fill: #fafafa; stroke: #d2d7e1; stroke-miterlimit: 10;"></line>
    <text transform="translate(349.605072021484375 32.459865570068359)" style="font-family: Roboto-Bold, Roboto; font-size: 16px; font-weight: 700;"><tspan x="0" y="0">GST BIN</tspan></text>
    <rect x="21.931498096499126" y="50.679661840506924" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
    <text transform="translate(78.369045257568359 79.186370849609375)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Filesrc</tspan></text>
    <rect x="207.500821815016934" y="50.679661840506924" width="159.999999999999091" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
    <text transform="translate(235.7154541015625 80.355354309082031)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Stream demux</tspan></text>
    <rect x="392.500821815016025" y="50.679661840506924" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
    <text transform="translate(423.9268798828125 80.355354309082031)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Video decode</tspan></text>
    <rect x="578.068440868373727" y="50.679661840506924" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
    <text transform="translate(613.0804443359375 80.355354309082031)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Waylandsink</tspan></text>
    <g>
      <line x1="181.931495666503906" y1="75.679656982421875" x2="201.908134460449219" y2="75.679656982421875" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="200.8868408203125 79.170089721679688 206.931495666503906 75.679656982421875 200.8868408203125 72.189224243164062 200.8868408203125 79.170089721679688"></polygon>
    </g>
    <g>
      <line x1="367.500823974609375" y1="75.679656982421875" x2="387.477447509765625" y2="75.679656982421875" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="386.4561767578125 79.170089721679688 392.500823974609375 75.679656982421875 386.4561767578125 72.189224243164062 386.4561767578125 79.170089721679688"></polygon>
    </g>
    <g>
      <line x1="551.931488037109375" y1="75.679656982421875" x2="571.90814208984375" y2="75.679656982421875" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="570.8868408203125 79.170089721679688 576.931488037109375 75.679656982421875 570.8868408203125 72.189224243164062 570.8868408203125 79.170089721679688"></polygon>
    </g>
    <rect x="392.500821815016025" y="406.368732751148855" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
    <text transform="translate(434.5242919921875 434.875442504882812)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">V4l2 driver</tspan></text>
    <g>
      <line x1="658.068440868373727" y1="373.6669752800899" x2="658.068440868373727" y2="405.654288719673787" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 3px;"></line>
      <g>
        <line x1="658.06842041015625" y1="373.666976928710938" x2="658.06842041015625" y2="376.666946411132812" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <line x1="658.06842041015625" y1="379.265701293945312" x2="658.06842041015625" y2="385.762527465820312" style="fill: none; stroke: #000; stroke-dasharray: 5.197462558746338 2.598731279373169; stroke-miterlimit: 10;"></line>
        <line x1="658.06842041015625" y1="387.061904907226562" x2="658.06842041015625" y2="401.354934692382812" style="fill: none; stroke: #000; stroke-dasharray: 5.197462558746338 2.598731279373169 5.197462558746338 2.598731279373169; stroke-miterlimit: 10;"></line>
        <line x1="658.06842041015625" y1="402.654312133789062" x2="658.06842041015625" y2="405.654312133789062" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      </g>
    </g>
    <rect x="578.068440868373727" y="406.368732751148855" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
    <text transform="translate(620.8692626953125 434.875442504882812)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">DRM/KMS</tspan></text>
    <rect x="578.068440868373727" y="147.679661840507833" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
    <text transform="translate(631.0177001953125 176.186370849609375)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Weston</tspan></text>
    <rect x="578.068440868373727" y="235.673318560299776" width="160" height="50.000000000000909" rx="4" ry="4" style="fill: #007884;"></rect>
    <text transform="translate(640.9122314453125 264.180023193359375)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">DRM</tspan></text>
    <rect x="578.068440868373727" y="323.6669752800899" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
    <text transform="translate(635.4669189453125 352.173660278320312)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">libdrm</tspan></text>
    <g>
      <line x1="658.068440868373727" y1="101.679661840506924" x2="658.068440868373727" y2="146.679661840507833" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 3px;"></line>
      <g>
        <line x1="658.06842041015625" y1="107.420639038085938" x2="658.06842041015625" y2="140.938674926757812" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="654.07940673828125 108.587844848632812 658.06842041015625 101.679672241210938 662.0574951171875 108.587844848632812 654.07940673828125 108.587844848632812"></polygon>
        <polygon points="654.07940673828125 139.771499633789062 658.06842041015625 146.679672241210938 662.0574951171875 139.771499633789062 654.07940673828125 139.771499633789062"></polygon>
      </g>
    </g>
    <g>
      <line x1="472.500821815016025" y1="101.679661840506924" x2="472.500821815016025" y2="405.654288719673787" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 3px;"></line>
      <g>
        <line x1="472.500823974609375" y1="107.420639038085938" x2="472.500823974609375" y2="399.913284301757812" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="468.511749267578125 108.587844848632812 472.500823974609375 101.679672241210938 476.489898681640625 108.587844848632812 468.511749267578125 108.587844848632812"></polygon>
        <polygon points="468.511749267578125 398.746109008789062 472.500823974609375 405.654312133789062 476.489898681640625 398.746109008789062 468.511749267578125 398.746109008789062"></polygon>
      </g>
    </g>
    <g>
      <line x1="658.068440868373727" y1="198.679661840507833" x2="658.068440868373727" y2="235.6669752800899" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 3px;"></line>
      <g>
        <line x1="658.06842041015625" y1="204.420639038085938" x2="658.06842041015625" y2="229.925979614257812" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="654.07940673828125 205.587844848632812 658.06842041015625 198.679672241210938 662.0574951171875 205.587844848632812 654.07940673828125 205.587844848632812"></polygon>
        <polygon points="654.07940673828125 228.758804321289062 658.06842041015625 235.666976928710938 662.0574951171875 228.758804321289062 654.07940673828125 228.758804321289062"></polygon>
      </g>
    </g>
    <g>
      <line x1="658.068440868373727" y1="286.176490200406988" x2="658.068440868373727" y2="323.163803639989055" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 3px;"></line>
      <g>
        <line x1="658.06842041015625" y1="291.917467397983273" x2="658.06842041015625" y2="317.422807974155148" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="654.07940673828125 293.084673208530148 658.06842041015625 286.176500601108273 662.0574951171875 293.084673208530148 654.07940673828125 293.084673208530148"></polygon>
        <polygon points="654.07940673828125 316.255632681186398 658.06842041015625 323.163805288608273 662.0574951171875 316.255632681186398 654.07940673828125 316.255632681186398"></polygon>
      </g>
    </g>
  </g>
  <g id="Layer_2" data-name="Layer 2">
    <g>
      <text transform="translate(658.068359375 484.091487884521484)" style="font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">Open source</tspan></text>
      <rect x="637.817329610534216" y="472.000015258789062" width="16" height="16" rx="2" ry="2" style="fill: #007884;"></rect>
    </g>
  </g>
</svg>

For video decode use cases, see [Video playback use cases](https://docs.qualcomm.com/doc/80-70022-50/topic/video-playback-use-cases.html).

Table : Video decode components

| Components | Description |
| --- | --- |
| Video decode plugins | Uses the V4L2 driver and APIs to decode the video stream and<br>                                connects with the Waylandsink plugin. <ul class="ul" id="video__ul_brg_w4y_rbc"><br>                                    <li class="li"><a href="https://docs.qualcomm.com/doc/80-70022-50/topic/v4l2h264dec.html">v4l2h264dec</a>: Decodes the video for AVC<br>                                        (H.264) format.</li><br><br>                                    <li class="li"><a href="https://docs.qualcomm.com/doc/80-70022-50/topic/v4l2h265dec.html">v4l2h265dec</a>: Decodes the video for HEVC<br>                                        (H.265) format.</li><br><br>                                </ul> |
| Waylandsink | <ol class="ol" id="video__ol_xzc_spy_rbc"><br>                                    <li class="li"> Receives the GBM buffers (decoded buffers) as an<br>                                        input.</li><br><br>                                    <li class="li">Sends them to the Weston server (through Wayland protocol)<br>                                        for display composition.</li><br><br>                                </ol> |

## Audio architecture

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

For audio capture and playback, use the [pulsesrc](https://docs.qualcomm.com/doc/80-70022-50/topic/pulsesrc.html) and [pulsesink](https://docs.qualcomm.com/doc/80-70022-50/topic/pulsesink.html) GStreamer plugins. You can encode and decode audio through an
        open-source software.

### Capture

The following figure shows the audio capture using the pulsesrc plugin. The audio
                stream is then processed and written to a file.

Figure : Audio capture pipeline
                
                <?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="570.569297790527344" height="346.921279907226562" viewbox="0 0 570.569297790527344 346.921279907226562">
  <g id="Layer_1" data-name="Layer 1">
    <g>
      <rect x=".499900817871094" y=".499893188476562" width="569.5693359375" height="345.92138671875" rx="7.500000000000001" ry="7.500000000000001" style="fill: #fafafa;"></rect>
      <path d="M562.569297790527344,1c3.859771728515625,0,7,3.140213012695312,7,7v330.921279907226562c0,3.85980224609375-3.140228271484375,7-7,7H8c-3.859786987304688,0-7-3.14019775390625-7-7V8c0-3.859786987304688,3.140213012695312-7,7-7h554.569297790527344M562.569297790527344,0H8C3.581718444824219,0,0,3.581787109375,0,8v330.921279907226562c0,4.41839599609375,3.581718444824219,8,8,8h554.569297790527344c4.41827392578125,0,8-3.58160400390625,8-8V8c0-4.418212890625-3.58172607421875-8-8-8h0Z" style="fill: #d2d7e1;"></path>
    </g>
    <line x1=".338422094058842" y1="131.416453407779954" x2="569.911409295815247" y2="131.416453407779954" style="fill: #fafafa; stroke: #d2d7e1; stroke-miterlimit: 10;"></line>
    <line x1=".395932317146617" y1="244.637014256661132" x2="569.899786678079181" y2="244.637014256661132" style="fill: #fafafa; stroke: #d2d7e1; stroke-miterlimit: 10;"></line>
    <text transform="translate(254.890094757080078 31.381191253662109)" style="font-family: Roboto-Bold, Roboto; font-size: 16px; font-weight: 700;"><tspan x="0" y="0">GST BIN</tspan></text>
    <rect x="20.000023707712899" y="49.600987524100674" width="160" height="50" rx="4.000000000000003" ry="4.000000000000003" style="fill: #007884;"></rect>
    <text transform="translate(69.218818664550781 78.107696533203125)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Pulsesrc</tspan></text>
    <rect x="205.569347426230706" y="49.600987524100674" width="159.999999999999091" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
    <text transform="translate(268.330848693847656 79.276679992675781)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">PCM</tspan></text>
    <rect x="390.569347426229797" y="49.600987524100674" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
    <text transform="translate(445.136039733886719 79.276679992675781)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">filesink</tspan></text>
    <g>
      <line x1="180.000022888183594" y1="74.600982666015625" x2="199.976661682128906" y2="74.600982666015625" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="198.955368041992188 78.091415405273438 205.000022888184503 74.600982666015625 198.955368041992188 71.110549926757812 198.955368041992188 78.091415405273438"></polygon>
    </g>
    <g>
      <line x1="365.569358825684503" y1="74.600982666015625" x2="385.545982360839844" y2="74.600982666015625" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="384.524681091308594 78.091415405273438 390.569358825683594 74.600982666015625 384.524681091308594 71.110549926757812 384.524681091308594 78.091415405273438"></polygon>
    </g>
    <rect x="20.000023707712899" y="277.290058434742605" width="160" height="50" rx="4.000000000000003" ry="4.000000000000003" style="fill: #007884;"></rect>
    <text transform="translate(80.51177978515625 305.796768188476562)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">ALSA</tspan></text>
    <rect x="20.000023707712899" y="163.445522979422094" width="160" height="50" rx="4.000000000000003" ry="4.000000000000003" style="fill: #007884;"></rect>
    <text transform="translate(59.593818664550781 183.520904541015625)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">PulseAudio</tspan><tspan x="18.515625" y="19.2001953125">server</tspan></text>
    <g>
      <line x1="100.000023707712899" y1="100.600987524100674" x2="100.000023707712899" y2="162.231919291455597" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 3px;"></line>
      <g>
        <line x1="100.000022888183594" y1="106.341964721679688" x2="100.000022888183594" y2="156.490921020507812" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="96.010959625244141 107.509170532226562 100.000022888183594 100.600997924804688 103.98908805847168 107.509170532226562 96.010959625244141 107.509170532226562"></polygon>
        <polygon points="96.010959625244141 155.323745727539972 100.000022888183594 162.231918334960938 103.98908805847168 155.323745727539972 96.010959625244141 155.323745727539972"></polygon>
      </g>
    </g>
    <g>
      <line x1="99.59851317218272" y1="213.445514256662136" x2="99.59851317218272" y2="275.828514256660128" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 3px;"></line>
      <g>
        <line x1="99.598512649536133" y1="213.445510864257812" x2="99.598512649536133" y2="216.445510864257812" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <line x1="99.598512649536133" y1="219.008377075195312" x2="99.598512649536133" y2="225.415542602539972" style="fill: none; stroke: #000; stroke-dasharray: 5.12572717666626 2.56286358833313; stroke-miterlimit: 10;"></line>
        <line x1="99.598512649536133" y1="226.696975708007812" x2="99.598512649536133" y2="271.547073364257812" style="fill: none; stroke: #000; stroke-dasharray: 5.12572717666626 2.56286358833313 5.12572717666626 2.56286358833313; stroke-miterlimit: 10;"></line>
        <line x1="99.598512649536133" y1="272.828506469726562" x2="99.598512649536133" y2="275.828506469726562" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      </g>
    </g>
  </g>
  <g id="Layer_2" data-name="Layer 2">
    <g>
      <text transform="translate(473.612510681152344 333.881973266601562)" style="font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">Open source</tspan></text>
      <rect x="453.361453545454424" y="321.790502627916794" width="16" height="16" rx="2" ry="2" style="fill: #007884;"></rect>
    </g>
  </g>
</svg>

Table : Audio capture components

| Component | Description |
| --- | --- |
| Pulsesrc | <ul class="ul" id="audio__ul_xcf_2ry_rbc"><br>                                    <li class="li">Captures the audio and shares it with the underlying<br>                                        PulseAudio server.</li><br><br>                                    <li class="li">Sets the audio source from which the pulse-code modulation<br>                                        (PCM) audio samples are captured.</li><br><br>                                    <li class="li">Saves the PCM samples to a file.</li><br><br>                                </ul> |
| PulseAudio server | <ul class="ul" id="audio__ul_lfh_vqy_rbc"><br>                                    <li class="li">Interacts with the Qualcomm hardware.</li><br><br>                                    <li class="li">Uses a pluggable module to interact with the ALSA driver to<br>                                        process the audio data.</li><br><br>                                </ul> |

### Playback

Use the pulsesink plugin for audio playback. It's an upstream plugin that allows you
                to play audio from various audio sources (live source or an encoded audio file).

Figure : Audio playback pipeline
                
                <?xml version="1.0" encoding="UTF-8"?>
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" width="570.569282531738281" height="380.955993652342841" viewbox="0 0 570.569282531738281 380.955993652342841">
  <g>
    <rect x=".499855041503906" y=".500122070311591" width="569.5693359375" height="379.95556640625" rx="7.500000000000001" ry="7.500000000000001" style="fill: #fafafa;"></rect>
    <path d="M562.569282531738281,1c3.85980224609375,0,7,3.140213012694403,7,7v364.955993652342841c0,3.85980224609375-3.14019775390625,7-7,7H8c-3.859786987304688,0-7-3.14019775390625-7-7V8c0-3.859786987305597,3.140213012695312-7,7-7h554.569282531738281M562.569282531738281,0H8C3.581718444824219,0,0,3.581710815428778,0,8v364.955993652342841c0,4.41827392578125,3.581718444824219,8,8,8h554.569282531738281c4.418304443359375,0,8-3.58172607421875,8-8V8c0-4.418289184571222-3.581695556640625-8-8-8h0Z" style="fill: #d2d7e1;"></path>
  </g>
  <line x1="-.000022068654289" y1="132.860191017041871" x2="570.569301649862609" y2="132.860191017041871" style="fill: #fafafa; stroke: #d2d7e1; stroke-miterlimit: 10;"></line>
  <line x1="-.000022068654289" y1="250.810009673757122" x2="570.569301649862609" y2="250.810009673757122" style="fill: #fafafa; stroke: #d2d7e1; stroke-miterlimit: 10;"></line>
  <text transform="translate(254.890048980712891 31.245677947997137)" style="font-family: Roboto-Bold, Roboto; font-size: 16px; font-weight: 700;"><tspan x="0" y="0">GST BIN</tspan></text>
  <g>
    <rect x="19.999977931345711" y="49.465474218435702" width="160" height="50" rx="4.000000000000003" ry="4.000000000000003" style="fill: #007884;"></rect>
    <text transform="translate(78.082054138183594 77.972183227538153)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">filesrc</tspan></text>
  </g>
  <g>
    <rect x="205.569301649863519" y="49.465474218435702" width="159.999999999999091" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
    <text transform="translate(268.330802917480469 79.141166687010809)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">PCM</tspan></text>
  </g>
  <g>
    <rect x="390.569301649862609" y="49.465474218435702" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
    <text transform="translate(436.272712707519531 79.141166687010809)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Pulsesink</tspan></text>
  </g>
  <g>
    <line x1="179.999977111816406" y1="74.465469360350653" x2="199.976615905761719" y2="74.465469360350653" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
    <polygon points="198.955322265625 77.955902099608466 204.999977111817316 74.465469360350653 198.955322265625 70.975036621092841 198.955322265625 77.955902099608466"></polygon>
  </g>
  <g>
    <line x1="365.569313049317316" y1="74.465469360350653" x2="385.545936584472656" y2="74.465469360350653" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
    <polygon points="384.524635314941406 77.955902099608466 390.569313049316406 74.465469360350653 384.524635314941406 70.975036621092841 384.524635314941406 77.955902099608466"></polygon>
  </g>
  <g>
    <rect x="390.569301649862609" y="285.365111531867115" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
    <text transform="translate(451.081062316894531 313.871826171874091)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">ALSA</tspan></text>
  </g>
  <g>
    <rect x="390.569301649862609" y="166.25490781564713" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
    <text transform="translate(430.163093566894531 186.330291748045966)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">PulseAudio</tspan><tspan x="18.515625" y="19.2001953125">server</tspan></text>
  </g>
  <g>
    <line x1="470.569301649862609" y1="99.860191017041871" x2="470.569301649862609" y2="165.860191017041871" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 3px;"></line>
    <g>
      <line x1="470.569313049316406" y1="105.601165771483466" x2="470.569313049316406" y2="160.119201660155341" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="466.580238342285156 106.768371582030341 470.569313049316406 99.860198974608466 474.558357238769531 106.768371582030341 466.580238342285156 106.768371582030341"></polygon>
      <polygon points="466.580238342285156 158.952026367186591 470.569313049316406 165.860198974608466 474.558357238769531 158.952026367186591 466.580238342285156 158.952026367186591"></polygon>
    </g>
  </g>
  <g>
    <line x1="470.569301649862609" y1="217.810009673757122" x2="470.569301649862609" y2="283.810009673757122" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 3px;"></line>
    <g>
      <line x1="470.569313049316406" y1="217.809997558592841" x2="470.569313049316406" y2="220.809997558592841" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <line x1="470.569313049316406" y1="223.537292480467841" x2="470.569313049316406" y2="230.35546875" style="fill: none; stroke: #000; stroke-dasharray: 5.454545497894287 2.727272748947144; stroke-miterlimit: 10;"></line>
      <line x1="470.569313049316406" y1="231.719085693358466" x2="470.569313049316406" y2="279.446380615233466" style="fill: none; stroke: #000; stroke-dasharray: 5.454545497894287 2.727272748947144 5.454545497894287 2.727272748947144; stroke-miterlimit: 10;"></line>
      <line x1="470.569313049316406" y1="280.809997558592841" x2="470.569313049316406" y2="283.809997558592841" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
    </g>
  </g>
  <g>
    <text transform="translate(470.569252014160156 362.448287963866278)" style="font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">Open source</tspan></text>
    <rect x="450.318190392023098" y="350.356811523436591" width="16" height="16" rx="2" ry="2" style="fill: #007884;"></rect>
  </g>
</svg>

Table : Audio playback components

| Component | Description |
| --- | --- |
| Pulsesink | <ul class="ul" id="audio__ul_v3g_msy_rbc"><br>                                    <li class="li">Interacts with the underlying PulseAudio server.</li><br><br>                                    <li class="li">Sets the audio playback sink on which the audio is<br>                                        played.</li><br><br>                                    <li class="li">Plays only the PCM data.</li><br><br>                                </ul> |
| PulseAudio server | <ul class="ul" id="audio__ul_ohn_lsy_rbc"><br>                                    <li class="li">Interacts with the Qualcomm hardware.</li><br><br>                                    <li class="li">Uses a pluggable module to interact with the ALSA driver to<br>                                        process the audio data for playback.</li><br><br>                                </ul> |

### Encode

You can encode the audio using an open-source audio encoder plugin.
Figure : Audio encoding pipeline
                    
                    <?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="756.1458740234375" height="372.862380981445312" viewbox="0 0 756.1458740234375 372.862380981445312">
  <g id="Layer_1" data-name="Layer 1">
    <g>
      <rect x=".500244140625" y=".500076293945312" width="755.1455078125" height="371.8623046875" rx="7.5" ry="7.5" style="fill: #fafafa;"></rect>
      <path d="M748.1458740234375,1c3.85980224609375,0,7,3.14019775390625,7,7v356.862380981445312c0,3.85980224609375-3.14019775390625,7-7,7H8c-3.85980224609375,0-7-3.14019775390625-7-7V8c0-3.85980224609375,3.14019775390625-7,7-7h740.1458740234375M748.1458740234375,0H8C3.581794738769531,0,0,3.581695556640625,0,8v356.862380981445312c0,4.4183349609375,3.581794738769531,8,8,8h740.1458740234375c4.4183349609375,0,8-3.5816650390625,8-8V8c0-4.418304443359375-3.5816650390625-8-8-8h0Z" style="fill: #d2d7e1;"></path>
    </g>
    <line x1=".000030633283131" y1="133.716674974017224" x2="756.145955516811227" y2="133.716674974017224" style="fill: #fafafa; stroke: #d2d7e1; stroke-miterlimit: 10;"></line>
    <line x1=".000030633283131" y1="251.599666251255258" x2="756.1458740234375" y2="251.599666251255258" style="fill: #fafafa; stroke: #d2d7e1; stroke-miterlimit: 10;"></line>
    <text transform="translate(347.678665161132812 31.536159515380859)" style="font-family: Roboto-Bold, Roboto; font-size: 16px; font-weight: 700;"><tspan x="0" y="0">GST BIN</tspan></text>
    <g>
      <rect x="20.009012744936626" y="49.755955785819424" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
      <text transform="translate(69.227809906005859 78.262664794921875)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Pulsesrc</tspan></text>
    </g>
    <g>
      <rect x="205.578336463454434" y="49.755955785819424" width="159.999999999999091" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
      <text transform="translate(236.80078125 79.431648254394531)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Audio encode</tspan></text>
    </g>
    <g>
      <rect x="390.578336463453525" y="49.755955785819424" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
      <text transform="translate(450.10986328125 79.431648254394531)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Parse</tspan></text>
    </g>
    <g>
      <rect x="576.145955516811227" y="49.755955785819424" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
      <text transform="translate(628.243896484375 69.831573486328125)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">FileMux</tspan><tspan x="-36.9140625" y="19.2001953125">(MP4 or MPEGTS)</tspan></text>
    </g>
    <g>
      <line x1="180.009010314941406" y1="74.755950927734375" x2="199.985649108886719" y2="74.755950927734375" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="198.96435546875 78.246383666992188 205.009010314941406 74.755950927734375 198.96435546875 71.265518188476562 198.96435546875 78.246383666992188"></polygon>
    </g>
    <g>
      <line x1="365.578338623046875" y1="74.755950927734375" x2="384.554962158203125" y2="74.755950927734375" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="383.53369140625 78.246383666992188 389.578338623046875 74.755950927734375 383.53369140625 71.265518188476562 383.53369140625 78.246383666992188"></polygon>
    </g>
    <g>
      <line x1="550.009002685546875" y1="74.755950927734375" x2="569.98565673828125" y2="74.755950927734375" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="568.96435546875 78.246383666992188 575.009002685546875 74.755950927734375 568.96435546875 71.265518188476562 568.96435546875 78.246383666992188"></polygon>
    </g>
    <g>
      <rect x="20.009012744936626" y="286.521938340296401" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
      <text transform="translate(80.520767211914062 315.028640747070312)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">ALSA</tspan></text>
    </g>
    <g>
      <rect x="20.009012744936626" y="168.138947063058367" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
      <text transform="translate(59.602798461914062 188.214324951171875)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">PulseAudio</tspan><tspan x="18.515625" y="19.2001953125">server</tspan></text>
    </g>
    <g>
      <line x1="100.009012744936626" y1="100.755955785819424" x2="100.009012744936626" y2="166.677394162215023" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 3px;"></line>
      <g>
        <line x1="100.009012222290039" y1="106.496932983398438" x2="100.009012222290039" y2="160.936416625976562" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="96.019948959350586 107.664138793945312 100.009012222290039 100.755966186523438 103.998077392578125 107.664138793945312 96.019948959350586 107.664138793945312"></polygon>
        <polygon points="96.019948959350586 159.769210815429688 100.009012222290039 166.677383422851562 103.998077392578125 159.769210815429688 96.019948959350586 159.769210815429688"></polygon>
      </g>
    </g>
    <g>
      <rect x="205.578336463454434" y="168.138947063058367" width="159.999999999999091" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
      <text transform="translate(253.570571899414062 188.214324951171875)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Software</tspan><tspan x="-.75" y="19.2001953125">encoding</tspan></text>
    </g>
    <g>
      <line x1="285.578336463454434" y1="100.755955785819424" x2="285.578336463454434" y2="166.677394162215023" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 3px;"></line>
      <g>
        <line x1="285.578338623046875" y1="106.496932983398438" x2="285.578338623046875" y2="160.936416625976562" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="281.589279174804688 107.664138793945312 285.578338623046875 100.755966186523438 289.567398071289062 107.664138793945312 281.589279174804688 107.664138793945312"></polygon>
        <polygon points="281.589279174804688 159.769210815429688 285.578338623046875 166.677383422851562 289.567398071289062 159.769210815429688 281.589279174804688 159.769210815429688"></polygon>
      </g>
    </g>
  </g>
  <g id="Layer_2" data-name="Layer 2">
    <g>
      <line x1="100.009012744936626" y1="218.138938340298409" x2="100.009012744936626" y2="285.060394162213925" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 3px;"></line>
      <g>
        <line x1="100.009012222290039" y1="218.138931274414062" x2="100.009012222290039" y2="221.138931274414062" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <line x1="100.009012222290039" y1="223.908096313476562" x2="100.009012222290039" y2="230.830978393554688" style="fill: none; stroke: #000; stroke-dasharray: 5.538314342498779 2.76915717124939; stroke-miterlimit: 10;"></line>
        <line x1="100.009012222290039" y1="232.215560913085938" x2="100.009012222290039" y2="280.675827026367188" style="fill: none; stroke: #000; stroke-dasharray: 5.538314342498779 2.76915717124939 5.538314342498779 2.76915717124939; stroke-miterlimit: 10;"></line>
        <line x1="100.009012222290039" y1="282.060379028320312" x2="100.009012222290039" y2="285.060379028320312" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      </g>
    </g>
    <g>
      <text transform="translate(657.65594482421875 352.6134033203125)" style="font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">Open source</tspan></text>
      <rect x="637.404875815618652" y="340.521938340296401" width="16" height="16" rx="2" ry="2" style="fill: #007884;"></rect>
    </g>
  </g>
</svg>

Table : Audio encoding components

| Component | Description |
| --- | --- |
| Pulsesrc | Captures the audio and shares it with the underlying PulseAudio<br>                                server. |
| PulseAudio server | Interacts with the ALSA driver to process the audio data for<br>                                encoding. |
| Encode | Encodes the audio data using an open-source software. |
| Parse | Parses the audio data. |
| Filemux | Multiplexes it and saves it in an MP4 or MPEGTS<br>                                container. |

### Decode

You can decode the audio using an open-source audio decoder plugin.

Figure : Audio decode pipeline
                
                <?xml version="1.0" encoding="UTF-8"?>
<svg id="Layer_1" data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" width="756.137008666992188" height="362.142974853515625" viewbox="0 0 756.137008666992188 362.142974853515625">
  <g>
    <rect x=".500045776367188" y=".500152587890625" width="755.13671875" height="361.142578125" rx="7.499999999999972" ry="7.499999999999972" style="fill: #fafafa;"></rect>
    <path d="M748.137008666992188,1c3.85980224609375,0,7,3.14019775390625,7,7v346.142974853515625c0,3.85980224609375-3.14019775390625,7-7,7H8c-3.85980224609375,0-7-3.14019775390625-7-7V8c0-3.85980224609375,3.14019775390625-7,7-7h740.137008666992188M748.137008666992188,0H8C3.581794738769531,0,0,3.581695556640625,0,8v346.142974853515625c0,4.41845703125,3.581794738769531,8,8,8h740.137008666992188c4.418212890625,0,8-3.58154296875,8-8V8c0-4.418304443359375-3.581787109375-8-8-8h0Z" style="fill: #d2d7e1;"></path>
  </g>
  <line x1=".529207079547632" y1="124.600758642264736" x2="755.48383211377768" y2="124.600758642264736" style="fill: #fafafa; stroke: #d2d7e1; stroke-miterlimit: 10;"></line>
  <line x1=".451850683646626" y1="242.289829552908486" x2="755.327132480670116" y2="242.289829552908486" style="fill: #fafafa; stroke: #d2d7e1; stroke-miterlimit: 10;"></line>
  <text transform="translate(347.673599243164062 31.380962371826172)" style="font-family: Roboto-Bold, Roboto; font-size: 16px; font-weight: 700;"><tspan x="0" y="0">GST BIN</tspan></text>
  <g>
    <rect x="20.000025318178814" y="49.600758642264736" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
    <text transform="translate(78.082103729248047 78.107467651367188)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">filesrc</tspan></text>
  </g>
  <g>
    <rect x="205.569349036696622" y="49.600758642264736" width="159.999999999999091" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
    <text transform="translate(233.783981323242188 79.276451110839844)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Stream demux</tspan></text>
  </g>
  <g>
    <rect x="390.569349036695712" y="49.600758642264736" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
    <text transform="translate(421.694625854492188 79.276451110839844)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Audio decode</tspan></text>
  </g>
  <g>
    <rect x="576.136968090053415" y="49.600758642264736" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
    <text transform="translate(621.839584350585938 79.276481628417969)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Pulsesink</tspan></text>
  </g>
  <g>
    <line x1="180.000022888183594" y1="74.600753784179688" x2="199.976661682128906" y2="74.600753784179688" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
    <polygon points="198.955368041992188 78.0911865234375 205.000022888183594 74.600753784179688 198.955368041992188 71.110321044921875 198.955368041992188 78.0911865234375"></polygon>
  </g>
  <g>
    <line x1="365.569351196289062" y1="74.600753784179688" x2="385.426925659179688" y2="74.600753784179688" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
    <polygon points="384.405624389648438 78.0911865234375 390.450271606445312 74.600753784179688 384.405624389648438 71.110321044921875 384.405624389648438 78.0911865234375"></polygon>
  </g>
  <g>
    <line x1="550.569351196289062" y1="74.600753784179688" x2="570.703964233398438" y2="74.600753784179688" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
    <polygon points="569.682662963867188 78.0911865234375 575.727340698242188 74.600753784179688 569.682662963867188 71.110321044921875 569.682662963867188 78.0911865234375"></polygon>
  </g>
  <g>
    <rect x="390.569349036695712" y="159.445294097586157" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
    <text transform="translate(438.561569213867188 179.520675659179688)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Software</tspan><tspan x="-.75" y="19.2001953125">encoding</tspan></text>
  </g>
  <g>
    <line x1="470.569349036695712" y1="100.802069463868975" x2="470.569349036695712" y2="157.983741196742812" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 3px;"></line>
    <g>
      <line x1="470.569351196289062" y1="106.543060302734375" x2="470.569351196289062" y2="152.242767333984375" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="466.580276489257812 107.710235595704034 470.569351196289062 100.80206298828125 474.558425903320312 107.710235595704034 466.580276489257812 107.710235595704034"></polygon>
      <polygon points="466.580276489257812 151.0755615234375 470.569351196289062 157.983734130859375 474.558425903320312 151.0755615234375 466.580276489257812 151.0755615234375"></polygon>
    </g>
  </g>
  <g>
    <rect x="576.136968090053415" y="269.289829552906667" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
    <text transform="translate(636.648727416992188 297.796539306640625)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">ALSA</tspan></text>
  </g>
  <g>
    <rect x="576.136968090053415" y="159.445294097586157" width="160" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
    <text transform="translate(615.730758666992188 179.520675659179688)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">PulseAudio</tspan><tspan x="18.515625" y="19.2001953125">server</tspan></text>
  </g>
  <g>
    <line x1="656.136968090053415" y1="100.802069463868975" x2="656.136968090053415" y2="157.983741196742812" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 3px;"></line>
    <g>
      <line x1="656.136947631835938" y1="106.543060302734375" x2="656.136947631835938" y2="152.242767333984375" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="652.147933959960938 107.710235595704034 656.136947631835938 100.80206298828125 660.126022338867188 107.710235595704034 652.147933959960938 107.710235595704034"></polygon>
      <polygon points="652.147933959960938 151.0755615234375 656.136947631835938 157.983734130859375 660.126022338867188 151.0755615234375 652.147933959960938 151.0755615234375"></polygon>
    </g>
  </g>
  <g>
    <line x1="656.136968090053415" y1="210.514754856931177" x2="656.136968090053415" y2="267.888880547447116" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 3px;"></line>
    <g>
      <line x1="656.136947631835938" y1="210.514739990234375" x2="656.136947631835938" y2="213.514739990234375" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <line x1="656.136947631835938" y1="216.72564697265625" x2="656.136947631835938" y2="224.752838134765625" style="fill: none; stroke: #000; stroke-dasharray: 6.421765804290771 3.210882902145386; stroke-miterlimit: 10;"></line>
      <line x1="656.136947631835938" y1="226.3582763671875" x2="656.136947631835938" y2="263.283447265625" style="fill: none; stroke: #000; stroke-dasharray: 6.421765804290771 3.210882902145386 6.421765804290771 3.210882902145386; stroke-miterlimit: 10;"></line>
      <line x1="656.136947631835938" y1="264.888885498046875" x2="656.136947631835938" y2="267.888885498046875" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
    </g>
  </g>
  <g>
    <text transform="translate(658.193771362304688 346.381294250488281)" style="font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">Open source</tspan></text>
    <rect x="637.942726573392065" y="334.289829552906667" width="16.000000000001819" height="16" rx="2" ry="2" style="fill: #007884;"></rect>
  </g>
</svg>

Table : Audio decode components

| Component | Description |
| --- | --- |
| Filesrc | Reads the audio data. |
| Stream demux | Demultiplexes the audio data. |
| Decode | Decodes the audio data using an open-source software. |
| Pulsesink | Interacts with the underlying PulseAudio server and plays the<br>                                decoded audio. |
| PulseAudio server | Interacts with the ALSA driver to process the audio data for<br>                                decoding. |

## Machine learning architecture

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

Qualcomm IM SDK supports machine learning use cases that include video preprocessing,
        model inference, output tensor postprocessing, and inference result overlay to
        stream.

The machine learning framework provides the following types of video analytics:

- Image classification
- Object detection
- Image segmentation

With machine learning plugins in the framework, use the following for inferencing:

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

For each of the engines, the delegates speed up the model inference performance.

### ML pipeline processing

The following
            figure depicts the pipeline in which the captured video/audio stream is processed
            among the preprocessing, inference, and postprocessing plugins.

Figure : ML pipeline
                
                <?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="1141.665740966796875" height="637.276298522949219" viewbox="0 0 1141.665740966796875 637.276298522949219">
  <g id="Layer_1" data-name="Layer 1">
    <g>
      <rect x=".499847412109375" y=".499809265136719" width="1140.666015625" height="636.27685546875" rx="7.5" ry="7.5" style="fill: #fafafa;"></rect>
      <path d="M1133.665740966796875,1c3.85980224609375,0,7,3.140144348144531,7,7v621.276298522949219c0,3.85986328125-3.14019775390625,7-7,7H8c-3.85986328125,0-7-3.14013671875-7-7V8c0-3.859855651855469,3.14013671875-7,7-7h1125.665740966796875M1133.665740966796875,0H8C3.58172607421875,0,0,3.581718444824219,0,8v621.276298522949219c0,4.41839599609375,3.58172607421875,8,8,8h1125.665740966796875c4.41827392578125,0,8-3.58160400390625,8-8V8c0-4.418281555175781-3.58172607421875-8-8-8h0Z" style="fill: #d2d7e1;"></path>
    </g>
    <line x1="426.326044014352192" y1="538.89446669890458" x2="1121.287274903226717" y2="538.89446669890458" style="fill: #fafafa; stroke: #d2d7e1; stroke-miterlimit: 10;"></line>
    <text transform="translate(743.601593017578125 207.265220642089844)" style="font-family: Roboto-Bold, Roboto; font-size: 16px; font-weight: 700;"><tspan x="0" y="0">GST BIN</tspan></text>
    <g>
      <rect x="436.036504155730654" y="223.20539578826083" width="140" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
      <text transform="translate(461.751373291015625 244.280975341796875)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Video/Audio</tspan><tspan x="20.0546875" y="19.2001953125">source</tspan></text>
    </g>
    <g>
      <rect x="613.831475444227181" y="223.20539578826083" width="140" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
      <text transform="translate(641.1988525390625 243.281013488769531)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Pre-process</tspan><tspan x="20.94921875" y="19.2001953125">plugin</tspan></text>
    </g>
    <g>
      <rect x="791.626446732721888" y="223.20539578826083" width="140" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
      <text transform="translate(815.200897216796875 243.281013488769531)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">ML inference</tspan><tspan x="24.7421875" y="19.2001953125">plugin</tspan></text>
    </g>
    <g>
      <rect x="969.421418021218415" y="223.20539578826083" width="140" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
      <text transform="translate(992.433074951171875 243.281013488769531)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Post-process</tspan><tspan x="25.3046875" y="19.2001953125">plugin</tspan></text>
    </g>
    <g>
      <line x1="575.1304931640625" y1="248.205406188964844" x2="608.090484619140625" y2="248.205406188964844" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="606.923309326171875 252.194450378417969 613.83148193359375 248.205406188964844 606.923309326171875 244.216331481933594 606.923309326171875 252.194450378417969"></polygon>
    </g>
    <g>
      <line x1="753.83148193359375" y1="248.205406188964844" x2="785.885467529296875" y2="248.205406188964844" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="784.718292236328125 252.194450378417969 791.626434326171875 248.205406188964844 784.718292236328125 244.216331481933594 784.718292236328125 252.194450378417969"></polygon>
    </g>
    <g>
      <line x1="931.626434326171875" y1="248.205406188964844" x2="962.680450439453125" y2="248.205406188964844" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="961.513214111328125 252.194450378417969 968.421417236328125 248.205406188964844 961.513214111328125 244.216331481933594 961.513214111328125 252.194450378417969"></polygon>
    </g>
    <rect x="613.831475444227181" y="565.894466698902761" width="140" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
    <text transform="translate(668.147430419921875 594.401176452636719)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">GPU</tspan></text>
    <g>
      <line x1="861.626446732721888" y1="506.563802293172557" x2="861.626446732721888" y2="565.180022667427693" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 3px;"></line>
      <g>
        <line x1="861.626434326171875" y1="506.563774108886719" x2="861.626434326171875" y2="509.563774108886719" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <line x1="861.626434326171875" y1="512.852287292480469" x2="861.626434326171875" y2="521.073600769042969" style="fill: none; stroke: #000; stroke-dasharray: 6.577027320861816 3.288513660430908; stroke-miterlimit: 10;"></line>
        <line x1="861.626434326171875" y1="522.717887878417969" x2="861.626434326171875" y2="560.535758972167969" style="fill: none; stroke: #000; stroke-dasharray: 6.577027320861816 3.288513660430908 6.577027320861816 3.288513660430908; stroke-miterlimit: 10;"></line>
        <line x1="861.626434326171875" y1="562.180046081542969" x2="861.626434326171875" y2="565.180046081542969" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      </g>
    </g>
    <g>
      <line x1="683.831475444227181" y1="408.20539578826174" x2="683.831475444227181" y2="565.180022667427693" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 3px;"></line>
      <g>
        <line x1="683.83148193359375" y1="408.205406188964844" x2="683.83148193359375" y2="411.205406188964844" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <line x1="683.83148193359375" y1="414.108757019042969" x2="683.83148193359375" y2="421.367149353027344" style="fill: none; stroke: #000; stroke-dasharray: 5.806716442108154 2.903358221054077; stroke-miterlimit: 10;"></line>
        <line x1="683.83148193359375" y1="422.818840026855469" x2="683.83148193359375" y2="560.728324890136719" style="fill: none; stroke: #000; stroke-dasharray: 5.806716442108154 2.903358221054077 5.806716442108154 2.903358221054077; stroke-miterlimit: 10;"></line>
        <line x1="683.83148193359375" y1="562.180046081542969" x2="683.83148193359375" y2="565.180046081542969" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      </g>
    </g>
    <rect x="791.626446732721888" y="565.894466698902761" width="140" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
    <text transform="translate(808.372528076171875 594.401176452636719)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">DSP/GPU/NPU</tspan></text>
    <g>
      <rect x="969.421418021218415" y="358.20539578826174" width="140" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
      <text transform="translate(999.101165771484375 386.712089538574219)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Submodule</tspan></text>
    </g>
    <g>
      <g>
        <rect x="744.598373317216101" y="462.211961529186738" width="72.235834331011574" height="35" rx="4" ry="4" style="fill: #007884;"></rect>
        <text transform="translate(763.810028076171875 484.387657165527344)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">QNN</tspan></text>
        <rect x="825.508529567216101" y="462.211961529186738" width="72.235834331011574" height="35" rx="4" ry="4" style="fill: #007884;"></rect>
        <text transform="translate(839.333465576171875 484.387657165527344)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">TFLite</tspan></text>
        <rect x="906.418685817216101" y="462.211961529186738" width="72.235834331011574" height="35" rx="4" ry="4" style="fill: #007884;"></rect>
        <text transform="translate(922.493682861328125 484.387657165527344)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">SNPE</tspan></text>
      </g>
      <rect x="739.142565043652212" y="454.711961529186738" width="244.967763378139352" height="50" rx="4" ry="4" style="fill: none; stroke: #4d4d4d; stroke-miterlimit: 10;"></rect>
    </g>
    <g>
      <rect x="613.831475444227181" y="358.20539578826174" width="140" height="50" rx="4" ry="4" style="fill: #007884;"></rect>
      <text transform="translate(644.16351318359375 386.712089538574219)" style="fill: #fff; font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">OpenGL ES</tspan></text>
    </g>
    <rect x="426.326044014352192" y="183.362602233881262" width="695.33968827391891" height="110.087107821431346" rx="4.000000000000002" ry="4.000000000000002" style="fill: none; stroke: #4d4d4d; stroke-miterlimit: 10;"></rect>
    <g>
      <line x1="1039.421418021218415" y1="274.20539578826083" x2="1039.421418021218415" y2="357.20539578826174" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 3px;"></line>
      <g>
        <line x1="1039.421417236328125" y1="279.946372985839844" x2="1039.421417236328125" y2="351.464408874511719" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="1035.432342529296875 281.113578796386719 1039.421417236328125 274.205406188964844 1043.410491943359375 281.113578796386719 1035.432342529296875 281.113578796386719"></polygon>
        <polygon points="1035.432342529296875 350.297233581542969 1039.421417236328125 357.205406188964844 1043.410491943359375 350.297233581542969 1035.432342529296875 350.297233581542969"></polygon>
      </g>
    </g>
    <g>
      <line x1="683.831475444227181" y1="274.20539578826083" x2="683.831475444227181" y2="357.20539578826174" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 3px;"></line>
      <g>
        <line x1="683.83148193359375" y1="279.946372985839844" x2="683.83148193359375" y2="351.464408874511719" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="679.8424072265625 281.113578796386719 683.83148193359375 274.205406188964844 687.820526123046875 281.113578796386719 679.8424072265625 281.113578796386719"></polygon>
        <polygon points="679.8424072265625 350.297233581542969 683.83148193359375 357.205406188964844 687.820526123046875 350.297233581542969 679.8424072265625 350.297233581542969"></polygon>
      </g>
    </g>
    <g>
      <line x1="861.626446732721888" y1="274.20539578826083" x2="861.626446732721888" y2="452.536060193993762" style="fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 3px;"></line>
      <g>
        <line x1="861.626434326171875" y1="279.946372985839844" x2="861.626434326171875" y2="446.795097351074219" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
        <polygon points="857.637359619140625 281.113578796386719 861.626434326171875 274.205406188964844 865.615509033203125 281.113578796386719 857.637359619140625 281.113578796386719"></polygon>
        <polygon points="857.637359619140625 445.627861022949219 861.626434326171875 452.536064147949219 865.615509033203125 445.627861022949219 857.637359619140625 445.627861022949219"></polygon>
      </g>
    </g>
    <g>
      <rect x="19.774480931856488" y="286.641319274902344" width="361.712450399310001" height="330.635069121723063" rx="4" ry="4" style="fill: #007884;"></rect>
      <text transform="translate(121.739921569824219 309.034477233886719)" style="fill: #fff; font-family: Roboto-Medium, Roboto; font-size: 16px; font-weight: 500;"><tspan x="0" y="0">GstMLTensorMeta </tspan></text>
      <text transform="translate(34.130584716796875 344.394706726074219)" style="fill: #fff; font-size: 16px;"><tspan x="0" y="0" style="font-family: Roboto-Medium, Roboto; font-weight: 500;">+ id:</tspan><tspan x="30.171875" y="0" xml:space="preserve" style="font-family: Roboto-Regular, Roboto;"> Identification number that corresponds</tspan><tspan style="font-family: Roboto-Regular, Roboto;"><tspan x="0" y="20">to the GstMemory index inside GstBuffer. </tspan></tspan><tspan x="0" y="40" style="font-family: Roboto-Medium, Roboto; font-weight: 500;">+ type:</tspan><tspan x="47.8046875" y="40" xml:space="preserve" style="font-family: Roboto-Regular, Roboto;"> Tensor type (UINT8, FLOAT32, etc.) </tspan><tspan x="0" y="60" style="font-family: Roboto-Medium, Roboto; font-weight: 500;">+ dimensions[CMAX]:</tspan><tspan x="153.953125" y="60" xml:space="preserve" style="font-family: Roboto-Regular, Roboto;"> Array containing the</tspan><tspan style="font-family: Roboto-Regular, Roboto;"><tspan x="0" y="80">tensor dimensions (e.g., 1x513x513x3) </tspan></tspan><tspan x="0" y="100" style="font-family: Roboto-Medium, Roboto; font-weight: 500;">+ n_dimensions:</tspan><tspan x="116.1875" y="100" xml:space="preserve" style="font-family: Roboto-Regular, Roboto;"> Actual number of the </tspan><tspan style="font-family: Roboto-Regular, Roboto;"><tspan x="0" y="120">dimensions (e.g., 3 for three dimensions)</tspan></tspan></text>
      <line x1="19.774480931856488" y1="321.034517312638854" x2="381.486931331166488" y2="321.034517312638854" style="fill: none; stroke: #b3b7bf; stroke-miterlimit: 10;"></line>
      <text transform="translate(34.130828857421875 503.463493347167969)" style="fill: #fff; font-size: 16px;"><tspan style="font-family: Roboto-Medium, Roboto; font-weight: 500;"><tspan x="0" y="0">+ gst_buffer_add_ml_tensor_meta(): </tspan></tspan><tspan style="font-family: Roboto-Regular, Roboto;"><tspan x="0" y="20" style="letter-spacing: 2.00244140625em;">	</tspan><tspan x="36" y="20">Add the meta to a GstBuffer</tspan></tspan><tspan style="font-family: Roboto-Medium, Roboto; font-weight: 500;"><tspan x="0" y="40">+ gst_buffer_get_ml_tensor_meta(): </tspan></tspan><tspan style="font-family: Roboto-Regular, Roboto;"><tspan x="0" y="60" style="letter-spacing: 2.00244140625em;">	</tspan><tspan x="36" y="60">Retrieve the 1st meta entry</tspan></tspan><tspan style="font-family: Roboto-Medium, Roboto; font-weight: 500;"><tspan x="0" y="80">+ gst_buffer_get_ml_tensor_meta_id(): </tspan></tspan><tspan style="font-family: Roboto-Regular, Roboto;"><tspan x="0" y="100" style="letter-spacing: 2.00244140625em;">	</tspan><tspan x="36" y="100">Retrieve the nst meta entry</tspan></tspan></text>
      <line x1="19.774480931856488" y1="478.671615836941783" x2="381.486931331166488" y2="478.671615836941783" style="fill: none; stroke: #b3b7bf; stroke-miterlimit: 10;"></line>
    </g>
    <g>
      <rect x="19.774480931856488" y="20.103170745910575" width="361.179417728648332" height="214.270053161499163" rx="4.000000000000001" ry="4.000000000000001" style="fill: #007884;"></rect>
      <text transform="translate(153.883827209472656 40.775352478027344)" style="fill: #fff; font-family: Roboto-Medium, Roboto; font-size: 16px; font-weight: 500;"><tspan x="0" y="0">GstBuffer </tspan></text>
      <text transform="translate(32.859512329101562 70.791770935058594)" style="fill: #fff; font-size: 16px;"><tspan x="0" y="0" style="font-family: Roboto-Medium, Roboto; font-weight: 500;">+ GstMemory:</tspan><tspan x="100.609375" y="0" xml:space="preserve" style="font-family: Roboto-Regular, Roboto;"> Contains a single tensor</tspan><tspan style="font-family: Roboto-Regular, Roboto;"><tspan x="10.171875" y="19.2001953125" xml:space="preserve">                       Example: 1x513x513x3</tspan></tspan></text>
      <text transform="translate(32.859519958496094 113.436119079589844)" style="fill: #fff; font-size: 16px;"><tspan x="0" y="0" style="font-family: Roboto-Medium, Roboto; font-weight: 500;">+ GstMemory:</tspan><tspan x="100.609375" y="0" xml:space="preserve" style="font-family: Roboto-Regular, Roboto;"> Next tensor and so on...</tspan></text>
      <text transform="translate(32.789199829101562 173.946006774902344)" style="fill: #fff; font-size: 16px;"><tspan x="0" y="0" style="font-family: Roboto-Medium, Roboto; font-weight: 500;">+ GstMLTensorMeta:</tspan><tspan x="150.8828125" y="0" xml:space="preserve" style="font-family: Roboto-Regular, Roboto;"> Describes the raw data </tspan><tspan style="font-family: Roboto-Regular, Roboto;"><tspan x="0" y="19.2001953125" xml:space="preserve" style="letter-spacing: 2.00244140625em;">				</tspan><tspan x="144" y="19.2001953125" xml:space="preserve">  of a single tensor</tspan></tspan></text>
      <text transform="translate(32.789199829101562 216.019493103027344)" style="fill: #fff; font-size: 16px;"><tspan x="0" y="0" style="font-family: Roboto-Medium, Roboto; font-weight: 500;">+ GstMLTensorMeta:</tspan><tspan x="150.8828125" y="0" xml:space="preserve" style="font-family: Roboto-Regular, Roboto;"> Meta for next tensor entry</tspan></text>
      <text transform="translate(32.789199829101562 138.532341003417969)" style="fill: #fff; font-family: Roboto-Medium, Roboto; font-size: 16px; font-weight: 500;"><tspan x="0" y="0">+ ...</tspan></text>
      <line x1="19.774480931856488" y1="50.107713802236503" x2="380.953898660504819" y2="50.107713802236503" style="fill: none; stroke: #b3b7bf; stroke-miterlimit: 10;"></line>
      <line x1="19.774480931856488" y1="148.516404224654252" x2="380.953898660504819" y2="148.516404224654252" style="fill: none; stroke: #b3b7bf; stroke-miterlimit: 10;"></line>
    </g>
    <rect x="426.326044014352192" y="20.103170745910575" width="695.33968827391891" height="151.186655053183131" rx="3.999999999999997" ry="3.999999999999997" style="fill: #d2d7e1;"></rect>
    <text transform="translate(438.796493530273438 42.772010803222656)" style="font-size: 16px;"><tspan x="0" y="0" style="font-family: Roboto-Medium, Roboto; font-weight: 500;">neural-network/tensors</tspan><tspan x="168.1796875" y="0" xml:space="preserve" style="font-family: Roboto-Regular, Roboto;"> GstCaps have the following common rules: </tspan><tspan x="0" y="19.2001953125" style="font-family: Roboto-Medium, Roboto; font-weight: 500;">dimensions: </tspan><tspan x="91.234375" y="19.2001953125" style="font-family: Roboto-Regular, Roboto;">GstArray is tensors dimension values separated by &apos;,&apos; and marked with delimiters </tspan><tspan style="font-family: Roboto-Regular, Roboto;"><tspan x="0" y="38.39990234375">‘&lt;’ for beginning and ‘&gt;’ for end. </tspan></tspan><tspan style="font-family: Roboto-Regular, Roboto;"><tspan x="0" y="57.60009765625" xml:space="preserve"># Example-&gt;  &lt; &lt;5, 300, 300, 1&gt;, &lt;1, 1, 1000, 1&gt; &gt;</tspan></tspan><tspan style="font-family: Roboto-Regular, Roboto;"><tspan x="0" y="76.7998046875">#</tspan></tspan><tspan style="font-family: Roboto-Regular, Roboto;"><tspan x="0" y="96">#</tspan></tspan><tspan x="0" y="115.2001953125" style="font-family: Roboto-Medium, Roboto; font-weight: 500;">type: </tspan><tspan x="38.921875" y="115.2001953125" style="font-family: Roboto-Regular, Roboto;">(string) {UINT8, INT8, UINT16, INT16, UINT32, INT32, UINT64, INT64, FLOAT32, FLOAT64} </tspan></text>
    <g>
      <line x1="200.364189147949219" y1="286.481254577636719" x2="200.364189147949219" y2="240.724479675292969" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="204.353256225585938 241.891685485839844 200.364189147949219 234.983512878417969 196.3751220703125 241.891685485839844 204.353256225585938 241.891685485839844"></polygon>
    </g>
    <g>
      <polyline points="380.953895568847656 99.244300842285156 403.639968872070312 99.244300842285156 403.639968872070312 318.000511169433594 950.591522216796875 318.000511169433594 950.591522216796875 300.247032165527344" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></polyline>
      <polygon points="954.580596923828125 301.414207458496094 950.591522216796875 294.506034851075128 946.602447509765625 301.414207458496094 954.580596923828125 301.414207458496094"></polygon>
    </g>
    <g>
      <line x1="772.728973388671875" y1="318.000511169433594" x2="772.728973388671875" y2="300.247032165527344" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="776.718017578125 301.414207458496094 772.728973388671875 294.506034851075128 768.739898681640625 301.414207458496094 776.718017578125 301.414207458496094"></polygon>
    </g>
    <g>
      <text transform="translate(1030.931488037109375 621.367877960205078)" style="font-family: Roboto-Regular, Roboto; font-size: 14px;"><tspan x="0" y="0">Open source</tspan></text>
      <rect x="1010.680497934157756" y="609.276388396625407" width="16" height="16" rx="2" ry="2" style="fill: #007884;"></rect>
    </g>
  </g>
  <g id="Layer_2" data-name="Layer 2">
    <text transform="translate(541.999359130859375 133.142341613769531)" style="font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">First tensor</tspan></text>
    <text transform="translate(653.130462646484375 133.142341613769531)" style="font-family: Roboto-Regular, Roboto; font-size: 16px;"><tspan x="0" y="0">Second tensor</tspan></text>
    <g>
      <line x1="583.931365966796875" y1="104.439369201660156" x2="583.931365966796875" y2="115.401359558105469" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="579.942291259765625 114.234169006347656 583.931365966796875 121.142341613769531 587.920440673828125 114.234169006347656 579.942291259765625 114.234169006347656"></polygon>
    </g>
    <g>
      <line x1="707.966033935546875" y1="104.439369201660156" x2="707.966033935546875" y2="115.401359558105469" style="fill: none; stroke: #000; stroke-miterlimit: 10;"></line>
      <polygon points="703.97698974609375 114.234169006347656 707.966033935546875 121.142341613769531 711.955108642578125 114.234169006347656 703.97698974609375 114.234169006347656"></polygon>
    </g>
  </g>
</svg>

The following table lists the sequential stages during which the video/audio
            stream is captured, processed, and the output is either displayed on a screen or saved
            to a file.

Table : ML pipeline processing stages

| Process | Description |
| --- | --- |
| Source | <ul class="ul" id="machine-learning__ul_t1g_f3v_y1c"><br>                                    <li class="li"><a href="https://docs.qualcomm.com/doc/80-70022-50/topic/qtiqmmfsrc.html">qtiqmmfsrc</a> captures the YUV streams from<br>                                        live camera source. </li><br><br>                                    <li class="li">The filesrc plugin captures any format from an offline video<br>                                        that requires format conversion. </li><br><br>                                </ul> |
| Preprocessing | [qtimlvconverter](https://docs.qualcomm.com/doc/80-70022-50/topic/qtimlvconverter.html)does the following to prepare<br>                                the video stream for inferencing:<ul class="ul" id="machine-learning__ul_sj1_nbz_rbc"><br>                                    <li class="li">Color conversion</li><br><br>                                    <li class="li">Resize</li><br><br>                                    <li class="li">Mean subtraction</li><br><br>                                </ul> |
| Inferencing | <ol class="ol" id="machine-learning__ol_x3m_1cz_rbc"><br>                                    <li class="li">The preprocessed data is sent to the inference plugin in a<br>                                        tensor format.</li><br><br>                                    <li class="li">The inference plugin sends this data to the machine learning<br>                                        engines:<ul class="ul" id="machine-learning__ol_jg1_ccz_rbc"><br>                                            <li class="li">LiteRT engine uses <a href="https://docs.qualcomm.com/doc/80-70022-50/topic/qtimltflite.html">qtimltflite</a>.</li><br><br>                                            <li class="li">Qualcomm Neural Processing SDK engine uses <a href="https://docs.qualcomm.com/doc/80-70022-50/topic/qtimlsnpe.html">qtimlsnpe</a>.</li><br><br>                                        </ul><br></li><br><br>                                </ol> |
| Postprocessing | The output tensor is passed down to the postprocessing<br>                                plugins:<ul class="ul" id="machine-learning__ul_qqj_fgt_5zb"><br>                                    <li class="li">Object detection–<a href="https://docs.qualcomm.com/doc/80-70022-50/topic/qtimlvdetection.html">qtimlvdetection</a></li><br><br>                                    <li class="li">Image classification–<a href="https://docs.qualcomm.com/doc/80-70022-50/topic/qtimlvclassification.html">qtimlvclassification</a></li><br><br>                                    <li class="li">Image segmentation–<a href="https://docs.qualcomm.com/doc/80-70022-50/topic/qtimlvsegmentation.html">qtimlvsegmentation</a></li><br><br>                                </ul> |
| Overlay | The overlay plugin that interprets the machine learning<br>                                    metadata.<br><ol class="ol" id="machine-learning__ol_t3l_2dz_rbc"><br>                                    <li class="li"><a href="https://docs.qualcomm.com/doc/80-70022-50/topic/qtioverlay.html">qtivoverlay</a> draws appropriate overlay on<br>                                        the buffer that allows the inference result to be visualized<br>                                        in real-time. </li><br><br>                                    <li class="li">The stream can be rendered on to the display, streamed over<br>                                        network, or encoded and stored to a local storage.</li><br><br>                                </ol> |
| Sink | <ul class="ul" id="machine-learning__ul_vlx_v1z_rbc"><br>                                    <li class="li"><a href="https://docs.qualcomm.com/doc/80-70022-50/topic/waylandsink.html">Waylandsink</a> is used to display the<br>                                        output on a screen. </li><br><br>                                    <li class="li">Filesink is used to save the inferenced video to a local<br>                                        storage.</li><br><br>                                </ul> |

### Related information

[Run machine learning use cases](https://docs.qualcomm.com/doc/80-70022-50/topic/machine-learning-use-cases.html)

Last Published: Feb 20, 2026

[Previous Topic
Qualcomm GStreamer architecture and plugins](https://docs.qualcomm.com/bundle/publicresource/80-70022-50/topics/gst-plugin-architecture.md) [Next Topic
Configure Qualcomm GStreamer plugins](https://docs.qualcomm.com/bundle/publicresource/80-70022-50/topics/qim-sdk-plugins.md)