QVideo 4.24.0__tar.gz → 4.26.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (290) hide show
  1. {qvideo-4.24.0 → qvideo-4.26.0}/PKG-INFO +9 -3
  2. {qvideo-4.24.0 → qvideo-4.26.0}/QVideo.egg-info/PKG-INFO +9 -3
  3. {qvideo-4.24.0 → qvideo-4.26.0}/QVideo.egg-info/SOURCES.txt +19 -0
  4. {qvideo-4.24.0 → qvideo-4.26.0}/QVideo.egg-info/requires.txt +8 -2
  5. {qvideo-4.24.0 → qvideo-4.26.0}/README.md +1 -0
  6. {qvideo-4.24.0 → qvideo-4.26.0}/cameras/Genicam/_nodes.py +2 -0
  7. {qvideo-4.24.0 → qvideo-4.26.0}/cameras/Genicam/_tree.py +39 -14
  8. {qvideo-4.24.0 → qvideo-4.26.0}/cameras/Viva/_camera.py +3 -0
  9. {qvideo-4.24.0 → qvideo-4.26.0}/cameras/Viva/_tree.py +0 -9
  10. {qvideo-4.24.0 → qvideo-4.26.0}/demos/__init__.py +57 -12
  11. qvideo-4.26.0/demos/webdemo.py +94 -0
  12. qvideo-4.26.0/filters/circletransform.py +202 -0
  13. {qvideo-4.24.0 → qvideo-4.26.0}/lib/QCameraTree.py +189 -19
  14. {qvideo-4.24.0 → qvideo-4.26.0}/lib/QVideoScreen.py +23 -1
  15. qvideo-4.26.0/lib/QWebScreen.py +1199 -0
  16. qvideo-4.26.0/lib/_qrcode.py +37 -0
  17. qvideo-4.26.0/lib/_sliderspin.py +97 -0
  18. qvideo-4.26.0/lib/_tailscale.py +102 -0
  19. qvideo-4.26.0/lib/_webcontrols.py +146 -0
  20. qvideo-4.26.0/lib/_webpage.py +452 -0
  21. qvideo-4.26.0/lib/_writequeue.py +106 -0
  22. {qvideo-4.24.0 → qvideo-4.26.0}/pyproject.toml +5 -4
  23. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_circletransform.py +109 -9
  24. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_deepfilters.py +10 -0
  25. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_demo_recipes.py +2 -1
  26. qvideo-4.26.0/tests/test_demos_lazy.py +51 -0
  27. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_qcameratree.py +362 -2
  28. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_qgenicamtree.py +126 -1
  29. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_qopencvtree.py +7 -0
  30. qvideo-4.26.0/tests/test_qsliderspinbox.py +243 -0
  31. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_qvideoscreen.py +48 -0
  32. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_qvivacamera.py +7 -3
  33. qvideo-4.26.0/tests/test_qwebscreen.py +714 -0
  34. qvideo-4.26.0/tests/test_qwebsharedialog.py +217 -0
  35. qvideo-4.26.0/tests/test_sliderspin.py +196 -0
  36. qvideo-4.26.0/tests/test_tailscale.py +95 -0
  37. qvideo-4.26.0/tests/test_webcontrols.py +409 -0
  38. qvideo-4.26.0/tests/test_webdemo.py +93 -0
  39. qvideo-4.26.0/tests/test_writequeue.py +170 -0
  40. qvideo-4.26.0/widgets/QSliderSpinBox.py +269 -0
  41. qvideo-4.26.0/widgets/QWebShareDialog.py +306 -0
  42. {qvideo-4.24.0 → qvideo-4.26.0}/widgets/__init__.py +7 -1
  43. qvideo-4.24.0/filters/circletransform.py +0 -174
  44. {qvideo-4.24.0 → qvideo-4.26.0}/LICENSE.md +0 -0
  45. {qvideo-4.24.0 → qvideo-4.26.0}/QCamcorder.py +0 -0
  46. {qvideo-4.24.0 → qvideo-4.26.0}/QVideo.egg-info/dependency_links.txt +0 -0
  47. {qvideo-4.24.0 → qvideo-4.26.0}/QVideo.egg-info/top_level.txt +0 -0
  48. {qvideo-4.24.0 → qvideo-4.26.0}/__init__.py +0 -0
  49. {qvideo-4.24.0 → qvideo-4.26.0}/__main__.py +0 -0
  50. {qvideo-4.24.0 → qvideo-4.26.0}/cameras/Basler/__init__.py +0 -0
  51. {qvideo-4.24.0 → qvideo-4.26.0}/cameras/Basler/_camera.py +0 -0
  52. {qvideo-4.24.0 → qvideo-4.26.0}/cameras/Basler/_tree.py +0 -0
  53. {qvideo-4.24.0 → qvideo-4.26.0}/cameras/Flir/__init__.py +0 -0
  54. {qvideo-4.24.0 → qvideo-4.26.0}/cameras/Flir/_camera.py +0 -0
  55. {qvideo-4.24.0 → qvideo-4.26.0}/cameras/Flir/_tree.py +0 -0
  56. {qvideo-4.24.0 → qvideo-4.26.0}/cameras/Genicam/__init__.py +0 -0
  57. {qvideo-4.24.0 → qvideo-4.26.0}/cameras/Genicam/_camera.py +0 -0
  58. {qvideo-4.24.0 → qvideo-4.26.0}/cameras/IDS/__init__.py +0 -0
  59. {qvideo-4.24.0 → qvideo-4.26.0}/cameras/IDS/_camera.py +0 -0
  60. {qvideo-4.24.0 → qvideo-4.26.0}/cameras/IDS/_tree.py +0 -0
  61. {qvideo-4.24.0 → qvideo-4.26.0}/cameras/MV/__init__.py +0 -0
  62. {qvideo-4.24.0 → qvideo-4.26.0}/cameras/MV/_camera.py +0 -0
  63. {qvideo-4.24.0 → qvideo-4.26.0}/cameras/MV/_tree.py +0 -0
  64. {qvideo-4.24.0 → qvideo-4.26.0}/cameras/Noise/__init__.py +0 -0
  65. {qvideo-4.24.0 → qvideo-4.26.0}/cameras/Noise/_camera.py +0 -0
  66. {qvideo-4.24.0 → qvideo-4.26.0}/cameras/Noise/_tree.py +0 -0
  67. {qvideo-4.24.0 → qvideo-4.26.0}/cameras/OpenCV/__init__.py +0 -0
  68. {qvideo-4.24.0 → qvideo-4.26.0}/cameras/OpenCV/_camera.py +0 -0
  69. {qvideo-4.24.0 → qvideo-4.26.0}/cameras/OpenCV/_devices.py +0 -0
  70. {qvideo-4.24.0 → qvideo-4.26.0}/cameras/OpenCV/_tree.py +0 -0
  71. {qvideo-4.24.0 → qvideo-4.26.0}/cameras/Picamera/__init__.py +0 -0
  72. {qvideo-4.24.0 → qvideo-4.26.0}/cameras/Picamera/_camera.py +0 -0
  73. {qvideo-4.24.0 → qvideo-4.26.0}/cameras/Picamera/_imx500.py +0 -0
  74. {qvideo-4.24.0 → qvideo-4.26.0}/cameras/Picamera/_tree.py +0 -0
  75. {qvideo-4.24.0 → qvideo-4.26.0}/cameras/Vimbax/__init__.py +0 -0
  76. {qvideo-4.24.0 → qvideo-4.26.0}/cameras/Vimbax/_camera.py +0 -0
  77. {qvideo-4.24.0 → qvideo-4.26.0}/cameras/Vimbax/_tree.py +0 -0
  78. {qvideo-4.24.0 → qvideo-4.26.0}/cameras/Viva/__init__.py +0 -0
  79. {qvideo-4.24.0 → qvideo-4.26.0}/cameras/__init__.py +0 -0
  80. {qvideo-4.24.0 → qvideo-4.26.0}/cameras/_deprecated.py +0 -0
  81. {qvideo-4.24.0 → qvideo-4.26.0}/cameras/chooser.py +0 -0
  82. {qvideo-4.24.0 → qvideo-4.26.0}/cameras/gentl.py +0 -0
  83. {qvideo-4.24.0 → qvideo-4.26.0}/demos/circulardemo.py +0 -0
  84. {qvideo-4.24.0 → qvideo-4.26.0}/demos/combineddemo.py +0 -0
  85. {qvideo-4.24.0 → qvideo-4.26.0}/demos/compositedemo.py +0 -0
  86. {qvideo-4.24.0 → qvideo-4.26.0}/demos/demo.py +0 -0
  87. {qvideo-4.24.0 → qvideo-4.26.0}/demos/filterdemo.py +0 -0
  88. {qvideo-4.24.0 → qvideo-4.26.0}/demos/filterrackdemo.py +0 -0
  89. {qvideo-4.24.0 → qvideo-4.26.0}/demos/histogramdemo.py +0 -0
  90. {qvideo-4.24.0 → qvideo-4.26.0}/demos/roidemo.py +0 -0
  91. {qvideo-4.24.0 → qvideo-4.26.0}/demos/trackpydemo.py +0 -0
  92. {qvideo-4.24.0 → qvideo-4.26.0}/demos/uniformitydemo.py +0 -0
  93. {qvideo-4.24.0 → qvideo-4.26.0}/demos/yolodemo.py +0 -0
  94. {qvideo-4.24.0 → qvideo-4.26.0}/dvr/QBacklogMonitor.py +0 -0
  95. {qvideo-4.24.0 → qvideo-4.26.0}/dvr/QCircularBuffer.py +0 -0
  96. {qvideo-4.24.0 → qvideo-4.26.0}/dvr/QCircularDVRWidget.py +0 -0
  97. {qvideo-4.24.0 → qvideo-4.26.0}/dvr/QDVRWidget.py +0 -0
  98. {qvideo-4.24.0 → qvideo-4.26.0}/dvr/QHDF5Reader.py +0 -0
  99. {qvideo-4.24.0 → qvideo-4.26.0}/dvr/QHDF5Writer.py +0 -0
  100. {qvideo-4.24.0 → qvideo-4.26.0}/dvr/QOpenCVReader.py +0 -0
  101. {qvideo-4.24.0 → qvideo-4.26.0}/dvr/QOpenCVWriter.py +0 -0
  102. {qvideo-4.24.0 → qvideo-4.26.0}/dvr/QPlayer.py +0 -0
  103. {qvideo-4.24.0 → qvideo-4.26.0}/dvr/QPyAVReader.py +0 -0
  104. {qvideo-4.24.0 → qvideo-4.26.0}/dvr/QPyAVWriter.py +0 -0
  105. {qvideo-4.24.0 → qvideo-4.26.0}/dvr/QRecorder.py +0 -0
  106. {qvideo-4.24.0 → qvideo-4.26.0}/dvr/QSourceSelector.py +0 -0
  107. {qvideo-4.24.0 → qvideo-4.26.0}/dvr/__init__.py +0 -0
  108. {qvideo-4.24.0 → qvideo-4.26.0}/dvr/formats.py +0 -0
  109. {qvideo-4.24.0 → qvideo-4.26.0}/dvr/icons/record.svg +0 -0
  110. {qvideo-4.24.0 → qvideo-4.26.0}/filters/_MedianBase.py +0 -0
  111. {qvideo-4.24.0 → qvideo-4.26.0}/filters/__init__.py +0 -0
  112. {qvideo-4.24.0 → qvideo-4.26.0}/filters/artistic.py +0 -0
  113. {qvideo-4.24.0 → qvideo-4.26.0}/filters/blob.py +0 -0
  114. {qvideo-4.24.0 → qvideo-4.26.0}/filters/darkframe.py +0 -0
  115. {qvideo-4.24.0 → qvideo-4.26.0}/filters/dejitter.py +0 -0
  116. {qvideo-4.24.0 → qvideo-4.26.0}/filters/dog.py +0 -0
  117. {qvideo-4.24.0 → qvideo-4.26.0}/filters/edge.py +0 -0
  118. {qvideo-4.24.0 → qvideo-4.26.0}/filters/exposure.py +0 -0
  119. {qvideo-4.24.0 → qvideo-4.26.0}/filters/flatfield.py +0 -0
  120. {qvideo-4.24.0 → qvideo-4.26.0}/filters/foreground.py +0 -0
  121. {qvideo-4.24.0 → qvideo-4.26.0}/filters/gamma.py +0 -0
  122. {qvideo-4.24.0 → qvideo-4.26.0}/filters/invert.py +0 -0
  123. {qvideo-4.24.0 → qvideo-4.26.0}/filters/laplacian.py +0 -0
  124. {qvideo-4.24.0 → qvideo-4.26.0}/filters/median.py +0 -0
  125. {qvideo-4.24.0 → qvideo-4.26.0}/filters/momean.py +0 -0
  126. {qvideo-4.24.0 → qvideo-4.26.0}/filters/momedian.py +0 -0
  127. {qvideo-4.24.0 → qvideo-4.26.0}/filters/normalize.py +0 -0
  128. {qvideo-4.24.0 → qvideo-4.26.0}/filters/rgb.py +0 -0
  129. {qvideo-4.24.0 → qvideo-4.26.0}/filters/roi.py +0 -0
  130. {qvideo-4.24.0 → qvideo-4.26.0}/filters/samplehold.py +0 -0
  131. {qvideo-4.24.0 → qvideo-4.26.0}/filters/smoothing.py +0 -0
  132. {qvideo-4.24.0 → qvideo-4.26.0}/filters/sobel.py +0 -0
  133. {qvideo-4.24.0 → qvideo-4.26.0}/filters/threshold.py +0 -0
  134. {qvideo-4.24.0 → qvideo-4.26.0}/filters/unsharp.py +0 -0
  135. {qvideo-4.24.0 → qvideo-4.26.0}/interactive/__init__.py +0 -0
  136. {qvideo-4.24.0 → qvideo-4.26.0}/interactive/camera.py +0 -0
  137. {qvideo-4.24.0 → qvideo-4.26.0}/interactive/filter.py +0 -0
  138. {qvideo-4.24.0 → qvideo-4.26.0}/interactive/widgets.py +0 -0
  139. {qvideo-4.24.0 → qvideo-4.26.0}/lib/QCamera.py +0 -0
  140. {qvideo-4.24.0 → qvideo-4.26.0}/lib/QCameraOpener.py +0 -0
  141. {qvideo-4.24.0 → qvideo-4.26.0}/lib/QFilterPipeline.py +0 -0
  142. {qvideo-4.24.0 → qvideo-4.26.0}/lib/QFilterRack.py +0 -0
  143. {qvideo-4.24.0 → qvideo-4.26.0}/lib/QFrameRelay.py +0 -0
  144. {qvideo-4.24.0 → qvideo-4.26.0}/lib/QImageSaver.py +0 -0
  145. {qvideo-4.24.0 → qvideo-4.26.0}/lib/QOverlayWidget.py +0 -0
  146. {qvideo-4.24.0 → qvideo-4.26.0}/lib/QReferenceFilter.py +0 -0
  147. {qvideo-4.24.0 → qvideo-4.26.0}/lib/QSnapshot.py +0 -0
  148. {qvideo-4.24.0 → qvideo-4.26.0}/lib/QVideoFilter.py +0 -0
  149. {qvideo-4.24.0 → qvideo-4.26.0}/lib/QVideoReader.py +0 -0
  150. {qvideo-4.24.0 → qvideo-4.26.0}/lib/QVideoSource.py +0 -0
  151. {qvideo-4.24.0 → qvideo-4.26.0}/lib/QVideoWriter.py +0 -0
  152. {qvideo-4.24.0 → qvideo-4.26.0}/lib/__init__.py +0 -0
  153. {qvideo-4.24.0 → qvideo-4.26.0}/lib/_launch.py +0 -0
  154. {qvideo-4.24.0 → qvideo-4.26.0}/lib/_qabc.py +0 -0
  155. {qvideo-4.24.0 → qvideo-4.26.0}/lib/_qapp.py +0 -0
  156. {qvideo-4.24.0 → qvideo-4.26.0}/lib/_settings.py +0 -0
  157. {qvideo-4.24.0 → qvideo-4.26.0}/lib/_splash.py +0 -0
  158. {qvideo-4.24.0 → qvideo-4.26.0}/lib/clickable.py +0 -0
  159. {qvideo-4.24.0 → qvideo-4.26.0}/lib/dnn.py +0 -0
  160. {qvideo-4.24.0 → qvideo-4.26.0}/lib/errors.py +0 -0
  161. {qvideo-4.24.0 → qvideo-4.26.0}/lib/imageops.py +0 -0
  162. {qvideo-4.24.0 → qvideo-4.26.0}/lib/remote/__init__.py +0 -0
  163. {qvideo-4.24.0 → qvideo-4.26.0}/lib/remote/__main__.py +0 -0
  164. {qvideo-4.24.0 → qvideo-4.26.0}/lib/remote/camera.py +0 -0
  165. {qvideo-4.24.0 → qvideo-4.26.0}/lib/remote/protocol.py +0 -0
  166. {qvideo-4.24.0 → qvideo-4.26.0}/lib/remote/worker.py +0 -0
  167. {qvideo-4.24.0 → qvideo-4.26.0}/lib/videotypes.py +0 -0
  168. {qvideo-4.24.0 → qvideo-4.26.0}/overlays/__init__.py +0 -0
  169. {qvideo-4.24.0 → qvideo-4.26.0}/overlays/trackpy.py +0 -0
  170. {qvideo-4.24.0 → qvideo-4.26.0}/overlays/yolo.py +0 -0
  171. {qvideo-4.24.0 → qvideo-4.26.0}/setup.cfg +0 -0
  172. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_artistic.py +0 -0
  173. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_benchmark.py +0 -0
  174. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_blob.py +0 -0
  175. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_camera.py +0 -0
  176. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_chooser.py +0 -0
  177. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_circularbuffer.py +0 -0
  178. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_circulardemo.py +0 -0
  179. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_circulardvrwidget.py +0 -0
  180. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_clickable.py +0 -0
  181. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_combineddemo.py +0 -0
  182. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_compositedemo.py +0 -0
  183. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_conformance_genicam.py +0 -0
  184. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_conformance_noise.py +0 -0
  185. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_conformance_opencv.py +0 -0
  186. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_conformance_remote.py +0 -0
  187. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_conformance_viva.py +0 -0
  188. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_darkframe.py +0 -0
  189. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_dejitter.py +0 -0
  190. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_demo.py +0 -0
  191. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_deprecated_sources.py +0 -0
  192. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_dnn.py +0 -0
  193. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_docs_quickstart.py +0 -0
  194. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_dog.py +0 -0
  195. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_edge.py +0 -0
  196. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_exposure.py +0 -0
  197. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_filter.py +0 -0
  198. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_filter_export.py +0 -0
  199. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_filter_export_equivalence.py +0 -0
  200. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_filterdemo.py +0 -0
  201. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_filterrackdemo.py +0 -0
  202. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_filters_gray.py +0 -0
  203. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_flatfield.py +0 -0
  204. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_foreground.py +0 -0
  205. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_formats.py +0 -0
  206. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_gamma.py +0 -0
  207. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_gentl.py +0 -0
  208. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_histogramdemo.py +0 -0
  209. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_histogramwidget.py +0 -0
  210. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_imageops.py +0 -0
  211. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_import_order.py +0 -0
  212. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_imports.py +0 -0
  213. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_invert.py +0 -0
  214. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_jupyter.py +0 -0
  215. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_laplacian.py +0 -0
  216. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_launch.py +0 -0
  217. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_mainwindow.py +0 -0
  218. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_median.py +0 -0
  219. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_momean.py +0 -0
  220. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_momedian.py +0 -0
  221. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_normalize.py +0 -0
  222. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_overlays_package.py +0 -0
  223. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_qabc.py +0 -0
  224. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_qapp.py +0 -0
  225. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_qbacklogmonitor.py +0 -0
  226. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_qbaslercamera.py +0 -0
  227. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_qcamcorder.py +0 -0
  228. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_qcamera.py +0 -0
  229. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_qcamerachooser.py +0 -0
  230. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_qcameraopener.py +0 -0
  231. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_qdvrwidget.py +0 -0
  232. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_qfilterpipeline.py +0 -0
  233. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_qfilterrack.py +0 -0
  234. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_qflircamera.py +0 -0
  235. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_qframerelay.py +0 -0
  236. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_qgenicamcamera.py +0 -0
  237. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_qhdf5reader.py +0 -0
  238. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_qhdf5writer.py +0 -0
  239. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_qidscamera.py +0 -0
  240. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_qimagesaver.py +0 -0
  241. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_qimxcamera.py +0 -0
  242. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_qmvcamera.py +0 -0
  243. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_qnoisecamera.py +0 -0
  244. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_qnoisetree.py +0 -0
  245. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_qopencvcamera.py +0 -0
  246. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_qopencvdevices.py +0 -0
  247. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_qopencvreader.py +0 -0
  248. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_qopencvwriter.py +0 -0
  249. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_qoverlaywidget.py +0 -0
  250. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_qpicamera.py +0 -0
  251. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_qpicameratree.py +0 -0
  252. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_qplayer.py +0 -0
  253. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_qpyavreader.py +0 -0
  254. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_qpyavwriter.py +0 -0
  255. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_qrecorder.py +0 -0
  256. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_qreferencefilter.py +0 -0
  257. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_qremotecamera.py +0 -0
  258. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_qscrollpanel.py +0 -0
  259. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_qsnapshot.py +0 -0
  260. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_qsourceselector.py +0 -0
  261. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_qt_binding.py +0 -0
  262. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_qvideoreader.py +0 -0
  263. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_qvideosource.py +0 -0
  264. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_qvideowriter.py +0 -0
  265. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_qvimbaxcamera.py +0 -0
  266. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_resolutions.py +0 -0
  267. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_rgb.py +0 -0
  268. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_roi.py +0 -0
  269. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_roidemo.py +0 -0
  270. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_samplehold.py +0 -0
  271. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_settings.py +0 -0
  272. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_smoothing.py +0 -0
  273. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_sobel.py +0 -0
  274. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_splash.py +0 -0
  275. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_teardown.py +0 -0
  276. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_threshold.py +0 -0
  277. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_trackpy_overlay.py +0 -0
  278. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_trackpydemo.py +0 -0
  279. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_uniformitydemo.py +0 -0
  280. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_uniformitywidget.py +0 -0
  281. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_unsharp.py +0 -0
  282. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_vendor_trees.py +0 -0
  283. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_videofilter.py +0 -0
  284. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_videotypes.py +0 -0
  285. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_yolo_overlay.py +0 -0
  286. {qvideo-4.24.0 → qvideo-4.26.0}/tests/test_yolodemo.py +0 -0
  287. {qvideo-4.24.0 → qvideo-4.26.0}/widgets/QCameraChooser.py +0 -0
  288. {qvideo-4.24.0 → qvideo-4.26.0}/widgets/QHistogramWidget.py +0 -0
  289. {qvideo-4.24.0 → qvideo-4.26.0}/widgets/QScrollPanel.py +0 -0
  290. {qvideo-4.24.0 → qvideo-4.26.0}/widgets/QUniformityWidget.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: QVideo
