VlcDisplay module

Display, and playback of media using VLC.

VlcDisplay class is responsible for :

  • creating a VLC player instance,

  • creating a window for that instance,

  • moving the window to the correct offset for the correct display,

  • making the window fullscreen, if required,

  • control of playback.

class VlcDisplay.VlcDisplay(name, width, height, x_offset, y_offset, fullscreen)

Bases: object

Parameters
  • name – The name of the window.

  • width – The width of the window to create.

  • height – The height of the window to create.

  • x_offset – The displacement of the window on the x-axis.

  • y_offset – The displacement of the window on the y-axis.

  • fullscreen – boolean indicating whether to make this window fullscreen.

is_playing()
Returns

boolean indicating whether the media is playing.

play()

Play the media.

Returns

boolean indicating whether the media wasn’t playing.

play_next()

Play the next item in the playlist.

release()

Essential cleanup.

Warning

Object cannot be used afterwards.

set_geometry(width, height, x_offset, y_offset)
Parameters
  • width – Set the width of the total cropped section.

  • height – Set the height of the total cropped section.

  • x_offset – Set the horizontal offset into the cropped section.

  • y_offset – Set the vertical offset into the cropped section.

Sets the geometry of the cropped section of the input video.

The width and height parameters set the total cropped section that is used, however, adjusting the horizontal and vertical offsets changes the size of the displayed section.

set_playlist(playlist)
Parameters

playlist – List containing the MRLs of the media for the player to play.

stop()

Stop the media.

Returns

boolean indicating whether the media was playing.

VlcDisplay.setup_displays()

Automatically setup, and configure, each VlcDisplay.

Returns

list of VlcDisplay objects.