Compare commits

...

3 Commits

Author SHA1 Message Date
yair
19f8e1d02e with crop 2025-11-16 05:24:38 +02:00
yair
fe6312e484 add get all by default 2025-11-16 05:21:25 +02:00
yair
bc12e0ea13 Fix property getters to query hardware state instead of cached values
- PROP_AUTO_EXPOSURE now queries hardware using IS_GET_ENABLE_AUTO_SHUTTER
- PROP_AUTO_GAIN now queries hardware using IS_GET_ENABLE_AUTO_GAIN
- PROP_GAIN_BOOST now queries hardware using IS_GET_GAINBOOST

This ensures each camera reports its actual hardware state rather than
a shared cached value when properties are queried via camera_control.py
2025-11-16 05:21:09 +02:00
3 changed files with 195 additions and 71 deletions

View File

@@ -4,55 +4,73 @@
<!-- Generated by graphviz version 14.0.2 (20251019.1705)
-->
<!-- Title: pipeline Pages: 1 -->
<svg width="1103pt" height="290pt"
viewBox="0.00 0.00 1103.00 290.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<svg width="1466pt" height="290pt"
viewBox="0.00 0.00 1466.00 290.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<g id="graph0" class="graph" transform="scale(1 1) rotate(0) translate(4 285.85)">
<title>pipeline</title>
<polygon fill="white" stroke="none" points="-4,4 -4,-285.85 1099.2,-285.85 1099.2,4 -4,4"/>
<text xml:space="preserve" text-anchor="middle" x="547.6" y="-268.35" font-family="sans" font-size="10.00">&lt;GstPipeline&gt;</text>
<text xml:space="preserve" text-anchor="middle" x="547.6" y="-255.6" font-family="sans" font-size="10.00">pipeline0</text>
<text xml:space="preserve" text-anchor="middle" x="547.6" y="-242.85" font-family="sans" font-size="10.00">[&gt;]</text>
<polygon fill="white" stroke="none" points="-4,4 -4,-285.85 1462.2,-285.85 1462.2,4 -4,4"/>
<text xml:space="preserve" text-anchor="middle" x="729.1" y="-268.35" font-family="sans" font-size="10.00">&lt;GstPipeline&gt;</text>
<text xml:space="preserve" text-anchor="middle" x="729.1" y="-255.6" font-family="sans" font-size="10.00">pipeline0</text>
<text xml:space="preserve" text-anchor="middle" x="729.1" y="-242.85" font-family="sans" font-size="10.00">[&gt;]</text>
<g id="clust1" class="cluster">
<title>cluster_node_udpsink0_000001FC4DD89DE0</title>
<path fill="#aaaaff" stroke="black" d="M886.45,-75.6C886.45,-75.6 1083.2,-75.6 1083.2,-75.6 1089.2,-75.6 1095.2,-81.6 1095.2,-87.6 1095.2,-87.6 1095.2,-215.6 1095.2,-215.6 1095.2,-221.6 1089.2,-227.6 1083.2,-227.6 1083.2,-227.6 886.45,-227.6 886.45,-227.6 880.45,-227.6 874.45,-221.6 874.45,-215.6 874.45,-215.6 874.45,-87.6 874.45,-87.6 874.45,-81.6 880.45,-75.6 886.45,-75.6"/>
<text xml:space="preserve" text-anchor="middle" x="984.83" y="-216" font-family="Bitstream Vera Sans" font-size="8.00">GstUDPSink</text>
<text xml:space="preserve" text-anchor="middle" x="984.83" y="-206.25" font-family="Bitstream Vera Sans" font-size="8.00">udpsink0</text>
<text xml:space="preserve" text-anchor="middle" x="984.83" y="-196.5" font-family="Bitstream Vera Sans" font-size="8.00">[&gt;]</text>
<text xml:space="preserve" text-anchor="middle" x="984.83" y="-186.75" font-family="Bitstream Vera Sans" font-size="8.00">last&#45;sample=((GstSample*) 000001FC4DE728F0)</text>
<text xml:space="preserve" text-anchor="middle" x="984.83" y="-177" font-family="Bitstream Vera Sans" font-size="8.00">used&#45;socket=((GSocket*) 000001FC4DD85E90)</text>
<text xml:space="preserve" text-anchor="middle" x="984.83" y="-167.25" font-family="Bitstream Vera Sans" font-size="8.00">used&#45;socket&#45;v6=((GSocket*) 000001FC4DD87A30)</text>
<text xml:space="preserve" text-anchor="middle" x="984.83" y="-157.5" font-family="Bitstream Vera Sans" font-size="8.00">clients=&quot;127.0.0.1:5000&quot;</text>
<text xml:space="preserve" text-anchor="middle" x="984.83" y="-147.75" font-family="Bitstream Vera Sans" font-size="8.00">host=&quot;127.0.0.1&quot;</text>
<text xml:space="preserve" text-anchor="middle" x="984.83" y="-138" font-family="Bitstream Vera Sans" font-size="8.00">port=5000</text>
<title>cluster_node_udpsink0_0000018E25D28DB0</title>
<path fill="#aaaaff" stroke="black" d="M1248.7,-75.6C1248.7,-75.6 1446.2,-75.6 1446.2,-75.6 1452.2,-75.6 1458.2,-81.6 1458.2,-87.6 1458.2,-87.6 1458.2,-215.6 1458.2,-215.6 1458.2,-221.6 1452.2,-227.6 1446.2,-227.6 1446.2,-227.6 1248.7,-227.6 1248.7,-227.6 1242.7,-227.6 1236.7,-221.6 1236.7,-215.6 1236.7,-215.6 1236.7,-87.6 1236.7,-87.6 1236.7,-81.6 1242.7,-75.6 1248.7,-75.6"/>
<text xml:space="preserve" text-anchor="middle" x="1347.45" y="-216" font-family="Bitstream Vera Sans" font-size="8.00">GstUDPSink</text>
<text xml:space="preserve" text-anchor="middle" x="1347.45" y="-206.25" font-family="Bitstream Vera Sans" font-size="8.00">udpsink0</text>
<text xml:space="preserve" text-anchor="middle" x="1347.45" y="-196.5" font-family="Bitstream Vera Sans" font-size="8.00">[&gt;]</text>
<text xml:space="preserve" text-anchor="middle" x="1347.45" y="-186.75" font-family="Bitstream Vera Sans" font-size="8.00">last&#45;sample=((GstSample*) 0000018E27D5C020)</text>
<text xml:space="preserve" text-anchor="middle" x="1347.45" y="-177" font-family="Bitstream Vera Sans" font-size="8.00">used&#45;socket=((GSocket*) 0000018E25D2B7B0)</text>
<text xml:space="preserve" text-anchor="middle" x="1347.45" y="-167.25" font-family="Bitstream Vera Sans" font-size="8.00">used&#45;socket&#45;v6=((GSocket*) 0000018E25D2B2D0)</text>
<text xml:space="preserve" text-anchor="middle" x="1347.45" y="-157.5" font-family="Bitstream Vera Sans" font-size="8.00">clients=&quot;10.81.2.183:5000&quot;</text>
<text xml:space="preserve" text-anchor="middle" x="1347.45" y="-147.75" font-family="Bitstream Vera Sans" font-size="8.00">host=&quot;10.81.2.183&quot;</text>
<text xml:space="preserve" text-anchor="middle" x="1347.45" y="-138" font-family="Bitstream Vera Sans" font-size="8.00">port=5000</text>
</g>
<g id="clust2" class="cluster">
<title>cluster_node_udpsink0_000001FC4DD89DE0_sink</title>
<title>cluster_node_udpsink0_0000018E25D28DB0_sink</title>
</g>
<g id="clust3" class="cluster">
<title>cluster_node_queue0_000001FC4BB96850</title>
<path fill="#aaffaa" stroke="black" d="M524.2,-75.6C524.2,-75.6 673.2,-75.6 673.2,-75.6 679.2,-75.6 685.2,-81.6 685.2,-87.6 685.2,-87.6 685.2,-156.6 685.2,-156.6 685.2,-162.6 679.2,-168.6 673.2,-168.6 673.2,-168.6 524.2,-168.6 524.2,-168.6 518.2,-168.6 512.2,-162.6 512.2,-156.6 512.2,-156.6 512.2,-87.6 512.2,-87.6 512.2,-81.6 518.2,-75.6 524.2,-75.6"/>
<text xml:space="preserve" text-anchor="middle" x="598.7" y="-157" font-family="Bitstream Vera Sans" font-size="8.00">GstQueue</text>
<text xml:space="preserve" text-anchor="middle" x="598.7" y="-147.25" font-family="Bitstream Vera Sans" font-size="8.00">queue0</text>
<text xml:space="preserve" text-anchor="middle" x="598.7" y="-137.5" font-family="Bitstream Vera Sans" font-size="8.00">[&gt;]</text>
<title>cluster_node_queue0_0000018E25C95910</title>
<path fill="#aaffaa" stroke="black" d="M886.45,-75.6C886.45,-75.6 1035.45,-75.6 1035.45,-75.6 1041.45,-75.6 1047.45,-81.6 1047.45,-87.6 1047.45,-87.6 1047.45,-186.6 1047.45,-186.6 1047.45,-192.6 1041.45,-198.6 1035.45,-198.6 1035.45,-198.6 886.45,-198.6 886.45,-198.6 880.45,-198.6 874.45,-192.6 874.45,-186.6 874.45,-186.6 874.45,-87.6 874.45,-87.6 874.45,-81.6 880.45,-75.6 886.45,-75.6"/>
<text xml:space="preserve" text-anchor="middle" x="960.95" y="-187" font-family="Bitstream Vera Sans" font-size="8.00">GstQueue</text>
<text xml:space="preserve" text-anchor="middle" x="960.95" y="-177.25" font-family="Bitstream Vera Sans" font-size="8.00">queue0</text>
<text xml:space="preserve" text-anchor="middle" x="960.95" y="-167.5" font-family="Bitstream Vera Sans" font-size="8.00">[&gt;]</text>
<text xml:space="preserve" text-anchor="middle" x="960.95" y="-157.75" font-family="Bitstream Vera Sans" font-size="8.00">current&#45;level&#45;buffers=1</text>
<text xml:space="preserve" text-anchor="middle" x="960.95" y="-148" font-family="Bitstream Vera Sans" font-size="8.00">current&#45;level&#45;bytes=7368</text>
<text xml:space="preserve" text-anchor="middle" x="960.95" y="-138.25" font-family="Bitstream Vera Sans" font-size="8.00">current&#45;level&#45;time=171900</text>
</g>
<g id="clust4" class="cluster">
<title>cluster_node_queue0_000001FC4BB96850_sink</title>
<title>cluster_node_queue0_0000018E25C95910_sink</title>
</g>
<g id="clust5" class="cluster">
<title>cluster_node_queue0_000001FC4BB96850_src</title>
<title>cluster_node_queue0_0000018E25C95910_src</title>
</g>
<g id="clust6" class="cluster">
<title>cluster_node_idsueyesrc0_000001FC4DD4B2C0</title>
<path fill="#ffaaaa" stroke="black" d="M81.98,-75.6C81.98,-75.6 241.98,-75.6 241.98,-75.6 247.98,-75.6 253.98,-81.6 253.98,-87.6 253.98,-87.6 253.98,-186.6 253.98,-186.6 253.98,-192.6 247.98,-198.6 241.98,-198.6 241.98,-198.6 81.98,-198.6 81.98,-198.6 75.98,-198.6 69.98,-192.6 69.98,-186.6 69.98,-186.6 69.98,-87.6 69.98,-87.6 69.98,-81.6 75.98,-75.6 81.98,-75.6"/>
<text xml:space="preserve" text-anchor="middle" x="161.98" y="-187" font-family="Bitstream Vera Sans" font-size="8.00">GstIdsueyeSrc</text>
<text xml:space="preserve" text-anchor="middle" x="161.98" y="-177.25" font-family="Bitstream Vera Sans" font-size="8.00">idsueyesrc0</text>
<text xml:space="preserve" text-anchor="middle" x="161.98" y="-167.5" font-family="Bitstream Vera Sans" font-size="8.00">[&gt;]</text>
<text xml:space="preserve" text-anchor="middle" x="161.98" y="-157.75" font-family="Bitstream Vera Sans" font-size="8.00">config&#45;file=&quot;ini/200fps&#45;2456x4pix&#45;cw.ini&quot;</text>
<text xml:space="preserve" text-anchor="middle" x="161.98" y="-148" font-family="Bitstream Vera Sans" font-size="8.00">exposure=3.237784</text>
<text xml:space="preserve" text-anchor="middle" x="161.98" y="-138.25" font-family="Bitstream Vera Sans" font-size="8.00">framerate=300.000000</text>
<title>cluster_node_videocrop0_0000018E25CC4B00</title>
<path fill="#aaffaa" stroke="black" d="M524.2,-75.6C524.2,-75.6 673.2,-75.6 673.2,-75.6 679.2,-75.6 685.2,-81.6 685.2,-87.6 685.2,-87.6 685.2,-176.6 685.2,-176.6 685.2,-182.6 679.2,-188.6 673.2,-188.6 673.2,-188.6 524.2,-188.6 524.2,-188.6 518.2,-188.6 512.2,-182.6 512.2,-176.6 512.2,-176.6 512.2,-87.6 512.2,-87.6 512.2,-81.6 518.2,-75.6 524.2,-75.6"/>
<text xml:space="preserve" text-anchor="middle" x="598.7" y="-177" font-family="Bitstream Vera Sans" font-size="8.00">GstVideoCrop</text>
<text xml:space="preserve" text-anchor="middle" x="598.7" y="-167.25" font-family="Bitstream Vera Sans" font-size="8.00">videocrop0</text>
<text xml:space="preserve" text-anchor="middle" x="598.7" y="-157.5" font-family="Bitstream Vera Sans" font-size="8.00">[&gt;]</text>
<text xml:space="preserve" text-anchor="middle" x="598.7" y="-147.75" font-family="Bitstream Vera Sans" font-size="8.00">qos=TRUE</text>
<text xml:space="preserve" text-anchor="middle" x="598.7" y="-138" font-family="Bitstream Vera Sans" font-size="8.00">bottom=3</text>
</g>
<g id="clust7" class="cluster">
<title>cluster_node_idsueyesrc0_000001FC4DD4B2C0_src</title>
<title>cluster_node_videocrop0_0000018E25CC4B00_sink</title>
</g>
<g id="clust8" class="cluster">
<title>cluster_node_videocrop0_0000018E25CC4B00_src</title>
</g>
<g id="clust9" class="cluster">
<title>cluster_node_idsueyesrc0_0000018E25CEE120</title>
<path fill="#ffaaaa" stroke="black" d="M30.97,-75.6C30.97,-75.6 292.97,-75.6 292.97,-75.6 298.97,-75.6 304.97,-81.6 304.97,-87.6 304.97,-87.6 304.97,-186.6 304.97,-186.6 304.97,-192.6 298.97,-198.6 292.97,-198.6 292.97,-198.6 30.97,-198.6 30.97,-198.6 24.97,-198.6 18.97,-192.6 18.97,-186.6 18.97,-186.6 18.97,-87.6 18.97,-87.6 18.97,-81.6 24.97,-75.6 30.97,-75.6"/>
<text xml:space="preserve" text-anchor="middle" x="161.97" y="-187" font-family="Bitstream Vera Sans" font-size="8.00">GstIdsueyeSrc</text>
<text xml:space="preserve" text-anchor="middle" x="161.97" y="-177.25" font-family="Bitstream Vera Sans" font-size="8.00">idsueyesrc0</text>
<text xml:space="preserve" text-anchor="middle" x="161.97" y="-167.5" font-family="Bitstream Vera Sans" font-size="8.00">[&gt;]</text>
<text xml:space="preserve" text-anchor="middle" x="161.97" y="-157.75" font-family="Bitstream Vera Sans" font-size="8.00">config&#45;file=&quot;ini/100fps&#45;10exp&#45;2456x4pix&#45;500top&#45;cw&#45;extragain.ini&quot;</text>
<text xml:space="preserve" text-anchor="middle" x="161.97" y="-148" font-family="Bitstream Vera Sans" font-size="8.00">exposure=1.241433</text>
<text xml:space="preserve" text-anchor="middle" x="161.97" y="-138.25" font-family="Bitstream Vera Sans" font-size="8.00">framerate=750.000000</text>
</g>
<g id="clust10" class="cluster">
<title>cluster_node_idsueyesrc0_0000018E25CEE120_src</title>
</g>
<!-- legend -->
<g id="node1" class="node">
@@ -64,52 +82,81 @@
<text xml:space="preserve" text-anchor="start" x="3.6" y="-19.05" font-family="sans" font-size="9.00">Pad&#45;Flags: [b]locked, [f]lushing, [b]locking, [E]OS; upper&#45;case is set</text>
<text xml:space="preserve" text-anchor="start" x="3.6" y="-7.05" font-family="sans" font-size="9.00">Pad&#45;Task: [T] has started task, [t] has paused task</text>
</g>
<!-- node_udpsink0_000001FC4DD89DE0_node_sink_000001FC4DD609D0 -->
<!-- node_udpsink0_0000018E25D28DB0_node_sink_0000018E25CFB9A0 -->
<g id="node2" class="node">
<title>node_udpsink0_000001FC4DD89DE0_node_sink_000001FC4DD609D0</title>
<polygon fill="#aaaaff" stroke="black" points="1011.33,-115.6 957.33,-115.6 957.33,-91.6 1011.33,-91.6 1011.33,-115.6"/>
<text xml:space="preserve" text-anchor="middle" x="984.33" y="-107.05" font-family="sans" font-size="9.00">sink</text>
<text xml:space="preserve" text-anchor="middle" x="984.33" y="-95.05" font-family="sans" font-size="9.00">[&gt;][bfb]</text>
<title>node_udpsink0_0000018E25D28DB0_node_sink_0000018E25CFB9A0</title>
<polygon fill="#aaaaff" stroke="black" points="1373.95,-115.6 1319.95,-115.6 1319.95,-91.6 1373.95,-91.6 1373.95,-115.6"/>
<text xml:space="preserve" text-anchor="middle" x="1346.95" y="-107.05" font-family="sans" font-size="9.00">sink</text>
<text xml:space="preserve" text-anchor="middle" x="1346.95" y="-95.05" font-family="sans" font-size="9.00">[&gt;][bfb]</text>
</g>
<!-- node_queue0_000001FC4BB96850_node_sink_000001FC4DD5F9A0 -->
<!-- node_queue0_0000018E25C95910_node_sink_0000018E25CFB750 -->
<g id="node3" class="node">
<title>node_queue0_000001FC4BB96850_node_sink_000001FC4DD5F9A0</title>
<title>node_queue0_0000018E25C95910_node_sink_0000018E25CFB750</title>
<polygon fill="#aaaaff" stroke="black" points="944.45,-115.6 890.45,-115.6 890.45,-91.6 944.45,-91.6 944.45,-115.6"/>
<text xml:space="preserve" text-anchor="middle" x="917.45" y="-107.05" font-family="sans" font-size="9.00">sink</text>
<text xml:space="preserve" text-anchor="middle" x="917.45" y="-95.05" font-family="sans" font-size="9.00">[&gt;][bfb]</text>
</g>
<!-- node_queue0_0000018E25C95910_node_src_0000018E25CFA4D0 -->
<g id="node4" class="node">
<title>node_queue0_0000018E25C95910_node_src_0000018E25CFA4D0</title>
<polygon fill="#ffaaaa" stroke="black" points="1031.45,-115.6 977.45,-115.6 977.45,-91.6 1031.45,-91.6 1031.45,-115.6"/>
<text xml:space="preserve" text-anchor="middle" x="1004.45" y="-107.05" font-family="sans" font-size="9.00">src</text>
<text xml:space="preserve" text-anchor="middle" x="1004.45" y="-95.05" font-family="sans" font-size="9.00">[&gt;][bfb][T]</text>
</g>
<!-- node_queue0_0000018E25C95910_node_sink_0000018E25CFB750&#45;&gt;node_queue0_0000018E25C95910_node_src_0000018E25CFA4D0 -->
<!-- node_queue0_0000018E25C95910_node_src_0000018E25CFA4D0&#45;&gt;node_udpsink0_0000018E25D28DB0_node_sink_0000018E25CFB9A0 -->
<g id="edge2" class="edge">
<title>node_queue0_0000018E25C95910_node_src_0000018E25CFA4D0&#45;&gt;node_udpsink0_0000018E25D28DB0_node_sink_0000018E25CFB9A0</title>
<path fill="none" stroke="black" d="M1031.89,-103.6C1092,-103.6 1239.11,-103.6 1308.53,-103.6"/>
<polygon fill="black" stroke="black" points="1308.25,-107.1 1318.25,-103.6 1308.25,-100.1 1308.25,-107.1"/>
<text xml:space="preserve" text-anchor="start" x="1055.45" y="-179.05" font-family="monospace" font-size="9.00">video/x&#45;raw</text>
<text xml:space="preserve" text-anchor="start" x="1055.45" y="-168.55" font-family="monospace" font-size="9.00"> &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;format: BGR</text>
<text xml:space="preserve" text-anchor="start" x="1055.45" y="-158.05" font-family="monospace" font-size="9.00"> &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;width: 2456</text>
<text xml:space="preserve" text-anchor="start" x="1055.45" y="-147.55" font-family="monospace" font-size="9.00"> &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;height: 1</text>
<text xml:space="preserve" text-anchor="start" x="1055.45" y="-137.05" font-family="monospace" font-size="9.00"> &#160;&#160;&#160;&#160;&#160;interlace&#45;mode: progressive</text>
<text xml:space="preserve" text-anchor="start" x="1055.45" y="-126.55" font-family="monospace" font-size="9.00"> &#160;pixel&#45;aspect&#45;ratio: 1/1</text>
<text xml:space="preserve" text-anchor="start" x="1055.45" y="-116.05" font-family="monospace" font-size="9.00"> &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;colorimetry: sRGB</text>
<text xml:space="preserve" text-anchor="start" x="1055.45" y="-105.55" font-family="monospace" font-size="9.00"> &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;framerate: 0/1</text>
</g>
<!-- node_videocrop0_0000018E25CC4B00_node_sink_0000018E25CFAE10 -->
<g id="node5" class="node">
<title>node_videocrop0_0000018E25CC4B00_node_sink_0000018E25CFAE10</title>
<polygon fill="#aaaaff" stroke="black" points="582.2,-115.6 528.2,-115.6 528.2,-91.6 582.2,-91.6 582.2,-115.6"/>
<text xml:space="preserve" text-anchor="middle" x="555.2" y="-107.05" font-family="sans" font-size="9.00">sink</text>
<text xml:space="preserve" text-anchor="middle" x="555.2" y="-95.05" font-family="sans" font-size="9.00">[&gt;][bfb]</text>
</g>
<!-- node_queue0_000001FC4BB96850_node_src_000001FC4DD60E70 -->
<g id="node4" class="node">
<title>node_queue0_000001FC4BB96850_node_src_000001FC4DD60E70</title>
<!-- node_videocrop0_0000018E25CC4B00_node_src_0000018E25CFBE40 -->
<g id="node6" class="node">
<title>node_videocrop0_0000018E25CC4B00_node_src_0000018E25CFBE40</title>
<polygon fill="#ffaaaa" stroke="black" points="669.2,-115.6 615.2,-115.6 615.2,-91.6 669.2,-91.6 669.2,-115.6"/>
<text xml:space="preserve" text-anchor="middle" x="642.2" y="-107.05" font-family="sans" font-size="9.00">src</text>
<text xml:space="preserve" text-anchor="middle" x="642.2" y="-95.05" font-family="sans" font-size="9.00">[&gt;][bfb][T]</text>
<text xml:space="preserve" text-anchor="middle" x="642.2" y="-95.05" font-family="sans" font-size="9.00">[&gt;][bfb]</text>
</g>
<!-- node_queue0_000001FC4BB96850_node_sink_000001FC4DD5F9A0&#45;&gt;node_queue0_000001FC4BB96850_node_src_000001FC4DD60E70 -->
<!-- node_queue0_000001FC4BB96850_node_src_000001FC4DD60E70&#45;&gt;node_udpsink0_000001FC4DD89DE0_node_sink_000001FC4DD609D0 -->
<g id="edge2" class="edge">
<title>node_queue0_000001FC4BB96850_node_src_000001FC4DD60E70&#45;&gt;node_udpsink0_000001FC4DD89DE0_node_sink_000001FC4DD609D0</title>
<path fill="none" stroke="black" d="M669.61,-103.6C729.66,-103.6 876.61,-103.6 945.95,-103.6"/>
<polygon fill="black" stroke="black" points="945.66,-107.1 955.66,-103.6 945.66,-100.1 945.66,-107.1"/>
<!-- node_videocrop0_0000018E25CC4B00_node_sink_0000018E25CFAE10&#45;&gt;node_videocrop0_0000018E25CC4B00_node_src_0000018E25CFBE40 -->
<!-- node_videocrop0_0000018E25CC4B00_node_src_0000018E25CFBE40&#45;&gt;node_queue0_0000018E25C95910_node_sink_0000018E25CFB750 -->
<g id="edge4" class="edge">
<title>node_videocrop0_0000018E25CC4B00_node_src_0000018E25CFBE40&#45;&gt;node_queue0_0000018E25C95910_node_sink_0000018E25CFB750</title>
<path fill="none" stroke="black" d="M669.4,-103.6C718.16,-103.6 822.97,-103.6 879.12,-103.6"/>
<polygon fill="black" stroke="black" points="878.82,-107.1 888.82,-103.6 878.82,-100.1 878.82,-107.1"/>
<text xml:space="preserve" text-anchor="start" x="693.2" y="-179.05" font-family="monospace" font-size="9.00">video/x&#45;raw</text>
<text xml:space="preserve" text-anchor="start" x="693.2" y="-168.55" font-family="monospace" font-size="9.00"> &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;format: BGR</text>
<text xml:space="preserve" text-anchor="start" x="693.2" y="-158.05" font-family="monospace" font-size="9.00"> &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;width: 2456</text>
<text xml:space="preserve" text-anchor="start" x="693.2" y="-147.55" font-family="monospace" font-size="9.00"> &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;height: 4</text>
<text xml:space="preserve" text-anchor="start" x="693.2" y="-147.55" font-family="monospace" font-size="9.00"> &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;height: 1</text>
<text xml:space="preserve" text-anchor="start" x="693.2" y="-137.05" font-family="monospace" font-size="9.00"> &#160;&#160;&#160;&#160;&#160;interlace&#45;mode: progressive</text>
<text xml:space="preserve" text-anchor="start" x="693.2" y="-126.55" font-family="monospace" font-size="9.00"> &#160;pixel&#45;aspect&#45;ratio: 1/1</text>
<text xml:space="preserve" text-anchor="start" x="693.2" y="-116.05" font-family="monospace" font-size="9.00"> &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;colorimetry: sRGB</text>
<text xml:space="preserve" text-anchor="start" x="693.2" y="-105.55" font-family="monospace" font-size="9.00"> &#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;framerate: 0/1</text>
</g>
<!-- node_idsueyesrc0_000001FC4DD4B2C0_node_src_000001FC4BB7ECA0 -->
<g id="node5" class="node">
<title>node_idsueyesrc0_000001FC4DD4B2C0_node_src_000001FC4BB7ECA0</title>
<polygon fill="#ffaaaa" stroke="black" points="188.48,-115.6 134.48,-115.6 134.48,-91.6 188.48,-91.6 188.48,-115.6"/>
<text xml:space="preserve" text-anchor="middle" x="161.48" y="-107.05" font-family="sans" font-size="9.00">src</text>
<text xml:space="preserve" text-anchor="middle" x="161.48" y="-95.05" font-family="sans" font-size="9.00">[&gt;][bfb][T]</text>
<!-- node_idsueyesrc0_0000018E25CEE120_node_src_0000018E25C822C0 -->
<g id="node7" class="node">
<title>node_idsueyesrc0_0000018E25CEE120_node_src_0000018E25C822C0</title>
<polygon fill="#ffaaaa" stroke="black" points="188.47,-115.6 134.47,-115.6 134.47,-91.6 188.47,-91.6 188.47,-115.6"/>
<text xml:space="preserve" text-anchor="middle" x="161.47" y="-107.05" font-family="sans" font-size="9.00">src</text>
<text xml:space="preserve" text-anchor="middle" x="161.47" y="-95.05" font-family="sans" font-size="9.00">[&gt;][bfb][T]</text>
</g>
<!-- node_idsueyesrc0_000001FC4DD4B2C0_node_src_000001FC4BB7ECA0&#45;&gt;node_queue0_000001FC4BB96850_node_sink_000001FC4DD5F9A0 -->
<g id="edge3" class="edge">
<title>node_idsueyesrc0_000001FC4DD4B2C0_node_src_000001FC4BB7ECA0&#45;&gt;node_queue0_000001FC4BB96850_node_sink_000001FC4DD5F9A0</title>
<!-- node_idsueyesrc0_0000018E25CEE120_node_src_0000018E25C822C0&#45;&gt;node_videocrop0_0000018E25CC4B00_node_sink_0000018E25CFAE10 -->
<g id="edge5" class="edge">
<title>node_idsueyesrc0_0000018E25CEE120_node_src_0000018E25C822C0&#45;&gt;node_videocrop0_0000018E25CC4B00_node_sink_0000018E25CFAE10</title>
<path fill="none" stroke="black" d="M188.79,-103.6C256.58,-103.6 437.44,-103.6 516.42,-103.6"/>
<polygon fill="black" stroke="black" points="516.23,-107.1 526.23,-103.6 516.23,-100.1 516.23,-107.1"/>
<text xml:space="preserve" text-anchor="start" x="330.95" y="-179.05" font-family="monospace" font-size="9.00">video/x&#45;raw</text>

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

