matrice-streaming 0.1.69__tar.gz → 0.1.70__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.
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/PKG-INFO +1 -1
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/matrice_streaming.egg-info/PKG-INFO +1 -1
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/src/matrice_streaming/streaming_gateway/camera_streamer/async_camera_worker.py +10 -3
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/src/matrice_streaming/streaming_gateway/camera_streamer/async_ffmpeg_worker.py +2 -2
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/src/matrice_streaming/streaming_gateway/camera_streamer/camera_streamer.py +1 -1
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/src/matrice_streaming/streaming_gateway/camera_streamer/ffmpeg_camera_streamer.py +1 -1
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/src/matrice_streaming/streaming_gateway/camera_streamer/gstreamer_camera_streamer.py +1 -1
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/src/matrice_streaming/streaming_gateway/camera_streamer/worker_manager.py +27 -6
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/LICENSE.txt +0 -0
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/README.md +0 -0
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/matrice_streaming.egg-info/SOURCES.txt +0 -0
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/matrice_streaming.egg-info/dependency_links.txt +0 -0
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/matrice_streaming.egg-info/not-zip-safe +0 -0
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/matrice_streaming.egg-info/top_level.txt +0 -0
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/pyproject.toml +0 -0
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/setup.cfg +0 -0
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/setup.py +0 -0
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/src/matrice_streaming/__init__.py +0 -0
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/src/matrice_streaming/client/__init__.py +0 -0
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/src/matrice_streaming/client/client.py +0 -0
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/src/matrice_streaming/client/client_utils.py +0 -0
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/src/matrice_streaming/deployment/__init__.py +0 -0
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/src/matrice_streaming/deployment/camera_manager.py +0 -0
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/src/matrice_streaming/deployment/deployment.py +0 -0
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/src/matrice_streaming/deployment/inference_pipeline.py +0 -0
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/src/matrice_streaming/deployment/streaming_gateway_manager.py +0 -0
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/src/matrice_streaming/deployment/todo.txt +0 -0
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/src/matrice_streaming/py.typed +0 -0
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/src/matrice_streaming/streaming_gateway/__init__.py +0 -0
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/src/matrice_streaming/streaming_gateway/camera_streamer/ARCHITECTURE.md +0 -0
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/src/matrice_streaming/streaming_gateway/camera_streamer/__init__.py +0 -0
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/src/matrice_streaming/streaming_gateway/camera_streamer/device_detection.py +0 -0
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/src/matrice_streaming/streaming_gateway/camera_streamer/encoder_manager.py +0 -0
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/src/matrice_streaming/streaming_gateway/camera_streamer/encoding_pool_manager.py +0 -0
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/src/matrice_streaming/streaming_gateway/camera_streamer/ffmpeg_config.py +0 -0
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/src/matrice_streaming/streaming_gateway/camera_streamer/ffmpeg_worker_manager.py +0 -0
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/src/matrice_streaming/streaming_gateway/camera_streamer/frame_processor.py +0 -0
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/src/matrice_streaming/streaming_gateway/camera_streamer/gstreamer_worker.py +0 -0
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/src/matrice_streaming/streaming_gateway/camera_streamer/gstreamer_worker_manager.py +0 -0
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/src/matrice_streaming/streaming_gateway/camera_streamer/message_builder.py +0 -0
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/src/matrice_streaming/streaming_gateway/camera_streamer/nvdec.py +0 -0
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/src/matrice_streaming/streaming_gateway/camera_streamer/nvdec_worker_manager.py +0 -0
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/src/matrice_streaming/streaming_gateway/camera_streamer/platform_pipelines.py +0 -0
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/src/matrice_streaming/streaming_gateway/camera_streamer/retry_manager.py +0 -0
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/src/matrice_streaming/streaming_gateway/camera_streamer/stream_statistics.py +0 -0
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/src/matrice_streaming/streaming_gateway/camera_streamer/video_capture_manager.py +0 -0
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/src/matrice_streaming/streaming_gateway/debug/README.md +0 -0
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/src/matrice_streaming/streaming_gateway/debug/__init__.py +0 -0
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/src/matrice_streaming/streaming_gateway/debug/benchmark.py +0 -0
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/src/matrice_streaming/streaming_gateway/debug/debug_gstreamer_gateway.py +0 -0
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/src/matrice_streaming/streaming_gateway/debug/debug_stream_backend.py +0 -0
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/src/matrice_streaming/streaming_gateway/debug/debug_streaming_gateway.py +0 -0
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/src/matrice_streaming/streaming_gateway/debug/debug_utils.py +0 -0
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/src/matrice_streaming/streaming_gateway/debug/example_debug_streaming.py +0 -0
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/src/matrice_streaming/streaming_gateway/debug/test_videoplayback.py +0 -0
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/src/matrice_streaming/streaming_gateway/dynamic_camera_manager.py +0 -0
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/src/matrice_streaming/streaming_gateway/event_listener.py +0 -0
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/src/matrice_streaming/streaming_gateway/metrics_reporter.py +0 -0
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/src/matrice_streaming/streaming_gateway/streaming_action.py +0 -0
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/src/matrice_streaming/streaming_gateway/streaming_gateway.py +0 -0
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/src/matrice_streaming/streaming_gateway/streaming_gateway_utils.py +0 -0
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/src/matrice_streaming/streaming_gateway/streaming_status_listener.py +0 -0
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/tests/test_async_infrastructure.py +0 -0
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/tests/test_batch_auto_calculation.py +0 -0
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/tests/test_batching_verification.py +0 -0
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/tests/test_e2e_production.py +0 -0
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/tests/test_flatten_binary.py +0 -0
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/tests/test_gstreamer_integration.py +0 -0
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/tests/test_msgpack_fix.py +0 -0
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/tests/test_phase1_unit.py +0 -0
- {matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/tests/test_phase2_scaling.py +0 -0
|
@@ -88,7 +88,7 @@ class AsyncCameraWorker:
|
|
|
88
88
|
health_queue: multiprocessing.Queue,
|
|
89
89
|
command_queue: Optional[multiprocessing.Queue] = None,
|
|
90
90
|
response_queue: Optional[multiprocessing.Queue] = None,
|
|
91
|
-
frame_optimizer_enabled: bool =
|
|
91
|
+
frame_optimizer_enabled: bool = False, # Disabled for ML quality
|
|
92
92
|
frame_optimizer_config: Optional[Dict[str, Any]] = None,
|
|
93
93
|
# ================================================================
|
|
94
94
|
# SHM_MODE: New parameters for shared memory architecture
|
|
@@ -99,7 +99,7 @@ class AsyncCameraWorker:
|
|
|
99
99
|
# ================================================================
|
|
100
100
|
# PERFORMANCE: New parameters for optimized frame capture
|
|
101
101
|
# ================================================================
|
|
102
|
-
drop_stale_frames: bool =
|
|
102
|
+
drop_stale_frames: bool = False, # Disabled for ML quality
|
|
103
103
|
pin_cpu_affinity: bool = True, # Pin worker to specific CPU cores
|
|
104
104
|
total_workers: int = 1, # Total worker count for CPU affinity calculation
|
|
105
105
|
buffer_size: int = 1, # Minimal buffer for low latency (cv2_bench uses 1)
|
|
@@ -1313,10 +1313,14 @@ def run_async_worker(
|
|
|
1313
1313
|
# ================================================================
|
|
1314
1314
|
# PERFORMANCE: New parameters for optimized frame capture
|
|
1315
1315
|
# ================================================================
|
|
1316
|
-
drop_stale_frames: bool =
|
|
1316
|
+
drop_stale_frames: bool = False, # Disabled for ML quality
|
|
1317
1317
|
pin_cpu_affinity: bool = True,
|
|
1318
1318
|
total_workers: int = 1,
|
|
1319
1319
|
buffer_size: int = 1,
|
|
1320
|
+
# ================================================================
|
|
1321
|
+
# FRAME OPTIMIZER: Control frame similarity detection
|
|
1322
|
+
# ================================================================
|
|
1323
|
+
frame_optimizer_enabled: bool = False, # Disabled for ML quality
|
|
1320
1324
|
):
|
|
1321
1325
|
"""Entry point for async worker process.
|
|
1322
1326
|
|
|
@@ -1337,6 +1341,7 @@ def run_async_worker(
|
|
|
1337
1341
|
pin_cpu_affinity: Pin worker process to specific CPU cores
|
|
1338
1342
|
total_workers: Total number of workers for CPU affinity calculation
|
|
1339
1343
|
buffer_size: VideoCapture buffer size (1 = minimal latency)
|
|
1344
|
+
frame_optimizer_enabled: Enable frame similarity detection (skip similar frames)
|
|
1340
1345
|
"""
|
|
1341
1346
|
# Setup logging for this process
|
|
1342
1347
|
logging.basicConfig(
|
|
@@ -1378,6 +1383,8 @@ def run_async_worker(
|
|
|
1378
1383
|
pin_cpu_affinity=pin_cpu_affinity,
|
|
1379
1384
|
total_workers=total_workers,
|
|
1380
1385
|
buffer_size=buffer_size,
|
|
1386
|
+
# FRAME OPTIMIZER: Pass through frame similarity detection setting
|
|
1387
|
+
frame_optimizer_enabled=frame_optimizer_enabled,
|
|
1381
1388
|
)
|
|
1382
1389
|
|
|
1383
1390
|
# Run event loop
|
|
@@ -86,7 +86,7 @@ class AsyncFFmpegWorker:
|
|
|
86
86
|
pin_cpu_affinity: bool = True,
|
|
87
87
|
total_workers: int = 1,
|
|
88
88
|
# Frame optimizer options
|
|
89
|
-
frame_optimizer_enabled: bool =
|
|
89
|
+
frame_optimizer_enabled: bool = False, # Disabled for ML quality
|
|
90
90
|
frame_optimizer_config: Optional[Dict[str, Any]] = None,
|
|
91
91
|
):
|
|
92
92
|
"""Initialize async FFmpeg worker.
|
|
@@ -905,7 +905,7 @@ def run_ffmpeg_worker(
|
|
|
905
905
|
shm_frame_format: str = "BGR",
|
|
906
906
|
pin_cpu_affinity: bool = True,
|
|
907
907
|
total_workers: int = 1,
|
|
908
|
-
frame_optimizer_enabled: bool =
|
|
908
|
+
frame_optimizer_enabled: bool = False, # Disabled for ML quality
|
|
909
909
|
frame_optimizer_config: Optional[Dict[str, Any]] = None,
|
|
910
910
|
):
|
|
911
911
|
"""Entry point for FFmpeg worker process.
|
|
@@ -41,7 +41,7 @@ class CameraStreamer:
|
|
|
41
41
|
gateway_util: StreamingGatewayUtil = None,
|
|
42
42
|
connection_refresh_threshold: int = 10,
|
|
43
43
|
connection_refresh_interval: float = 60.0,
|
|
44
|
-
frame_optimizer_enabled: bool =
|
|
44
|
+
frame_optimizer_enabled: bool = False, # Disabled for ML quality
|
|
45
45
|
frame_optimizer_config: Optional[Dict[str, Any]] = None,
|
|
46
46
|
):
|
|
47
47
|
"""Initialize CameraStreamer.
|
|
@@ -315,7 +315,7 @@ class FFmpegCameraStreamer:
|
|
|
315
315
|
shm_slot_count: int = 1000,
|
|
316
316
|
shm_frame_format: str = "BGR",
|
|
317
317
|
# Frame optimizer options
|
|
318
|
-
frame_optimizer_enabled: bool =
|
|
318
|
+
frame_optimizer_enabled: bool = False, # Disabled for ML quality
|
|
319
319
|
frame_optimizer_config: Optional[Dict[str, Any]] = None,
|
|
320
320
|
# CPU affinity options
|
|
321
321
|
pin_cpu_affinity: bool = False,
|
|
@@ -532,7 +532,7 @@ class GStreamerCameraStreamer:
|
|
|
532
532
|
video_codec: Optional[str] = None,
|
|
533
533
|
gateway_util: StreamingGatewayUtil = None,
|
|
534
534
|
gstreamer_config: Optional[GStreamerConfig] = None,
|
|
535
|
-
frame_optimizer_enabled: bool =
|
|
535
|
+
frame_optimizer_enabled: bool = False, # Disabled for ML quality
|
|
536
536
|
frame_optimizer_config: Optional[Dict[str, Any]] = None,
|
|
537
537
|
):
|
|
538
538
|
"""Initialize GStreamerCameraStreamer.
|
|
@@ -43,9 +43,13 @@ class WorkerManager:
|
|
|
43
43
|
# ================================================================
|
|
44
44
|
# PERFORMANCE: New parameters for optimized frame capture
|
|
45
45
|
# ================================================================
|
|
46
|
-
drop_stale_frames: bool =
|
|
46
|
+
drop_stale_frames: bool = False, # Use grab()/grab()/retrieve() for latest frame (disabled for ML quality)
|
|
47
47
|
pin_cpu_affinity: bool = True, # Pin workers to specific CPU cores
|
|
48
48
|
buffer_size: int = 1, # VideoCapture buffer size (1 = minimal latency)
|
|
49
|
+
# ================================================================
|
|
50
|
+
# FRAME OPTIMIZER: Control frame similarity detection
|
|
51
|
+
# ================================================================
|
|
52
|
+
frame_optimizer_enabled: bool = False, # Enable frame similarity detection (disabled for ML quality)
|
|
49
53
|
):
|
|
50
54
|
"""Initialize worker manager with dynamic CPU-based scaling.
|
|
51
55
|
|
|
@@ -62,6 +66,7 @@ class WorkerManager:
|
|
|
62
66
|
drop_stale_frames: Use grab()/grab()/retrieve() pattern for latest frame
|
|
63
67
|
pin_cpu_affinity: Pin worker processes to specific CPU cores for cache locality
|
|
64
68
|
buffer_size: VideoCapture buffer size (1 = minimal latency)
|
|
69
|
+
frame_optimizer_enabled: Enable frame similarity detection (skip similar frames for bandwidth saving)
|
|
65
70
|
"""
|
|
66
71
|
self.camera_configs = camera_configs
|
|
67
72
|
self.stream_config = stream_config
|
|
@@ -122,14 +127,28 @@ class WorkerManager:
|
|
|
122
127
|
self.pin_cpu_affinity = pin_cpu_affinity
|
|
123
128
|
self.buffer_size = buffer_size
|
|
124
129
|
|
|
125
|
-
|
|
130
|
+
# ================================================================
|
|
131
|
+
# FRAME OPTIMIZER: Store frame similarity detection configuration
|
|
132
|
+
# ================================================================
|
|
133
|
+
self.frame_optimizer_enabled = frame_optimizer_enabled
|
|
134
|
+
|
|
135
|
+
if frame_optimizer_enabled:
|
|
126
136
|
self.logger.info(
|
|
127
|
-
|
|
128
|
-
f"drop_stale_frames={drop_stale_frames}, "
|
|
129
|
-
f"pin_cpu_affinity={pin_cpu_affinity}, "
|
|
130
|
-
f"buffer_size={buffer_size}"
|
|
137
|
+
"FRAME OPTIMIZER ENABLED: Similar frames will be skipped (may reduce ML quality)"
|
|
131
138
|
)
|
|
132
139
|
|
|
140
|
+
if drop_stale_frames:
|
|
141
|
+
self.logger.info(
|
|
142
|
+
"DROP STALE FRAMES ENABLED: Using grab/grab/retrieve pattern (may reduce ML quality)"
|
|
143
|
+
)
|
|
144
|
+
|
|
145
|
+
self.logger.info(
|
|
146
|
+
f"Worker config: frame_optimizer={frame_optimizer_enabled}, "
|
|
147
|
+
f"drop_stale_frames={drop_stale_frames}, "
|
|
148
|
+
f"pin_cpu_affinity={pin_cpu_affinity}, "
|
|
149
|
+
f"buffer_size={buffer_size}"
|
|
150
|
+
)
|
|
151
|
+
|
|
133
152
|
# Note: Batch parameters are calculated per-worker in _start_worker()
|
|
134
153
|
# based on each worker's camera count, not the global total.
|
|
135
154
|
# This ensures optimal batching when cameras are distributed across workers.
|
|
@@ -291,6 +310,8 @@ class WorkerManager:
|
|
|
291
310
|
self.pin_cpu_affinity,
|
|
292
311
|
self.num_workers, # Total workers for CPU affinity calculation
|
|
293
312
|
self.buffer_size,
|
|
313
|
+
# FRAME OPTIMIZER: Pass frame similarity detection setting
|
|
314
|
+
self.frame_optimizer_enabled,
|
|
294
315
|
),
|
|
295
316
|
name=f"AsyncWorker-{worker_id}",
|
|
296
317
|
daemon=False # Non-daemon so we can properly wait for shutdown
|
|
File without changes
|
|
File without changes
|
{matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/matrice_streaming.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/matrice_streaming.egg-info/not-zip-safe
RENAMED
|
File without changes
|
{matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/matrice_streaming.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/src/matrice_streaming/client/__init__.py
RENAMED
|
File without changes
|
{matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/src/matrice_streaming/client/client.py
RENAMED
|
File without changes
|
{matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/src/matrice_streaming/client/client_utils.py
RENAMED
|
File without changes
|
{matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/src/matrice_streaming/deployment/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
{matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/src/matrice_streaming/deployment/deployment.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{matrice_streaming-0.1.69 → matrice_streaming-0.1.70}/src/matrice_streaming/deployment/todo.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|