pub struct AssetPtr<T> { /* private fields */ }
Expand description
A managed iasset
pointer.
Implementations§
Methods from Deref<Target = video_destination>§
Sourcepub fn is_alive(&self) -> bool
pub fn is_alive(&self) -> bool
Whether this instance of video_renderer
is attached to a DOM element and is capable of playing.
Sourcepub fn start_streaming(
&mut self,
frame_size: (i32, i32),
color_space: COLOR_SPACE,
src: Option<&video_source>,
) -> Result<()>
pub fn start_streaming( &mut self, frame_size: (i32, i32), color_space: COLOR_SPACE, src: Option<&video_source>, ) -> Result<()>
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 customvideo_source
interface implementation, provided by the application.
Sourcepub fn stop_streaming(&mut self) -> Result<()>
pub fn stop_streaming(&mut self) -> Result<()>
Stop streaming.
Sourcepub fn render_frame(&mut self, data: &[u8]) -> Result<()>
pub fn render_frame(&mut self, data: &[u8]) -> Result<()>
Render the next frame.
Trait Implementations§
Source§impl DerefMut for AssetPtr<video_destination>
impl DerefMut for AssetPtr<video_destination>
Source§impl Deref for AssetPtr<fragmented_video_destination>
impl Deref for AssetPtr<fragmented_video_destination>
Source§impl Deref for AssetPtr<video_destination>
impl Deref for AssetPtr<video_destination>
impl<T> Send for AssetPtr<T>
It’s okay to transfer video pointers between threads.
Auto Trait Implementations§
impl<T> Freeze for AssetPtr<T>
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§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more