pub struct MediaCapture(/* private fields */);

Implementations§

§

impl MediaCapture

pub fn new() -> Result<Self>

pub fn Close(&self) -> Result<()>

pub fn InitializeAsync(&self) -> Result<IAsyncAction>

pub fn InitializeWithSettingsAsync<P0>( &self, mediacaptureinitializationsettings: P0 ) -> Result<IAsyncAction>

pub fn StartRecordToStorageFileAsync<P0, P1>( &self, encodingprofile: P0, file: P1 ) -> Result<IAsyncAction>
where P0: IntoParam<MediaEncodingProfile>, P1: IntoParam<IStorageFile>,

pub fn StartRecordToStreamAsync<P0, P1>( &self, encodingprofile: P0, stream: P1 ) -> Result<IAsyncAction>
where P0: IntoParam<MediaEncodingProfile>, P1: IntoParam<IRandomAccessStream>,

pub fn StartRecordToCustomSinkAsync<P0, P1>( &self, encodingprofile: P0, custommediasink: P1 ) -> Result<IAsyncAction>
where P0: IntoParam<MediaEncodingProfile>, P1: IntoParam<IMediaExtension>,

pub fn StartRecordToCustomSinkIdAsync<P0, P1>( &self, encodingprofile: P0, customsinkactivationid: &HSTRING, customsinksettings: P1 ) -> Result<IAsyncAction>
where P0: IntoParam<MediaEncodingProfile>, P1: IntoParam<IPropertySet>,

pub fn StopRecordAsync(&self) -> Result<IAsyncAction>

pub fn CapturePhotoToStorageFileAsync<P0, P1>( &self, type: P0, file: P1 ) -> Result<IAsyncAction>
where P0: IntoParam<ImageEncodingProperties>, P1: IntoParam<IStorageFile>,

pub fn CapturePhotoToStreamAsync<P0, P1>( &self, type: P0, stream: P1 ) -> Result<IAsyncAction>
where P0: IntoParam<ImageEncodingProperties>, P1: IntoParam<IRandomAccessStream>,

pub fn AddEffectAsync<P0>( &self, mediastreamtype: MediaStreamType, effectactivationid: &HSTRING, effectsettings: P0 ) -> Result<IAsyncAction>
where P0: IntoParam<IPropertySet>,

pub fn ClearEffectsAsync( &self, mediastreamtype: MediaStreamType ) -> Result<IAsyncAction>

pub fn SetEncoderProperty<P0>( &self, mediastreamtype: MediaStreamType, propertyid: GUID, propertyvalue: P0 ) -> Result<()>
where P0: IntoParam<IInspectable>,

pub fn GetEncoderProperty( &self, mediastreamtype: MediaStreamType, propertyid: GUID ) -> Result<IInspectable>

pub fn Failed<P0>( &self, erroreventhandler: P0 ) -> Result<EventRegistrationToken>
where P0: IntoParam<MediaCaptureFailedEventHandler>,

pub fn RemoveFailed(&self, eventcookie: EventRegistrationToken) -> Result<()>

pub fn RecordLimitationExceeded<P0>( &self, recordlimitationexceededeventhandler: P0 ) -> Result<EventRegistrationToken>

pub fn RemoveRecordLimitationExceeded( &self, eventcookie: EventRegistrationToken ) -> Result<()>

pub fn MediaCaptureSettings(&self) -> Result<MediaCaptureSettings>

pub fn AudioDeviceController(&self) -> Result<AudioDeviceController>

pub fn VideoDeviceController(&self) -> Result<VideoDeviceController>

pub fn SetPreviewMirroring(&self, value: bool) -> Result<()>

pub fn GetPreviewMirroring(&self) -> Result<bool>

pub fn SetPreviewRotation(&self, value: VideoRotation) -> Result<()>

pub fn GetPreviewRotation(&self) -> Result<VideoRotation>

pub fn SetRecordRotation(&self, value: VideoRotation) -> Result<()>

pub fn GetRecordRotation(&self) -> Result<VideoRotation>

pub fn PrepareLowLagRecordToStorageFileAsync<P0, P1>( &self, encodingprofile: P0, file: P1 ) -> Result<IAsyncOperation<LowLagMediaRecording>>
where P0: IntoParam<MediaEncodingProfile>, P1: IntoParam<IStorageFile>,

pub fn PrepareLowLagRecordToStreamAsync<P0, P1>( &self, encodingprofile: P0, stream: P1 ) -> Result<IAsyncOperation<LowLagMediaRecording>>
where P0: IntoParam<MediaEncodingProfile>, P1: IntoParam<IRandomAccessStream>,