3
- Version: 4.24.0
3
+ Version: 4.26.0
4
4
  Summary: PyQt-based framework for integrating video cameras into research applications
5
5
  Author-email: "David G. Grier" <david.grier@nyu.edu>
6
6
  License: GPL-3.0-or-later
@@ -44,7 +44,7 @@ Requires-Dist: hdf5plugin; extra == "dvr"
44
44
  Provides-Extra: av
45
45
  Requires-Dist: av; extra == "av"
46
46
  Provides-Extra: circletransform
47
- Requires-Dist: scipy; extra == "circletransform"
47
+ Requires-Dist: dgimage>=0.2.0; extra == "circletransform"
48
48
  Provides-Extra: trackpy
49
49
  Requires-Dist: trackpy; extra == "trackpy"
50
50
  Requires-Dist: pandas; extra == "trackpy"
@@ -61,8 +61,11 @@ Provides-Extra: viva
61
61
  Requires-Dist: viva-genicam; extra == "viva"
62
62
  Provides-Extra: picamera
63
63
  Requires-Dist: picamera2; extra == "picamera"
64
+ Provides-Extra: stream
65
+ Requires-Dist: aiohttp; extra == "stream"
66
+ Requires-Dist: segno; extra == "stream"
64
67
  Provides-Extra: test
