0
Windows Phone 8에서 응용 프로그램을 개발 중입니다. 기본적으로 내 응용 프로그램에서는 스냅을 찍고 바코드를 스캔 할 때 PhotoCaptureDevice
API를 사용합니다. 계속해서 카메라 페이지로 돌아갈 때 하드웨어 백 버튼을 사용하여 가끔씩 카메라 페이지가 멈추고 더 이상 진행할 수 없습니다.Photocapture device 카메라가 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;
}
당신이 brush.SetSource (_device)를 호출하기 전에 photocapture 객체를 초기화해야이