Python "API" for interacting with rusty-engine
Project description
upgraded-engineer
upgraded-engineer
is a Python library for interacting with rusty-engine
.
Installation
pip install upgraded-engineer
Dependencies
- GStreamer (base and bad plugins required for
upgraded-engineer
, more required byrusty-engine
) - Open CV (known working with >= 4.0.0, must be compiled with GStreamer support)
Usage
Importing is simple:
import engine
To simply start a new rusty-engine
process, create an instance of the engine.Engine
class. You will have to figure out how to write frames into the shared memory yourself. (Note that rusty-engine
is expecting I420 color, and cannot determine what is being written for itself.)
Alternatively, using engine.EngineWriter
s provide the write_frame
method to write "normal" Open CV BGR color frames into shared memory for streaming.
import engine
# see also: engine.GStreamerEngineWriter for a GStreamer-only impl
ew = engine.OpenCVEngineWriter()
# alternately, if we wanted smaller video
ew = engine.OpenCVEngineWriter(video_size=(426, 240, 30)) # width, height, framerate
Now, writing frames into shared memory is simple.
def on_new_frame_whenever_that_is_for_you(frame):
ew.write_frame(frame) # ew.write_frame handles the BGR to I420 conversion automagically
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file upgraded-engineer-0.2.1.tar.gz
.
File metadata
- Download URL: upgraded-engineer-0.2.1.tar.gz
- Upload date:
- Size: 4.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6696c52951a076c28a13d280e950be3f128ee4901ac8bf11d5280aa6134f5ac7 |
|
MD5 | b0f2f5604372df4681d0f736bc77d5e6 |
|
BLAKE2b-256 | fbd521ba5645a83e8f1333066c49d841f04b28ff46be0b524e80e562246cbeda |
File details
Details for the file upgraded_engineer-0.2.1-py3-none-any.whl
.
File metadata
- Download URL: upgraded_engineer-0.2.1-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.6.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e98fcf314aabb49e01f7296845d59460e1beffc224ce35c0663f620cd727d4ac |
|
MD5 | 9e8d1077a4810acadca230bdcfaab215 |
|
BLAKE2b-256 | 498ccaf0d73f5ce66d08c6dedc2627c004d55c5d22ded4bbc96af87125e61b9c |