GstVideoSink

Provides useful functions and a base class for video sinks.

GstVideoSink 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.

GstVideoRectangle

Helper structure representing a rectangular area.

Members

x (gint) –

X coordinate of rectangle's top-left point

y (gint) –

Y coordinate of rectangle's top-left point

w (gint) –

width of the rectangle

h (gint) –

height of the rectangle


GstVideo.VideoRectangle

Helper structure representing a rectangular area.

Members

x (Number) –

X coordinate of rectangle's top-left point

y (Number) –

Y coordinate of rectangle's top-left point

w (Number) –

width of the rectangle

h (Number) –

height of the rectangle


GstVideo.VideoRectangle

Helper structure representing a rectangular area.

Members

x (int) –

X coordinate of rectangle's top-left point

y (int) –

Y coordinate of rectangle's top-left point

w (int) –

width of the rectangle

h (int) –

height of the rectangle


GstVideoSink

GObject
    ╰──GInitiallyUnowned
        ╰──GstObject
            ╰──GstElement
                ╰──GstBaseSink
                    ╰──GstVideoSink

The video sink instance structure. Derived video sinks should set the height and width members.

Members

element (GstBaseSink) –
No description available
width (gint) –

video width (derived class needs to set this)

height (gint) –

video height (derived class needs to set this)


Class structure

GstVideoSinkClass

The video sink class structure. Derived classes should override the show_frame virtual function.

Fields
parent_class (GstBaseSinkClass) –

the parent class structure


GstVideo.VideoSinkClass

The video sink class structure. Derived classes should override the show_frame virtual function.

Attributes
parent_class (GstBase.BaseSinkClass) –

the parent class structure


GstVideo.VideoSinkClass

The video sink class structure. Derived classes should override the show_frame virtual function.

Attributes
parent_class (GstBase.BaseSinkClass) –

the parent class structure


GstVideoSink

GObject
    ╰──GInitiallyUnowned
        ╰──GstObject
            ╰──GstElement
                ╰──GstBaseSink
                    ╰──GstVideoSink

The video sink instance structure. Derived video sinks should set the height and width members.

Members

element (GstBaseSink) –
No description available
width (Number) –

video width (derived class needs to set this)

height (Number) –

video height (derived class needs to set this)


GstVideoSink

GObject
    ╰──GInitiallyUnowned
        ╰──GstObject
            ╰──GstElement
                ╰──GstBaseSink
                    ╰──GstVideoSink

The video sink instance structure. Derived video sinks should set the height and width members.

Members

element (GstBaseSink) –
No description available
width (int) –

video width (derived class needs to set this)

height (int) –

video height (derived class needs to set this)


Functions

gst_video_sink_center_rect

gst_video_sink_center_rect (GstVideoRectangle src,
                            GstVideoRectangle dst,
                            GstVideoRectangle * result,
                            gboolean scaling)

Takes src rectangle and position it at the center of dst rectangle with or without scaling. It handles clipping if the src rectangle is bigger than the dst one and scaling is set to FALSE.

Parameters:

src

the GstVideoRectangle describing the source area

dst

the GstVideoRectangle describing the destination area

result

a pointer to a GstVideoRectangle which will receive the result area

scaling

a gboolean indicating if scaling should be applied or not


GstVideo.VideoSink.prototype.center_rect

function GstVideo.VideoSink.prototype.center_rect(src: GstVideo.VideoRectangle, dst: GstVideo.VideoRectangle, result: GstVideo.VideoRectangle, scaling: Number): {
    // javascript wrapper for 'gst_video_sink_center_rect'
}

Takes src rectangle and position it at the center of dst rectangle with or without scaling. It handles clipping if the src rectangle is bigger than the dst one and scaling is set to FALSE.

Parameters:

the GstVideo.VideoRectangle describing the source area

the GstVideo.VideoRectangle describing the destination area

result ( GstVideo.VideoRectangle ) –

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

scaling ( Number ) –

a Number indicating if scaling should be applied or not


GstVideo.VideoSink.center_rect

def GstVideo.VideoSink.center_rect (src, dst, result, scaling):
    #python wrapper for 'gst_video_sink_center_rect'

Takes src rectangle and position it at the center of dst rectangle with or without scaling. It handles clipping if the src rectangle is bigger than the dst one and scaling is set to FALSE.

Parameters:

the GstVideo.VideoRectangle describing the source area

the GstVideo.VideoRectangle describing the destination area

result ( GstVideo.VideoRectangle ) –

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

scaling ( bool ) –

a bool indicating if scaling should be applied or not


Properties

show-preroll-frame

“show-preroll-frame” gboolean

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

Flags : Read / Write / Construct


show-preroll-frame

“show-preroll-frame” Number

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

Flags : Read / Write / Construct


show_preroll_frame

“self.props.show_preroll_frame” bool

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

Flags : Read / Write / Construct


Virtual Methods

show_frame

GstFlowReturn
show_frame (GstVideoSink * video_sink,
            GstBuffer * buf)

render a video frame. Maps to GstBaseSinkClass.render() and GstBaseSinkClass.preroll() vfuncs. Rendering during preroll will be suppressed if the show-preroll-frame property is set to FALSE.

Parameters:

video_sink
No description available
buf
No description available
Returns
No description available

show_frame

function show_frame(video_sink: GstVideo.VideoSink, buf: Gst.Buffer): {
    // javascript implementation of the 'show_frame' virtual method
}

render a video frame. Maps to GstBaseSinkClass.render() and GstBaseSinkClass.preroll() vfuncs. Rendering during preroll will be suppressed if the show-preroll-frame property is set to FALSE.

Parameters:

video_sink ( GstVideo.VideoSink ) –
No description available
buf ( Gst.Buffer ) –
No description available
Returns ( Gst.FlowReturn ) –
No description available

show_frame

def show_frame (video_sink, buf):
    #python implementation of the 'show_frame' virtual method

render a video frame. Maps to GstBaseSinkClass.render() and GstBaseSinkClass.preroll() vfuncs. Rendering during preroll will be suppressed if the show-preroll-frame property is set to FALSE.

Parameters:

video_sink ( GstVideo.VideoSink ) –
No description available
buf ( Gst.Buffer ) –
No description available
Returns ( Gst.FlowReturn ) –
No description available

Function Macros

GST_VIDEO_SINK_CAST

#define GST_VIDEO_SINK_CAST(obj)  ((GstVideoSink *) (obj))

Cast obj to a GstVideoSink without runtime type check.

Parameters:

obj

a GstVideoSink or derived object


GST_VIDEO_SINK_HEIGHT

#define GST_VIDEO_SINK_HEIGHT(obj) (GST_VIDEO_SINK_CAST (obj)->height)

GST_VIDEO_SINK_PAD

#define GST_VIDEO_SINK_PAD(obj) GST_BASE_SINK_PAD(obj)

Get the sink GstPad of obj.

Parameters:

obj

a GstVideoSink


GST_VIDEO_SINK_WIDTH

#define GST_VIDEO_SINK_WIDTH(obj) (GST_VIDEO_SINK_CAST (obj)->width)

The results of the search are