65
- Requires-Dist: QVideo[av,circletransform,dvr,jupyter,trackpy,viva]; extra == "test"
68
+ Requires-Dist: QVideo[av,circletransform,dvr,jupyter,stream,trackpy,viva]; extra == "test"
66
69
  Requires-Dist: pytest; extra == "test"
67
70
  Requires-Dist: pytest-cov; extra == "test"
68
71
  Provides-Extra: dev-pyqt5
@@ -84,6 +87,8 @@ Requires-Dist: pydata-sphinx-theme; extra == "docs"
84
87
  Requires-Dist: sphinx; extra == "docs"
85
88
  Requires-Dist: sphinx-autodoc-typehints; extra == "docs"
86
89
  Requires-Dist: PyQt5; extra == "docs"
90
+ Requires-Dist: aiohttp; extra == "docs"
91
+ Requires-Dist: segno; extra == "docs"
87
92
  Dynamic: license-file
88
93
 
89
94
  # QVideo: Qt framework for video cameras
@@ -174,6 +179,7 @@ Replace `python3-pyqt6` with `python3-pyqt5` if you prefer PyQt5.
174
179
  | GenICam cameras, viva-genicam only | `pip install QVideo[viva]` | The preferred interface alone, without harvesters |
175
180
  | Raspberry Pi camera | `pip install QVideo[picamera]` | Requires `picamera2` |
