platypush.plugins.camera.gstreamer

class platypush.plugins.camera.gstreamer.CameraGstreamerPlugin(device: Optional[str] = '/dev/video0', **opts)[source]

Plugin to interact with a camera over GStreamer.

Requires:

  • gst-python (pip install gst-python)

__init__(device: Optional[str] = '/dev/video0', **opts)[source]
Parameters
capture_frame(camera: platypush.plugins.camera.gstreamer.model.GStreamerCamera, *args, **kwargs)Optional[PIL.Image.Image][source]

Capture a frame from a device using the plugin-specific logic - to be implemented by the derived classes.

Parameters

device – An initialized platypush.plugins.camera.Camera object.

prepare_device(camera: platypush.plugins.camera.gstreamer.model.GStreamerCamera)platypush.common.gstreamer.Pipeline[source]

Prepare a device using the plugin-specific logic - to be implemented by the derived classes.

Parameters

device – An initialized platypush.plugins.camera.Camera object.

release_device(camera: platypush.plugins.camera.gstreamer.model.GStreamerCamera)[source]

Release a device using the plugin-specific logic - to be implemented by the derived classes.

Parameters

device – An initialized platypush.plugins.camera.Camera object.

start_camera(camera: platypush.plugins.camera.gstreamer.model.GStreamerCamera, preview: bool = False, *args, **kwargs)[source]

Start a camera capture session.

Parameters