Trait gstreamer_video::prelude::VideoOverlayExt[][src]

pub trait VideoOverlayExt: 'static {
    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>; }

Trait containing all VideoOverlay methods.

Implementors

crate::VideoOverlay

Required methods

fn expose(&self)[src]

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

fn handle_events(&self, handle_events: bool)[src]

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 crate::VideoOverlay.

handle_events

a gboolean indicating if events should be handled or not.

fn prepare_window_handle(&self)[src]

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

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

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

Configure a subregion as a video target within the window set by [crate::VideoOverlay::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 [crate::VideoOverlay::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.

Loading content...

Implementors

impl<O: IsA<VideoOverlay>> VideoOverlayExt for O[src]

fn expose(&self)[src]

fn handle_events(&self, handle_events: bool)[src]

fn prepare_window_handle(&self)[src]

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

Loading content...