FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    CameraPreview

    struct · ferroui-media-camera-controls · v0.5.0

    struct CameraPreview
    

    View source

    Members

    TYPE

    const TYPE: &'static $crate::TypeInfo
    

    The runtime type of this class.

    Source

    to_ref

    fn to_ref(self: &Self) -> $crate::Ref<CameraPreview>
    

    Returns a strong reference to this object.

    Source

    stretch_property

    fn stretch_property() -> &'static StyledProperty<Stretch>
    

    Source

    construct

    fn construct() -> Self
    

    Source

    new

    fn new() -> Ref<Self>
    

    Source

    stretch

    fn stretch(self: &Self) -> Stretch
    

    Source

    set_stretch

    fn set_stretch(self: &Self, value: Stretch)
    

    Source

    errors

    fn errors(self: &Self) -> MediaEvent<CameraError>
    

    Source

    session

    fn session(self: &Self) -> Option<CameraSession>
    

    Source

    set_session

    fn set_session(self: &Self, session: Option<&CameraSession>, importer: Option<Rc<dyn TextureFrameImporter>>)
    

    Borrows a caller-owned session. Detach releases this view's leases only.

    Source

    start

    fn start(self: &Self, capture: CameraCapture, options: CameraStartOptions, importer: Rc<dyn TextureFrameImporter>) -> CameraFuture<()>
    

    Explicitly creates an owned session. Detach cancels preparation and stops this session; construction/attachment never starts a camera.

    Source

    stop

    fn stop(self: &Self)
    

    Source

    set_provider_factory

    fn set_provider_factory(self: &Self, factory: Option<Rc<CameraProviderFactory>>)
    

    Enables automatic restart only for this control's explicitly started, active session. Caller-supplied sessions are recovered by their owner.

    Source

    Trait implementations

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.