我已经设法为 Windows Phone 8 应用程序设置代码,该应用程序初始化并可以使用 AudioVideoCaptureDevice 开始/停止录制视频。(将其保存到 IRandomAccessStream)
//Initialize Camera Recording
Windows.Foundation.Size resolution = new Windows.Foundation.Size(640, 480);
captureDevice = await AudioVideoCaptureDevice.OpenAsync(CameraSensorLocation.Back, resolution);
captureDevice.VideoEncodingFormat = CameraCaptureVideoFormat.H264;
captureDevice.AudioEncodingFormat = CameraCaptureAudioFormat.Aac;
captureDevice.RecordingFailed += captureDevice_RecordingFailed;
但是,我无法弄清楚如何将此记录连接到 VideoBrush 以向用户显示记录。我希望用户能够看到他们正在录制的视频......
我知道有一个教程展示了如何使用 Windows Phone 7 的旧 API(CaptureSource、VideoDevice 等)来执行此操作,但我特别需要使用 AudioVideoCaptureDevice 进行录制。有人知道如何在屏幕上显示此视频吗?