[][src]Struct sciter::video::AssetPtr

pub struct AssetPtr<T> { /* fields omitted */ }

A managed iasset pointer.

Implementations

impl<T> AssetPtr<T>[src]

pub fn adopt(lp: *mut T) -> Self[src]

Attach to an iasset pointer and increment its reference count.

impl<T: NamedInterface> AssetPtr<T>[src]

Attempt to construct Self via a conversion.

pub fn try_from<U>(other: &mut AssetPtr<U>) -> Result<Self>[src]

Retrieve a supported interface of the managed pointer.

Example:

let mut site = AssetPtr::adopt(external_ptr);
let source = AssetPtr::<video_source>::try_from(&mut site);
assert!(source.is_ok());

Methods from Deref<Target = video_destination>

pub fn is_alive(&self) -> bool[src]

Whether this instance of video_renderer is attached to a DOM element and is capable of playing.

pub fn start_streaming(
    &mut self,
    frame_size: (i32, i32),
    color_space: COLOR_SPACE,
    src: Option<&video_source>
) -> Result<()>
[src]

Start streaming/rendering.

  • frame_size - the width and the height of the video frame.
  • color_space - the color space format of the video frame.
  • src - an optional custom video_source interface implementation, provided by the application.

pub fn stop_streaming(&mut self) -> Result<()>[src]

Stop streaming.

pub fn render_frame(&mut self, data: &[u8]) -> Result<()>[src]

Render the next frame.

Trait Implementations

impl Deref for AssetPtr<video_destination>[src]

type Target = video_destination

The resulting type after dereferencing.

impl Deref for AssetPtr<fragmented_video_destination>[src]

type Target = fragmented_video_destination

The resulting type after dereferencing.

impl DerefMut for AssetPtr<video_destination>[src]

impl DerefMut for AssetPtr<fragmented_video_destination>[src]

impl<T> Drop for AssetPtr<T>[src]

Decrements the reference count of a managed pointer.

impl<T> From<*mut T> for AssetPtr<T>[src]

Attach to an iasset pointer.

fn from(lp: *mut T) -> Self[src]

Attach to a pointer and increment its reference count.

impl<T> Send for AssetPtr<T>[src]

It's okay to transfer video pointers between threads.

Auto Trait Implementations

impl<T> RefUnwindSafe for AssetPtr<T> where
    T: RefUnwindSafe

impl<T> !Sync for AssetPtr<T>

impl<T> Unpin for AssetPtr<T>

impl<T> UnwindSafe for AssetPtr<T> where
    T: RefUnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.