CameraPreview
struct · ferroui-media-camera-controls · v0.5.0
struct CameraPreview
Members
TYPEto_refstretch_propertyconstructnewstretchset_stretcherrorssessionset_sessionstartstopset_provider_factory
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this class.
to_ref
fn to_ref(self: &Self) -> $crate::Ref<CameraPreview>
Returns a strong reference to this object.
stretch_property
fn stretch_property() -> &'static StyledProperty<Stretch>
construct
fn construct() -> Self
new
fn new() -> Ref<Self>
stretch
fn stretch(self: &Self) -> Stretch
set_stretch
fn set_stretch(self: &Self, value: Stretch)
errors
fn errors(self: &Self) -> MediaEvent<CameraError>
session
fn session(self: &Self) -> Option<CameraSession>
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.
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.
stop
fn stop(self: &Self)
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.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyInputElementImplExtInteractiveImplExtLayoutableImplExtFerroObjectImplExtStyledElementImplExtClassDefaultsVisualImplExtErasedDestructorIntoEitherControlImplExtPanelImplExtDerefUpcast<T>Upcast<CameraPreview>StaticTypeObjectTypeSubclassable<T>DefaultConstructibleStyledElementImplLayoutableImplInteractiveImplInputElementImplControlImplPanelImplFerroObjectImplVisualImplDrop
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.