C# Class WinRTXamlToolkit.Controls.CameraCaptureControl

Inheritance: Windows.UI.Xaml.Controls.Control
Mostrar archivo Open project: xyzzer/WinRTXamlToolkit

Public Properties

Property Type Description
AudioDeviceIdProperty Windows.UI.Xaml.DependencyProperty
AudioDeviceNameProperty Windows.UI.Xaml.DependencyProperty
AudioDeviceProperty Windows.UI.Xaml.DependencyProperty
PhotoCaptureCountdownSecondsProperty Windows.UI.Xaml.DependencyProperty
PickAudioDeviceAutomaticallyProperty Windows.UI.Xaml.DependencyProperty
PickVideoDeviceAutomaticallyProperty Windows.UI.Xaml.DependencyProperty
PreferredCameraTypeProperty Windows.UI.Xaml.DependencyProperty
ShowOnLoadProperty Windows.UI.Xaml.DependencyProperty
StreamingCaptureModeProperty Windows.UI.Xaml.DependencyProperty
VideoDeviceEnclosureLocationProperty Windows.UI.Xaml.DependencyProperty
VideoDeviceIdProperty Windows.UI.Xaml.DependencyProperty
VideoDeviceNameProperty Windows.UI.Xaml.DependencyProperty
VideoDeviceProperty Windows.UI.Xaml.DependencyProperty
VideoEncodingQualityProperty Windows.UI.Xaml.DependencyProperty

Private Properties

Property Type Description
CheckStreamingCaptureModeConfiguration bool
FindAudioCaptureDevicesAsync System.Threading.Tasks.Task
FindVideoCaptureDevicesAsync System.Threading.Tasks.Task
InitializeAsync Task
OnAudioDeviceIdChanged void
OnCameraFailed void
OnLoaded void
OnMediaCaptureFailed void
OnStreamingCaptureModeChanged void
OnUnloaded void
OnVideoDeviceIdChanged void
ShowMicrophoneSelectorAsync Task
ShowWebCamSelectorAsync Task
StartPreviewAsync Task
TraceDeviceDetails void

Public Methods

Method Description
CameraCaptureControl ( ) : System

Initializes a new instance of the CameraCaptureControl class.

CapturePhotoToStorageFileAsync ( StorageFolder folder = null, string fileName = null, string defaultExtension = ".jpg" ) : Task

Captures the photo to storage file asynchronously.

CapturePhotoToStreamAsync ( IRandomAccessStream stream, ImageEncodingProperties imageEncodingProperties ) : System.Threading.Tasks.Task

Captures a photo to a stream asynchronously.

CycleCamerasAsync ( ) : Task

Cycles the cameras asynchronously.

HideAsync ( ) : System.Threading.Tasks.Task

Hides the camera preview asynchronously.

ShowAsync ( ) : Task

Shows the preview asynchronously (completes when the camera is initialized)..

StartVideoCaptureAsync ( StorageFolder folder = null, string fileName = null ) : Task

Starts the video capture asynchronously.

StopCaptureAsync ( ) : Task

Stops the video capture.

Protected Methods

Method Description
OnApplyTemplate ( ) : void

Invoked whenever application code or internal processes (such as a rebuilding layout pass) call ApplyTemplate. In simplest terms, this means the method is called just before a UI element displays in your app. Override this method to influence the default post-template logic of a class.

OnAudioDeviceIdChanged ( string oldAudioDeviceId, string newAudioDeviceId ) : void

Provides derived classes an opportunity to handle changes to the AudioDeviceId property.

OnStreamingCaptureModeChanged ( StreamingCaptureMode oldStreamingCaptureMode, StreamingCaptureMode newStreamingCaptureMode ) : void

Provides derived classes an opportunity to handle changes to the StreamingCaptureMode property.

OnVideoDeviceIdChanged ( string oldVideoDeviceId, string newVideoDeviceId ) : void

Provides derived classes an opportunity to handle changes to the VideoDeviceId property.

