GstPlayer.PlayerVideoOverlayVideoRenderer

g GObject.GInterface GObject.GInterface GstPlayer.PlayerVideoRenderer GstPlayer.PlayerVideoRenderer GObject.GInterface->GstPlayer.PlayerVideoRenderer GObject.Object GObject.Object GstPlayer.PlayerVideoOverlayVideoRenderer GstPlayer.PlayerVideoOverlayVideoRenderer GObject.Object->GstPlayer.PlayerVideoOverlayVideoRenderer GstPlayer.PlayerVideoRenderer->GstPlayer.PlayerVideoOverlayVideoRenderer

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

class

new (window_handle)

class

new_with_sink (window_handle, video_sink)

expose ()

get_render_rectangle ()

get_window_handle ()

set_render_rectangle (x, y, width, height)

set_window_handle (window_handle)

Virtual Methods

Inherited:

GObject.Object (7)

Properties

Name

Type

Flags

Short Description

video-sink

Gst.Element

r/w

the video output element to use (None = default sink)

window-handle

int

r/w/c

Window handle to embed the video into

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class GstPlayer.PlayerVideoOverlayVideoRenderer(**kwargs)
Bases:

GObject.Object, GstPlayer.PlayerVideoRenderer

Abstract:

No

Structure:

GstPlayer.PlayerVideoOverlayVideoRendererClass

classmethod new(window_handle)
Parameters:

window_handle (object or None) – Window handle to use or None

Return type:

GstPlayer.PlayerVideoRenderer

classmethod new_with_sink(window_handle, video_sink)
Parameters:
  • window_handle (object or None) – Window handle to use or None

  • video_sink (Gst.Element) – the custom video_sink element to be set for the video renderer

Return type:

GstPlayer.PlayerVideoRenderer

New in version 1.12.

expose()

Tell an overlay that it has been exposed. This will redraw the current frame in the drawable even if the pipeline is PAUSED.

get_render_rectangle()
Returns:

x:

the horizontal offset of the render area inside the window

y:

the vertical offset of the render area inside the window

width:

the width of the render area inside the window

height:

the height of the render area inside the window

Return type:

(x: int, y: int, width: int, height: int)

Return the currently configured render rectangle. See GstPlayer.PlayerVideoOverlayVideoRenderer.set_render_rectangle() for details.

get_window_handle()
Returns:

The currently set, platform specific window handle

Return type:

object or None

set_render_rectangle(x, y, width, height)
Parameters:
  • x (int) – the horizontal offset of the render area inside the window

  • y (int) – the vertical offset of the render area inside the window

  • width (int) – the width of the render area inside the window

  • height (int) – the height of the render area inside the window

Configure a subregion as a video target within the window set by GstPlayer.PlayerVideoOverlayVideoRenderer.set_window_handle(). If this is not used or not supported the video will fill the area of the window set as the overlay to 100%. By specifying the rectangle, the video can be overlaid to a specific region of that window only. After setting the new rectangle one should call GstPlayer.PlayerVideoOverlayVideoRenderer.expose() to force a redraw. To unset the region pass -1 for the width and height parameters.

This method is needed for non fullscreen video overlay in UI toolkits that do not support subwindows.

set_window_handle(window_handle)
Parameters:

window_handle (object or None) – handle referencing to the platform specific window

Sets the platform specific window handle into which the video should be rendered

Property Details

GstPlayer.PlayerVideoOverlayVideoRenderer.props.video_sink
Name:

video-sink

Type:

Gst.Element

Default Value:

None

Flags:

READABLE, WRITABLE

the video output element to use (None = default sink)

GstPlayer.PlayerVideoOverlayVideoRenderer.props.window_handle
Name:

window-handle

Type:

int

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT

Window handle to embed the video into