Struct windows::Media::Capture::MediaCapture
pub struct MediaCapture(/* private fields */);
Implementations§
§impl MediaCapture
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>where
P0: Param<MediaCaptureInitializationSettings>,
pub fn StartRecordToStorageFileAsync<P0, P1>(
&self,
encodingprofile: P0,
file: P1,
) -> Result<IAsyncAction>where
P0: Param<MediaEncodingProfile>,
P1: Param<IStorageFile>,
pub fn StartRecordToStreamAsync<P0, P1>(
&self,
encodingprofile: P0,
stream: P1,
) -> Result<IAsyncAction>where
P0: Param<MediaEncodingProfile>,
P1: Param<IRandomAccessStream>,
pub fn StartRecordToCustomSinkAsync<P0, P1>(
&self,
encodingprofile: P0,
custommediasink: P1,
) -> Result<IAsyncAction>where
P0: Param<MediaEncodingProfile>,
P1: Param<IMediaExtension>,
pub fn StartRecordToCustomSinkIdAsync<P0, P1>(
&self,
encodingprofile: P0,
customsinkactivationid: &HSTRING,
customsinksettings: P1,
) -> Result<IAsyncAction>where
P0: Param<MediaEncodingProfile>,
P1: Param<IPropertySet>,
pub fn StopRecordAsync(&self) -> Result<IAsyncAction>
pub fn CapturePhotoToStorageFileAsync<P0, P1>(
&self,
type: P0,
file: P1,
) -> Result<IAsyncAction>where
P0: Param<ImageEncodingProperties>,
P1: Param<IStorageFile>,
pub fn CapturePhotoToStreamAsync<P0, P1>(
&self,
type: P0,
stream: P1,
) -> Result<IAsyncAction>where
P0: Param<ImageEncodingProperties>,
P1: Param<IRandomAccessStream>,
pub fn AddEffectAsync<P0>(
&self,
mediastreamtype: MediaStreamType,
effectactivationid: &HSTRING,
effectsettings: P0,
) -> Result<IAsyncAction>where
P0: Param<IPropertySet>,
pub fn ClearEffectsAsync( &self, mediastreamtype: MediaStreamType, ) -> Result<IAsyncAction>
pub fn SetEncoderProperty<P0>(
&self,
mediastreamtype: MediaStreamType,
propertyid: GUID,
propertyvalue: P0,
) -> Result<()>where
P0: Param<IInspectable>,
pub fn GetEncoderProperty( &self, mediastreamtype: MediaStreamType, propertyid: GUID, ) -> Result<IInspectable>
pub fn Failed<P0>(
&self,
erroreventhandler: P0,
) -> Result<EventRegistrationToken>where
P0: Param<MediaCaptureFailedEventHandler>,
pub fn RemoveFailed(&self, eventcookie: EventRegistrationToken) -> Result<()>
pub fn RecordLimitationExceeded<P0>(
&self,
recordlimitationexceededeventhandler: P0,
) -> Result<EventRegistrationToken>where
P0: Param<RecordLimitationExceededEventHandler>,
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: Param<MediaEncodingProfile>,
P1: Param<IStorageFile>,
pub fn PrepareLowLagRecordToStreamAsync<P0, P1>(
&self,
encodingprofile: P0,
stream: P1,
) -> Result<IAsyncOperation<LowLagMediaRecording>>where
P0: Param<MediaEncodingProfile>,
P1: Param<IRandomAccessStream>,
pub fn PrepareLowLagRecordToCustomSinkAsync<P0, P1>(
&self,
encodingprofile: P0,
custommediasink: P1,
) -> Result<IAsyncOperation<LowLagMediaRecording>>where
P0: Param<MediaEncodingProfile>,
P1: Param<IMediaExtension>,
pub fn PrepareLowLagRecordToCustomSinkIdAsync<P0, P1>(
&self,
encodingprofile: P0,
customsinkactivationid: &HSTRING,
customsinksettings: P1,
) -> Result<IAsyncOperation<LowLagMediaRecording>>where
P0: Param<MediaEncodingProfile>,
P1: Param<IPropertySet>,
pub fn PrepareLowLagPhotoCaptureAsync<P0>(
&self,
type: P0,
) -> Result<IAsyncOperation<LowLagPhotoCapture>>where
P0: Param<ImageEncodingProperties>,
pub fn PrepareLowLagPhotoSequenceCaptureAsync<P0>(
&self,
type: P0,
) -> Result<IAsyncOperation<LowLagPhotoSequenceCapture>>where
P0: Param<ImageEncodingProperties>,
pub fn SetEncodingPropertiesAsync<P0, P1>(
&self,
mediastreamtype: MediaStreamType,
mediaencodingproperties: P0,
encoderproperties: P1,
) -> Result<IAsyncAction>where
P0: Param<IMediaEncodingProperties>,
P1: Param<MediaPropertySet>,
pub fn PrepareVariablePhotoSequenceCaptureAsync<P0>(
&self,
type: P0,
) -> Result<IAsyncOperation<VariablePhotoSequenceCapture>>where
P0: Param<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: Param<IAudioEffectDefinition>,
pub fn AddVideoEffectAsync<P0>(
&self,
definition: P0,
mediastreamtype: MediaStreamType,
) -> Result<IAsyncOperation<IMediaExtension>>where
P0: Param<IVideoEffectDefinition>,
pub fn PauseRecordAsync( &self, behavior: MediaCapturePauseBehavior, ) -> Result<IAsyncAction>
pub fn ResumeRecordAsync(&self) -> Result<IAsyncAction>
pub fn CameraStreamStateChanged<P0>(
&self,
handler: P0,
) -> Result<EventRegistrationToken>where
P0: Param<TypedEventHandler<MediaCapture, IInspectable>>,
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: Param<VideoFrame>,
pub fn ThermalStatusChanged<P0>(
&self,
handler: P0,
) -> Result<EventRegistrationToken>where
P0: Param<TypedEventHandler<MediaCapture, IInspectable>>,
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: Param<ImageEncodingProperties>,
pub fn RemoveEffectAsync<P0>(&self, effect: P0) -> Result<IAsyncAction>where
P0: Param<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: Param<MediaFrameSource>,
pub fn CreateFrameReaderWithSubtypeAsync<P0>(
&self,
inputsource: P0,
outputsubtype: &HSTRING,
) -> Result<IAsyncOperation<MediaFrameReader>>where
P0: Param<MediaFrameSource>,
pub fn CreateFrameReaderWithSubtypeAndSizeAsync<P0>(
&self,
inputsource: P0,
outputsubtype: &HSTRING,
outputsize: BitmapSize,
) -> Result<IAsyncOperation<MediaFrameReader>>where
P0: Param<MediaFrameSource>,
pub fn CaptureDeviceExclusiveControlStatusChanged<P0>(
&self,
handler: P0,
) -> Result<EventRegistrationToken>where
P0: Param<TypedEventHandler<MediaCapture, MediaCaptureDeviceExclusiveControlStatusChangedEventArgs>>,
pub fn RemoveCaptureDeviceExclusiveControlStatusChanged( &self, token: EventRegistrationToken, ) -> Result<()>
pub fn CreateMultiSourceFrameReaderAsync<P0>(
&self,
inputsources: P0,
) -> Result<IAsyncOperation<MultiSourceMediaFrameReader>>where
P0: Param<IIterable<MediaFrameSource>>,
pub fn CreateRelativePanelWatcher<P0>(
&self,
capturemode: StreamingCaptureMode,
displayregion: P0,
) -> Result<MediaCaptureRelativePanelWatcher>where
P0: Param<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: Param<MediaEncodingProfile>,
P1: Param<IMediaExtension>,
pub fn StartPreviewToCustomSinkIdAsync<P0, P1>(
&self,
encodingprofile: P0,
customsinkactivationid: &HSTRING,
customsinksettings: P1,
) -> Result<IAsyncAction>where
P0: Param<MediaEncodingProfile>,
P1: Param<IPropertySet>,
pub fn StopPreviewAsync(&self) -> Result<IAsyncAction>
Trait Implementations§
§impl CanInto<IInspectable> for MediaCapture
impl CanInto<IInspectable> for MediaCapture
§impl CanInto<IUnknown> for MediaCapture
impl CanInto<IUnknown> for MediaCapture
§impl Clone for MediaCapture
impl Clone for MediaCapture
§fn clone(&self) -> MediaCapture
fn clone(&self) -> MediaCapture
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read more§impl Debug for MediaCapture
impl Debug for MediaCapture
§impl From<&MediaCapture> for &IInspectable
impl From<&MediaCapture> for &IInspectable
§fn from(value: &MediaCapture) -> Self
fn from(value: &MediaCapture) -> Self
Converts to this type from the input type.
§impl From<&MediaCapture> for &IUnknown
impl From<&MediaCapture> for &IUnknown
§fn from(value: &MediaCapture) -> Self
fn from(value: &MediaCapture) -> Self
Converts to this type from the input type.
§impl From<MediaCapture> for IInspectable
impl From<MediaCapture> for IInspectable
§fn from(value: MediaCapture) -> Self
fn from(value: MediaCapture) -> Self
Converts to this type from the input type.
§impl From<MediaCapture> for IUnknown
impl From<MediaCapture> for IUnknown
§fn from(value: MediaCapture) -> Self
fn from(value: MediaCapture) -> Self
Converts to this type from the input type.
§impl Interface for MediaCapture
impl Interface for MediaCapture
§const IID: GUID = <IMediaCapture as windows_core::Interface>::IID
const IID: GUID = <IMediaCapture as windows_core::Interface>::IID
The
GUID
associated with the interface.§fn as_raw(&self) -> *mut c_void
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
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.
§fn cast<T>(&self) -> Result<T, Error>where
T: Interface,
fn cast<T>(&self) -> Result<T, Error>where
T: Interface,
Attempts to cast the current interface to another interface using
QueryInterface
. Read more§fn cast_to_any<T>(&self) -> Result<&(dyn Any + 'static), Error>where
T: ComObjectInner,
<T as ComObjectInner>::Outer: Any + 'static + IUnknownImpl<Impl = T>,
fn cast_to_any<T>(&self) -> Result<&(dyn Any + 'static), Error>where
T: ComObjectInner,
<T as ComObjectInner>::Outer: Any + 'static + IUnknownImpl<Impl = T>,
This casts the given COM interface to [
&dyn Any
]. Read more§fn is_object<T>(&self) -> boolwhere
T: ComObjectInner,
<T as ComObjectInner>::Outer: Any + 'static + IUnknownImpl<Impl = T>,
fn is_object<T>(&self) -> boolwhere
T: ComObjectInner,
<T as ComObjectInner>::Outer: Any + 'static + IUnknownImpl<Impl = T>,
§fn cast_object_ref<T>(&self) -> Result<&<T as ComObjectInner>::Outer, Error>where
T: ComObjectInner,
<T as ComObjectInner>::Outer: Any + 'static + IUnknownImpl<Impl = T>,
fn cast_object_ref<T>(&self) -> Result<&<T as ComObjectInner>::Outer, Error>where
T: ComObjectInner,
<T as ComObjectInner>::Outer: Any + 'static + IUnknownImpl<Impl = T>,
This casts the given COM interface to [
&dyn Any
]. It returns a reference to the “outer”
object, e.g. &MyApp_Impl
, not the inner &MyApp
object. Read more§fn cast_object<T>(&self) -> Result<ComObject<T>, Error>where
T: ComObjectInner,
<T as ComObjectInner>::Outer: Any + 'static + IUnknownImpl<Impl = T>,
fn cast_object<T>(&self) -> Result<ComObject<T>, Error>where
T: ComObjectInner,
<T as ComObjectInner>::Outer: Any + 'static + IUnknownImpl<Impl = T>,
This casts the given COM interface to [
&dyn Any
]. It returns a reference to the “outer”
object, e.g. MyApp_Impl
, not the inner MyApp
object. Read more§fn downgrade(&self) -> Result<Weak<Self>, Error>
fn downgrade(&self) -> Result<Weak<Self>, Error>
Attempts to create a [
Weak
] reference to this object.§impl PartialEq for MediaCapture
impl PartialEq for MediaCapture
§fn eq(&self, other: &MediaCapture) -> bool
fn eq(&self, other: &MediaCapture) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.impl Eq for MediaCapture
impl StructuralPartialEq for MediaCapture
Auto Trait Implementations§
impl Freeze for MediaCapture
impl RefUnwindSafe for MediaCapture
impl !Send for MediaCapture
impl !Sync for MediaCapture
impl Unpin for MediaCapture
impl UnwindSafe for MediaCapture
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)