C# Класс Mvvm.Services.CameraService

Показать файл Открыть проект Примеры использования класса

Private Properties

Свойство Тип Описание
CleanupCameraAsync System.Threading.Tasks.Task
ConvertDisplayOrientationToDegrees int
FindCameraDeviceByPanelAsync Task
InitializeCameraAsync System.Threading.Tasks.Task
MediaCapture_Failed void
SetPreviewRotationAsync System.Threading.Tasks.Task
StartPreviewAsync Task
StopPreviewAsync Task

Открытые методы

Метод Описание
CameraService ( CaptureElement el ) : System

Приватные методы

Метод Описание
CleanupCameraAsync ( ) : System.Threading.Tasks.Task

Cleans up the camera resources (after stopping the preview if necessary) and unregisters from MediaCapture events

ConvertDisplayOrientationToDegrees ( DisplayOrientations orientation ) : int

Converts the given orientation of the app on the screen to the corresponding rotation in degrees

FindCameraDeviceByPanelAsync ( Windows desiredPanel ) : Task

Queries the available video capture devices to try and find one mounted on the desired panel

InitializeCameraAsync ( ) : System.Threading.Tasks.Task
MediaCapture_Failed ( MediaCapture sender, MediaCaptureFailedEventArgs errorEventArgs ) : void
SetPreviewRotationAsync ( ) : System.Threading.Tasks.Task

Gets the current orientation of the UI in relation to the device and applies a corrective rotation to the preview

StartPreviewAsync ( ) : Task

Starts the preview and adjusts it for for rotation and mirroring after making a request to keep the screen on and unlocks the UI

StopPreviewAsync ( ) : Task

Stops the preview and deactivates a display request, to allow the screen to go into power saving modes, and locks the UI

Описание методов

CameraService() публичный Метод

public CameraService ( CaptureElement el ) : System
el Windows.UI.Xaml.Controls.CaptureElement
Результат System