neurospeech / xamarin-android-ffmpeg

Xamarin Android FFMpeg binding
MIT License
30 stars 6 forks source link

Error in VideoConverter Class #6

Closed shadow111 closed 7 years ago

shadow111 commented 8 years ago

Hello, i have install FFmpeg using this command Install-Package Xamarin.Android.FFmpeg and paste the video class on the main activity , but i have many error on those line of code

await FFMpeg.Xamarin.FFMpegLibrary.Run( contex, cmdParams , (s) => { logger?.Invoke(s); int n = Extract(s, "Duration:", ","); if (n != -1) { total = n; } n = Extract(s, "time=", " bitrate="); if (n != -1) { current = n; onProgress?.Invoke(current, total); } });

neurospeech commented 8 years ago

What is exact error?

movAX13h commented 7 years ago

I got the same error (using vs 2013 ultimate, fresh xamarin, fresh xamarin-android-ffmpeg from NuGet). Here's a screenshot... sorry it's German. It says that the await operator can only be used inside an async method and that the return type should be changed to Task<System.Threading.Tasks.Task>

image

Adding async to the method solves it. Maybe the code should be updated. The questionmarks are features of c# 6 which is not (really) available in vs 2013.

neurospeech commented 7 years ago

We are working on the fix, we will be uploading new version pretty soon.