Windows.Phone.Media.Capture.PhotoCaptureDevice已经过时了吗?

3
我正在开发一个相机应用程序,需要使用曝光、ISO等高级设置。
根据这篇文章(2014年8月19日)或这篇文章所述,我必须使用“PhotoCaptureDevice”类而不是“Camera”类。
问题是,当我在带有Windows Phone 8.1项目的Visual Studio Premium 2013更新3上使用它时,我收到了以下警告:
“'Windows.Phone.Media.Capture.PhotoCaptureDevice'已过时:'Windows.Phone.Media.Capture在未来的Windows Phone版本中可能无法使用。从Windows Phone Blue开始,请改用Windows.Media.Capture'。”
我应该听谁的,Visual Studio还是msdn手册?

听起来好像有三个类,其中两个现在已经过时了。Camera 变成了 Phone.Media.PhotoCaptureDevice,后来又变成了 Media.Capture;Visual Studio 显示的是最新信息。 - EricLaw
为什么微软手册没有提到它? - Sebastien Receveur
因为微软不会回头更新每篇 MSDN 文章以适应他们软件的每一次更新。你仍然可以在 MSDN 上找到许多文章,它们认为 IE5 是该产品的最新版本。 - EricLaw
啊,好的!你有“Capture”如何使用的例子吗? - Sebastien Receveur
是 Windows.Media.Capture 还是 Windows.Media.CaptureDevice? - Sebastien Receveur
1个回答

0

使用起来非常简单。

完整的示例应用程序在此处可用:

MediaCapture类 滚动到底部。


关于您的高级设置,假设您的MediaCapture命名为mc,那么所有设置都在其中。
mc.VideoDeviceController structure

VideoDeviceController MSDN 链接


你可以通过类似以下方式来设置这些设置:

// set the brightness (0 representing blanking and 10000 representing pure white)
mc.VideoDeviceController.Brightness.TrySetValue(5000); 

谢谢您提供这些信息,但是我想问一下:示例中使用了XAML中的CaptureElement,它在Windows Runtime项目中有效,而我正在使用Windows 8.1 Silverlight。我尝试使用videoBrush.setSource(mediaCapture),但它不起作用,我应该使用什么? - Sebastien Receveur

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接