GstPlay.PlayVideoOverlayVideoRenderer

g GObject.GInterface GObject.GInterface GstPlay.PlayVideoRenderer GstPlay.PlayVideoRenderer GObject.GInterface->GstPlay.PlayVideoRenderer GObject.Object GObject.Object GstPlay.PlayVideoOverlayVideoRenderer GstPlay.PlayVideoOverlayVideoRenderer GObject.Object->GstPlay.PlayVideoOverlayVideoRenderer GstPlay.PlayVideoRenderer->GstPlay.PlayVideoOverlayVideoRenderer

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 GstPlay.PlayVideoOverlayVideoRenderer(**kwargs)
Bases:

GObject.Object, GstPlay.PlayVideoRenderer

Abstract:

No

Structure:

GstPlay.PlayVideoOverlayVideoRendererClass

New in version 1.20.

classmethod new(window_handle)
Parameters:

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

Return type:

GstPlay.PlayVideoRenderer

New in version 1.20.

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:

GstPlay.PlayVideoRenderer

New in version 1.20.

expose()

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

New in version 1.20.

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 GstPlay.PlayVideoOverlayVideoRenderer.set_render_rectangle() for details.

New in version 1.20.

get_window_handle()
Returns:

The currently set, platform specific window handle

Return type:

object or None

New in version 1.20.

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 GstPlay.PlayVideoOverlayVideoRenderer.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 GstPlay.PlayVideoOverlayVideoRenderer.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.

New in version 1.20.

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

New in version 1.20.

Property Details

GstPlay.PlayVideoOverlayVideoRenderer.props.video_sink
Name:

video-sink

Type:

Gst.Element

Default Value:

None

Flags:

READABLE, WRITABLE

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

GstPlay.PlayVideoOverlayVideoRenderer.props.window_handle
Name:

window-handle

Type:

int

Default Value:

None

Flags:

READABLE, WRITABLE, CONSTRUCT

Window handle to embed the video into