#[repr(C)]pub struct AVCaptureDevice { /* private fields */ }Implementations§
Source§impl AVCaptureDevice
impl AVCaptureDevice
pub fn devices() -> Id<NSArray<AVCaptureDevice>>
pub fn devices_with_media_type( media_type: &AVMediaType, ) -> Id<NSArray<AVCaptureDevice>>
pub fn default_device_with_media_type( media_type: &AVMediaType, ) -> Option<Id<AVCaptureDevice>>
pub fn device_with_unique_id( unique_id: &NSString, ) -> Option<Id<AVCaptureDevice>>
pub fn unique_id(&self) -> Id<NSString>
pub fn model_id(&self) -> Id<NSString>
pub fn localized_name(&self) -> Id<NSString>
pub fn manufacturer(&self) -> Id<NSString>
pub fn transport_type(&self) -> i32
pub fn has_media_type(&self, media_type: &AVMediaType) -> Bool
pub fn lock_for_configuration(&self) -> Result<Bool, Id<NSError>>
pub fn unlock_for_configuration(&self)
pub fn supports_av_capture_session_preset( &self, preset: &AVCaptureSessionPreset, ) -> Bool
pub fn is_connected(&self) -> Bool
pub fn is_in_use_by_another_application(&self) -> Bool
pub fn is_suspended(&self) -> Bool
pub fn linked_devices(&self) -> Id<NSArray<AVCaptureDevice>>
pub fn formats(&self) -> Id<NSArray<AVCaptureDeviceFormat>>
pub fn get_active_format(&self) -> Id<AVCaptureDeviceFormat>
pub fn set_active_format(&self, format: &AVCaptureDeviceFormat)
pub fn get_active_video_min_frame_duration(&self) -> CMTime
pub fn set_active_video_min_frame_duration(&self, duration: CMTime)
pub fn get_active_video_max_frame_duration(&self) -> CMTime
pub fn set_active_video_max_frame_duration(&self, duration: CMTime)
pub fn input_sources(&self) -> Id<NSArray<AVCaptureDeviceInputSource>>
pub fn get_active_input_source(&self) -> Id<AVCaptureDeviceInputSource>
pub fn set_active_input_source(&self, input_source: &AVCaptureDeviceInputSource)
Source§impl AVCaptureDevice
impl AVCaptureDevice
pub fn position(&self) -> AVCaptureDevicePosition
Source§impl AVCaptureDevice
impl AVCaptureDevice
pub fn device_type(&self) -> Id<AVCaptureDeviceType>
pub fn default_device_with_device_type( device_type: &AVCaptureDeviceType, media_type: &AVMediaType, position: AVCaptureDevicePosition, ) -> Option<Id<AVCaptureDevice>>
Source§impl AVCaptureDevice
impl AVCaptureDevice
pub fn has_torch(&self) -> Bool
pub fn is_torch_available(&self) -> Bool
pub fn is_torch_active(&self) -> Bool
pub fn torch_level(&self) -> f32
pub fn is_torch_mode_supported(&self, torch_mode: AVCaptureTorchMode) -> Bool
pub fn torch_mode(&self) -> AVCaptureTorchMode
pub fn set_torch_mode(&self, torch_mode: AVCaptureTorchMode)
pub fn set_torch_mode_on_with_level( &self, torch_level: f32, ) -> Result<Bool, Id<NSError>>
Source§impl AVCaptureDevice
impl AVCaptureDevice
pub fn is_focus_mode_supported(&self, focus_mode: AVCaptureFocusMode) -> Bool
pub fn focus_mode(&self) -> AVCaptureFocusMode
pub fn set_focus_mode(&self, focus_mode: AVCaptureFocusMode)
pub fn is_focus_point_of_interest_supported(&self) -> Bool
pub fn focus_point_of_interest(&self) -> CGPoint
pub fn set_focus_point_of_interest(&self, point: CGPoint)
pub fn is_adjusting_focus(&self) -> Bool
pub fn minimum_focus_distance(&self) -> NSInteger
Source§impl AVCaptureDevice
impl AVCaptureDevice
pub fn is_exposure_mode_supported( &self, exposure_mode: AVCaptureExposureMode, ) -> Bool
pub fn exposure_mode(&self) -> AVCaptureExposureMode
pub fn set_exposure_mode(&self, exposure_mode: AVCaptureExposureMode)
pub fn is_exposure_point_of_interest_supported(&self) -> Bool
pub fn exposure_point_of_interest(&self) -> CGPoint
pub fn set_exposure_point_of_interest(&self, point: CGPoint)
pub fn is_adjusting_exposure(&self) -> Bool
Source§impl AVCaptureDevice
impl AVCaptureDevice
pub fn is_white_balance_mode_supported( &self, white_balance_mode: AVCaptureWhiteBalanceMode, ) -> Bool
pub fn white_balance_mode(&self) -> AVCaptureWhiteBalanceMode
pub fn set_white_balance_mode( &self, white_balance_mode: AVCaptureWhiteBalanceMode, )
pub fn is_adjusting_white_balance(&self) -> Bool
Source§impl AVCaptureDevice
impl AVCaptureDevice
pub fn display_video_zoom_factor_multiplier(&self) -> CGFloat
Source§impl AVCaptureDevice
impl AVCaptureDevice
pub fn request_access_for_media_type<F>(media_type: &AVMediaType, handler: F)
Source§impl AVCaptureDevice
impl AVCaptureDevice
pub fn active_color_space(&self) -> AVCaptureColorSpace
Methods from Deref<Target = NSObject>§
Sourcepub fn doesNotRecognizeSelector(&self, sel: Sel) -> !
pub fn doesNotRecognizeSelector(&self, sel: Sel) -> !
Handle messages the object doesn’t recognize.
See Apple’s documentation for details.
Methods from Deref<Target = AnyObject>§
Sourcepub fn class(&self) -> &'static AnyClass
pub fn class(&self) -> &'static AnyClass
Dynamically find the class of this object.
§Example
Check that an instance of NSObject has the precise class NSObject.
use objc2::ClassType;
use objc2::runtime::NSObject;
let obj = NSObject::new();
assert_eq!(obj.class(), NSObject::class());Sourcepub unsafe fn get_ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
👎Deprecated: this is difficult to use correctly, use Ivar::load instead.
pub unsafe fn get_ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
Ivar::load instead.Use Ivar::load instead.
§Safety
The object must have an instance variable with the given name, and it
must be of type T.
See Ivar::load_ptr for details surrounding this.
Sourcepub unsafe fn get_mut_ivar<T>(&mut self, name: &str) -> &mut Twhere
T: Encode,
👎Deprecated: this is difficult to use correctly, use Ivar::load_mut instead.
pub unsafe fn get_mut_ivar<T>(&mut self, name: &str) -> &mut Twhere
T: Encode,
Ivar::load_mut instead.Use Ivar::load_mut instead.
§Safety
The object must have an instance variable with the given name, and it
must be of type T.
See Ivar::load_ptr for details surrounding this.
Trait Implementations§
Source§impl AsMut<AVCaptureDevice> for AVCaptureDevice
impl AsMut<AVCaptureDevice> for AVCaptureDevice
Source§impl AsMut<AnyObject> for AVCaptureDevice
impl AsMut<AnyObject> for AVCaptureDevice
Source§impl AsMut<NSObject> for AVCaptureDevice
impl AsMut<NSObject> for AVCaptureDevice
Source§impl AsRef<AVCaptureDevice> for AVCaptureDevice
impl AsRef<AVCaptureDevice> for AVCaptureDevice
Source§impl AsRef<AnyObject> for AVCaptureDevice
impl AsRef<AnyObject> for AVCaptureDevice
Source§impl AsRef<NSObject> for AVCaptureDevice
impl AsRef<NSObject> for AVCaptureDevice
Source§impl Borrow<AnyObject> for AVCaptureDevice
impl Borrow<AnyObject> for AVCaptureDevice
Source§impl Borrow<NSObject> for AVCaptureDevice
impl Borrow<NSObject> for AVCaptureDevice
Source§impl BorrowMut<AnyObject> for AVCaptureDevice
impl BorrowMut<AnyObject> for AVCaptureDevice
Source§fn borrow_mut(&mut self) -> &mut AnyObject
fn borrow_mut(&mut self) -> &mut AnyObject
Mutably borrows from an owned value. Read more
Source§impl BorrowMut<NSObject> for AVCaptureDevice
impl BorrowMut<NSObject> for AVCaptureDevice
Source§fn borrow_mut(&mut self) -> &mut NSObject
fn borrow_mut(&mut self) -> &mut NSObject
Mutably borrows from an owned value. Read more
Source§impl ClassType for AVCaptureDevice
impl ClassType for AVCaptureDevice
Source§const NAME: &'static str = "AVCaptureDevice"
const NAME: &'static str = "AVCaptureDevice"
The name of the Objective-C class that this type represents. Read more
Source§type Mutability = InteriorMutable
type Mutability = InteriorMutable
Whether the type is mutable or immutable. Read more
Source§fn class() -> &'static AnyClass
fn class() -> &'static AnyClass
Get a reference to the Objective-C class that this type represents. Read more
Source§fn as_super_mut(&mut self) -> &mut Self::Super
fn as_super_mut(&mut self) -> &mut Self::Super
Get a mutable reference to the superclass.
Source§impl Debug for AVCaptureDevice
impl Debug for AVCaptureDevice
Source§impl Deref for AVCaptureDevice
impl Deref for AVCaptureDevice
Source§impl DerefMut for AVCaptureDevice
impl DerefMut for AVCaptureDevice
Source§impl Hash for AVCaptureDevice
impl Hash for AVCaptureDevice
Source§impl NSObjectProtocol for AVCaptureDevice
impl NSObjectProtocol for AVCaptureDevice
Source§fn isEqual(&self, other: &AnyObject) -> bool
fn isEqual(&self, other: &AnyObject) -> bool
Check whether the object is equal to an arbitrary other object. Read more
Source§fn hash(&self) -> usize
fn hash(&self) -> usize
An integer that can be used as a table address in a hash table
structure. Read more
Source§fn isKindOfClass(&self, cls: &AnyClass) -> bool
fn isKindOfClass(&self, cls: &AnyClass) -> bool
Check if the object is an instance of the class, or one of its
subclasses. Read more
Source§fn is_kind_of<T>(&self) -> bool
fn is_kind_of<T>(&self) -> bool
Check if the object is an instance of the class type, or one of its
subclasses. Read more
Source§fn isMemberOfClass(&self, cls: &AnyClass) -> bool
fn isMemberOfClass(&self, cls: &AnyClass) -> bool
Check if the object is an instance of a specific class, without
checking subclasses. Read more
Source§fn respondsToSelector(&self, aSelector: Sel) -> bool
fn respondsToSelector(&self, aSelector: Sel) -> bool
Check whether the object implements or inherits a method with the
given selector. Read more
Source§fn conformsToProtocol(&self, aProtocol: &AnyProtocol) -> bool
fn conformsToProtocol(&self, aProtocol: &AnyProtocol) -> bool
Check whether the object conforms to a given protocol. Read more
Source§fn debugDescription(&self) -> Retained<NSObject>
fn debugDescription(&self) -> Retained<NSObject>
A textual representation of the object to use when debugging. Read more
Source§impl PartialEq for AVCaptureDevice
impl PartialEq for AVCaptureDevice
Source§impl RefEncode for AVCaptureDevice
impl RefEncode for AVCaptureDevice
Source§const ENCODING_REF: Encoding = <NSObject as ::objc2::RefEncode>::ENCODING_REF
const ENCODING_REF: Encoding = <NSObject as ::objc2::RefEncode>::ENCODING_REF
The Objective-C type-encoding for a reference of this type. Read more
impl Eq for AVCaptureDevice
impl Message for AVCaptureDevice
impl StructuralPartialEq for AVCaptureDevice
Auto Trait Implementations§
impl !Freeze for AVCaptureDevice
impl !RefUnwindSafe for AVCaptureDevice
impl !Send for AVCaptureDevice
impl !Sync for AVCaptureDevice
impl !Unpin for AVCaptureDevice
impl !UnwindSafe for AVCaptureDevice
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more