rocket-welder-sdk 1.1.28__py3-none-any.whl → 1.1.30__py3-none-any.whl

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.
@@ -1,12 +1,12 @@
1
1
  rocket_welder_sdk/__init__.py,sha256=tL2NPprMSh19MDUtLsk1YByB0YTLp6nNAkWv2fxNKuM,2001
2
2
  rocket_welder_sdk/bytes_size.py,sha256=Myl29-wyWCIYdbMmgaxXebT8Dz8_Fwcr3fnfaNW81P0,7463
3
3
  rocket_welder_sdk/connection_string.py,sha256=hW61Yf1uCGTWz5KA-yis1nrXO5pyTOCTzxJUbAxf7uk,9685
4
- rocket_welder_sdk/controllers.py,sha256=DGy33gikQEi8HhdC3JHKN38ADa-qlSE5acKEsnZLzNA,26593
4
+ rocket_welder_sdk/controllers.py,sha256=bp4MmTSoxMKrWYTpcO6aUXqI8jpZDBEhSKuCLinVZVE,30971
5
5
  rocket_welder_sdk/gst_metadata.py,sha256=jEQvZX4BdR6OR3lqp12PV-HEXZhcxfiS010diA2CbMM,14213
6
6
  rocket_welder_sdk/opencv_controller.py,sha256=MDM6_yFBB9BaMa5jnZRqw7xZZB-WuLr7EPrrfHQ2DK4,9905
7
7
  rocket_welder_sdk/periodic_timer.py,sha256=hnObybmrnf3J47QrNKJhYAytLKwria016123NvPRfQ0,9369
8
8
  rocket_welder_sdk/py.typed,sha256=0cXFZXmes4Y-vnl4lO3HtyyyWaFNw85B7tJdFeCtHDc,67
9
- rocket_welder_sdk/rocket_welder_client.py,sha256=aiNfNJjDXLWJ-vw5uDg2tv0HuSkerCVMl109zQaVjGg,14311
9
+ rocket_welder_sdk/rocket_welder_client.py,sha256=u2XYY1RVyP2rKu2zUZpObKVa4nlTKDUNI0YlFXt8ePE,14401
10
10
  rocket_welder_sdk/external_controls/__init__.py,sha256=ldOLGhLLS5BQL8m4VKFYV0SvsNNlV2tghlc7rkqadU8,699
11
11
  rocket_welder_sdk/external_controls/contracts.py,sha256=3DU6pdpteN50gF2fsS7C2279dGjDa0tZLrLntkBa2LM,2607
12
12
  rocket_welder_sdk/external_controls/contracts_old.py,sha256=XWriuXJZu5caTSS0bcTIOZcKnj-IRCm96voA4gqLBfU,2980
@@ -16,7 +16,7 @@ rocket_welder_sdk/ui/icons.py,sha256=DcDklZkPmiEzlOD4IR7VTJOtGPCuuh_OM_WN7ScghWE
16
16
  rocket_welder_sdk/ui/ui_events_projection.py,sha256=siiNhjLEBOPfTKw1ZhOPGkwIN5rLDH7V9VCZTNrhEtQ,7836
17
17
  rocket_welder_sdk/ui/ui_service.py,sha256=uRdpyJGoCQmtOli_HKSrxLwhZYG-XRuHIYdkmFz1zNk,12026
18
18
  rocket_welder_sdk/ui/value_types.py,sha256=f7OA_9zgXEDPoITc8v8SfAR23I4XeFhE3E2_GcAbR6k,1616
