libappstream::prelude

Trait VideoExt

source
pub trait VideoExt:
    IsA<Video>
    + Sealed
    + 'static {
    // Provided methods
    fn codec_kind(&self) -> VideoCodecKind { ... }
    fn container_kind(&self) -> VideoContainerKind { ... }
    fn height(&self) -> u32 { ... }
    fn locale(&self) -> Option<GString> { ... }
    fn url(&self) -> Option<GString> { ... }
    fn width(&self) -> u32 { ... }
    fn set_codec_kind(&self, kind: VideoCodecKind) { ... }
    fn set_container_kind(&self, kind: VideoContainerKind) { ... }
    fn set_height(&self, height: u32) { ... }
    fn set_locale(&self, locale: &str) { ... }
    fn set_url(&self, url: &str) { ... }
    fn set_width(&self, width: u32) { ... }
}
Expand description

Trait containing all Video methods.

§Implementors

Video

Provided Methods§

source

fn codec_kind(&self) -> VideoCodecKind

Gets the video codec, if known.

§Returns

the VideoCodecKind

source

fn container_kind(&self) -> VideoContainerKind

Gets the video container format, if known.

§Returns

the VideoContainerKind

source

fn height(&self) -> u32

Gets the video height, if known.

§Returns

height in pixels or 0 if unknown

source

fn locale(&self) -> Option<GString>

Get locale for this video.

§Returns

Locale string

source

fn url(&self) -> Option<GString>

Gets the full qualified URL for the video, usually pointing at a mirror or CDN server.

§Returns

a web URL

source

fn width(&self) -> u32

Gets the video width, if known.

§Returns

width in pixels or 0 if unknown

source

fn set_codec_kind(&self, kind: VideoCodecKind)

Sets the video codec.

§kind

the VideoCodecKind, e.g. VideoCodecKind::Av1.

source

fn set_container_kind(&self, kind: VideoContainerKind)

Sets the video container.

§kind

the VideoContainerKind, e.g. VideoContainerKind::Mkv.

source

fn set_height(&self, height: u32)

Sets the video height.

§height

the height in pixels.

source

fn set_locale(&self, locale: &str)

Sets the locale for this video.

§locale

the BCP47 locale string.

source

fn set_url(&self, url: &str)

Sets the fully-qualified URL to use for the video.

§url

the URL.

source

fn set_width(&self, width: u32)

Sets the video width.

§width

the width in pixels.

Object Safety§

This trait is not object safe.

Implementors§

source§

impl<O: IsA<Video>> VideoExt for O