Private Methods

Method Description
CheckStreamingCaptureModeConfiguration ( ) : bool
FindAudioCaptureDevicesAsync ( ) : System.Threading.Tasks.Task
FindVideoCaptureDevicesAsync ( ) : System.Threading.Tasks.Task
InitializeAsync ( ) : Task

Performs the one time initialization and shows the preview (if video).

OnAudioDeviceIdChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Handles changes to the AudioDeviceId property.

OnCameraFailed ( object sender, MediaCaptureFailedEventArgs e ) : void
OnLoaded ( object sender, RoutedEventArgs e ) : void
OnMediaCaptureFailed ( MediaCapture sender, MediaCaptureFailedEventArgs errorEventArgs ) : void
OnStreamingCaptureModeChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Handles changes to the StreamingCaptureMode property.

OnUnloaded ( object sender, RoutedEventArgs e ) : void
OnVideoDeviceIdChanged ( DependencyObject d, DependencyPropertyChangedEventArgs e ) : void

Handles changes to the VideoDeviceId property.

ShowMicrophoneSelectorAsync ( ) : Task
ShowWebCamSelectorAsync ( ) : Task
StartPreviewAsync ( ) : Task
TraceDeviceDetails ( ) : void

Method Details

CameraCaptureControl() public method

Initializes a new instance of the CameraCaptureControl class.
public CameraCaptureControl ( ) : System
return System

CapturePhotoToStorageFileAsync() public method

Captures the photo to storage file asynchronously.
public CapturePhotoToStorageFileAsync ( StorageFolder folder = null, string fileName = null, string defaultExtension = ".jpg" ) : Task
folder Windows.Storage.StorageFolder The folder.
fileName string Name of the file.
defaultExtension string The default extension.
return Task

CapturePhotoToStreamAsync() public method

Captures a photo to a stream asynchronously.
public CapturePhotoToStreamAsync ( IRandomAccessStream stream, ImageEncodingProperties imageEncodingProperties ) : System.Threading.Tasks.Task
stream IRandomAccessStream The stream.
imageEncodingProperties Windows.Media.MediaProperties.ImageEncodingProperties The image encoding properties.
return System.Threading.Tasks.Task

CycleCamerasAsync() public method

Cycles the cameras asynchronously.
public CycleCamerasAsync ( ) : Task
return Task

HideAsync() public method

Hides the camera preview asynchronously.
public HideAsync ( ) : System.Threading.Tasks.Task
return System.Threading.Tasks.Task

OnApplyTemplate() protected method

Invoked whenever application code or internal processes (such as a rebuilding layout pass) call ApplyTemplate. In simplest terms, this means the method is called just before a UI element displays in your app. Override this method to influence the default post-template logic of a class.
protected OnApplyTemplate ( ) : void
return void

OnAudioDeviceIdChanged() protected method

Provides derived classes an opportunity to handle changes to the AudioDeviceId property.
protected OnAudioDeviceIdChanged ( string oldAudioDeviceId, string newAudioDeviceId ) : void
oldAudioDeviceId string The old AudioDeviceId value
newAudioDeviceId string The new AudioDeviceId value
return void

OnStreamingCaptureModeChanged() protected method

Provides derived classes an opportunity to handle changes to the StreamingCaptureMode property.
protected OnStreamingCaptureModeChanged ( StreamingCaptureMode oldStreamingCaptureMode, StreamingCaptureMode newStreamingCaptureMode ) : void
oldStreamingCaptureMode StreamingCaptureMode The old StreamingCaptureMode value
newStreamingCaptureMode StreamingCaptureMode The new StreamingCaptureMode value
return void

OnVideoDeviceIdChanged() protected method

Provides derived classes an opportunity to handle changes to the VideoDeviceId property.
protected OnVideoDeviceIdChanged ( string oldVideoDeviceId, string newVideoDeviceId ) : void
oldVideoDeviceId string The old VideoDeviceId value
newVideoDeviceId string The new VideoDeviceId value
return void

