# qtivcomposer

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

qtivcomposer 插件使用 GPU 硬件将多个输入视频流合并/混合为单个输出流。

Note: 在使用 qtivcomposer 的实时源设置中，长时间测试表明，如果输入缓存没有按照预期的间隔到达，则合成器可能会产生重复的输出帧。当这种重复持续存在于连续的帧中时，即使缓存是连续生成和处理的，也会产生视频冻结的视觉印象。这种行为表明，不规则的缓存计时可能会干扰正常的帧生成，从而导致误导性的播放伪影。

输出缓存内的（针对每个流）的输入缓存组成由端口属性决定。

下表列出了 qtivcomposer 的一些常见端口属性。关于更多详细信息，请参阅 [Table :  qtivcomposer 的端口属性](https://docs.qualcomm.com/doc/80-70022-50SC/topic/qtivcomposer.html#qtivcomposer__table_hzl_mcn_myb)。

| 属性 | 用法 |
| --- | --- |
| Position | 设置输出中每个输入帧的 X 轴和 Y 轴位置。 |
| Crop | 设置源的可选裁剪。 |
| Dimensions | 放大/缩小帧。 |
| Rotate | 垂直旋转帧 |
| <ul class="ul" id="qtivcomposer__ul_vyb_2dp_tbc"><br>                                    <li class="li">Flip-horizontal</li><br><br>                                    <li class="li">Flip-vertical</li><br><br>                                </ul> | 水平和垂直翻转帧。 |
| Alpha | 将阿尔法混合值添加到帧中。 |
| Z order | 更改帧的顺序。<br>默认情况下，帧会按接收设备端口的创建顺序进行排列。例如，sink\_0 和 sink\_1。 |

图中展示了使用 qtivcomposer 处理多个视频源的 GStreamer pipeline。

Figure : 使用 qtivcomposer 的 pipeline
            
            <!--?xml version="1.0" encoding="UTF-8" standalone="no"?-->

<!-- Generated by Microsoft Visio, SVG Export pipeline_with_qtivcomposer.svg Layer_1 -->
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:v="http://schemas.microsoft.com/visio/2003/SVGExtensions/" width="9.375in" height="5.04935in" viewbox="0 0 675 363.553" xml:space="preserve" color-interpolation-filters="sRGB" class="st22"><v:documentproperties v:langid="1033" v:viewmarkup="false"></v:documentproperties>
<style>.svg-1 .st1 { fill: #fafafa; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-1 .st2 { fill: #d2d7e1; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-1 .st3 { fill: none; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-1 .st4 { fill: #000000; font-family: Roboto; font-size: 1.00001em; font-weight: bold }
.svg-1 .st5 { fill: #000000; font-family: Roboto; font-size: 1.00001em }
.svg-1 .st6 { font-size: 1em }
.svg-1 .st7 { stroke: #000000; stroke-linecap: butt; stroke-width: 0.75 }
.svg-1 .st8 { fill: #000000; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-1 .st9 { fill: #2a2aea; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-1 .st10 { fill: #ffffff; font-family: Roboto; font-size: 1.00001em }
.svg-1 .st11 { fill: #007884; stroke: none; stroke-linecap: butt; stroke-width: 0.75 }
.svg-1 .st12 { fill: none }
.svg-1 .st13 { fill: #ffffff; font-family: SimHei; font-size: 1.00001em }
.svg-1 .st14 { font-family: Roboto; font-size: 1em }
.svg-1 .st15 { stroke: #000000; stroke-dasharray: 3, 1.5; stroke-linecap: butt; stroke-width: 0.75 }
.svg-1 .st16 { fill: #000000; font-family: Roboto; font-size: 0.874992em }
.svg-1 .st17 { fill: #000000; font-family: SimHei; font-size: 0.874992em }
.svg-1 .st18 { fill: #ffffff; font-family: Roboto; font-size: 1.00001em; font-weight: bold }
.svg-1 .st19 { font-family: SimHei; font-size: 1em; font-weight: normal }
.svg-1 .st20 { font-size: 1em; font-weight: normal }
.svg-1 .st21 { stroke: #b3b7bf; stroke-linecap: butt; stroke-width: 0.75 }
.svg-1 .st22 { fill: none; fill-rule: evenodd; font-size: 12px; overflow: visible; stroke-linecap: square; stroke-miterlimit: 3 }</style>
<g v:mid="0" v:index="1" v:groupcontext="foregroundPage">	<title>Layer_1</title>	<v:pageproperties v:drawingscale="1" v:pagescale="1" v:drawingunits="19" v:shadowoffsetx="9" v:shadowoffsety="-9"></v:pageproperties>	<g id="shape2-1" v:mid="2" v:groupcontext="shape" transform="translate(0.374851,-0.374725)">		<title>Sheet.2</title>		<path d="M0 357.93 A5.62513 5.62513 -180 0 0 5.62 363.55 L668.62 363.55 A5.62513 5.62513 -180 0 0 674.25 357.93 L674.25					 6.37 A5.62513 5.62513 -180 0 0 668.62 0.75 L5.62 0.75 A5.62513 5.62513 -180 0 0 -0 6.37 L0 357.93 Z" class="st1"></path>	</g>	<g id="shape3-3" v:mid="3" v:groupcontext="shape">		<title>Sheet.3</title>		<path d="M669 0.75 C671.89 0.75 674.25 3.11 674.25 6 L674.25 357.55 C674.25 360.45 671.89 362.8 669 362.8 L6 362.8 C3.11					 362.8 0.75 360.45 0.75 357.55 L0.75 6 C0.75 3.11 3.11 0.75 6 0.75 L669 0.75 ZM669 0 L6 0 C2.69 0 0 2.69					 0 6 L0 357.55 C0 360.87 2.69 363.55 6 363.55 L669 363.55 C672.31 363.55 675 360.87 675 357.55 L675 6 C675					 2.69 672.31 0 669 0 Z" class="st2"></path>	</g>	<g id="shape4-5" v:mid="4" v:groupcontext="shape" transform="translate(0,-336.559)">		<title>Sheet.4</title>		<desc>GST BIN</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="337.5" cy="356.353" width="675" height="14.4"></v:textrect>		<rect x="0" y="349.153" width="675" height="14.4" class="st3"></rect>		<text x="314.7" y="359.95" class="st4" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>GST BIN</text>		</g>	<g id="shape25-8" v:mid="25" v:groupcontext="shape" transform="translate(127.5,-206.304)">		<title>Sheet.25</title>		<desc>video/x-raw width=1920, height=1080, format=YUV</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="114" cy="345.553" width="228" height="36"></v:textrect>		<rect x="0" y="327.553" width="228" height="36" class="st3"></rect>		<text x="82.75" y="341.35" class="st5" v:langid="1033"><v:paragraph v:spline="-1.4" v:horizalign="1"></v:paragraph><v:tablist></v:tablist>video/x-raw<v:newlinechar></v:newlinechar><tspan x="11.33" dy="1.4em" class="st6">width=1920, height=1080, format=YUV</tspan></text>		</g>	<g id="shape26-12" v:mid="26" v:groupcontext="shape" transform="translate(477,-151.554)">		<title>Sheet.26</title>		<desc>video/x-raw width=1920 height=1080 format=YUV</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="46.6875" cy="332.053" width="93.38" height="63"></v:textrect>		<rect x="0" y="300.553" width="93.375" height="63" class="st3"></rect>		<text x="15.44" y="311.05" class="st5" v:langid="1033"><v:paragraph v:spline="-1.4" v:horizalign="1"></v:paragraph><v:tablist></v:tablist>video/x-raw<v:newlinechar></v:newlinechar><tspan x="15.3" dy="1.4em" class="st6">width=1920<v:newlinechar></v:newlinechar></tspan><tspan x="13.35" dy="1.4em" class="st6">height=1080<v:newlinechar></v:newlinechar></tspan><tspan x="14.06" dy="1.4em" class="st6">format=YUV</tspan></text>		</g>	<g id="shape28-18" v:mid="28" v:groupcontext="shape" transform="translate(127.5,-123.804)">		<title>Sheet.28</title>		<desc>video/x-raw width=640, height=360, format=BGRA</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="114" cy="345.553" width="228" height="36"></v:textrect>		<rect x="0" y="327.553" width="228" height="36" class="st3"></rect>		<text x="82.75" y="341.35" class="st5" v:langid="1033"><v:paragraph v:spline="-1.4" v:horizalign="1"></v:paragraph><v:tablist></v:tablist>video/x-raw<v:newlinechar></v:newlinechar><tspan x="13.95" dy="1.4em" class="st6">width=640, height=360, format=BGRA</tspan></text>		</g>	<g id="shape29-22" v:mid="29" v:groupcontext="shape" transform="translate(127.5,-288.804)">		<title>Sheet.29</title>		<desc>video/x-raw width=1280, height=720, format=RGB</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="114" cy="345.553" width="228" height="36"></v:textrect>		<rect x="0" y="327.553" width="228" height="36" class="st3"></rect>		<text x="82.75" y="341.35" class="st5" v:langid="1033"><v:paragraph v:spline="-1.4" v:horizalign="1"></v:paragraph><v:tablist></v:tablist>video/x-raw<v:newlinechar></v:newlinechar><tspan x="14.49" dy="1.4em" class="st6">width=1280, height=720, format=RGB</tspan></text>		</g>	<g id="shape30-26" v:mid="30" v:groupcontext="shape" transform="translate(127.5,-41.3039)">		<title>Sheet.30</title>		<desc>video/x-raw width=320, height=180, format=YUV2</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="114" cy="345.553" width="228" height="36"></v:textrect>		<rect x="0" y="327.553" width="228" height="36" class="st3"></rect>		<text x="82.75" y="341.35" class="st5" v:langid="1033"><v:paragraph v:spline="-1.4" v:horizalign="1"></v:paragraph><v:tablist></v:tablist>video/x-raw<v:newlinechar></v:newlinechar><tspan x="14.7" dy="1.4em" class="st6">width=320, height=180, format=YUV2</tspan></text>		</g>	<g id="shape32-30" v:mid="32" v:groupcontext="shape" transform="translate(477.198,-183.054)">		<title>Sheet.32</title>		<path d="M0 363.55 L88.69 363.55" class="st7"></path>	</g>	<g id="shape33-33" v:mid="33" v:groupcontext="shape" transform="translate(565.011,-180.062)">		<title>Sheet.33</title>		<path d="M0 363.55 L5.18 360.56 L0 357.57 L0 363.55 Z" class="st8"></path>	</g>	<g id="shape34-35" v:mid="34" v:groupcontext="shape" transform="translate(387.198,-164.304)">		<title>Sheet.34</title>		<desc>qtivcomposer</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="45" cy="344.803" width="90" height="37.5"></v:textrect>		<path d="M0 360.55 A3.00007 3.00007 -180 0 0 3 363.55 L87 363.55 A3.00007 3.00007 -180 0 0 90 360.55 L90 329.05 A3.00007					 3.00007 -180 0 0 87 326.05 L3 326.05 A3.00007 3.00007 -180 0 0 -0 329.05 L0 360.55 Z" class="st9"></path>		<text x="8.35" y="348.4" class="st10" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>qtivcomposer</text>		</g>	<g id="shape36-38" v:mid="36" v:groupcontext="shape" transform="translate(570.192,-164.304)">		<title>Sheet.36</title>		<desc>filesink</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="45" cy="344.803" width="90" height="37.5"></v:textrect>		<path d="M0 360.55 A3.00007 3.00007 -180 0 0 3 363.55 L87 363.55 A3.00007 3.00007 -180 0 0 90 360.55 L90 329.05 A3.00007					 3.00007 -180 0 0 87 326.05 L3 326.05 A3.00007 3.00007 -180 0 0 -0 329.05 L0 360.55 Z" class="st11"></path>		<text x="25.92" y="348.4" class="st10" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>filesink</text>		</g>	<g id="shape39-41" v:mid="39" v:groupcontext="shape" transform="translate(127.5,-193.529)">		<title>Sheet.39</title>		<path d="M255.21 363.55 L239.79 363.55 L239.79 250.28 L0 250.28 L255.21 363.55 Z" class="st12"></path>		<path d="M255.21 363.55 L239.79 363.55 L239.79 250.28 L0 250.28" class="st7"></path>	</g>	<g id="shape40-44" v:mid="40" v:groupcontext="shape" transform="translate(381.836,-190.537)">		<title>Sheet.40</title>		<path d="M0 357.57 L5.18 360.56 L0 363.55 L0 357.57 Z" class="st8"></path>	</g>	<g id="shape42-46" v:mid="42" v:groupcontext="shape" transform="translate(127.5,-186.029)">		<title>Sheet.42</title>		<path d="M255.21 363.55 L229.06 363.55 L229.06 325.28 L0 325.28 L255.21 363.55 Z" class="st12"></path>		<path d="M255.21 363.55 L229.06 363.55 L229.06 325.28 L0 325.28" class="st7"></path>	</g>	<g id="shape43-49" v:mid="43" v:groupcontext="shape" transform="translate(381.836,-183.037)">		<title>Sheet.43</title>		<path d="M0 357.57 L5.18 360.56 L0 363.55 L0 357.57 Z" class="st8"></path>	</g>	<g id="shape45-51" v:mid="45" v:groupcontext="shape" transform="translate(127.5,-141.804)">		<title>Sheet.45</title>		<path d="M255.21 326.83 L229.06 326.83 L229.06 363.55 L0 363.55 L255.21 326.83 Z" class="st12"></path>		<path d="M255.21 326.83 L229.06 326.83 L229.06 363.55 L0 363.55" class="st7"></path>	</g>	<g id="shape46-54" v:mid="46" v:groupcontext="shape" transform="translate(381.836,-175.537)">		<title>Sheet.46</title>		<path d="M0 357.57 L5.18 360.56 L0 363.55 L0 357.57 Z" class="st8"></path>	</g>	<g id="shape48-56" v:mid="48" v:groupcontext="shape" transform="translate(127.5,-59.3039)">		<title>Sheet.48</title>		<path d="M255.39 251.83 L239.87 251.83 L239.68 363.55 L0 363.55 L255.39 251.83 Z" class="st12"></path>		<path d="M255.39 251.83 L239.87 251.83 L239.68 363.55 L0 363.55" class="st7"></path>	</g>	<g id="shape49-59" v:mid="49" v:groupcontext="shape" transform="translate(382.017,-168.037)">		<title>Sheet.49</title>		<path d="M0 357.57 L5.18 360.56 L0 363.55 L0 357.57 Z" class="st8"></path>	</g>	<g id="shape51-61" v:mid="51" v:groupcontext="shape" transform="translate(15,-288.054)">		<title>Sheet.51</title>		<desc>视频源 0</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="56.25" cy="344.803" width="112.5" height="37.5"></v:textrect>		<path d="M0 360.55 A3.00007 3.00007 -180 0 0 3 363.55 L109.5 363.55 A3.00007 3.00007 -180 0 0 112.5 360.55 L112.5 329.05					 A3.00007 3.00007 -180 0 0 109.5 326.05 L3 326.05 A3.00007 3.00007 -180 0 0 0 329.05 L0 360.55 Z" class="st11"></path>		<text x="33.4" y="348.8" class="st13" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>视频源<tspan class="st14"> </tspan><tspan class="st14">0</tspan></text>		</g>	<g id="shape54-66" v:mid="54" v:groupcontext="shape" transform="translate(15,-205.554)">		<title>Sheet.54</title>		<desc>视频源 1</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="56.25" cy="344.803" width="112.5" height="37.5"></v:textrect>		<path d="M0 360.55 A3.00007 3.00007 -180 0 0 3 363.55 L109.5 363.55 A3.00007 3.00007 -180 0 0 112.5 360.55 L112.5 329.05					 A3.00007 3.00007 -180 0 0 109.5 326.05 L3 326.05 A3.00007 3.00007 -180 0 0 0 329.05 L0 360.55 Z" class="st11"></path>		<text x="33.4" y="348.8" class="st13" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>视频源<tspan class="st14"> </tspan><tspan class="st14">1</tspan></text>		</g>	<g id="shape57-71" v:mid="57" v:groupcontext="shape" transform="translate(15,-123.054)">		<title>Sheet.57</title>		<desc>视频源 N-1</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="56.25" cy="344.803" width="112.5" height="37.5"></v:textrect>		<path d="M0 360.55 A3.00007 3.00007 -180 0 0 3 363.55 L109.5 363.55 A3.00007 3.00007 -180 0 0 112.5 360.55 L112.5 329.05					 A3.00007 3.00007 -180 0 0 109.5 326.05 L3 326.05 A3.00007 3.00007 -180 0 0 0 329.05 L0 360.55 Z" class="st11"></path>		<text x="27.46" y="348.8" class="st13" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>视频源<tspan class="st14"> </tspan><tspan class="st14">N</tspan><tspan class="st14">-</tspan><tspan class="st14">1</tspan></text>		</g>	<g id="shape60-78" v:mid="60" v:groupcontext="shape" transform="translate(15,-40.5539)">		<title>Sheet.60</title>		<desc>视频源 N-2</desc>		<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>		<v:textrect cx="56.25" cy="344.803" width="112.5" height="37.5"></v:textrect>		<path d="M0 360.55 A3.00007 3.00007 -180 0 0 3 363.55 L109.5 363.55 A3.00007 3.00007 -180 0 0 112.5 360.55 L112.5 329.05					 A3.00007 3.00007 -180 0 0 109.5 326.05 L3 326.05 A3.00007 3.00007 -180 0 0 -0 329.05 L0 360.55 Z" class="st11"></path>		<text x="27.46" y="348.8" class="st13" v:langid="1033"><v:paragraph v:horizalign="1"></v:paragraph><v:tablist></v:tablist>视频源<tspan class="st14"> </tspan><tspan class="st14">N</tspan><tspan class="st14">-</tspan><tspan class="st14">2</tspan></text>		</g>	<g id="shape63-85" v:mid="63" v:groupcontext="shape" transform="translate(434.803,161.749) rotate(90)">		<title>Sheet.63</title>		<path d="M0 363.55 L2.25 363.55" class="st7"></path>	</g>	<g id="shape64-88" v:mid="64" v:groupcontext="shape" transform="translate(434.803,166.062) rotate(90)">		<title>Sheet.64</title>		<path d="M0 363.55 L29.91 363.55" class="st15"></path>	</g>	<g id="shape65-91" v:mid="65" v:groupcontext="shape" transform="translate(434.803,196.999) rotate(90)">		<title>Sheet.65</title>		<path d="M0 363.55 L2.25 363.55" class="st7"></path>	</g>	<g id="group81-94" transform="translate(550.067,-14.7814)" v:mid="81" v:groupcontext="group">		<title>Sheet.81</title>		<g id="shape68-95" v:mid="68" v:groupcontext="shape" transform="translate(15.1883,5.68434E-14)">			<title>Sheet.68</title>			<desc>Qualcomm</desc>			<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>			<v:textrect cx="26.7348" cy="357.253" width="53.47" height="12.6"></v:textrect>			<rect x="0" y="350.953" width="53.4696" height="12.6" class="st3"></rect>			<text x="0" y="360.4" class="st16" v:langid="1033"><v:paragraph></v:paragraph><v:tablist></v:tablist>Qualcomm  </text>			</g>		<g id="shape69-98" v:mid="69" v:groupcontext="shape" transform="translate(3.09752E-14,-0.218607)">			<title>Sheet.69</title>			<path d="M0 362.05 A1.50003 1.50003 -180 0 0 1.5 363.55 L10.5 363.55 A1.50003 1.50003 -180 0 0 12 362.05 L12 353.05						 A1.50003 1.50003 -180 0 0 10.5 351.55 L1.5 351.55 A1.50003 1.50003 -180 0 0 0 353.05 L0 362.05 Z" class="st9"></path>		</g>		<g id="shape71-100" v:mid="71" v:groupcontext="shape" transform="translate(89.1246,5.68434E-14)">			<title>Sheet.71</title>			<desc>开源</desc>			<v:textblock v:margins="rect(0,0,0,0)"></v:textblock>			<v:textrect cx="10.5" cy="357.253" width="21.01" height="12.6"></v:textrect>			<rect x="0" y="350.953" width="21" height="12.6" class="st3"></rect>			<text x="0" y="360.75" class="st17" v:langid="1033"><v:paragraph></v:paragraph><v:tablist></v:tablist>开源</text>			</g>		<g id="shape72-103" v:mid="72" v:groupcontext="shape" transform="translate(73.9363,-0.218607)">			<title>Sheet.72</title>			<path d="M0 362.05 A1.50003 1.50003 -180 0 0 1.5 363.55 L10.5 363.55 A1.50003 1.50003 -180 0 0 12 362.05 L12 353.05						 A1.50003 1.50003 -180 0 0 10.5 351.55 L1.5 351.55 A1.50003 1.50003 -180 0 0 0 353.05 L0 362.05 Z" class="st11"></path>		</g>	</g>	<g id="group88-105" transform="translate(423,-238.834)" v:mid="88" v:groupcontext="group">		<title>Sheet.88</title>		<g id="shape83-106" v:mid="83" v:groupcontext="shape">			<title>Sheet.83</title>			<desc>GstBuffer</desc>			<v:textblock v:margins="rect(7.2,0,0,0)" v:verticalalign="0"></v:textblock>			<v:textrect cx="99.3875" cy="320.193" width="198.78" height="86.7196"></v:textrect>			<path d="M0 360.55 A3.00007 3.00007 -180 0 0 3 363.55 L195.78 363.55 A3.00007 3.00007 -180 0 0 198.78 360.55 L198.78						 279.83 A3.00007 3.00007 -180 0 0 195.78 276.83 L3 276.83 A3.00007 3.00007 -180 0 0 0 279.83 L0 360.55						 Z" class="st11"></path>			<text x="73.27" y="293.03" class="st18" v:langid="1033"><v:paragraph v:spline="-1" v:horizalign="1"></v:paragraph><v:tablist></v:tablist>GstBuffer  </text>			</g>		<g id="shape84-109" v:mid="84" v:groupcontext="shape" transform="translate(9.52164,-45.8532)">			<title>Sheet.84</title>			<desc>+ GstMemory: 图像</desc>			<v:textblock v:margins="rect(0,0,0,0)" v:verticalalign="0"></v:textblock>			<v:textrect cx="93.5837" cy="356.353" width="187.17" height="14.4"></v:textrect>			<rect x="0" y="349.153" width="187.167" height="14.4" class="st3"></rect>			<text x="-0" y="361.13" class="st18" v:langid="1033"><v:paragraph></v:paragraph><v:tablist></v:tablist>+ GstMemory:<v:tabchar></v:tabchar><tspan dx="2.675em" class="st19">图像</tspan></text>			</g>		<g id="shape85-113" v:mid="85" v:groupcontext="shape" transform="translate(9.52164,-2.04752)">			<title>Sheet.85</title>			<desc>+ GstVideoMeta: 描述 raw 视频数据</desc>			<v:textblock v:margins="rect(0,0,0,0)" v:verticalalign="0"></v:textblock>			<v:textrect cx="93.5837" cy="346.954" width="187.17" height="33.1986"></v:textrect>			<rect x="0" y="330.354" width="187.167" height="33.1986" class="st3"></rect>			<text x="0" y="342.34" class="st18" v:langid="1033"><v:paragraph></v:paragraph><v:tablist></v:tablist>+ GstVideoMeta:<v:tabchar></v:tabchar><tspan dx="1.511em" class="st19">描述</tspan><tspan class="st20"> </tspan><tspan class="st20">raw <v:tabchar></v:tabchar><v:tabchar></v:tabchar><v:tabchar></v:tabchar><v:tabchar></v:tabchar></tspan><tspan x="108" dy="1.331em" class="st19">视频数据</tspan></text>			</g>		<g id="shape86-120" v:mid="86" v:groupcontext="shape" transform="translate(4.68425E-12,-64.2162)">			<title>Sheet.86</title>			<path d="M0 363.55 L198.78 363.55" class="st21"></path>		</g>		<g id="shape87-123" v:mid="87" v:groupcontext="shape" transform="translate(4.68425E-12,-41.6977)">			<title>Sheet.87</title>			<path d="M0 363.55 L198.78 363.55" class="st21"></path>		</g>	</g>	<g id="group89-126" transform="translate(520.703,-216)" v:mid="89" v:groupcontext="group">		<title>Sheet.89</title>		<g id="shape20-127" v:mid="20" v:groupcontext="shape" transform="translate(366.545,341.577) rotate(90)">			<title>Sheet.20</title>			<path d="M0 363.55 L17.67 363.55" class="st7"></path>		</g>		<g id="shape21-130" v:mid="21" v:groupcontext="shape">			<title>Sheet.21</title>			<path d="M0 358.37 L2.99 363.55 L5.98 358.37 L0 358.37 Z" class="st8"></path>		</g>	</g>	<g id="group96-132" transform="translate(368.415,-90)" v:mid="96" v:groupcontext="group">		<title>Sheet.96</title>		<g id="shape23-133" v:mid="23" v:groupcontext="shape" transform="translate(55.8922,724.114) rotate(180)">			<title>Sheet.23</title>			<path d="M0 363.55 L51.59 363.55" class="st7"></path>		</g>		<g id="shape24-136" v:mid="24" v:groupcontext="shape">			<title>Sheet.24</title>			<path d="M5.18 357.57 L0 360.56 L5.18 363.55 L5.18 357.57 Z" class="st8"></path>		</g>	</g>	<g id="group90-138" transform="translate(423,-40.5539)" v:mid="90" v:groupcontext="group">		<title>Sheet.90</title>		<g id="shape91-139" v:mid="91" v:groupcontext="shape">			<title>Sheet.91</title>			<desc>GstBuffer</desc>			<v:textblock v:margins="rect(7.2,0,0,0)" v:verticalalign="0"></v:textblock>			<v:textrect cx="99.3875" cy="320.193" width="198.78" height="86.7196"></v:textrect>			<path d="M0 360.55 A3.00007 3.00007 -180 0 0 3 363.55 L195.78 363.55 A3.00007 3.00007 -180 0 0 198.78 360.55 L198.78						 279.83 A3.00007 3.00007 -180 0 0 195.78 276.83 L3 276.83 A3.00007 3.00007 -180 0 0 0 279.83 L0 360.55						 Z" class="st11"></path>			<text x="73.27" y="293.03" class="st18" v:langid="1033"><v:paragraph v:spline="-1" v:horizalign="1"></v:paragraph><v:tablist></v:tablist>GstBuffer  </text>			</g>		<g id="shape92-142" v:mid="92" v:groupcontext="shape" transform="translate(9.52164,-45.8532)">			<title>Sheet.92</title>			<desc>+ GstMemory: 图像</desc>			<v:textblock v:margins="rect(0,0,0,0)" v:verticalalign="0"></v:textblock>			<v:textrect cx="93.5837" cy="356.353" width="187.17" height="14.4"></v:textrect>			<rect x="0" y="349.153" width="187.167" height="14.4" class="st3"></rect>			<text x="-0" y="361.13" class="st18" v:langid="1033"><v:paragraph></v:paragraph><v:tablist></v:tablist>+ GstMemory:<v:tabchar></v:tabchar><tspan dx="2.675em" class="st19">图像</tspan></text>			</g>		<g id="shape93-146" v:mid="93" v:groupcontext="shape" transform="translate(9.52164,-2.04752)">			<title>Sheet.93</title>			<desc>+ GstVideoMeta: 描述 raw 视频数据</desc>			<v:textblock v:margins="rect(0,0,0,0)" v:verticalalign="0"></v:textblock>			<v:textrect cx="93.5837" cy="346.954" width="187.17" height="33.1986"></v:textrect>			<rect x="0" y="330.354" width="187.167" height="33.1986" class="st3"></rect>			<text x="0" y="342.34" class="st18" v:langid="1033"><v:paragraph></v:paragraph><v:tablist></v:tablist>+ GstVideoMeta:<v:tabchar></v:tabchar><tspan dx="1.511em" class="st19">描述</tspan><tspan class="st20"> </tspan><tspan class="st20">raw <v:tabchar></v:tabchar><v:tabchar></v:tabchar><v:tabchar></v:tabchar><v:tabchar></v:tabchar></tspan><tspan x="108" dy="1.331em" class="st19">视频数据</tspan></text>			</g>		<g id="shape94-153" v:mid="94" v:groupcontext="shape" transform="translate(4.68425E-12,-64.2162)">			<title>Sheet.94</title>			<path d="M0 363.55 L198.78 363.55" class="st21"></path>		</g>		<g id="shape95-156" v:mid="95" v:groupcontext="shape" transform="translate(4.68425E-12,-41.6977)">			<title>Sheet.95</title>			<path d="M0 363.55 L198.78 363.55" class="st21"></path>		</g>	</g></g>
</svg>

视频合成包括但不限于以下内容：

- 画中画
- 并排
- 阿尔法混合

如果在 [GstCaps](https://gstreamer.freedesktop.org/documentation/gstreamer/gstcaps.html) 发送端口中没有指定合成参数和尺寸，则输出视频帧的尺寸将与最大的传入视频流相同。

同样，如果未在 GstCaps 中设置帧率，则从帧率最高的流获取帧率。如果输出 GstCaps 没有明确设置的格式，则插件会根据输入流协商最通用的格式。

该插件使用 Qualcomm IB2C 库或 Qualcomm Computer Vision SDK 进行所有转换操作。

- Qualcomm IB2C 库包装在自定义 GstC2dVideoConverter 或 GstGlesVideoConverter 抽象层中。
- 它包含用于创建、配置和处理传入和传出缓存的 API。
- 推荐的插件是 GstGLESVideoConverter。

名为 GstImageBufferPool 的自定义缓存池类分配输出存。GstImageBufferPool 分配 GBM 或 ION 缓存：

- 通过 Qualcomm libgbm 完成 GBM 分配。
- 通过发到内核的 IOCTL 命令完成 ION 分配。

## 继承链

[GObject](https://docs.gtk.org/gobject/) → [GstObject](https://gstreamer.freedesktop.org/documentation/gstreamer/gstobject.html?gi-language=c) → [GstElement](https://gstreamer.freedesktop.org/documentation/gstreamer/gstelement.html?gi-language=c) → [GstAggregator](https://gstreamer.freedesktop.org/documentation/base/gstaggregator.html?gi-language=c) → GstVideoComposer

下表提供了有关 qtivcomposer 的端口模板和元素属性的信息。有关用例信息，请参见[视频合成用例](https://docs.qualcomm.com/doc/80-70022-50SC/topic/video-composition.html)。

## 端口配置

| 端口名称 | 功能 | 功能 | 功能 |
| --- | --- | --- | --- |
| SINK 模板：'sink\_%u'<br><ul class="ul" id="qtivcomposer__ul_rkh_dlv_q1c"><br>                                    <li class="li"><em class="ph i">可用性：</em> 按需</li><br><br>                                    <li class="li"><em class="ph i">方向：</em> 接收端</li><br><br>                                </ul> | video/x-raw | format： | { (string)NV12, (string)NV21, (string)UYVY, (string)YUY2, (string)RGBA, (string)BGRA, (string)ARGB, (string)ABGR, (string)RGBx, (string)BGRx, (string)xRGB, (string)xBGR, (string)RGB, (string)BGR, (string)GRAY8 } |
| SINK 模板：'sink\_%u'<br><ul class="ul" id="qtivcomposer__ul_rkh_dlv_q1c"><br>                                    <li class="li"><em class="ph i">可用性：</em> 按需</li><br><br>                                    <li class="li"><em class="ph i">方向：</em> 接收端</li><br><br>                                </ul> | video/x-raw | width: | [ 1, 32767 ] |
| SINK 模板：'sink\_%u'<br><ul class="ul" id="qtivcomposer__ul_rkh_dlv_q1c"><br>                                    <li class="li"><em class="ph i">可用性：</em> 按需</li><br><br>                                    <li class="li"><em class="ph i">方向：</em> 接收端</li><br><br>                                </ul> | video/x-raw | height: | [ 1, 32767 ] |
| SINK 模板：'sink\_%u'<br><ul class="ul" id="qtivcomposer__ul_rkh_dlv_q1c"><br>                                    <li class="li"><em class="ph i">可用性：</em> 按需</li><br><br>                                    <li class="li"><em class="ph i">方向：</em> 接收端</li><br><br>                                </ul> | video/x-raw | framerate： | [ 0/1, 255/1 ] |
| SINK 模板：'sink\_%u'<br><ul class="ul" id="qtivcomposer__ul_rkh_dlv_q1c"><br>                                    <li class="li"><em class="ph i">可用性：</em> 按需</li><br><br>                                    <li class="li"><em class="ph i">方向：</em> 接收端</li><br><br>                                </ul> | video/x-raw (memory:GBM) | format： | { (string)NV12, (string)NV21, (string)UYVY, (string)YUY2, (string)RGBA, (string)BGRA, (string)ARGB, (string)ABGR, (string)RGBx, (string)BGRx, (string)xRGB, (string)xBGR, (string)RGB, (string)BGR, (string)GRAY8 } |
| SINK 模板：'sink\_%u'<br><ul class="ul" id="qtivcomposer__ul_rkh_dlv_q1c"><br>                                    <li class="li"><em class="ph i">可用性：</em> 按需</li><br><br>                                    <li class="li"><em class="ph i">方向：</em> 接收端</li><br><br>                                </ul> | video/x-raw (memory:GBM) | width: | [ 1, 32767 ] |
| SINK 模板：'sink\_%u'<br><ul class="ul" id="qtivcomposer__ul_rkh_dlv_q1c"><br>                                    <li class="li"><em class="ph i">可用性：</em> 按需</li><br><br>                                    <li class="li"><em class="ph i">方向：</em> 接收端</li><br><br>                                </ul> | video/x-raw (memory:GBM) | height: | [ 1, 32767 ] |
| SINK 模板：'sink\_%u'<br><ul class="ul" id="qtivcomposer__ul_rkh_dlv_q1c"><br>                                    <li class="li"><em class="ph i">可用性：</em> 按需</li><br><br>                                    <li class="li"><em class="ph i">方向：</em> 接收端</li><br><br>                                </ul> | video/x-raw (memory:GBM) | framerate： | [ 0/1, 255/1 ] |
| SRC 模板：'src'<br><ul class="ul" id="qtivcomposer__ul_kcp_dlv_q1c"><br>                                    <li class="li"><em class="ph i">可用性：</em> 始终可用</li><br><br>                                    <li class="li"><em class="ph i">方向：</em> 发送</li><br><br>                                </ul> | video/x-raw | format： | { (string)NV12, (string)NV21, (string)UYVY, (string)YUY2, (string)RGBA, (string)BGRA, (string)ARGB, (string)ABGR, (string)RGBx, (string)BGRx, (string)xRGB, (string)xBGR, (string)RGB, (string)BGR, (string)GRAY8 } |
| SRC 模板：'src'<br><ul class="ul" id="qtivcomposer__ul_kcp_dlv_q1c"><br>                                    <li class="li"><em class="ph i">可用性：</em> 始终可用</li><br><br>                                    <li class="li"><em class="ph i">方向：</em> 发送</li><br><br>                                </ul> | video/x-raw | width: | [ 1, 32767 ] |
| SRC 模板：'src'<br><ul class="ul" id="qtivcomposer__ul_kcp_dlv_q1c"><br>                                    <li class="li"><em class="ph i">可用性：</em> 始终可用</li><br><br>                                    <li class="li"><em class="ph i">方向：</em> 发送</li><br><br>                                </ul> | video/x-raw | height: | [ 1, 32767 ] |
| SRC 模板：'src'<br><ul class="ul" id="qtivcomposer__ul_kcp_dlv_q1c"><br>                                    <li class="li"><em class="ph i">可用性：</em> 始终可用</li><br><br>                                    <li class="li"><em class="ph i">方向：</em> 发送</li><br><br>                                </ul> | video/x-raw | framerate： | [ 0/1, 255/1 ] |
| SRC 模板：'src'<br><ul class="ul" id="qtivcomposer__ul_kcp_dlv_q1c"><br>                                    <li class="li"><em class="ph i">可用性：</em> 始终可用</li><br><br>                                    <li class="li"><em class="ph i">方向：</em> 发送</li><br><br>                                </ul> | video/x-raw (memory:GBM) | format： | { (string)NV12, (string)NV21, (string)UYVY, (string)YUY2, (string)RGBA, (string)BGRA, (string)ARGB, (string)ABGR, (string)RGBx, (string)BGRx, (string)xRGB, (string)xBGR, (string)RGB, (string)BGR, (string)GRAY8 } |
| SRC 模板：'src'<br><ul class="ul" id="qtivcomposer__ul_kcp_dlv_q1c"><br>                                    <li class="li"><em class="ph i">可用性：</em> 始终可用</li><br><br>                                    <li class="li"><em class="ph i">方向：</em> 发送</li><br><br>                                </ul> | video/x-raw (memory:GBM) | width: | [ 1, 32767 ] |
| SRC 模板：'src'<br><ul class="ul" id="qtivcomposer__ul_kcp_dlv_q1c"><br>                                    <li class="li"><em class="ph i">可用性：</em> 始终可用</li><br><br>                                    <li class="li"><em class="ph i">方向：</em> 发送</li><br><br>                                </ul> | video/x-raw (memory:GBM) | height: | [ 1, 32767 ] |
| SRC 模板：'src'<br><ul class="ul" id="qtivcomposer__ul_kcp_dlv_q1c"><br>                                    <li class="li"><em class="ph i">可用性：</em> 始终可用</li><br><br>                                    <li class="li"><em class="ph i">方向：</em> 发送</li><br><br>                                </ul> | video/x-raw (memory:GBM) | framerate： | [ 0/1, 255/1 ] |
|  |  |  |  |
|  |  |  |  |
|  |  |  |  |
|  |  |  |  |
|  |  |  |  |
|  |  |  |  |
|  |  |  |  |

| 端口 | 属性 | 说明 |
| --- | --- | --- |
| 'sink\_%u' | zorder | Z 轴顺序，默认为创建顺序。<br><ul class="ul" id="qtivcomposer__ul_x3v_2lv_q1c"><br>                                    <li class="li">标志：可读、可写、可在 NULL、READY、PAUSED 或 PLAYING 状态下更改、0x40000000</li><br><br>                                    <li class="li">整型。范围：˗1 至 2147483647 默认值：˗1</li><br><br>                                </ul> |
| 'sink\_%u' | crop | 裁剪矩形 ('&lt;X, Y, WIDTH, HEIGHT &gt;')<br><ul class="ul" id="qtivcomposer__ul_kl3_flv_q1c"><br>                                    <li class="li">标志：可读、可写、可在 NULL、READY、PAUSED 或 PLAYING 状态下更改、0x40000000</li><br><br>                                    <li class="li">GstValueArray 类型为 "gint" 的 GValues 数组</li><br><br>                                </ul> |
| 'sink\_%u' | position | 目标矩形左上角的 X 和 Y 坐标 ('&lt;X, Y&gt;')。<br><ul class="ul" id="qtivcomposer__ul_exn_flv_q1c"><br>                                    <li class="li">标志：可读、可写、可在 NULL、READY、PAUSED 或 PLAYING 状态下更改、0x40000000</li><br><br>                                    <li class="li">GstValueArray 类型为 "gint" 的 GValues 数组</li><br><br>                                </ul> |
| 'sink\_%u' | dimensions | 目标矩形的宽度和高度，如果为“0”，则将与输入尺寸相同（'&lt;WIDTH, HEIGHT&gt;'）<br><ul class="ul" id="qtivcomposer__ul_tfy_flv_q1c"><br>                                    <li class="li">标志：可读、可写、可在 NULL、READY、PAUSED 或 PLAYING 状态下更改、0x40000000</li><br><br>                                    <li class="li">GstValueArray 类型为 "gint" 的 GValues 数组</li><br><br>                                </ul> |
| 'sink\_%u' | alpha | 阿尔法通道值。<br><ul class="ul" id="qtivcomposer__ul_bmd_glv_q1c"><br>                                    <li class="li">标志：可读、可写、可在 NULL、READY、PAUSED 或 PLAYING 状态下更改、0x40000000</li><br><br>                                    <li class="li">双精度浮点型。范围：0.0 - 1.0 默认：1.0</li><br><br>                                </ul> |
| 'sink\_%u' | flip-horizontal | 水平翻转视频图像。<br><ul class="ul" id="qtivcomposer__ul_wvs_glv_q1c"><br>                                    <li class="li">标志：可读、可写、可在 NULL、READY、PAUSED 或 PLAYING 状态下更改、0x40000000</li><br><br>                                    <li class="li">Boolean。默认值：false</li><br><br>                                </ul> |
| 'sink\_%u' | flip-vertical | 垂直翻转视频图像。<br><ul class="ul" id="qtivcomposer__ul_hlg_hlv_q1c"><br>                                    <li class="li">标志：可读、可写、可在 NULL、READY、PAUSED 或 PLAYING 状态下更改、0x40000000</li><br><br>                                    <li class="li">Boolean。默认值：false</li><br><br>                                </ul> |
| 'sink\_%u' | rotate | 旋转视频图像。<br><ul class="ul" id="qtivcomposer__ul_lx4_hlv_q1c"><br>                                    <li class="li">标志：可读、可写、可在 NULL、READY、PAUSED 或 PLAYING 状态下更改、0x40000000</li><br><br>                                    <li class="li">枚举 “GstVideoComposerRotate” 默认：0，“none”<ul class="ul" id="qtivcomposer__ul_jt3_24m_4yb"><br>                                            <li class="li"> (0)：none - 无旋转</li><br><br>                                            <li class="li"> (1)：90CW - 顺时针旋转 90 度</li><br><br>                                            <li class="li"> (2)：90CCW - 逆时针旋转 90 度</li><br><br>                                            <li class="li"> (3)：180 - 旋转 180 度</li><br><br>                                        </ul><br></li><br><br>                                </ul> |
| 'sink\_%u' | emit-signals | 发送信号以消耗信号数据<br><ul class="ul" id="qtivcomposer__ul_clr_3lv_q1c"><br>                                    <li class="li"> 标志：可读、可写</li><br><br>                                    <li class="li"> Boolean。默认值：false</li><br><br>                                </ul> |
|  |  |  |
|  |  |  |
|  |  |  |
|  |  |  |
|  |  |  |
|  |  |  |
|  |  |  |
|  |  |  |

## 元素配置

Table : qtivcomposer 的元素属性

| 属性 | 说明 |
| --- | --- |
| name | 对象名称<br><ul class="ul" id="qtivcomposer__ul_ocj_klv_q1c"><br>                                    <li class="li">标志：可读、可写</li><br><br>                                    <li class="li">字符串。默认："videocomposer0"</li><br><br>                                </ul> |
| parent | 对象的父级<br><ul class="ul" id="qtivcomposer__ul_jdn_klv_q1c"><br>                                    <li class="li">标志：可读、可写</li><br><br>                                    <li class="li">"GstObject" 类型的对象</li><br><br>                                </ul> |
| engine | 用于转换操作的引擎后端<ul class="ul" id="qtivcomposer__ul_icy_klv_q1c"><br>                                    <li class="li">标志：可读、可写</li><br><br>                                    <li class="li">枚举“GstVideoConverterBackend”默认： 1，“gles”<ul class="ul" id="qtivcomposer__ul_ayt_mlv_q1c"><br>                                            <li class="li">(1)：gles - 使用基于 OpenGLES 的视频转换器 </li><br><br>                                            <li class="li">(2)：fcv - 使用基于 FastCV 的视频转换器</li><br><br>                                        </ul><br><div class="note note" id="qtivcomposer__note_etr_pyg_vdc"><span class="notetitle">Note:</span> 目前不支持 Qualcomm Computer Vision SDK（fcv）引擎。</div><br></li><br><br>                                </ul> |
| latency | 实时模式下的额外延迟，允许上游花费更长的时间生成当前位置的缓存（以纳秒为单位）<br><ul class="ul" id="qtivcomposer__ul_cn5_nlv_q1c"><br>                                    <li class="li">标志：可读、可写</li><br><br>                                    <li class="li">64 位无符号整型。 </li><br><br>                                    <li class="li">范围：0 - 18446744073709551615 </li><br><br>                                    <li class="li">默认值：0</li><br><br>                                </ul> |
| start-time-selection | 决定输出哪个开始时间。<br><ul class="ul" id="qtivcomposer__ul_wd4_plv_q1c"><br>                                    <li class="li">标志：可读、可写</li><br><br>                                    <li class="li">枚举 “GstAggregatorStartTimeSelection” 默认：0，“zero”<ul class="ul" id="qtivcomposer__ul_d2d_f4m_4yb"><br>                                            <li class="li"> (0)：zero - 从 0 运行时间开始（默认）</li><br><br>                                            <li class="li"> (1)：first - 从第一个观察到的输入运行时间开始</li><br><br>                                            <li class="li"> (2)：set - 使用 start-time 属性设置开始时间</li><br><br>                                        </ul><br></li><br><br>                                </ul> |
| start-time | 当 start-time-selection=set 时的开始时间<br><ul class="ul" id="qtivcomposer__ul_bf2_qlv_q1c"><br>                                    <li class="li">标志：可读、可写</li><br><br>                                    <li class="li">64 位无符号整型。范围：0 - 18446744073709551615 默认：18446744073709551615</li><br><br>                                </ul> |
| background | 背景颜色<br><ul class="ul" id="qtivcomposer__ul_gw3_qlv_q1c"><br>                                    <li class="li">标志：可读、可写、可在 NULL、READY、PAUSED 或 PLAYING 状态下更改</li><br><br>                                    <li class="li">无符号整数范围 ：0 - 4294967295 </li><br><br>                                    <li class="li">默认值：4286611584</li><br><br>                                </ul> |

**Parent Topic:** [配置显示器、摄像头、编码和解码插件](https://docs.qualcomm.com/doc/80-70022-50SC/topic/display-plugins.html)

Last Published: Nov 05, 2025

[Previous Topic
qtiqmmfsrc](https://docs.qualcomm.com/bundle/publicresource/80-70022-50SC/topics/qtiqmmfsrc.md) [Next Topic
Waylandsink](https://docs.qualcomm.com/bundle/publicresource/80-70022-50SC/topics/waylandsink.md)