19
- rocket_welder_sdk-1.1.28.dist-info/METADATA,sha256=_4x2JrvbxuknI2dU9FeuZFX_SZ3SEPcnnG5U_ZI_DKU,18081
20
- rocket_welder_sdk-1.1.28.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
21
- rocket_welder_sdk-1.1.28.dist-info/top_level.txt,sha256=2iZvBjnwVCUW-uDE23-eJld5PZ9-mlPI69QiXM5IrTA,18
22
- rocket_welder_sdk-1.1.28.dist-info/RECORD,,
19
+ rocket_welder_sdk-1.1.30.dist-info/METADATA,sha256=RA2ryhg4JnHIBnAbQZLjzH2_ZRsGugT4NVigmDnKoLs,24438
20
+ rocket_welder_sdk-1.1.30.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
21
+ rocket_welder_sdk-1.1.30.dist-info/top_level.txt,sha256=2iZvBjnwVCUW-uDE23-eJld5PZ9-mlPI69QiXM5IrTA,18
22
+ rocket_welder_sdk-1.1.30.dist-info/RECORD,,
@@ -1,627 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: rocket-welder-sdk
3
- Version: 1.1.28
4
- Summary: High-performance video streaming SDK for RocketWelder services using ZeroBuffer IPC
5
- Home-page: https://github.com/modelingevolution/rocket-welder-sdk
6
- Author: ModelingEvolution
7
- Author-email: ModelingEvolution <info@modelingevolution.com>
8
- Maintainer-email: ModelingEvolution <info@modelingevolution.com>
9
- License: MIT
10
- Project-URL: Homepage, https://github.com/modelingevolution/rocket-welder-sdk
11
- Project-URL: Repository, https://github.com/modelingevolution/rocket-welder-sdk.git
12
- Project-URL: Issues, https://github.com/modelingevolution/rocket-welder-sdk/issues
13
- Keywords: video,streaming,gstreamer,ipc,shared-memory,zerobuffer,computer-vision
14
- Classifier: Development Status :: 4 - Beta
15
- Classifier: Intended Audience :: Developers
16
- Classifier: Topic :: Multimedia :: Video
17
- Classifier: Topic :: Software Development :: Libraries :: Python Modules
18
- Classifier: License :: OSI Approved :: MIT License
19
- Classifier: Programming Language :: Python :: 3
20
- Classifier: Programming Language :: Python :: 3.8
21
- Classifier: Programming Language :: Python :: 3.9
22
- Classifier: Programming Language :: Python :: 3.10
23
- Classifier: Programming Language :: Python :: 3.11
24
- Classifier: Programming Language :: Python :: 3.12
25
- Classifier: Operating System :: OS Independent
26
- Classifier: Typing :: Typed
27
- Requires-Python: >=3.8
28
- Description-Content-Type: text/markdown
29
- Requires-Dist: numpy>=1.20.0
30
- Requires-Dist: opencv-python>=4.5.0
31
- Requires-Dist: zerobuffer-ipc>=1.1.17
32
- Requires-Dist: pydantic>=2.5.0
33
- Requires-Dist: py-micro-plumberd>=0.1.8
34
- Provides-Extra: dev
35
- Requires-Dist: pytest>=7.0; extra == "dev"
36
- Requires-Dist: pytest-cov>=4.0; extra == "dev"
37
- Requires-Dist: pytest-asyncio>=0.21; extra == "dev"
38
- Requires-Dist: black>=22.0; extra == "dev"
39
- Requires-Dist: mypy>=1.0; extra == "dev"
40
- Requires-Dist: ruff>=0.1.0; extra == "dev"
41
- Requires-Dist: types-setuptools; extra == "dev"
42
- Dynamic: author
43
- Dynamic: home-page
44
- Dynamic: requires-python
45
-
46
- # Rocket Welder SDK
47
-
48
- [![NuGet](https://img.shields.io/nuget/v/RocketWelder.SDK.svg)](https://www.nuget.org/packages/RocketWelder.SDK/)
49
- [![PyPI](https://img.shields.io/pypi/v/rocket-welder-sdk.svg)](https://pypi.org/project/rocket-welder-sdk/)
50
- [![vcpkg](https://img.shields.io/badge/vcpkg-rocket--welder--sdk-blue)](https://github.com/modelingevolution/rocket-welder-sdk-vcpkg-registry)
51
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
52
-
53
- Multi-language client libraries for interacting with RocketWelder video streaming services.
54
-
55
- ## Overview
56
-
57
- The Rocket Welder SDK provides high-performance video streaming capabilities for containerized applications. It offers native client libraries in C++, C#, and Python, enabling seamless integration with RocketWelder video streaming pipelines.
58
-
59
- ## Features
60
-
61
- - **High Performance**: Optimized for minimal latency and maximum throughput
62
- - **Multi-Language Support**: Native libraries for C++, C#, and Python
63
- - **Protocol Flexibility**: Support for multiple streaming protocols via connection strings
64
- - **Container-Ready**: Designed for Docker/Kubernetes deployments
65
- - **Simple Integration**: Easy-to-use API with minimal configuration
66
-
67
- ## Client Libraries
68
-
69
- | Language | Package Manager | Package Name |
70
- |----------|----------------|--------------|
71
- | C++ | vcpkg | rocket-welder-sdk |
72
- | C# | NuGet | RocketWelder.SDK |
73
- | Python | pip | rocket-welder-sdk |
74
-
75
- ## Connection String Format
76
-
77
- The SDK uses URI-style connection strings to specify data sources and protocols:
78
-
79
- ```
80
- protocol://[host[:port]]/[path][?param1=value1&param2=value2]
81
- ```
82
-
83
- ### Supported Protocols
84
-
85
- #### Shared Memory (High-Performance Local)
86
- ```
87
- shm://<buffer_name>
88
- shm://<buffer_name>?buffer_size=10MB&metadata_size=1024KB
89
- shm://<buffer_name>?mode=duplex&buffer_size=10MB
90
- ```
91
-
92
- **Optional Parameters:**
93
- - `mode`: Communication mode (`duplex` for bidirectional/mutable, `oneway` for one-way communication; default: `duplex`)
94
- - `buffer_size`: Size of the data buffer (default: 20MB, supports units: B, KB, MB, GB)
95
- - `metadata_size`: Size of the metadata buffer (default: 4KB, supports units: B, KB, MB)
96
-
97
- #### File (Video File Playback)
98
- ```
99
- file:///path/to/video.mp4
100
- file:///path/to/video.mp4?loop=true
101
- file:///path/to/video.mp4?preview=true
102
- file:///path/to/video.mp4?loop=true&preview=true
103
- ```
104
-
105
- **Optional Parameters:**
106
- - `loop`: Loop video playback when end is reached (`true` or `false`; default: `false`)
107
- - `preview`: Enable preview window display (`true` or `false`; default: `false`)
108
-
109
- #### MJPEG over HTTP
110
- ```
111
- mjpeg+http://192.168.1.100:8080
112
- mjpeg+http://camera.local:8080
113
- ```
114
-
115
- #### MJPEG over TCP
116
- ```
117
- mjpeg+tcp://192.168.1.100:5000
118
- mjpeg+tcp://camera.local:5000
119
- ```
120
-
121
- ### Environment Variable
122
-
123
- When deployed in a Rocket Welder container, the connection string is provided via:
124
- ```bash
125
- CONNECTION_STRING=shm://camera_feed?buffer_size=20MB&metadata_size=4KB
126
- ```
127
-
128
- ## Installation
129
-
130
- ### C++ with vcpkg
131
-
132
- Configure the custom registry in your `vcpkg-configuration.json`:
133
- ```json
134
- {
135
- "registries": [
136
- {
137
- "kind": "git",
138
- "repository": "https://github.com/modelingevolution/rocket-welder-sdk-vcpkg-registry",
139
- "baseline": "YOUR_BASELINE_HERE",
140
- "packages": ["rocket-welder-sdk"]
141
- }
142
- ]
143
- }
144
- ```
145
-
146
- Then install:
147
- ```bash
148
- # Install via vcpkg
149
- vcpkg install rocket-welder-sdk
150
-
151
- # Or integrate with CMake
152
- find_package(rocket-welder-sdk CONFIG REQUIRED)
153
- target_link_libraries(your_app PRIVATE rocket-welder-sdk::rocket-welder-sdk)
154
- ```
155
-
156
- ### C# with NuGet
157
-
158
- [![NuGet Downloads](https://img.shields.io/nuget/dt/RocketWelder.SDK.svg)](https://www.nuget.org/packages/RocketWelder.SDK/)
159
-
160
- ```bash
161
- # Package Manager Console
162
- Install-Package RocketWelder.SDK
163
-
164
- # .NET CLI
165
- dotnet add package RocketWelder.SDK
166
-
167
- # PackageReference in .csproj
168
- <PackageReference Include="RocketWelder.SDK" Version="1.0.*" />
169
- ```
170
-
171
- ### Python with pip
172
-
173
- [![PyPI Downloads](https://img.shields.io/pypi/dm/rocket-welder-sdk.svg)](https://pypi.org/project/rocket-welder-sdk/)
174
-
175
- ```bash
176
- # Install from PyPI
177
- pip install rocket-welder-sdk
178
-
179
- # Install with optional dependencies
180
- pip install rocket-welder-sdk[opencv] # Includes OpenCV
181
- pip install rocket-welder-sdk[all] # All optional dependencies
182
-
183
- # Install specific version
184
- pip install rocket-welder-sdk==1.0.0
185
- ```
186
-
187
- ## Quick Start
188
-
189
- ### C++ Quick Start
190
- ```cpp
191
- #include <rocket_welder/client.hpp>
192
-
193
- auto client = rocket_welder::Client::from_connection_string("shm://my-buffer");
194
- client.on_frame([](cv::Mat& frame) {
195
- // Process frame
196
- });
197
- client.start();
198
- ```
199
-
200
- ### C# Quick Start
201
- ```csharp
202
- using RocketWelder.SDK;
203
-
204
- var client = RocketWelderClient.FromConnectionString("shm://my-buffer");
205
- client.Start(frame => {
206
- // Process frame
207
- });
208
- ```
209
-
210
- ### Python Quick Start
211
- ```python
212
- import rocket_welder_sdk as rw
213
-
214
- client = rw.Client.from_connection_string("shm://my-buffer")
215
-
216
- @client.on_frame
217
- def process(frame):
218
- # Process frame
219
- pass
220
-
221
- client.start()
222
- ```
223
-
224
- ## Usage Examples
225
-
226
- ### C++
227
-
228
- ```cpp
229
- #include <rocket_welder/client.hpp>
230
- #include <opencv2/opencv.hpp>
231
-
232
- int main(int argc, char* argv[]) {
233
- // Best practice: use from() which:
234
- // 1. Checks environment variable (CONNECTION_STRING)
235
- // 2. Overrides with command line args if provided
236
- auto client = rocket_welder::Client::from(argc, argv);
237
-
238
- // Or specify connection string directly
239
- auto client = rocket_welder::Client::from_connection_string(
240
- "shm://camera_feed?buffer_size=20MB&metadata_size=4KB"
241
- );
242
-
243
- // Process frames as OpenCV Mat (mutable by default)
244
- client.on_frame([](cv::Mat& frame) {
245
- // Add overlay text - zero copy!
246
- cv::putText(frame, "Processing", cv::Point(10, 30),
247
- cv::FONT_HERSHEY_SIMPLEX, 1.0, cv::Scalar(0, 255, 0), 2);
248
-
249
- // Add timestamp overlay
250
- auto now = std::chrono::system_clock::now();
251
- auto time_t = std::chrono::system_clock::to_time_t(now);
252
- cv::putText(frame, std::ctime(&time_t), cv::Point(10, 60),
253
- cv::FONT_HERSHEY_SIMPLEX, 0.5, cv::Scalar(255, 255, 255), 1);
254
- });
255
-
256
- client.start();
257
- return 0;
258
- }
259
- ```
260
-
261
- ### C#
262
-
263
- ```csharp
264
- using RocketWelder.SDK;
265
- using OpenCvSharp;
266
-
267
- class Program
268
- {
269
- static void Main(string[] args)
270
- {
271
- // Best practice: use From() which:
272
- // 1. Checks environment variable (CONNECTION_STRING)
273
- // 2. Overrides with command line args if provided
274
- var client = RocketWelderClient.From(args);
275
-
276
- // Or specify connection string directly
277
- var client = RocketWelderClient.FromConnectionString(
278
- "shm://camera_feed?buffer_size=20MB&metadata_size=4KB"
279
- );
280
-
281
- int frameCount = 0;
282
-
283
- // Process frames as OpenCV Mat
284
- client.Start((Mat frame) =>
285
- {
286
- // Add overlay text
287
- Cv2.PutText(frame, "Processing", new Point(10, 30),
288
- HersheyFonts.HersheySimplex, 1.0, new Scalar(0, 255, 0), 2);
289
-
290
- // Add frame counter overlay
291
- Cv2.PutText(frame, $"Frame: {frameCount++}", new Point(10, 60),
292
- HersheyFonts.HersheySimplex, 0.5, new Scalar(255, 255, 255), 1);
293
- });
294
- }
295
- }
296
- ```
297
-
298
- ### Python
299
-
300
- ```python
301
- import rocket_welder_sdk as rw
302
- import cv2
303
- import sys
304
-
305
- # Best practice: use from_args() which:
306
- # 1. Checks environment variable (CONNECTION_STRING)
307
- # 2. Overrides with command line args if provided
308
- client = rw.Client.from_args(sys.argv)
309
-
310
- # Or specify connection string directly
311
- client = rw.Client.from_connection_string("shm://camera_feed?buffer_size=20MB&metadata_size=4KB")
312
-
313
- # Process frames as numpy arrays (OpenCV compatible)
314
- @client.on_frame
315
- def process_frame(frame: np.ndarray):
316
- # Add overlay text - zero copy!
317
- cv2.putText(frame, "Processing", (10, 30),
318
- cv2.FONT_HERSHEY_SIMPLEX, 1.0, (0, 255, 0), 2)
319
-
320
- # Add timestamp overlay
321
- from datetime import datetime
322
- timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
323
- cv2.putText(frame, timestamp, (10, 60),
324
- cv2.FONT_HERSHEY_SIMPLEX, 0.5, (255, 255, 255), 1)
325
-
326
- client.start()
327
-
328
- # Or use iterator pattern
329
- for frame in client.frames():
330
- # Each frame is a numpy array
331
- print(f"Received frame: {frame.shape}")
332
- ```
333
-
334
- ## Preview Display
335
-
336
- When using the `file://` protocol with `preview=true` parameter, you can display frames in a window. The `Show()` method must be called from the main thread:
337
-
338
- ### C# Preview
339
- ```csharp
340
- var client = RocketWelderClient.FromConnectionString(
341
- "file:///path/to/video.mp4?preview=true&loop=true"
342
- );
343
-
344
- // Start processing in background
345
- client.Start(frame => {
346
- // Process frame
347
- });
348
-
349
- // Show preview window in main thread (blocks until 'q' pressed)
350
- client.Show();
351
- ```
352
-
353
- ### Python Preview
354
- ```python
355
- client = rw.Client.from_connection_string(
356
- "file:///path/to/video.mp4?preview=true&loop=true"
357
- )
358
-
359
- # Start processing in background
360
- client.start(lambda frame: process_frame(frame))
361
-
362
- # Show preview window in main thread (blocks until 'q' pressed)
363
- client.show()
364
- ```
365
-
366
- **Note**: The `Show()` method:
367
- - Blocks when `preview=true` is set in the connection string
368
- - Returns immediately when `preview` is not set or `false`
369
- - Must be called from the main thread (X11/GUI requirement)
370
- - Stops when 'q' key is pressed in the preview window
371
-
372
- ## Docker Integration
373
-
374
- ### C++ Dockerfile
375
-
376
- ```dockerfile
377
- FROM ubuntu:22.04 AS builder
378
-
379
- # Install build tools and OpenCV
380
- RUN apt-get update && apt-get install -y \
381
- build-essential \
382
- cmake \
383
- libopencv-dev
384
-
385
- # Install Rocket Welder SDK via vcpkg
386
- RUN vcpkg install rocket-welder-sdk
387
-
388
- # Build your application
389
- WORKDIR /app
390
- COPY . .
391
- RUN cmake . && make
392
-
393
- FROM ubuntu:22.04
394
- RUN apt-get update && apt-get install -y libopencv-dev
395
- COPY --from=builder /app/my_app /usr/local/bin/
396
- CMD ["my_app"]
397
- ```
398
-
399
- ### C# Dockerfile
400
-
401
- ```dockerfile
402
- FROM mcr.microsoft.com/dotnet/sdk:8.0 AS builder
403
-
404
- WORKDIR /app
405
- COPY *.csproj ./
406
- RUN dotnet restore
407
-
408
- COPY . ./
409
- RUN dotnet publish -c Release -o out
410
-
411
- FROM mcr.microsoft.com/dotnet/runtime:8.0
412
- WORKDIR /app
413
- COPY --from=builder /app/out .
414
- CMD ["dotnet", "MyApp.dll"]
415
- ```
416
-
417
- ### Python Dockerfile
418
-
419
- ```dockerfile
420
- FROM python:3.11-slim
421
-
422
- # Install OpenCV and other dependencies
423
- RUN apt-get update && apt-get install -y \
424
- python3-opencv \
425
- && rm -rf /var/lib/apt/lists/*
426
-
427
- # Install Rocket Welder SDK and ML frameworks
428
- RUN pip install --no-cache-dir \
429
- rocket-welder-sdk \
430
- numpy \
431
- ultralytics # Example: YOLO
432
-
433
- WORKDIR /app
434
- COPY . .
435
-
436
- CMD ["python", "app.py"]
437
- ```
438
-
439
- ### Running Docker with X11 Display Support (Preview)
440
-
441
- When using the `preview=true` parameter with file protocol, you need to enable X11 forwarding for Docker containers to display the preview window.
442
-
443
- #### Linux
444
-
445
- ```bash
446
- # Allow X server connections from Docker
447
- xhost +local:docker
448
-
449
- # Run container with display support
450
- docker run --rm \
451
- -e DISPLAY=$DISPLAY \
452
- -e CONNECTION_STRING="file:///data/video.mp4?preview=true&loop=true" \
453
- -v /tmp/.X11-unix:/tmp/.X11-unix:rw \
454
- -v /path/to/video.mp4:/data/video.mp4:ro \
455
- --network host \
456
- your-image:latest
457
-
458
- # Restore X server security after running
459
- xhost -local:docker
460
- ```
461
-
462
- #### Windows WSL2
463
-
464
- WSL2 includes WSLg which provides automatic X11 support:
465
-
466
- ```bash
467
- # WSLg sets DISPLAY automatically, just verify it's set
468
- echo $DISPLAY # Should show :0 or similar
469
-
470
- # Allow X server connections
471
- xhost +local:docker 2>/dev/null || xhost +local: 2>/dev/null
472
-
473
- # Run container with display support (same as Linux)
474
- docker run --rm \
475
- -e DISPLAY=$DISPLAY \
476
- -e CONNECTION_STRING="file:///data/video.mp4?preview=true&loop=true" \
477
- -v /tmp/.X11-unix:/tmp/.X11-unix:rw \
478
- -v /mnt/c/path/to/video.mp4:/data/video.mp4:ro \
479
- --network host \
480
- your-image:latest
481
-
482
- # Restore X server security
483
- xhost -local:docker 2>/dev/null || xhost -local: 2>/dev/null
484
- ```
485
-
486
- #### Helper Scripts
487
-
488
- The SDK includes helper scripts for easy testing:
489
-
490
- ```bash
491
- # Build Docker images with sample clients
492
- ./build_docker_samples.sh
493
-
494
- # Test Python client with preview
495
- ./run_docker_x11.sh python
496
-
497
- # Test C# client with preview
498
- ./run_docker_x11.sh csharp
499
- ```
500
-
501
- These scripts automatically:
502
- - Configure X11 display forwarding
503
- - Use a test video from the repository's data folder
504
- - Mount the video into the container
505
- - Set up the connection string with preview enabled
506
- - Clean up X server permissions after running
507
-
508
- ## Protocol Details
509
-
510
- ### Shared Memory Protocol (shm://)
511
-
512
- High-performance local data transfer between processes:
513
-
514
- - **Performance**: Minimal latency, maximum throughput
515
- - **Use Cases**: Local processing, multi-container applications on same host
516
-
517
- ### File Protocol (file://)
518
-
519
- Local video file playback with OpenCV:
520
-
521
- - **Performance**: Controlled playback speed based on video FPS
522
- - **Features**: Loop playback, preview window, frame-accurate timing
523
- - **Use Cases**: Testing, development, offline processing, demos
524
- - **Supported Formats**: All formats supported by OpenCV (MP4, AVI, MOV, etc.)
525
-
526
- ### MJPEG over HTTP (mjpeg+http://)
527
-
528
- Motion JPEG streaming over HTTP:
529
-
530
- - **Performance**: Good balance of quality and bandwidth
531
- - **Advantages**: Wide compatibility, firewall-friendly, browser support
532
- - **Use Cases**: Network streaming, web applications, remote monitoring
533
-
534
- ### MJPEG over TCP (mjpeg+tcp://)
535
-
536
- Motion JPEG streaming over raw TCP socket:
537
-
538
- - **Performance**: Lower latency than HTTP, less protocol overhead
539
- - **Advantages**: Direct socket connection, minimal overhead, suitable for local networks
540
- - **Use Cases**: Low-latency streaming, embedded systems, industrial applications
541
-
542
- ## Building from Source
543
-
544
- ### Prerequisites
545
-
546
- - CMake 3.20+
547
- - C++20 compiler
548
- - Python 3.8+ (for Python bindings)
549
- - .NET 6.0+ SDK (for C# bindings)
550
- - OpenCV 4.0+ (optional, for image processing)
551
-
552
- ### Build Instructions
553
-
554
- ```bash
555
- git clone https://github.com/modelingevolution/rocket-welder-sdk.git
556
- cd rocket-welder-sdk
557
-
558
- # Build all libraries
559
- mkdir build && cd build
560
- cmake ..
561
- make -j$(nproc)
562
-
563
- # Run tests
564
- ctest
565
-
566
- # Install
567
- sudo make install
568
- ```
569
-
570
- ## API Reference
571
-
572
- Detailed API documentation for each language:
573
-
574
- - [C++ API Reference](docs/cpp-api.md)
575
- - [C# API Reference](docs/csharp-api.md)
576
- - [Python API Reference](docs/python-api.md)
577
-
578
- ## Examples
579
-
580
- See the [examples](examples/) directory for complete working examples:
581
-
582
- - [Simple Frame Reader](examples/simple-reader/)
583
- - [Frame Processor](examples/frame-processor/)
584
- - [Multi-Stream Handler](examples/multi-stream/)
585
- - [Performance Benchmark](examples/benchmark/)
586
-
587
- ## Contributing
588
-
589
- Contributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
590
-
591
- ## License
592
-
593
- This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
594
-
595
- ## Support
596
-
597
- - **Issues**: [GitHub Issues](https://github.com/modelingevolution/rocket-welder-sdk/issues)
598
- - **Discussions**: [GitHub Discussions](https://github.com/modelingevolution/rocket-welder-sdk/discussions)
599
- - **Documentation**: [https://docs.rocket-welder.io](https://docs.rocket-welder.io)
600
-
601
- ## Technical Details
602
-
603
- ### GStreamer Integration
604
-
605
- The SDK integrates with GStreamer pipelines through specialized elements:
606
- - **zerosink**: Simple sink element for writing video frames
607
- - **zerobuffer**: Processing element with bidirectional communication using DuplexChannel
608
-
609
- ### Zero-Copy Buffer Technology
610
-
611
- For shared memory protocol, the SDK uses:
612
- - **C++**: Zero-Copy-Buffer (via vcpkg) - Returns cv::Mat with zero-copy access
613
- - **C#**: ZeroBuffer (via NuGet) - Returns OpenCvSharp.Mat with zero-copy access
614
- - **Python**: zero-buffer (via pip) - Returns numpy arrays compatible with OpenCV
615
-
616
- The SDK leverages DuplexChannel for bidirectional communication, enabling:
617
- - Zero-copy frame access as OpenCV Mat objects
618
- - In-place frame processing without memory allocation
619
- - Direct memory mapping between producer and consumer
620
- - Efficient metadata passing alongside frame data
621
-
622
- This technology enables direct memory access without data duplication, providing maximum performance for local processing scenarios.
623
-
624
- ## Acknowledgments
625
-
626
- - GStreamer Project for the multimedia framework
627
- - ZeroBuffer contributors for the zero-copy buffer implementation