Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
ackava committed Aug 19, 2016
1 parent 28f88b5 commit ec7c4e0
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
21 changes: 14 additions & 7 deletions FFMpeg.Xamarin/FFMpegLibrary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,10 @@ private static int _Run(

process.Start();



Task.Run(async () =>

Task.Run(() =>
{
try
{
Expand All @@ -267,13 +269,12 @@ private static int _Run(
if (line.StartsWith(EndOfFFMPEGLine))
{
// we are assuming that process has finished.. we will exit forcefully
// after 1 minute...
await Task.Delay(TimeSpan.FromMinutes(1));
System.Diagnostics.Debug.WriteLine("Forcing ffmpeg to exit..");
Task.Run(async () => {
await Task.Delay(TimeSpan.FromMinutes(1));
finished = true;
});
process.Kill();
}
} while (!finished);
Expand All @@ -287,7 +288,13 @@ private static int _Run(
}
});

process.WaitForExit();
while (!finished)
{
process.WaitForExit(10000);
if (process.HasExited) {
break;
}
}

return process.ExitCode;

Expand Down
2 changes: 1 addition & 1 deletion FFMpeg.Xamarin/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.28.*")]
[assembly: AssemblyVersion("1.0.29.*")]

2 changes: 1 addition & 1 deletion nuget/Package.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<package >
<metadata>
<id>Xamarin.Android.FFmpeg</id>
<version>1.0.28</version>
<version>1.0.29</version>
<title>FFmpeg binding for Xamarin Android</title>
<authors>akash.kava</authors>
<owners></owners>
Expand Down

0 comments on commit ec7c4e0

Please sign in to comment.