pub fn PrepareLowLagRecordToCustomSinkAsync<P0, P1>( &self, encodingprofile: P0, custommediasink: P1 ) -> Result<IAsyncOperation<LowLagMediaRecording>>
where P0: IntoParam<MediaEncodingProfile>, P1: IntoParam<IMediaExtension>,

pub fn PrepareLowLagRecordToCustomSinkIdAsync<P0, P1>( &self, encodingprofile: P0, customsinkactivationid: &HSTRING, customsinksettings: P1 ) -> Result<IAsyncOperation<LowLagMediaRecording>>
where P0: IntoParam<MediaEncodingProfile>, P1: IntoParam<IPropertySet>,

pub fn PrepareLowLagPhotoCaptureAsync<P0>( &self, type: P0 ) -> Result<IAsyncOperation<LowLagPhotoCapture>>
where P0: IntoParam<ImageEncodingProperties>,

pub fn PrepareLowLagPhotoSequenceCaptureAsync<P0>( &self, type: P0 ) -> Result<IAsyncOperation<LowLagPhotoSequenceCapture>>
where P0: IntoParam<ImageEncodingProperties>,

pub fn SetEncodingPropertiesAsync<P0, P1>( &self, mediastreamtype: MediaStreamType, mediaencodingproperties: P0, encoderproperties: P1 ) -> Result<IAsyncAction>
where P0: IntoParam<IMediaEncodingProperties>, P1: IntoParam<MediaPropertySet>,

pub fn PrepareVariablePhotoSequenceCaptureAsync<P0>( &self, type: P0 ) -> Result<IAsyncOperation<VariablePhotoSequenceCapture>>
where P0: IntoParam<ImageEncodingProperties>,

pub fn FocusChanged<P0>(&self, handler: P0) -> Result<EventRegistrationToken>

pub fn RemoveFocusChanged(&self, token: EventRegistrationToken) -> Result<()>

pub fn PhotoConfirmationCaptured<P0>( &self, handler: P0 ) -> Result<EventRegistrationToken>

pub fn RemovePhotoConfirmationCaptured( &self, token: EventRegistrationToken ) -> Result<()>

pub fn AddAudioEffectAsync<P0>( &self, definition: P0 ) -> Result<IAsyncOperation<IMediaExtension>>
where P0: IntoParam<IAudioEffectDefinition>,

pub fn AddVideoEffectAsync<P0>( &self, definition: P0, mediastreamtype: MediaStreamType ) -> Result<IAsyncOperation<IMediaExtension>>
where P0: IntoParam<IVideoEffectDefinition>,

pub fn PauseRecordAsync( &self, behavior: MediaCapturePauseBehavior ) -> Result<IAsyncAction>

pub fn ResumeRecordAsync(&self) -> Result<IAsyncAction>

pub fn CameraStreamStateChanged<P0>( &self, handler: P0 ) -> Result<EventRegistrationToken>

pub fn RemoveCameraStreamStateChanged( &self, token: EventRegistrationToken ) -> Result<()>

pub fn CameraStreamState(&self) -> Result<CameraStreamState>

pub fn GetPreviewFrameAsync(&self) -> Result<IAsyncOperation<VideoFrame>>

pub fn GetPreviewFrameCopyAsync<P0>( &self, destination: P0 ) -> Result<IAsyncOperation<VideoFrame>>
where P0: IntoParam<VideoFrame>,

pub fn ThermalStatusChanged<P0>( &self, handler: P0 ) -> Result<EventRegistrationToken>

pub fn RemoveThermalStatusChanged( &self, token: EventRegistrationToken ) -> Result<()>

pub fn ThermalStatus(&self) -> Result<MediaCaptureThermalStatus>

pub fn PrepareAdvancedPhotoCaptureAsync<P0>( &self, encodingproperties: P0 ) -> Result<IAsyncOperation<AdvancedPhotoCapture>>
where P0: IntoParam<ImageEncodingProperties>,

pub fn RemoveEffectAsync<P0>(&self, effect: P0) -> Result<IAsyncAction>
where P0: IntoParam<IMediaExtension>,

pub fn PauseRecordWithResultAsync( &self, behavior: MediaCapturePauseBehavior ) -> Result<IAsyncOperation<MediaCapturePauseResult>>

pub fn StopRecordWithResultAsync( &self ) -> Result<IAsyncOperation<MediaCaptureStopResult>>

pub fn FrameSources(&self) -> Result<IMapView<HSTRING, MediaFrameSource>>

pub fn CreateFrameReaderAsync<P0>( &self, inputsource: P0 ) -> Result<IAsyncOperation<MediaFrameReader>>
where P0: IntoParam<MediaFrameSource>,

