WebGlFrameProducer
struct · ferroui-media-browser · v0.5.0
struct WebGlFrameProducer
Allocation policy for the active compositor context. Old generations remain charged to the same budget until their native storage actually retires.
Members
from_interopbudgetdevicedevice_generationgraphicswith_budgetwith_analysisstreamis_currenttransfers_framesquadrantsupload
from_interop
fn from_interop(interop: &dyn ICompositionGpuInterop, budget: FrameBudget) -> Result<Self, MediaError>
budget
fn budget(self: &Self) -> FrameBudget
device
fn device(self: &Self) -> DeviceIdentity
device_generation
fn device_generation(self: &Self) -> u64
graphics
fn graphics(self: &Self) -> Acceleration
with_budget
fn with_budget(self: &Self, budget: FrameBudget) -> Self
with_analysis
fn with_analysis(self: &Self, enabled: bool) -> Self
stream
fn stream(self: &Self, source: u64, generation: u64) -> BrowserFrameStream
is_current
fn is_current(self: &Self) -> bool
transfers_frames
fn transfers_frames(self: &Self) -> bool
Whether frames are transferred to the render worker (#601) rather than written into a texture of a context of this thread.
quadrants
fn quadrants(self: &Self, identity: FrameIdentity, width: u32, height: u32) -> Result<Option<PendingWebGlFrame>, MediaError>
Independent GPU producer. Its framebuffer is bottom-left oriented; presentation must preserve that origin rather than flip CPU pixels.
upload
fn upload(self: &Self, identity: FrameIdentity, width: u32, height: u32, timestamp: Duration, source: &JsValue) -> Result<Option<PendingWebGlFrame>, MediaError>
Transfers a browser-owned HTMLVideoElement image directly to the active GL context. CORS/security failures remain errors; there is no CPU fallback.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedClassDefaultsErasedDestructorIntoEitherUpcast<T>Clone
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.