176
181
  | Camera names for USB cameras | `pip install QVideo[opencv]` | Uses `cv2-enumerate-cameras`; without it the cameras are listed as "Camera 0" and so on |
182
+ | Video in a web browser or on a tablet | `pip install QVideo[stream]` | Uses `aiohttp` and `segno`: a tablet scans a QR code to watch, and with the operator's permission can change exposure, gain and the like; see the streaming page of the documentation |
177
183
  | HDF5 recording (compressed without loss) | `pip install QVideo[dvr]` | Requires `h5py` and `hdf5plugin` |
178
184
  | Faster lossless AVI/MKV, 16-bit gray | `pip install QVideo[av]` | Uses PyAV instead of OpenCV when installed |
179
185
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: QVideo
3
- Version: 4.24.0
3
+ Version: 4.26.0
4
4
  Summary: PyQt-based framework for integrating video cameras into research applications
5
5
  Author-email: "David G. Grier" <david.grier@nyu.edu>
6
6
  License: GPL-3.0-or-later
@@ -44,7 +44,7 @@ Requires-Dist: hdf5plugin; extra == "dvr"
44
44
  Provides-Extra: av
45
45
  Requires-Dist: av; extra == "av"
46
46
  Provides-Extra: circletransform
47
- Requires-Dist: scipy; extra == "circletransform"
47
+ Requires-Dist: dgimage>=0.2.0; extra == "circletransform"
48
48
  Provides-Extra: trackpy
