pynq_composable.video Module

The pynq_composable.video module provides high level abstractions to start the video streams for a variety of sources and sinks. The pynq_composable.video.VideoStream abstracts all the low level details and instantiates the right driver depending on the video source and sink.

class pynq_composable.video.OpenCVDPVideo(ol: pynq.overlay.Overlay, filename: typing.Union[int, str], mode=VideoMode: width=1280 height=720 bpp=24 fps=60)[source]

Bases: pynq_composable.video.OpenCVPLVideo

Wrapper for a webcam/file video pipeline streamed to DisplayPort

start()[source]

Configure and start the video stream from/to PS

stop()[source]

Stop video stream

class pynq_composable.video.OpenCVPLVideo(ol: pynq.overlay.Overlay, filename: typing.Union[int, str], mode=VideoMode: width=1280 height=720 bpp=24 fps=60)[source]

Bases: object

Wrapper for a OpenCV video stream pipeline that sinks on PL

close()[source]

Uninitialise the drivers, stopping the pipeline beforehand

pause()[source]

Pause tie

readframe()[source]

Read an image from the video stream

start()[source]

Start video stream by configuring it

stop()[source]

Stop the video stream

class pynq_composable.video.PLDPVideo(ol: pynq.overlay.Overlay, source: pynq_composable.video.VSource = VSource.HDMI)[source]

Bases: object

Wrapper for PL Video stream sources that sink on DisplayPort

property modein

Return input video source mode

property modeout

Return output video sink mode

start()[source]

Configure and start the HDMI

stop()[source]

Stop the HDMI

class pynq_composable.video.PLPLVideo(ol: pynq.overlay.Overlay, source: pynq_composable.video.VSource = VSource.HDMI)[source]

Bases: object

PLPLVideo class

Handles video streams that start in the PL and end in the PL

property modein

Return input video source mode

property modeout

Return output video sink mode

start()[source]

Configure and start the Video source

Configures hdmi_in or mipi and hdmi_out. Then starts the source and sink, and finally tie them together

stop()[source]

Closes source and sink

class pynq_composable.video.VSink(value)[source]

Bases: enum.Enum

Suported output video sinks

DP = 2
HDMI = 1
class pynq_composable.video.VSource(value)[source]

Bases: enum.Enum

Suported input video sources

HDMI = 2
MIPI = 3
OpenCV = 1
class pynq_composable.video.VideoStream(ol: pynq.overlay.Overlay, source: pynq_composable.video.VSource = VSource.HDMI, sink: pynq_composable.video.VSink = VSink.HDMI, file: int = 0, mode: Optional[pynq.lib.video.common.VideoMode] = None)[source]

Bases: object

VideoStream class

Handles DisplayPort output paths .start: configures hdmi_in and hdmi_out starts them and tie them together .stop: closes hdmi_in and hdmi_out

property mode

Return mode

pause()[source]

Pause the stream

start()[source]

Start the video stream

stop()[source]

Stop the video stream