4000-520-616
欢迎来到免疫在线!(蚂蚁淘生物旗下平台)  请登录 |  免费注册 |  询价篮
主营:原厂直采,平行进口,授权代理(蚂蚁淘为您服务)
咨询热线电话
4000-520-616
当前位置: 首页 > 新闻动态 >
热卖商品
新闻详情
在wp8中调用captureSource.Start()时发生System.NotSupported-789找
来自 : www.789zhao.com/blog/JEU5KB6RJ 发布时间:2021-03-25

System.NotSupportedException: Specified method is not supportedI\'m getting this error sometimes while calling Start method of captureSource to record video on windows phone 8.

Below is my code :

if (captureSource.VideoCaptureDevice != null captureSource.State == CaptureState.Started) captureSource.Stop(); //UpdateUI(ButtonState.Recording, \"Initializing...\"); //Create Dir If Not Exist if (!IsolatedStorageFile.GetUserStoreForApplication().DirectoryExists(FileLocation)) IsolatedStorageFile.GetUserStoreForApplication().CreateDirectory(FileLocation); DateTime theDate = DateTime.Now; isoVideoFileName = theDate.ToString(\"yyyyMMdd\") + \"_\" + theDate.ToString(\"HHmmss\") + \"_\" + \"Video\" + \".\" + GlobalDTO.VideoFormat; // Connect the input and output of fileSink. captureSource = new CaptureSource(); captureSource.CaptureFailed += new EventHandler ExceptionRoutedEventArgs (OnCaptureFailed); captureSource.CaptureImageCompleted += captureSource_CaptureImageCompleted; fileSink.CaptureSource = captureSource; fileSink.IsolatedStorageFileName = FileLocation + isoVideoFileName; // Begin recording. if (captureSource.VideoCaptureDevice != null captureSource.State == CaptureState.Stopped) videoRecorderBrush.SetSource(captureSource); captureSource.Start(); captureSource.CaptureImageAsync(); // Set the button states and the message. UpdateUI(ButtonState.Recording, \"Recording...\");
Talk1:You need to capture the exception details and put them in an edit. That doesn t mean taking a picture of them, btw.Talk2:I caught the exception but found that InnerException is null , Message is Specified method is not supported. and Source is System.Windows .Talk3:Call stack. You have to learn that the exception details contain everything you need to track down your problem.Solutions1

That feature may not be supported on all phones? That maybe why you are getting that exception. you should catch the exception and handle it in an appropriate way to inform the user the functionality is not supported.

Talk1:Thanks Timmy, but my code is working and I m getting this error sometimes instead everytime.

本文链接: http://dtothewp.immuno-online.com/view-750012.html

发布于 : 2021-03-25 阅读(0)
公司介绍
品牌分类
联络我们
服务热线:4000-520-616
(限工作日9:00-18:00)
QQ :1570468124
手机:18915418616
官网:http://