49
49
  Requires-Dist: trackpy; extra == "trackpy"
50
50
  Requires-Dist: pandas; extra == "trackpy"
@@ -61,8 +61,11 @@ Provides-Extra: viva
61
61
  Requires-Dist: viva-genicam; extra == "viva"
62
62
  Provides-Extra: picamera
63
63
  Requires-Dist: picamera2; extra == "picamera"
64
+ Provides-Extra: stream
65
+ Requires-Dist: aiohttp; extra == "stream"
66
+ Requires-Dist: segno; extra == "stream"
64
67
  Provides-Extra: test
65
- Requires-Dist: QVideo[av,circletransform,dvr,jupyter,trackpy,viva]; extra == "test"
68
+ Requires-Dist: QVideo[av,circletransform,dvr,jupyter,stream,trackpy,viva]; extra == "test"
66
69
  Requires-Dist: pytest; extra == "test"
67
70
  Requires-Dist: pytest-cov; extra == "test"
68
71
  Provides-Extra: dev-pyqt5
@@ -84,6 +87,8 @@ Requires-Dist: pydata-sphinx-theme; extra == "docs"
84
87
  Requires-Dist: sphinx; extra == "docs"
85
88
  Requires-Dist: sphinx-autodoc-typehints; extra == "docs"
86
89
  Requires-Dist: PyQt5; extra == "docs"
90
+ Requires-Dist: aiohttp; extra == "docs"
91
+ Requires-Dist: segno; extra == "docs"
87
92
  Dynamic: license-file
88
93
 
89
94
  # QVideo: Qt framework for video cameras
@@ -174,6 +179,7 @@ Replace `python3-pyqt6` with `python3-pyqt5` if you prefer PyQt5.
174
179
  | GenICam cameras, viva-genicam only | `pip install QVideo[viva]` | The preferred interface alone, without harvesters |
175
180
  | Raspberry Pi camera | `pip install QVideo[picamera]` | Requires `picamera2` |
176
181
  | Camera names for USB cameras | `pip install QVideo[opencv]` | Uses `cv2-enumerate-cameras`; without it the cameras are listed as "Camera 0" and so on |
182
+ | Video in a web browser or on a tablet | `pip install QVideo[stream]` | Uses `aiohttp` and `segno`: a tablet scans a QR code to watch, and with the operator's permission can change exposure, gain and the like; see the streaming page of the documentation |
177
183
  | HDF5 recording (compressed without loss) | `pip install QVideo[dvr]` | Requires `h5py` and `hdf5plugin` |
178
184
  | Faster lossless AVI/MKV, 16-bit gray | `pip install QVideo[av]` | Uses PyAV instead of OpenCV when installed |
179
185
 
@@ -60,6 +60,7 @@ demos/histogramdemo.py
60
60
  demos/roidemo.py
61
61
  demos/trackpydemo.py
62
62
  demos/uniformitydemo.py
63
+ demos/webdemo.py
63
64
  demos/yolodemo.py
64
65
  dvr/QBacklogMonitor.py
65
66
  dvr/QCircularBuffer.py
@@ -122,12 +123,19 @@ lib/QVideoReader.py
122
123
  lib/QVideoScreen.py
123
124
  lib/QVideoSource.py
124
125
  lib/QVideoWriter.py
126
+ lib/QWebScreen.py
125
127
  lib/__init__.py
126
128
  lib/_launch.py
127
129
  lib/_qabc.py
128
130
  lib/_qapp.py
