rocket-welder-sdk 1.1.27__py3-none-any.whl → 1.1.29__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,10 +1,12 @@
1
- rocket_welder_sdk/__init__.py,sha256=hv0U_UsvIjyLhZLsumjGwKrBJs8vzb1kczUzANilHug,1789
1
+ rocket_welder_sdk/__init__.py,sha256=tL2NPprMSh19MDUtLsk1YByB0YTLp6nNAkWv2fxNKuM,2001
2
2
  rocket_welder_sdk/bytes_size.py,sha256=Myl29-wyWCIYdbMmgaxXebT8Dz8_Fwcr3fnfaNW81P0,7463
3
- rocket_welder_sdk/connection_string.py,sha256=msDgHD7525UXvrNPqKGpYgQJJtmOfS_XEnX3JA8LIz0,7731
4
- rocket_welder_sdk/controllers.py,sha256=IhPJfwVlk0pxOuTRPW_Xp_3H_BZG6AJXQfS7DCfBrhg,26177
3
+ rocket_welder_sdk/connection_string.py,sha256=hW61Yf1uCGTWz5KA-yis1nrXO5pyTOCTzxJUbAxf7uk,9685
4
+ rocket_welder_sdk/controllers.py,sha256=VfXfbRSiyma2gh0xSy-Ahg_9reIdH_JfVmuMtvhxhVs,30995
5
5
  rocket_welder_sdk/gst_metadata.py,sha256=jEQvZX4BdR6OR3lqp12PV-HEXZhcxfiS010diA2CbMM,14213
6
+ rocket_welder_sdk/opencv_controller.py,sha256=MDM6_yFBB9BaMa5jnZRqw7xZZB-WuLr7EPrrfHQ2DK4,9905
7
+ rocket_welder_sdk/periodic_timer.py,sha256=hnObybmrnf3J47QrNKJhYAytLKwria016123NvPRfQ0,9369
6
8
  rocket_welder_sdk/py.typed,sha256=0cXFZXmes4Y-vnl4lO3HtyyyWaFNw85B7tJdFeCtHDc,67
7
- rocket_welder_sdk/rocket_welder_client.py,sha256=uvaAtog-xVCY9YldisgkCnCkbEWMHEgrJUUWJA1J3hg,5237
9
+ rocket_welder_sdk/rocket_welder_client.py,sha256=aiNfNJjDXLWJ-vw5uDg2tv0HuSkerCVMl109zQaVjGg,14311
8
10
  rocket_welder_sdk/external_controls/__init__.py,sha256=ldOLGhLLS5BQL8m4VKFYV0SvsNNlV2tghlc7rkqadU8,699
9
11
  rocket_welder_sdk/external_controls/contracts.py,sha256=3DU6pdpteN50gF2fsS7C2279dGjDa0tZLrLntkBa2LM,2607
10
12
  rocket_welder_sdk/external_controls/contracts_old.py,sha256=XWriuXJZu5caTSS0bcTIOZcKnj-IRCm96voA4gqLBfU,2980
@@ -14,7 +16,7 @@ rocket_welder_sdk/ui/icons.py,sha256=DcDklZkPmiEzlOD4IR7VTJOtGPCuuh_OM_WN7ScghWE
14
16
  rocket_welder_sdk/ui/ui_events_projection.py,sha256=siiNhjLEBOPfTKw1ZhOPGkwIN5rLDH7V9VCZTNrhEtQ,7836
15
17
  rocket_welder_sdk/ui/ui_service.py,sha256=uRdpyJGoCQmtOli_HKSrxLwhZYG-XRuHIYdkmFz1zNk,12026
16
18
  rocket_welder_sdk/ui/value_types.py,sha256=f7OA_9zgXEDPoITc8v8SfAR23I4XeFhE3E2_GcAbR6k,1616
