2014-10-17 79 views
3

我正在开发相机应用程序,我需要使用曝光,ISO等高级设置。Windows.Phone.Media.Capture.PhotoCaptureDevice已过时...?

根据this article(2014年8月19日)或this one,我必须使用“PhotoCaptureDevice”类而不是“Camera”类。

问题是,当我使用它的Visual Studio 2013高级版更新3了Windows Phone 8.1的项目,我得到了以下变暖:

'Windows.Phone.Media.Capture.PhotoCaptureDevice'已过时:'Windows.Phone.Media.Capture可能在未来的Windows Phone版本中不可用。从Windows Phone Blue开始,使用Windows.Media.Capture代替'

我想听谁的,Visual Studio或msdn手册?

+0

听起来好像有三个类,其中两个现在已经过时。相机成为Phone.Media.PhotoCaptureDevice,成为Media.Capture; Visual Studio显示最新信息。 – EricLaw 2014-10-17 18:03:19

+0

为什么微软手册没有提到它? – 2014-10-17 18:10:33

+0

因为Microsoft不会每次更新每个MSDN文章并更新其软件。您仍然可以在MSDN上找到许多文章,假设IE5是该产品的最新版本。 – EricLaw 2014-10-17 18:11:42

回答

0

使用非常简单。

完整的示例应用程序,请访问:

MediaCapture class滚动至底部。


至于你高级设置假设你MediaCapture被命名为mc那么这一切都在 的

mc.VideoDeviceController structure 

VideoDeviceController MSDN Link


,你可以设置通过做一些这些设置像这样:

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

感谢您提供这些信息,但我想知道:该示例在Windows运行时项目中使用XAML中的CaptureElement,我正在使用Windows 8.1 Silverlight。我试图使用videoBrush.setSource(mediaCapture),但它不起作用,我应该使用什么? – 2014-10-19 21:01:22