GstVideo.VideoSink

g GObject.InitiallyUnowned GObject.InitiallyUnowned Gst.Object Gst.Object GObject.InitiallyUnowned->Gst.Object GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gst.Element Gst.Element GstBase.BaseSink GstBase.BaseSink Gst.Element->GstBase.BaseSink Gst.Object->Gst.Element GstVideo.VideoSink GstVideo.VideoSink GstBase.BaseSink->GstVideo.VideoSink

Subclasses:

None

Methods

Inherited:

GstBase.BaseSink (31), Gst.Element (82), Gst.Object (27), GObject.Object (37)

Structs:

Gst.ElementClass (10), GObject.ObjectClass (5)

class

center_rect (src, dst, scaling)

Virtual Methods

Inherited:

GstBase.BaseSink (18), Gst.Element (16), Gst.Object (1), GObject.Object (7)

do_set_info (caps, info)

do_show_frame (buf)

Properties

Inherited:

GstBase.BaseSink (13), Gst.Object (2)

Name

Type

Flags

Short Description

show-preroll-frame

bool

r/w/c

Whether to render video frames during preroll

Signals

Inherited:

Gst.Element (3), Gst.Object (1), GObject.Object (1)

Fields

Inherited:

Gst.Element (3), Gst.Object (1), GObject.Object (1)

Name

Type

Access

Description

element

GstBase.BaseSink

r

height

int

r

video height (derived class needs to set this)

width

int

r

video width (derived class needs to set this)

Class Details

class GstVideo.VideoSink(**kwargs)
Bases:

GstBase.BaseSink

Abstract:

No

Structure:

GstVideo.VideoSinkClass

Provides useful functions and a base class for video sinks.

GstVideo.VideoSink will configure the default base sink to drop frames that arrive later than 20ms as this is considered the default threshold for observing out-of-sync frames.

classmethod center_rect(src, dst, scaling)[source]
Parameters:
Returns:

a pointer to a GstVideo.VideoRectangle which will receive the result area

Return type:

result: GstVideo.VideoRectangle

Deprecated since version 1.20: Use GstVideo.video_center_rect() instead.

do_set_info(caps, info) virtual
Parameters:
Return type:

bool

Notifies the subclass of changed GstVideo.VideoInfo.

New in version 1.20.

do_show_frame(buf) virtual
Parameters:

buf (Gst.Buffer) –

Return type:

Gst.FlowReturn

render a video frame. Maps to GstBase.BaseSink.do_render() and GstBase.BaseSink.do_preroll() vfuncs. Rendering during preroll will be suppressed if the GstVideo.VideoSink :show-preroll-frame property is set to False.

Property Details

GstVideo.VideoSink.props.show_preroll_frame
Name:

show-preroll-frame

Type:

bool

Default Value:

True

Flags:

READABLE, WRITABLE, CONSTRUCT

Whether to show video frames during preroll. If set to False, video frames will only be rendered in PLAYING state.