Trait gstreamer_video::prelude::VideoOverlayExt

source ·
pub trait VideoOverlayExt: IsA<VideoOverlay> + Sealed + 'static {
    // Provided methods
    fn expose(&self) { ... }
    fn handle_events(&self, handle_events: bool) { ... }
    fn prepare_window_handle(&self) { ... }
    fn set_render_rectangle(
        &self,
        x: i32,
        y: i32,
        width: i32,
        height: i32,
    ) -> Result<(), BoolError> { ... }
}
Expand description

Trait containing all VideoOverlay methods.

§Implementors

VideoOverlay

Provided Methods§

source

fn expose(&self)

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

source

fn handle_events(&self, handle_events: bool)

Tell an overlay that it should handle events from the window system. These events are forwarded upstream as navigation events. In some window system, events are not propagated in the window hierarchy if a client is listening for them. This method allows you to disable events handling completely from the VideoOverlay.

§handle_events

a gboolean indicating if events should be handled or not.

source

fn prepare_window_handle(&self)

This will post a “prepare-window-handle” element message on the bus to give applications an opportunity to call VideoOverlayExtManual::set_window_handle() before a plugin creates its own window.

This function should only be used by video overlay plugin developers.

source

fn set_render_rectangle( &self, x: i32, y: i32, width: i32, height: i32, ) -> Result<(), BoolError>

Configure a subregion as a video target within the window set by VideoOverlayExtManual::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 overlayed to a specific region of that window only. After setting the new rectangle one should call 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.

§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

§Returns

false if not supported by the sink.

Object Safety§

This trait is not object safe.

Implementors§