Windows Phone 8.1 앱의 경우 비디오를 녹화해야합니다. MediaCapture 리소스를 올바르게 정리하십시오.
나는이 지침을 사용하고는 ... 기본적으로 http://msdn.microsoft.com/en-us/library/windows/apps/xaml/hh868171.aspx작동 ...하지만 난 App.xaml.cs를
public MediaCapture MediaCapture { get; set; }
public CaptureElement PreviewElement { get; set; }
public bool IsRecording { get; set; }
public bool IsPreviewing { get; set; }
public async Task CleanupCaptureResources()
{
if (IsRecording && MediaCapture != null)
{
await MediaCapture.StopRecordAsync();
IsRecording = false;
}
if (IsPreviewing && MediaCapture != null)
{
await MediaCapture.StopPreviewAsync();
IsPreviewing = false;
}
if (MediaCapture != null)
{
if (PreviewElement != null)
{
PreviewElement.Source = null;
}
MediaCapture.Dispose();
}
}
private async void OnSuspending(object sender, SuspendingEventArgs e)
{
var deferral = e.SuspendingOperation.GetDeferral();
//cleanup camera resources
await CleanupCaptureResources();
deferral.Complete();
}
내가 돈 '내 청소 부분을하지 않습니다 App.xaml.cs와 VideoRec.xaml (미리보기 요소와 관련된) 간의 연결이 어떻게 작동하는지 알아보십시오. 이것은 아마도 매우 기본적인 것입니다 ... 나는 모든 힌트 또는 초보자를위한 튜토리얼에 대한 링크가 MediaCapture를 전혀 다루지 않는 것에 대해 매우 감사하고 있습니다. 내가 찾은 모든 것은 진보 된 것입니다.