@@ -8,7 +8,9 @@
Test client for UDP exposure control
Usage:
uv run scripts/camera_control.py # Run full test suite
uv run scripts/camera_control.py # Get all camera settings (default)
uv run scripts/camera_control.py get-all # Get all camera settings
uv run scripts/camera_control.py test # Run full test suite
uv run scripts/camera_control.py get-exposure # Get current exposure
uv run scripts/camera_control.py set-exposure 10 # Set exposure to 10ms
uv run scripts/camera_control.py get-framerate # Get current framerate
@@ -91,6 +93,32 @@ def simple_command(command, description="Command"):
print(f"Unknown response: {response}")
return False
def get_all_settings():
"""Get all camera settings"""
print("=" * 70)
print("Camera Settings")
print("=" * 70)
settings = [
("Exposure", "GET_EXPOSURE"),
("Exposure Range", "GET_EXPOSURE_RANGE"),
("Framerate", "GET_FRAMERATE"),
("Gain", "GET_GAIN"),
("Auto-Exposure", "GET_AUTO_EXPOSURE"),
("Auto-Gain", "GET_AUTO_GAIN"),
("Gain Boost", "GET_GAIN_BOOST"),
]
all_success = True
for name, command in settings:
response = send_command(command)
print(f"{name:20s}: {response}")
if response.startswith("ERROR"):
all_success = False
print("=" * 70)
return all_success
def run_full_tests():
"""Run the full test suite (original functionality)"""
print("=" * 70)
@@ -180,8 +208,9 @@ def main():
description="UDP Exposure Control Test Client",
epilog="""
Examples:
%(prog)s # Show this help
%(prog)s # Get all camera settings (default)
%(prog)s test # Run full test suite
%(prog)s get-all # Get all camera settings
%(prog)s get-exposure # Get current exposure
%(prog)s set-exposure 10 # Set exposure to 10ms
%(prog)s get-framerate # Get current framerate
@@ -201,7 +230,7 @@ Examples:
parser.add_argument('command',
nargs='?',
choices=['test', 'get-exposure', 'get-exposure-range', 'set-exposure',
choices=['test', 'get-all', 'get-exposure', 'get-exposure-range', 'set-exposure',
'get-framerate', 'set-framerate', 'get-gain', 'set-gain',
'get-auto-exposure', 'set-auto-exposure',
'get-auto-gain', 'set-auto-gain',
@@ -228,10 +257,10 @@ Examples:
args = parser.parse_args()
# If no command provided, show help
# If no command provided, run get-all by default
if args.command is None:
parser.print_help()
return
success = get_all_settings()
sys.exit(0 if success else 1)
# Handle test command (full test suite)
if args.command == 'test':
@@ -239,7 +268,10 @@ Examples:
return
# Handle individual commands
if args.command == 'get-exposure':
if args.command == 'get-all':
success = get_all_settings()
elif args.command == 'get-exposure':
success = simple_command("GET_EXPOSURE", "Getting current exposure")
elif args.command == 'get-exposure-range':

View File

@@ -343,13 +343,58 @@ gst_idsueyesrc_get_property (GObject * object, guint property_id,
g_value_set_int (value, src->gain);
break;
case PROP_AUTO_EXPOSURE:
if (src->is_started && src->hCam) {
double enable = 0.0;
INT ret = is_SetAutoParameter (src->hCam, IS_GET_ENABLE_AUTO_SHUTTER,
&enable, NULL);
if (ret == IS_SUCCESS) {
gboolean actual_state = (enable != 0.0);
/* Update cached value to match hardware state */
src->auto_exposure = actual_state;
g_value_set_boolean (value, actual_state);
} else {
GST_WARNING_OBJECT (src, "Failed to query auto exposure state (error %d), returning cached value",
ret);
g_value_set_boolean (value, src->auto_exposure);
}
} else {
g_value_set_boolean (value, src->auto_exposure);
}
break;
case PROP_AUTO_GAIN:
if (src->is_started && src->hCam) {
double enable = 0.0;
INT ret = is_SetAutoParameter (src->hCam, IS_GET_ENABLE_AUTO_GAIN,
&enable, NULL);
if (ret == IS_SUCCESS) {
gboolean actual_state = (enable != 0.0);
/* Update cached value to match hardware state */
src->auto_gain = actual_state;
g_value_set_boolean (value, actual_state);
} else {
GST_WARNING_OBJECT (src, "Failed to query auto gain state (error %d), returning cached value",
ret);
g_value_set_boolean (value, src->auto_gain);
}
} else {
g_value_set_boolean (value, src->auto_gain);
}
break;
case PROP_GAIN_BOOST:
if (src->is_started && src->hCam) {
INT ret = is_SetGainBoost (src->hCam, IS_GET_GAINBOOST);
if (ret != IS_INVALID_PARAMETER) {
gboolean actual_state = (ret == IS_SET_GAINBOOST_ON);
/* Update cached value to match hardware state */
src->gain_boost = actual_state;
g_value_set_boolean (value, actual_state);
} else {
GST_WARNING_OBJECT (src, "Failed to query gain boost state, returning cached value");
g_value_set_boolean (value, src->gain_boost);
}
} else {
g_value_set_boolean (value, src->gain_boost);
}
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);