0
我正在開發Windows Phone 8中的應用程序。基本上在我的應用程序中,我使用PhotoCaptureDevice
API來拍攝快照並掃描條碼。當我繼續使用硬件後退按鈕返回到相機頁面時,有時相機頁面會掛起,無法繼續進行。Photocapture設備相機掛在Windows Phone 8
The code snippet used is :
//Passing Videobrush to PhotoCapturedevice
VideoBrush brush;
brush.SetSource(_device);
//PhotoCapture Device Intialization
internal PhotoCaptureDevice _device;
CameraSensorLocation cameraLocation;
if (PhotoCaptureDevice.AvailableSensorLocations.Contains(CameraSensorLocation.Back))
{
var supportedResolutions = PhotoCaptureDevice.GetAvailableCaptureResolutions(CameraSensorLocation.Back);
_initRes = GetBestResolution(supportedResolutions);
cameraLocation = CameraSensorLocation.Back;
}
else if (PhotoCaptureDevice.AvailableSensorLocations.Contains(CameraSensorLocation.Front))
{
var supportedResolutions = PhotoCaptureDevice.GetAvailableCaptureResolutions(CameraSensorLocation.Front);
_initRes = GetBestResolution(supportedResolutions);
cameraLocation = CameraSensorLocation.Front;
}
你能幫我在這