diff options
| author | Luke <luke.pulverenti@gmail.com> | 2017-08-10 14:03:18 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-08-10 14:03:18 -0400 |
| commit | d93d9754c9869378b8baf4c84b63c30f8c3682a8 (patch) | |
| tree | fdf2a4bf00b7e30c094f7c19663e8c86b9ae3cf6 /MediaBrowser.Controller/MediaEncoding | |
| parent | c6f98843fffffe1ddcf9baa348740fef0d6d8e19 (diff) | |
| parent | 773c00861ece4f497d4d8ebbd54edf7d9b42b276 (diff) | |
Merge pull request #2803 from MediaBrowser/dev
Dev
Diffstat (limited to 'MediaBrowser.Controller/MediaEncoding')
3 files changed, 5 insertions, 42 deletions
diff --git a/MediaBrowser.Controller/MediaEncoding/ChapterImageRefreshOptions.cs b/MediaBrowser.Controller/MediaEncoding/ChapterImageRefreshOptions.cs deleted file mode 100644 index e11bd6cdf..000000000 --- a/MediaBrowser.Controller/MediaEncoding/ChapterImageRefreshOptions.cs +++ /dev/null @@ -1,17 +0,0 @@ -using MediaBrowser.Controller.Entities; -using MediaBrowser.Model.Entities; -using System.Collections.Generic; - -namespace MediaBrowser.Controller.MediaEncoding -{ - public class ChapterImageRefreshOptions - { - public Video Video { get; set; } - - public List<ChapterInfo> Chapters { get; set; } - - public bool SaveChapters { get; set; } - - public bool ExtractImages { get; set; } - } -} diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs index 190ccdd9c..1f85a076e 100644 --- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs +++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs @@ -1622,26 +1622,6 @@ namespace MediaBrowser.Controller.MediaEncoding inputModifier += " -f " + inputFormat; } } - - // Only do this for video files due to sometimes unpredictable codec names coming from BDInfo - if (state.VideoType == VideoType.VideoFile && state.RunTimeTicks.HasValue && string.IsNullOrWhiteSpace(encodingOptions.HardwareAccelerationType)) - { - foreach (var stream in state.MediaSource.MediaStreams) - { - if (!stream.IsExternal && stream.Type != MediaStreamType.Subtitle) - { - if (!string.IsNullOrWhiteSpace(stream.Codec) && stream.Index != -1) - { - var decoder = GetDecoderFromCodec(stream.Codec); - - if (!string.IsNullOrWhiteSpace(decoder)) - { - inputModifier += " -codec:" + stream.Index.ToString(_usCulture) + " " + decoder; - } - } - } - } - } } if (state.MediaSource.RequiresLooping) diff --git a/MediaBrowser.Controller/MediaEncoding/IEncodingManager.cs b/MediaBrowser.Controller/MediaEncoding/IEncodingManager.cs index 8683a6af4..81269fe3f 100644 --- a/MediaBrowser.Controller/MediaEncoding/IEncodingManager.cs +++ b/MediaBrowser.Controller/MediaEncoding/IEncodingManager.cs @@ -1,5 +1,8 @@ -using System.Threading; +using System.Collections.Generic; +using System.Threading; using System.Threading.Tasks; +using MediaBrowser.Controller.Entities; +using MediaBrowser.Model.Entities; namespace MediaBrowser.Controller.MediaEncoding { @@ -8,9 +11,6 @@ namespace MediaBrowser.Controller.MediaEncoding /// <summary> /// Refreshes the chapter images. /// </summary> - /// <param name="options">The options.</param> - /// <param name="cancellationToken">The cancellation token.</param> - /// <returns>Task{System.Boolean}.</returns> - Task<bool> RefreshChapterImages(ChapterImageRefreshOptions options, CancellationToken cancellationToken); + Task<bool> RefreshChapterImages(Video video, List<ChapterInfo> chapters, bool extractImages, bool saveChapters, CancellationToken cancellationToken); } } |
