pyvar.multimedia

pyvar.multimedia.helper

../_images/gstreamer_logo.png
platform

Unix/Yocto

synopsis

Classes to handle Multimedia capabilities.

class pyvar.multimedia.helper.Caps[source]

Class to handle the video caps device.

Variables
  • name – video name;

  • format – caps format;

  • width – caps width;

  • height – caps height;

  • framerate – caps framerate.

class pyvar.multimedia.helper.Devices[source]

Class to handle the devices.

Variables

devices – devices from device monitor.

static get_device_caps(dev_caps)[source]
static get_std_caps(dev_caps)[source]
get_video_devices()[source]

Get the available devices from device monitor.

search_device(dev_name)[source]

Check if the device is valid or not.

class pyvar.multimedia.helper.Multimedia(source=None, resolution=None)[source]

Class to handle the Multimedia resources.

Variables
  • video_src – video source;

  • resolution – video source resolution;

  • devices – video devices;

  • sink – video capture.

destroy()[source]

Release and destroy the video capture from video source.

get_caps()[source]

Get the caps from device.

Returns

The valid resolution.

get_frame()[source]

Get the frame from video source.

Returns

The current frame.

loop()[source]

Check if the video source still have frames or not.

static save(name=None, output_frame=None)[source]

Save any frame as an output file.

set_v4l2_config()[source]

Set the v4l2 configuration.

show(name=None, output_frame=None)[source]

Show any frame.

static show_image(title=None, image=None)[source]

Show any image.

static v4l2_camera_pipeline(width, height, device, framerate)[source]

Set the v4l2 configuration for camera device.

static v4l2_video_pipeline(filesrc)[source]

Set the v4l2 configuration for video source file.

static v4l2_video_pipeline_imx93(filesrc)[source]

Set the v4l2 configuration for i.MX 93.

validate_caps(caps)[source]

Check if the resolution is valid.

Returns

The valid resolution or default one.

class pyvar.multimedia.helper.VideoDevice[source]

Class to handle the Video device features and resolutions.

Variables
  • name – video name;

  • caps – caps resolution;

  • default_caps – default caps resolution;

  • full_hd_caps – full hd caps resolution;

  • hd_caps – hd caps resolution;

  • vga_caps – vga caps resolution.