131
+ lib/_qrcode.py
129
132
  lib/_settings.py
133
+ lib/_sliderspin.py
130
134
  lib/_splash.py
135
+ lib/_tailscale.py
136
+ lib/_webcontrols.py
137
+ lib/_webpage.py
138
+ lib/_writequeue.py
131
139
  lib/clickable.py
132
140
  lib/dnn.py
133
141
  lib/errors.py
@@ -163,6 +171,7 @@ tests/test_deepfilters.py
163
171
  tests/test_dejitter.py
164
172
  tests/test_demo.py
165
173
  tests/test_demo_recipes.py
174
+ tests/test_demos_lazy.py
166
175
  tests/test_deprecated_sources.py
167
176
  tests/test_dnn.py
168
177
  tests/test_docs_quickstart.py
@@ -234,6 +243,7 @@ tests/test_qrecorder.py
234
243
  tests/test_qreferencefilter.py
235
244
  tests/test_qremotecamera.py
236
245
  tests/test_qscrollpanel.py
246
+ tests/test_qsliderspinbox.py
237
247
  tests/test_qsnapshot.py
238
248
  tests/test_qsourceselector.py
239
249
  tests/test_qt_binding.py
@@ -243,15 +253,19 @@ tests/test_qvideosource.py
243
253
  tests/test_qvideowriter.py
244
254
  tests/test_qvimbaxcamera.py
245
255
  tests/test_qvivacamera.py
256
+ tests/test_qwebscreen.py
257
+ tests/test_qwebsharedialog.py
246
258
  tests/test_resolutions.py
247
259
  tests/test_rgb.py
248
260
  tests/test_roi.py
249
261
  tests/test_roidemo.py
250
262
  tests/test_samplehold.py
251
263
  tests/test_settings.py
264
+ tests/test_sliderspin.py
252
265
  tests/test_smoothing.py
253
266
  tests/test_sobel.py
254
267
  tests/test_splash.py
268
+ tests/test_tailscale.py
255
269
  tests/test_teardown.py
256
270
  tests/test_threshold.py
257
271
  tests/test_trackpy_overlay.py
@@ -262,10 +276,15 @@ tests/test_unsharp.py
262
276
  tests/test_vendor_trees.py
263
277
  tests/test_videofilter.py
264
278
  tests/test_videotypes.py
279
+ tests/test_webcontrols.py
280
+ tests/test_webdemo.py
281
+ tests/test_writequeue.py
265
282
  tests/test_yolo_overlay.py
266
283
  tests/test_yolodemo.py
267
284
  widgets/QCameraChooser.py
268
285
  widgets/QHistogramWidget.py
269
286
  widgets/QScrollPanel.py
287
+ widgets/QSliderSpinBox.py
270
288
  widgets/QUniformityWidget.py
289
+ widgets/QWebShareDialog.py
271
290
  widgets/__init__.py
@@ -8,7 +8,7 @@ psutil
8
8
  av
9
9
 
10
10
  [circletransform]
11
- scipy
11
+ dgimage>=0.2.0
12
12
 
13
13
  [dev]
14
14
  QVideo[test,yolo]
@@ -33,6 +33,8 @@ pydata-sphinx-theme
33
33
  sphinx
34
34
  sphinx-autodoc-typehints
35
35
  PyQt5
36
+ aiohttp
37
+ segno
36
38
 
37
39
  [dvr]
38
40
  h5py
@@ -67,8 +69,12 @@ PyQt6
67
69
  [pyside6]
68
70
  PySide6>=6.7
69
71
 
72
+ [stream]
73
+ aiohttp
74
+ segno
75
+
70
76
  [test]
71
- QVideo[av,circletransform,dvr,jupyter,trackpy,viva]
77
+ QVideo[av,circletransform,dvr,jupyter,stream,trackpy,viva]
72
78
  pytest
73
79
  pytest-cov
74
80
 
@@ -86,6 +86,7 @@ Replace `python3-pyqt6` with `python3-pyqt5` if you prefer PyQt5.
86
86
  | GenICam cameras, viva-genicam only | `pip install QVideo[viva]` | The preferred interface alone, without harvesters |
87
87
  | Raspberry Pi camera | `pip install QVideo[picamera]` | Requires `picamera2` |
88
88
  | Camera names for USB cameras | `pip install QVideo[opencv]` | Uses `cv2-enumerate-cameras`; without it the cameras are listed as "Camera 0" and so on |
89
+ | Video in a web browser or on a tablet | `pip install QVideo[stream]` | Uses `aiohttp` and `segno`: a tablet scans a QR code to watch, and with the operator's permission can change exposure, gain and the like; see the streaming page of the documentation |
89
90
  | HDF5 recording (compressed without loss) | `pip install QVideo[dvr]` | Requires `h5py` and `hdf5plugin` |
90
91
  | Faster lossless AVI/MKV, 16-bit gray | `pip install QVideo[av]` | Uses PyAV instead of OpenCV when installed |
91
92
 
@@ -141,6 +141,8 @@ def spec(feature: IValue, kind: str) -> tuple[type, dict[str, object]]:
141
141
  meta = {'minimum': bounds['min'], 'maximum': bounds['max']}
142
142
  if bounds['inc'] is not None:
143
143
  meta['step'] = bounds['inc']
144
+ if kind == 'float' and getattr(feature, 'unit', None):
145
+ meta['unit'] = feature.unit
144
146
  return PTYPES[kind], meta
145
147
 
146
148
 
@@ -13,6 +13,9 @@ logger = logging.getLogger(__name__)
13
13
 
14
14
  _MICROSECOND_UNITS = frozenset({'us', 'µs', 'μs'})
15
15
 
16
+ #: The widest range of whole numbers that gets a slider.
17
+ _MAX_SLIDER_RANGE = 1e9
18
+
16
19
  __all__ = ['QGenicamTree']
17
20
 
18
21
 
@@ -138,8 +141,25 @@ class QGenicamTree(QCameraTree):
138
141
  this['children'] = [self.describe(c) for c in node['children']]
139
142
  elif node.get('type') == 'float':
140
143
  self._describeFloat(this)
144
+ self._makeSlider(this)
141
145
  return this
142
146
 