pub fn CreateFrameReaderWithSubtypeAsync<P0>( &self, inputsource: P0, outputsubtype: &HSTRING ) -> Result<IAsyncOperation<MediaFrameReader>>
where P0: IntoParam<MediaFrameSource>,

pub fn CreateFrameReaderWithSubtypeAndSizeAsync<P0>( &self, inputsource: P0, outputsubtype: &HSTRING, outputsize: BitmapSize ) -> Result<IAsyncOperation<MediaFrameReader>>
where P0: IntoParam<MediaFrameSource>,

pub fn CaptureDeviceExclusiveControlStatusChanged<P0>( &self, handler: P0 ) -> Result<EventRegistrationToken>

pub fn RemoveCaptureDeviceExclusiveControlStatusChanged( &self, token: EventRegistrationToken ) -> Result<()>

pub fn CreateMultiSourceFrameReaderAsync<P0>( &self, inputsources: P0 ) -> Result<IAsyncOperation<MultiSourceMediaFrameReader>>
where P0: IntoParam<IIterable<MediaFrameSource>>,

pub fn CreateRelativePanelWatcher<P0>( &self, capturemode: StreamingCaptureMode, displayregion: P0 ) -> Result<MediaCaptureRelativePanelWatcher>
where P0: IntoParam<DisplayRegion>,

pub fn IsVideoProfileSupported(videodeviceid: &HSTRING) -> Result<bool>

pub fn FindAllVideoProfiles( videodeviceid: &HSTRING ) -> Result<IVectorView<MediaCaptureVideoProfile>>

pub fn FindConcurrentProfiles( videodeviceid: &HSTRING ) -> Result<IVectorView<MediaCaptureVideoProfile>>

pub fn FindKnownVideoProfiles( videodeviceid: &HSTRING, name: KnownVideoProfile ) -> Result<IVectorView<MediaCaptureVideoProfile>>

pub fn StartPreviewAsync(&self) -> Result<IAsyncAction>

pub fn StartPreviewToCustomSinkAsync<P0, P1>( &self, encodingprofile: P0, custommediasink: P1 ) -> Result<IAsyncAction>
where P0: IntoParam<MediaEncodingProfile>, P1: IntoParam<IMediaExtension>,

pub fn StartPreviewToCustomSinkIdAsync<P0, P1>( &self, encodingprofile: P0, customsinkactivationid: &HSTRING, customsinksettings: P1 ) -> Result<IAsyncAction>
where P0: IntoParam<MediaEncodingProfile>, P1: IntoParam<IPropertySet>,

pub fn StopPreviewAsync(&self) -> Result<IAsyncAction>

Trait Implementations§

§

impl Clone for MediaCapture

§

fn clone(&self) -> MediaCapture

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
§

impl Debug for MediaCapture

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
§

impl From<&MediaCapture> for &IInspectable

§

fn from(value: &MediaCapture) -> Self

Converts to this type from the input type.
§

impl From<&MediaCapture> for &IUnknown

§

fn from(value: &MediaCapture) -> Self

Converts to this type from the input type.
§

impl From<MediaCapture> for IInspectable

§

fn from(value: MediaCapture) -> Self

Converts to this type from the input type.
§

impl From<MediaCapture> for IUnknown

§

fn from(value: MediaCapture) -> Self

Converts to this type from the input type.
§

impl Interface for MediaCapture

§

fn as_raw(&self) -> *mut c_void

Returns the raw COM interface pointer. The resulting pointer continues to be owned by the Interface implementation.
§

fn into_raw(self) -> *mut c_void

Returns the raw COM interface pointer and releases ownership. It the caller’s responsibility to release the COM interface pointer.
§

unsafe fn from_raw(raw: *mut c_void) -> Self

Creates an Interface by taking ownership of the raw COM interface pointer. Read more
§

unsafe fn from_raw_borrowed(raw: &*mut c_void) -> Option<&Self>

Creates an Interface that is valid so long as the raw COM interface pointer is valid. Read more
§

fn cast<T>(&self) -> Result<T, Error>
where T: Interface,

Attempts to cast the current interface to another interface using QueryInterface. Read more
§

fn downgrade(&self) -> Result<Weak<Self>, Error>

Attempts to create a Weak reference to this object.
§

unsafe fn query(&self, iid: *const GUID, interface: *mut *mut c_void) -> HRESULT

Call QueryInterface on this interface Read more
§

impl PartialEq for MediaCapture

§

fn eq(&self, other: &MediaCapture) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
§

impl Eq for MediaCapture

§

impl StructuralPartialEq for MediaCapture

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.