pub trait BrowserVideoCapture: CaptureArea {
// Required methods
fn capture(
&self,
source: &HtmlVideoElement,
mode: CaptureMode,
) -> (u32, u32);
fn retrieve(&self, buffer: &mut [u8]);
fn clear(&self);
// Provided methods
fn channels_count(&self) -> u32 { ... }
fn buffer_size(&self) -> usize { ... }
fn data(&self) -> Vec<u8> ⓘ { ... }
fn read(&self, source: &HtmlVideoElement, mode: CaptureMode) -> Vec<u8> ⓘ { ... }
}
Required Methods§
Sourcefn capture(&self, source: &HtmlVideoElement, mode: CaptureMode) -> (u32, u32)
fn capture(&self, source: &HtmlVideoElement, mode: CaptureMode) -> (u32, u32)
Capture a frame from the video element.
Provided Methods§
Sourcefn channels_count(&self) -> u32
fn channels_count(&self) -> u32
Get the number of channels in the capture buffer.
Sourcefn buffer_size(&self) -> usize
fn buffer_size(&self) -> usize
Get the size of the capture buffer in bytes.
Sourcefn read(&self, source: &HtmlVideoElement, mode: CaptureMode) -> Vec<u8> ⓘ
fn read(&self, source: &HtmlVideoElement, mode: CaptureMode) -> Vec<u8> ⓘ
Read the raw data from the video element.
Trait Implementations§
Source§impl From<BrowserCapture> for Box<dyn BrowserVideoCapture>
impl From<BrowserCapture> for Box<dyn BrowserVideoCapture>
Source§fn from(value: BrowserCapture) -> Self
fn from(value: BrowserCapture) -> Self
Converts to this type from the input type.