17
- rocket_welder_sdk-1.1.27.dist-info/METADATA,sha256=7ASdgQYwEmQFNAHNxEzgdTJycgy-5J59uujE9Zwxw6I,14402
18
- rocket_welder_sdk-1.1.27.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
19
- rocket_welder_sdk-1.1.27.dist-info/top_level.txt,sha256=2iZvBjnwVCUW-uDE23-eJld5PZ9-mlPI69QiXM5IrTA,18
20
- rocket_welder_sdk-1.1.27.dist-info/RECORD,,
19
+ rocket_welder_sdk-1.1.29.dist-info/METADATA,sha256=W2O0RIKhAnz7BgPHuVazdloH3vvMGdbHb7VhaO73ii8,24093
20
+ rocket_welder_sdk-1.1.29.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
21
+ rocket_welder_sdk-1.1.29.dist-info/top_level.txt,sha256=2iZvBjnwVCUW-uDE23-eJld5PZ9-mlPI69QiXM5IrTA,18
22
+ rocket_welder_sdk-1.1.29.dist-info/RECORD,,
@@ -1,498 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: rocket-welder-sdk
3
- Version: 1.1.27
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.9
21
- Classifier: Programming Language :: Python :: 3.10
22
- Classifier: Programming Language :: Python :: 3.11
23
- Classifier: Programming Language :: Python :: 3.12
24
- Classifier: Operating System :: OS Independent
25
- Classifier: Typing :: Typed
26
- Requires-Python: >=3.8
27
- Description-Content-Type: text/markdown
28
- Requires-Dist: numpy>=1.20.0
29
- Requires-Dist: opencv-python>=4.5.0
30
- Requires-Dist: zerobuffer-ipc>=1.1.17
31
- Requires-Dist: pydantic>=2.5.0
32
- Requires-Dist: py-micro-plumberd>=0.1.8
33
- Provides-Extra: dev
34
- Requires-Dist: pytest>=7.0; extra == "dev"
35
- Requires-Dist: pytest-cov>=4.0; extra == "dev"
36
- Requires-Dist: pytest-asyncio>=0.21; extra == "dev"
37
- Requires-Dist: black>=22.0; extra == "dev"
38
- Requires-Dist: mypy>=1.0; extra == "dev"
39
- Requires-Dist: ruff>=0.1.0; extra == "dev"
40
- Requires-Dist: types-setuptools; extra == "dev"
41
- Dynamic: author
42
- Dynamic: home-page
43
- Dynamic: requires-python
44
-
45
- # Rocket Welder SDK
46
-
47
- [![NuGet](https://img.shields.io/nuget/v/RocketWelder.SDK.svg)](https://www.nuget.org/packages/RocketWelder.SDK/)
48
- [![PyPI](https://img.shields.io/pypi/v/rocket-welder-sdk.svg)](https://pypi.org/project/rocket-welder-sdk/)
49
- [![vcpkg](https://img.shields.io/badge/vcpkg-rocket--welder--sdk-blue)](https://github.com/modelingevolution/rocket-welder-sdk-vcpkg-registry)
50
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
51
-
52
- Multi-language client libraries for interacting with RocketWelder video streaming services.
53
-
54
- ## Overview
55
-
56
- 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.
57
-
58
- ## Features
59
-
60
- - **High Performance**: Optimized for minimal latency and maximum throughput
61
- - **Multi-Language Support**: Native libraries for C++, C#, and Python
62
- - **Protocol Flexibility**: Support for multiple streaming protocols via connection strings
63
- - **Container-Ready**: Designed for Docker/Kubernetes deployments
64
- - **Simple Integration**: Easy-to-use API with minimal configuration
65
-
66
- ## Client Libraries
67
-
68
- | Language | Package Manager | Package Name |
69
- |----------|----------------|--------------|
70
- | C++ | vcpkg | rocket-welder-sdk |
71
- | C# | NuGet | RocketWelder.SDK |
72
- | Python | pip | rocket-welder-sdk |
73
-
74
- ## Connection String Format
75
-
76
- The SDK uses URI-style connection strings to specify data sources and protocols:
77
-
78
- ```
79
- protocol://[host[:port]]/[path][?param1=value1&param2=value2]
80
- ```
81
-
82
- ### Supported Protocols
83
-
84
- #### Shared Memory (High-Performance Local)
85
- ```
86
- shm://<buffer_name>
87
- shm://<buffer_name>?buffer_size=10MB&metadata_size=1024KB
88
- shm://<buffer_name>?mode=duplex&buffer_size=10MB
89
- ```
90
-
91
- **Optional Parameters:**
92
- - `mode`: Communication mode (`duplex` for bidirectional/mutable, `oneway` for one-way communication; default: `duplex`)
93
- - `buffer_size`: Size of the data buffer (default: 20MB, supports units: B, KB, MB, GB)
94
- - `metadata_size`: Size of the metadata buffer (default: 4KB, supports units: B, KB, MB)
95
-
96
- #### MJPEG over HTTP
97
- ```
98
- mjpeg+http://192.168.1.100:8080
99
- mjpeg+http://camera.local:8080
100
- ```
101
-
102
- #### MJPEG over TCP
103
- ```
104
- mjpeg+tcp://192.168.1.100:5000
105
- mjpeg+tcp://camera.local:5000
106
- ```
107
-
108
- ### Environment Variable
109
-
110
- When deployed in a Rocket Welder container, the connection string is provided via:
111
- ```bash
112
- CONNECTION_STRING=shm://camera_feed?buffer_size=20MB&metadata_size=4KB
113
- ```
114
-
115
- ## Installation
116
-
117
- ### C++ with vcpkg
118
-
119
- Configure the custom registry in your `vcpkg-configuration.json`:
120
- ```json
121
- {
122
- "registries": [
123
- {
124
- "kind": "git",
125
- "repository": "https://github.com/modelingevolution/rocket-welder-sdk-vcpkg-registry",
126
- "baseline": "YOUR_BASELINE_HERE",
127
- "packages": ["rocket-welder-sdk"]
128
- }
129
- ]
130
- }
131
- ```
132
-
133
- Then install:
134
- ```bash
135
- # Install via vcpkg
136
- vcpkg install rocket-welder-sdk
137
-
138
- # Or integrate with CMake
139
- find_package(rocket-welder-sdk CONFIG REQUIRED)
140
- target_link_libraries(your_app PRIVATE rocket-welder-sdk::rocket-welder-sdk)
141
- ```
142
-
143
- ### C# with NuGet
144
-
145
- [![NuGet Downloads](https://img.shields.io/nuget/dt/RocketWelder.SDK.svg)](https://www.nuget.org/packages/RocketWelder.SDK/)
146
-
147
- ```bash
148
- # Package Manager Console
149
- Install-Package RocketWelder.SDK
150
-
151
- # .NET CLI
152
- dotnet add package RocketWelder.SDK
153
-
154
- # PackageReference in .csproj
155
- <PackageReference Include="RocketWelder.SDK" Version="1.0.*" />
156
- ```
157
-
158
- ### Python with pip
159
-
160
- [![PyPI Downloads](https://img.shields.io/pypi/dm/rocket-welder-sdk.svg)](https://pypi.org/project/rocket-welder-sdk/)
161
-
162
- ```bash
163
- # Install from PyPI
164
- pip install rocket-welder-sdk
165
-
166
- # Install with optional dependencies
167
- pip install rocket-welder-sdk[opencv] # Includes OpenCV
168
- pip install rocket-welder-sdk[all] # All optional dependencies
169
-
170
- # Install specific version
171
- pip install rocket-welder-sdk==1.0.0
172
- ```
173
-
174
- ## Quick Start
175
-
176
- ### C++ Quick Start
177
- ```cpp
178
- #include <rocket_welder/client.hpp>
179
-
180
- auto client = rocket_welder::Client::from_connection_string("shm://my-buffer");
181
- client.on_frame([](cv::Mat& frame) {
182
- // Process frame
183
- });
184
- client.start();
185
- ```
186
-
187
- ### C# Quick Start
188
- ```csharp
189
- using RocketWelder.SDK;
190
-
191
- var client = RocketWelderClient.FromConnectionString("shm://my-buffer");
192
- client.Start(frame => {
193
- // Process frame
194
- });
195
- ```
196
-
197
- ### Python Quick Start
198
- ```python
199
- import rocket_welder_sdk as rw
200
-
201
- client = rw.Client.from_connection_string("shm://my-buffer")
202
-
203
- @client.on_frame
204
- def process(frame):
205
- # Process frame
206
- pass
207
-
208
- client.start()
209
- ```
210
-
211
- ## Usage Examples
212
-
213
- ### C++
214
-
215
- ```cpp
216
- #include <rocket_welder/client.hpp>
217
- #include <opencv2/opencv.hpp>
218
-
219
- int main(int argc, char* argv[]) {
220
- // Best practice: use from() which:
221
- // 1. Checks environment variable (CONNECTION_STRING)
222
- // 2. Overrides with command line args if provided
223
- auto client = rocket_welder::Client::from(argc, argv);
224
-
225
- // Or specify connection string directly
226
- auto client = rocket_welder::Client::from_connection_string(
227
- "shm://camera_feed?buffer_size=20MB&metadata_size=4KB"
228
- );
229
-
230
- // Process frames as OpenCV Mat (mutable by default)
231
- client.on_frame([](cv::Mat& frame) {
232
- // Add overlay text - zero copy!
233
- cv::putText(frame, "Processing", cv::Point(10, 30),
234
- cv::FONT_HERSHEY_SIMPLEX, 1.0, cv::Scalar(0, 255, 0), 2);
235
-
236
- // Add timestamp overlay
237
- auto now = std::chrono::system_clock::now();
238
- auto time_t = std::chrono::system_clock::to_time_t(now);
239
- cv::putText(frame, std::ctime(&time_t), cv::Point(10, 60),
240
- cv::FONT_HERSHEY_SIMPLEX, 0.5, cv::Scalar(255, 255, 255), 1);
241
- });
242
-
243
- client.start();
244
- return 0;
245
- }
246
- ```
247
-
248
- ### C#
249
-
250
- ```csharp
251
- using RocketWelder.SDK;
252
- using OpenCvSharp;
253
-
254
- class Program
255
- {
256
- static void Main(string[] args)
257
- {
258
- // Best practice: use From() which:
259
- // 1. Checks environment variable (CONNECTION_STRING)
260
- // 2. Overrides with command line args if provided
261
- var client = RocketWelderClient.From(args);
262
-
263
- // Or specify connection string directly
264
- var client = RocketWelderClient.FromConnectionString(
265
- "shm://camera_feed?buffer_size=20MB&metadata_size=4KB"
266
- );
267
-
268
- int frameCount = 0;
269
-
270
- // Process frames as OpenCV Mat
271
- client.Start((Mat frame) =>
272
- {
273
- // Add overlay text
274
- Cv2.PutText(frame, "Processing", new Point(10, 30),
275
- HersheyFonts.HersheySimplex, 1.0, new Scalar(0, 255, 0), 2);
276
-
277
- // Add frame counter overlay
278
- Cv2.PutText(frame, $"Frame: {frameCount++}", new Point(10, 60),
279
- HersheyFonts.HersheySimplex, 0.5, new Scalar(255, 255, 255), 1);
280
- });
281
- }
282
- }
283
- ```
284
-
285
- ### Python
286
-
287
- ```python
288
- import rocket_welder_sdk as rw
289
- import cv2
290
- import sys
291
-
292
- # Best practice: use from_args() which:
293
- # 1. Checks environment variable (CONNECTION_STRING)
294
- # 2. Overrides with command line args if provided
295
- client = rw.Client.from_args(sys.argv)
296
-
297
- # Or specify connection string directly
298
- client = rw.Client.from_connection_string("shm://camera_feed?buffer_size=20MB&metadata_size=4KB")
299
-
300
- # Process frames as numpy arrays (OpenCV compatible)
301
- @client.on_frame
302
- def process_frame(frame: np.ndarray):
303
- # Add overlay text - zero copy!
304
- cv2.putText(frame, "Processing", (10, 30),
305
- cv2.FONT_HERSHEY_SIMPLEX, 1.0, (0, 255, 0), 2)
306
-
307
- # Add timestamp overlay
308
- from datetime import datetime
309
- timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
310
- cv2.putText(frame, timestamp, (10, 60),
311
- cv2.FONT_HERSHEY_SIMPLEX, 0.5, (255, 255, 255), 1)
312
-
313
- client.start()
314
-
315
- # Or use iterator pattern
316
- for frame in client.frames():
317
- # Each frame is a numpy array
318
- print(f"Received frame: {frame.shape}")
319
- ```
320
-
321
- ## Docker Integration
322
-
323
- ### C++ Dockerfile
324
-
325
- ```dockerfile
326
- FROM ubuntu:22.04 AS builder
327
-
328
- # Install build tools and OpenCV
329
- RUN apt-get update && apt-get install -y \
330
- build-essential \
331
- cmake \
332
- libopencv-dev
333
-
334
- # Install Rocket Welder SDK via vcpkg
335
- RUN vcpkg install rocket-welder-sdk
336
-
337
- # Build your application
338
- WORKDIR /app
339
- COPY . .
340
- RUN cmake . && make
341
-
342
- FROM ubuntu:22.04
343
- RUN apt-get update && apt-get install -y libopencv-dev
344
- COPY --from=builder /app/my_app /usr/local/bin/
345
- CMD ["my_app"]
346
- ```
347
-
348
- ### C# Dockerfile
349
-
350
- ```dockerfile
351
- FROM mcr.microsoft.com/dotnet/sdk:8.0 AS builder
352
-
353
- WORKDIR /app
354
- COPY *.csproj ./
355
- RUN dotnet restore
356
-
357
- COPY . ./
358
- RUN dotnet publish -c Release -o out
359
-
360
- FROM mcr.microsoft.com/dotnet/runtime:8.0
361
- WORKDIR /app
362
- COPY --from=builder /app/out .
363
- CMD ["dotnet", "MyApp.dll"]
364
- ```
365
-
366
- ### Python Dockerfile
367
-
368
- ```dockerfile
369
- FROM python:3.11-slim
370
-
371
- # Install OpenCV and other dependencies
372
- RUN apt-get update && apt-get install -y \
373
- python3-opencv \
374
- && rm -rf /var/lib/apt/lists/*
375
-
376
- # Install Rocket Welder SDK and ML frameworks
377
- RUN pip install --no-cache-dir \
378
- rocket-welder-sdk \
379
- numpy \
380
- ultralytics # Example: YOLO
381
-
382
- WORKDIR /app
383
- COPY . .
384
-
385
- CMD ["python", "app.py"]
386
- ```
387
-
388
- ## Protocol Details
389
-
390
- ### Shared Memory Protocol (shm://)
391
-
392
- High-performance local data transfer between processes:
393
-
394
- - **Performance**: Minimal latency, maximum throughput
395
- - **Use Cases**: Local processing, multi-container applications on same host
396
-
397
- ### MJPEG over HTTP (mjpeg+http://)
398
-
399
- Motion JPEG streaming over HTTP:
400
-
401
- - **Performance**: Good balance of quality and bandwidth
402
- - **Advantages**: Wide compatibility, firewall-friendly, browser support
403
- - **Use Cases**: Network streaming, web applications, remote monitoring
404
-
405
- ### MJPEG over TCP (mjpeg+tcp://)
406
-
407
- Motion JPEG streaming over raw TCP socket:
408
-
409
- - **Performance**: Lower latency than HTTP, less protocol overhead
410
- - **Advantages**: Direct socket connection, minimal overhead, suitable for local networks
411
- - **Use Cases**: Low-latency streaming, embedded systems, industrial applications
412
-
413
- ## Building from Source
414
-
415
- ### Prerequisites
416
-
417
- - CMake 3.20+
418
- - C++20 compiler
419
- - Python 3.8+ (for Python bindings)
420
- - .NET 6.0+ SDK (for C# bindings)
421
- - OpenCV 4.0+ (optional, for image processing)
422
-
423
- ### Build Instructions
424
-
425
- ```bash
426
- git clone https://github.com/modelingevolution/rocket-welder-sdk.git
427
- cd rocket-welder-sdk
428
-
429
- # Build all libraries
430
- mkdir build && cd build
431
- cmake ..
432
- make -j$(nproc)
433
-
434
- # Run tests
435
- ctest
436
-
437
- # Install
438
- sudo make install
439
- ```
440
-
441
- ## API Reference
442
-
443
- Detailed API documentation for each language:
444
-
445
- - [C++ API Reference](docs/cpp-api.md)
446
- - [C# API Reference](docs/csharp-api.md)
447
- - [Python API Reference](docs/python-api.md)
448
-
449
- ## Examples
450
-
451
- See the [examples](examples/) directory for complete working examples:
452
-
453
- - [Simple Frame Reader](examples/simple-reader/)
454
- - [Frame Processor](examples/frame-processor/)
455
- - [Multi-Stream Handler](examples/multi-stream/)
456
- - [Performance Benchmark](examples/benchmark/)
457
-
458
- ## Contributing
459
-
460
- Contributions are welcome! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
461
-
462
- ## License
463
-
464
- This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
465
-
466
- ## Support
467
-
468
- - **Issues**: [GitHub Issues](https://github.com/modelingevolution/rocket-welder-sdk/issues)
469
- - **Discussions**: [GitHub Discussions](https://github.com/modelingevolution/rocket-welder-sdk/discussions)
470
- - **Documentation**: [https://docs.rocket-welder.io](https://docs.rocket-welder.io)
471
-
472
- ## Technical Details
473
-
474
- ### GStreamer Integration
475
-
476
- The SDK integrates with GStreamer pipelines through specialized elements:
477
- - **zerosink**: Simple sink element for writing video frames
478
- - **zerobuffer**: Processing element with bidirectional communication using DuplexChannel
479
-
480
- ### Zero-Copy Buffer Technology
481
-
482
- For shared memory protocol, the SDK uses:
483
- - **C++**: Zero-Copy-Buffer (via vcpkg) - Returns cv::Mat with zero-copy access
484
- - **C#**: ZeroBuffer (via NuGet) - Returns OpenCvSharp.Mat with zero-copy access
485
- - **Python**: zero-buffer (via pip) - Returns numpy arrays compatible with OpenCV
486
-
487
- The SDK leverages DuplexChannel for bidirectional communication, enabling:
488
- - Zero-copy frame access as OpenCV Mat objects
489
- - In-place frame processing without memory allocation
490
- - Direct memory mapping between producer and consumer
491
- - Efficient metadata passing alongside frame data
492
-
493
- This technology enables direct memory access without data duplication, providing maximum performance for local processing scenarios.
494
-
495
- ## Acknowledgments
496
-
497
- - GStreamer Project for the multimedia framework
498
- - ZeroBuffer contributors for the zero-copy buffer implementation