RendererHost
struct · ferroui-media-controls · v0.5.0
struct RendererHost
A normal composition control which schedules a client-owned renderer. Input mailboxes borrow already-acquired frames; this control never opens a source.
Members
TYPEto_refschedule_propertyconstructnewscheduleset_scheduleerrorsset_rendererset_renderer_factoryoutputset_inputsinvalidate_rendererviewport_point
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this class.
to_ref
fn to_ref(self: &Self) -> $crate::Ref<RendererHost>
Returns a strong reference to this object.
schedule_property
fn schedule_property() -> &'static StyledProperty<RenderSchedule>
construct
fn construct() -> Self
new
fn new() -> Ref<Self>
schedule
fn schedule(self: &Self) -> RenderSchedule
set_schedule
fn set_schedule(self: &Self, value: RenderSchedule)
errors
fn errors(self: &Self) -> MediaEvent<MediaError>
set_renderer
fn set_renderer(self: &Self, renderer: Option<Rc<dyn TextureRenderer>>, source: u64, importer: Option<Rc<dyn TextureFrameImporter>>)
The renderer's output identity must use source and the viewport's generation. The framework does not own its scenes or rendering library.
set_renderer_factory
fn set_renderer_factory(self: &Self, factory: Option<Rc<dyn Fn(&dyn ICompositionGpuInterop, u64) -> Result<(std::rc::Rc<dyn TextureRenderer>, std::rc::Rc<dyn TextureFrameImporter>), ferroui_media::MediaError>>>)
Enables recreation after context loss. Scene and pipeline recreation remain client code; source inputs and scheduling remain on this host.
output
fn output(self: &Self) -> Option<Arc<FrameMailbox>>
set_inputs
fn set_inputs(self: &Self, inputs: Vec<Arc<FrameMailbox>>)
invalidate_renderer
fn invalidate_renderer(self: &Self)
viewport_point
fn viewport_point(self: &Self, point: Point) -> Option<Point>
Map local pointer coordinates after normal control transforms. The caller subscribes to ordinary routed input and owns hit testing.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyInputElementImplExtInteractiveImplExtLayoutableImplExtFerroObjectImplExtStyledElementImplExtClassDefaultsVisualImplExtErasedDestructorIntoEitherControlImplExtPanelImplExtDerefUpcast<T>Upcast<RendererHost>StaticTypeObjectTypeSubclassable<T>DefaultConstructibleStyledElementImplLayoutableImplInteractiveImplInputElementImplPanelImplControlImplFerroObjectImplVisualImplDrop
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.