147
+ @staticmethod
148
+ def _makeSlider(this: dict[str, Any]) -> None:
149
+ '''Make a number that has a range, and that is not read only, a slider
150
+ with a spin box. (A range of billions has no use for a slider.)'''
151
+ if this.get('type') not in ('int', 'float') or this.get('readonly'):
152
+ return
153
+ low, high = this.get('min'), this.get('max')
154
+ if low is None or high is None or not low < high:
155
+ return
156
+ if not (math.isfinite(low) and math.isfinite(high)):
157
+ return
158
+ if this['type'] == 'int' and high - low > _MAX_SLIDER_RANGE:
159
+ return
160
+ this['int'] = this['type'] == 'int'
161
+ this['type'] = 'sliderspin'
162
+
143
163
  def _describeFloat(self, this: dict[str, Any]) -> None:
144
164
  '''Apply units, scale and step to the float description *this*.'''
145
165
  name = this['name']
@@ -170,20 +190,25 @@ class QGenicamTree(QCameraTree):
170
190
  p = item.param
171
191
  p.sigValueChanged.connect(self._handleItemChanges)
172
192
 
173
- @QtCore.Slot(object, object)
174
- def _sync(self, root, changes) -> None:
175
- if self._ignoreSync:
176
- return
177
- for param, change, value in changes:
178
- if change == 'value':
179
- key = param.name()
180
- scale = self._scaleFactors.get(key)
181
- sent = value if scale is None else value / scale
182
- self.camera.set(key, sent)
183
- with self._syncIgnored():
184
- for key, value in self.camera.settings.items():
185
- scale = self._scaleFactors.get(key)
186
- self.set(key, value if scale is None else value * scale)
193
+ def _toCamera(self, key: str, value: Any) -> Any:
194
+ '''Return the value of control *key* in the units of the node.'''
195
+ scale = self._scaleFactors.get(key)
196
+ return value if scale is None else value / scale
197
+
198
+ def _fromCamera(self, key: str, value: Any) -> Any:
199
+ '''Return the value of node *key* in the units of the control.'''
200
+ scale = self._scaleFactors.get(key)
201
+ return value if scale is None else value * scale
202
+
203
+ def _readback(self) -> dict:
204
+ '''Read all of the settings of the camera (in the worker thread).'''
205
+ return dict(self.camera.settings)
206
+
207
+ def _announce(self, values: dict) -> None:
208
+ '''Say nothing: the nodes that a change touches are refreshed by
209
+ :meth:`_showChanges`, which reads the camera, and announcing every
210
+ setting after every change would make it do that in the interface
211
+ thread.'''
187
212
 
188
213
  @property
189
214
  def controls(self) -> Sequence[str] | None:
@@ -224,6 +224,9 @@ class QVivaCamera(QCamera):
224
224
  meta['step'] = ptype(state.range.inc)
225
225
  if state.enum_entries:
226
226
  meta['limits'] = list(state.enum_entries)
227
+ unit = getattr(state, 'unit', None)
228
+ if unit and isinstance(unit, str):
229
+ meta['unit'] = unit
227
230
  setter = (self._setter(name, call, ptype)
228
231
  if self._isWritable(state, name) else None)