ShowAsync() public method

Shows the preview asynchronously (completes when the camera is initialized)..
public ShowAsync ( ) : Task
return Task

StartVideoCaptureAsync() public method

Starts the video capture asynchronously.
public StartVideoCaptureAsync ( StorageFolder folder = null, string fileName = null ) : Task
folder Windows.Storage.StorageFolder The folder.
fileName string Name of the file.
return Task

StopCaptureAsync() public method

Stops the video capture.
public StopCaptureAsync ( ) : Task
return Task

Property Details

AudioDeviceIdProperty public_oe static_oe property

AudioDeviceId Dependency Property
public static DependencyProperty,Windows.UI.Xaml AudioDeviceIdProperty
return Windows.UI.Xaml.DependencyProperty

AudioDeviceNameProperty public_oe static_oe property

AudioDeviceName Dependency Property
public static DependencyProperty,Windows.UI.Xaml AudioDeviceNameProperty
return Windows.UI.Xaml.DependencyProperty

AudioDeviceProperty public_oe static_oe property

AudioDevice Dependency Property
public static DependencyProperty,Windows.UI.Xaml AudioDeviceProperty
return Windows.UI.Xaml.DependencyProperty

PhotoCaptureCountdownSecondsProperty public_oe static_oe property

PhotoCaptureCountdownSeconds Dependency Property
public static DependencyProperty,Windows.UI.Xaml PhotoCaptureCountdownSecondsProperty
return Windows.UI.Xaml.DependencyProperty

PickAudioDeviceAutomaticallyProperty public_oe static_oe property

PickAudioDeviceAutomatically Dependency Property
public static DependencyProperty,Windows.UI.Xaml PickAudioDeviceAutomaticallyProperty
return Windows.UI.Xaml.DependencyProperty

PickVideoDeviceAutomaticallyProperty public_oe static_oe property

PickVideoDeviceAutomatically Dependency Property
public static DependencyProperty,Windows.UI.Xaml PickVideoDeviceAutomaticallyProperty
return Windows.UI.Xaml.DependencyProperty

PreferredCameraTypeProperty public_oe static_oe property

The preferred camera type property.
public static DependencyProperty,Windows.UI.Xaml PreferredCameraTypeProperty
return Windows.UI.Xaml.DependencyProperty

ShowOnLoadProperty public_oe static_oe property

The ShowOnLoadProperty.
public static DependencyProperty,Windows.UI.Xaml ShowOnLoadProperty
return Windows.UI.Xaml.DependencyProperty

StreamingCaptureModeProperty public_oe static_oe property

StreamingCaptureMode Dependency Property
public static DependencyProperty,Windows.UI.Xaml StreamingCaptureModeProperty
return Windows.UI.Xaml.DependencyProperty

VideoDeviceEnclosureLocationProperty public_oe static_oe property

VideoDeviceEnclosureLocation Dependency Property
public static DependencyProperty,Windows.UI.Xaml VideoDeviceEnclosureLocationProperty
return Windows.UI.Xaml.DependencyProperty

VideoDeviceIdProperty public_oe static_oe property

VideoDeviceId Dependency Property
public static DependencyProperty,Windows.UI.Xaml VideoDeviceIdProperty
return Windows.UI.Xaml.DependencyProperty

VideoDeviceNameProperty public_oe static_oe property

VideoDeviceName Dependency Property
public static DependencyProperty,Windows.UI.Xaml VideoDeviceNameProperty
return Windows.UI.Xaml.DependencyProperty

VideoDeviceProperty public_oe static_oe property

VideoDevice Dependency Property
public static DependencyProperty,Windows.UI.Xaml VideoDeviceProperty
return Windows.UI.Xaml.DependencyProperty

VideoEncodingQualityProperty public_oe static_oe property

VideoEncodingQuality Dependency Property
public static DependencyProperty,Windows.UI.Xaml VideoEncodingQualityProperty
return Windows.UI.Xaml.DependencyProperty