From f3e98dde6a82a28e5ba1c8eb2cd57eb5a41d0bd3 Mon Sep 17 00:00:00 2001 From: Luke Date: Tue, 13 Jan 2015 22:02:29 -0500 Subject: [PATCH 1/3] update mac project --- MediaBrowser.Server.Mac/MediaBrowser.Server.Mac.csproj | 6 ------ MediaBrowser.Server.Mac/Native/BaseMonoApp.cs | 2 +- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/MediaBrowser.Server.Mac/MediaBrowser.Server.Mac.csproj b/MediaBrowser.Server.Mac/MediaBrowser.Server.Mac.csproj index 666eb1c10e..25fb839b41 100644 --- a/MediaBrowser.Server.Mac/MediaBrowser.Server.Mac.csproj +++ b/MediaBrowser.Server.Mac/MediaBrowser.Server.Mac.csproj @@ -735,12 +735,6 @@ Resources\dashboard-ui\css\images\mblogoicon.png - - Resources\dashboard-ui\css\images\mblogotextblack.png - - - Resources\dashboard-ui\css\images\mblogotextwhite.png - Resources\dashboard-ui\css\images\rightarrow.png diff --git a/MediaBrowser.Server.Mac/Native/BaseMonoApp.cs b/MediaBrowser.Server.Mac/Native/BaseMonoApp.cs index 576b5b75f1..9821f49ddd 100644 --- a/MediaBrowser.Server.Mac/Native/BaseMonoApp.cs +++ b/MediaBrowser.Server.Mac/Native/BaseMonoApp.cs @@ -67,7 +67,7 @@ namespace MediaBrowser.Server.Mac return list; } - public void AuthorizeServer(int udpPort, int httpServerPort, string tempDirectory) + public void AuthorizeServer(int udpPort, int httpServerPort, int httpsPort, string tempDirectory) { } From af9bd11568e6a8d009d793e4a75aeeb84a3518af Mon Sep 17 00:00:00 2001 From: Bluebull32 Date: Sat, 31 Jan 2015 14:39:16 -0500 Subject: [PATCH 2/3] Update BifService.cs Reversing endianness for integers in the index.bif file. Little Endian is what we want here, so if BitConverter does NOT give us that, then we need to reverse the bytes. --- MediaBrowser.Api/Playback/BifService.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MediaBrowser.Api/Playback/BifService.cs b/MediaBrowser.Api/Playback/BifService.cs index 057d814417..181cdfe896 100644 --- a/MediaBrowser.Api/Playback/BifService.cs +++ b/MediaBrowser.Api/Playback/BifService.cs @@ -155,7 +155,7 @@ namespace MediaBrowser.Api.Playback private byte[] GetBytes(int value) { byte[] bytes = BitConverter.GetBytes(value); - if (BitConverter.IsLittleEndian) + if (!BitConverter.IsLittleEndian) Array.Reverse(bytes); return bytes; } From 9b41a0001c67421493a5ac17caf8b37e56c2156d Mon Sep 17 00:00:00 2001 From: Bluebull32 Date: Sat, 31 Jan 2015 14:44:26 -0500 Subject: [PATCH 3/3] Update MediaEncoder.cs Currently, the extraction routine is giving ffmpeg 2 minutes to get all the thumbnails from a video. For most videos, this is not enough time. Updating the routine here to poll thumbnail output every 2 minutes, and assume that ffmpeg is still doing well if new jpegs are being created. --- .../Encoder/MediaEncoder.cs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs b/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs index e800b4254a..a4ab1c5514 100644 --- a/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs +++ b/MediaBrowser.MediaEncoding/Encoder/MediaEncoder.cs @@ -501,7 +501,21 @@ namespace MediaBrowser.MediaEncoding.Encoder process.Start(); - var ranToCompletion = process.WaitForExit(120000); + // Need to give ffmpeg enough time to make all the thumbnails, which could be a while, + // but we still need to detect if the process hangs. + // Making the assumption that as long as new jpegs are showing up, everything is good. + + bool isResponsive = true; + int lastCount = 0; + + while (isResponsive && !process.WaitForExit(120000)) + { + int jpegCount = Directory.GetFiles(targetDirectory, "*.jpg").Count(); + isResponsive = (jpegCount > lastCount); + lastCount = jpegCount; + } + + bool ranToCompletion = process.HasExited; if (!ranToCompletion) {