229
232
  self.registerProperty(name, getter=self._getter(name, call),
@@ -1,8 +1,6 @@
1
1
  '''Camera property tree for GenICam cameras driven by viva-genicam.'''
2
2
  from typing import ClassVar
3
3
 
4
- from qtpy import QtCore
5
- from pyqtgraph.parametertree import Parameter
6
4
 
7
5
  from QVideo.cameras.Viva._camera import QVivaCamera
8
6
  from QVideo.lib.QCameraTree import QCameraTree, Source
@@ -98,13 +96,6 @@ class QVivaTree(QCameraTree):
98
96
  if key in properties:
99
97
  param.setOpts(enabled=properties[key]['setter'] is not None)
100
98
 
101
- @QtCore.Slot(object, object)
102
- def _sync(self, root: Parameter, changes) -> None:
103
- '''Send the changes to the camera, then show what it allows.'''
104
- super()._sync(root, changes)
105
- if not self._ignoreSync:
106
- self._showAccess()
107
-
108
99
 
109
100
  if __name__ == '__main__': # pragma: no cover
110
101
  QVivaTree.example()
@@ -58,6 +58,11 @@ roidemo
58
58
  A :class:`~QVideo.QCamcorder.QCamcorder` with a draggable region of
59
59
  interest; only the pixels inside it are recorded.
60
60
 
61
+ webdemo
62
+ A :class:`~QVideo.QCamcorder.QCamcorder` whose video can also be watched
63
+ on a tablet or phone: a QR code pairs the browser. Needs
64
+ ``QVideo[stream]``.
65
+
61
66
  Running
62
67
  -------
63
68
  Each demo can be launched directly::
@@ -73,6 +78,7 @@ Each demo can be launched directly::
73
78
  python -m QVideo.demos.yolodemo
74
79
  python -m QVideo.demos.compositedemo
75
80
  python -m QVideo.demos.combineddemo
81
+ python -m QVideo.demos.webdemo
76
82
 
77
83
  Camera selection
78
84
  ----------------
@@ -104,15 +110,54 @@ Example::
104
110
  python -m QVideo.demos.filterdemo -c 1 # second OpenCV camera
105
111
  '''
106
112
 
107
- from .demo import Demo
108
- from .filterdemo import FilterDemo
109
- from .filterrackdemo import FilterRackDemo
110
- from .histogramdemo import HistogramDemo
111
- from .uniformitydemo import UniformityDemo
112
- from .circulardemo import CircularDemo
113
- from .roidemo import CropROI, ROIDemo
114
- from .trackpydemo import TrackpyDemo
115
- from .yolodemo import YoloDemo
116
- from .compositedemo import CompositeDemo
117
- from .combineddemo import CombinedDemo
118
-
113
+ import importlib
114
+ from typing import TYPE_CHECKING
115
+
116
+ if TYPE_CHECKING: # for type checkers and editors; not run
117
+ from .demo import Demo
118
+ from .filterdemo import FilterDemo
119
+ from .filterrackdemo import FilterRackDemo
120
+ from .histogramdemo import HistogramDemo
121
+ from .uniformitydemo import UniformityDemo
122
+ from .circulardemo import CircularDemo
123
+ from .roidemo import CropROI, ROIDemo
124
+ from .trackpydemo import TrackpyDemo
125
+ from .yolodemo import YoloDemo
126
+ from .compositedemo import CompositeDemo
127
+ from .combineddemo import CombinedDemo
128
+ from .webdemo import WebDemo
129
+
130
+ #: Where each name lives. A demo is imported when it is first asked for, so
131
+ #: that ``python -m QVideo.demos.<name>`` does not find its module already
132
+ #: imported (``runpy`` warns), and a program that uses one demo does not
133
+ #: load the packages that the others need.
134
+ _MODULES = {
135
+ 'Demo': 'demo',
136
+ 'FilterDemo': 'filterdemo',
137
+ 'FilterRackDemo': 'filterrackdemo',
138
+ 'HistogramDemo': 'histogramdemo',
139
+ 'UniformityDemo': 'uniformitydemo',
140
+ 'CircularDemo': 'circulardemo',
141
+ 'CropROI': 'roidemo',
142
+ 'ROIDemo': 'roidemo',
143
+ 'TrackpyDemo': 'trackpydemo',
144
+ 'YoloDemo': 'yolodemo',
145
+ 'CompositeDemo': 'compositedemo',
146
+ 'CombinedDemo': 'combineddemo',
147
+ 'WebDemo': 'webdemo',
148
+ }
149
+
150
+ __all__ = list(_MODULES)
151
+
152
+
153
+ def __getattr__(name: str):
154
+ module = _MODULES.get(name)
155
+ if module is None:
156
+ raise AttributeError(f'module {__name__!r} has no attribute {name!r}')
157
+ value = getattr(importlib.import_module(f'.{module}', __name__), name)
158
+ globals()[name] = value # later lookups skip this function
159
+ return value
160
+
161
+
162
+ def __dir__() -> list[str]:
163
+ return sorted([*globals(), *_MODULES])
@@ -0,0 +1,94 @@
1
+ #!/usr/bin/env python3
2
+ '''Demo: the video served to web browsers, such as a tablet.
3
+
4
+ Run directly::
5
+
6
+ python -m QVideo.demos.webdemo
7
+
8
+ The window opens the sharing window, with the QR code that pairs a tablet:
9
+ point the tablet's camera at it. Ctrl+Shift+W (or the Share button) shows
10
+ or closes it. This needs ``aiohttp`` and ``segno``:
11
+ ``pip install "QVideo[stream]"``.
12
+ '''
13
+
14
+ import logging
15
+
16
+ from qtpy import QtCore, QtGui, QtWidgets
17
+ from QVideo.QCamcorder import QCamcorder
18
+ from QVideo.lib import launch
19
+ from QVideo.lib.QWebScreen import QWebScreen
20
+ from QVideo.widgets.QWebShareDialog import QWebShareDialog
21
+
22
+
23
+ logger = logging.getLogger(__name__)
24
+
25
+ __all__ = ['WebDemo']
26
+
27
+
28
+ class WebDemo(QCamcorder):
29
+
30
+ '''A camcorder whose video can also be watched on a tablet or phone.
31
+
32
+ Data flow::
33
+
34
+ camera -> screen
35
+ \\-> dvr
36
+ \\-> web screen -> browsers
37
+
38
+ The recipe is one object that watches the same source as the screen:
39
+ :class:`~QVideo.lib.QWebScreen.QWebScreen`. It serves a page that shows
40
+ the video to browsers that have paired, and the panel has a Share button
41
+ that opens the QR code
42
+ (:class:`~QVideo.widgets.QWebShareDialog.QWebShareDialog`) and says how
43
+ many are watching. The window opens when the demo starts. Port 8080 is
44
+ tried first; if it is taken, any free port is used. The camcorder
45
+ itself is unchanged, and has no web code: sharing is this recipe.
46
+ '''
47
+
48
+ #: A subclass that has a certificate sets these (PEM files): the page
49
+ #: is then served over https,
50
+ #: and the name that the certificate covers, which the QR code uses.
51
+ certfile: str | None = None
52
+ keyfile: str | None = None
53
+ hostname: str | None = None
54
+
55
+ #: A demo is tier 1 (plain http, a network that you trust): it lets a
56
+ #: tablet control the camera without a certificate, to try it. An
57
+ #: application should leave this ``False`` or give a certificate: see
58
+ #: :class:`~QVideo.lib.QWebScreen.QWebScreen`.
59
+ controlOverHttp: bool = True
60
+
61
+ def _setupUi(self) -> None:
62
+ super()._setupUi()
63
+ self.web = QWebScreen(self.screen.source, certfile=self.certfile,
64
+ keyfile=self.keyfile,
65
+ hostname=self.hostname,
66
+ camera=self.cameraWidget.camera,
67
+ controlOverHttp=self.controlOverHttp)
68
+ self.web.start(fallback=True)
69
+ self.share = QWebShareDialog(self.web, self)
70
+ self.shareButton = QtWidgets.QPushButton('Share...')
71
+ self.shareButton.setToolTip('Show the QR code (Ctrl+Shift+W)')
72
+ self.shareButton.clicked.connect(self.share.toggle)
73
+ shortcut = QtWidgets.QShortcut(
74
+ QtGui.QKeySequence('Ctrl+Shift+W'), self)
75
+ shortcut.setContext(
76
+ QtCore.Qt.ShortcutContext.WidgetWithChildrenShortcut)
77
+ shortcut.activated.connect(self.share.toggle)
78
+ self.viewers = QtWidgets.QLabel()
79
+ box = QtWidgets.QGroupBox('Web screen')
80
+ layout = QtWidgets.QVBoxLayout(box)
81
+ layout.addWidget(self.shareButton)
82
+ layout.addWidget(self.viewers)
83
+ self._controls.addWidget(box)
84
+ self.web.clientsChanged.connect(self._showViewers)
85
+ self._showViewers(0)
86
+ QtCore.QTimer.singleShot(0, self.share.show)
87
+
88
+ @QtCore.Slot(int)
89
+ def _showViewers(self, count: int) -> None:
90
+ self.viewers.setText(f'{count} watching')
91
+
92
+
93
+ if __name__ == '__main__': # pragma: no cover
94
+ launch(WebDemo, 'Web Demo')