From f6b94af438da8f8d3b3760c3e67eb24b09bafbfd Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Wed, 29 Mar 2017 02:27:22 -0400 Subject: enable qsv hevc decoding --- MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs') diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs index b7b31509c..530ff1343 100644 --- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs +++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs @@ -1713,13 +1713,13 @@ namespace MediaBrowser.Controller.MediaEncoding return "-c:v h264_qsv "; } break; - //case "hevc": - //case "h265": - // if (_mediaEncoder.SupportsDecoder("hevc_qsv")) - // { - // return "-c:v hevc_qsv "; - // } - // break; + case "hevc": + case "h265": + if (_mediaEncoder.SupportsDecoder("hevc_qsv")) + { + return "-c:v hevc_qsv "; + } + break; case "mpeg2video": if (_mediaEncoder.SupportsDecoder("mpeg2_qsv")) { -- cgit v1.2.3 From f641c501a78d6270793ee9c9fa185517be6df008 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Wed, 29 Mar 2017 15:16:43 -0400 Subject: improve cancellation support of auto-organize --- .../Networking/NetworkManager.cs | 6 +----- .../FileOrganization/TvFolderOrganizer.cs | 7 +++++++ Emby.Server.Implementations/LiveTv/LiveStreamHelper.cs | 5 +++++ Emby.Server.Implementations/LiveTv/LiveTvManager.cs | 18 +++++++++--------- .../LiveTv/LiveTvMediaSourceProvider.cs | 6 +++--- MediaBrowser.Controller/LiveTv/ILiveTvManager.cs | 2 +- .../MediaEncoding/EncodingHelper.cs | 10 ++++++++++ MediaBrowser.Model/Entities/MediaStream.cs | 7 +++++++ MediaBrowser.Model/Net/IpAddressInfo.cs | 10 +++++----- RSSDP/SsdpCommunicationsServer.cs | 5 +---- 10 files changed, 49 insertions(+), 27 deletions(-) (limited to 'MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs') diff --git a/Emby.Common.Implementations/Networking/NetworkManager.cs b/Emby.Common.Implementations/Networking/NetworkManager.cs index 2b84b2aa1..2f218656c 100644 --- a/Emby.Common.Implementations/Networking/NetworkManager.cs +++ b/Emby.Common.Implementations/Networking/NetworkManager.cs @@ -500,11 +500,7 @@ namespace Emby.Common.Implementations.Networking { return IpAddressInfo.IPv6Loopback; } - return new IpAddressInfo - { - Address = address.ToString(), - AddressFamily = address.AddressFamily == AddressFamily.InterNetworkV6 ? IpAddressFamily.InterNetworkV6 : IpAddressFamily.InterNetwork - }; + return new IpAddressInfo(address.ToString(), address.AddressFamily == AddressFamily.InterNetworkV6 ? IpAddressFamily.InterNetworkV6 : IpAddressFamily.InterNetwork); } public async Task GetHostAddressesAsync(string host) diff --git a/Emby.Server.Implementations/FileOrganization/TvFolderOrganizer.cs b/Emby.Server.Implementations/FileOrganization/TvFolderOrganizer.cs index b035fdcfd..807f1694c 100644 --- a/Emby.Server.Implementations/FileOrganization/TvFolderOrganizer.cs +++ b/Emby.Server.Implementations/FileOrganization/TvFolderOrganizer.cs @@ -72,17 +72,24 @@ namespace Emby.Server.Implementations.FileOrganization foreach (var file in eligibleFiles) { + cancellationToken.ThrowIfCancellationRequested(); + var organizer = new EpisodeFileOrganizer(_organizationService, _config, _fileSystem, _logger, _libraryManager, _libraryMonitor, _providerManager); try { var result = await organizer.OrganizeEpisodeFile(file.FullName, options, options.TvOptions.OverwriteExistingEpisodes, cancellationToken).ConfigureAwait(false); + if (result.Status == FileSortingStatus.Success && !processedFolders.Contains(file.DirectoryName, StringComparer.OrdinalIgnoreCase)) { processedFolders.Add(file.DirectoryName); } } + catch (OperationCanceledException) + { + break; + } catch (Exception ex) { _logger.ErrorException("Error organizing episode {0}", ex, file.FullName); diff --git a/Emby.Server.Implementations/LiveTv/LiveStreamHelper.cs b/Emby.Server.Implementations/LiveTv/LiveStreamHelper.cs index 9a8a930bd..3906df000 100644 --- a/Emby.Server.Implementations/LiveTv/LiveStreamHelper.cs +++ b/Emby.Server.Implementations/LiveTv/LiveStreamHelper.cs @@ -6,6 +6,7 @@ using System.Threading.Tasks; using MediaBrowser.Controller.MediaEncoding; using MediaBrowser.Model.Dlna; using MediaBrowser.Model.Dto; +using MediaBrowser.Model.Entities; using MediaBrowser.Model.Logging; namespace Emby.Server.Implementations.LiveTv @@ -29,6 +30,8 @@ namespace Emby.Server.Implementations.LiveTv var now = DateTime.UtcNow; + var allowVideoStreamCopy = mediaSource.MediaStreams.Any(i => i.Type == MediaStreamType.Video && i.AllowStreamCopy); + var info = await _mediaEncoder.GetMediaInfo(new MediaInfoRequest { InputPath = mediaSource.Path, @@ -73,6 +76,8 @@ namespace Emby.Server.Implementations.LiveTv var videoStream = mediaSource.MediaStreams.FirstOrDefault(i => i.Type == MediaBrowser.Model.Entities.MediaStreamType.Video); if (videoStream != null) { + videoStream.AllowStreamCopy = allowVideoStreamCopy; + if (!videoStream.BitRate.HasValue) { var width = videoStream.Width ?? 1920; diff --git a/Emby.Server.Implementations/LiveTv/LiveTvManager.cs b/Emby.Server.Implementations/LiveTv/LiveTvManager.cs index b9e73b62e..1c43b4188 100644 --- a/Emby.Server.Implementations/LiveTv/LiveTvManager.cs +++ b/Emby.Server.Implementations/LiveTv/LiveTvManager.cs @@ -261,7 +261,7 @@ namespace Emby.Server.Implementations.LiveTv return info.Item1; } - public Task> GetChannelStream(string id, string mediaSourceId, CancellationToken cancellationToken) + public Task> GetChannelStream(string id, string mediaSourceId, CancellationToken cancellationToken) { return GetLiveStream(id, mediaSourceId, true, cancellationToken); } @@ -323,7 +323,7 @@ namespace Emby.Server.Implementations.LiveTv return _services.FirstOrDefault(i => string.Equals(i.Name, name, StringComparison.OrdinalIgnoreCase)); } - private async Task> GetLiveStream(string id, string mediaSourceId, bool isChannel, CancellationToken cancellationToken) + private async Task> GetLiveStream(string id, string mediaSourceId, bool isChannel, CancellationToken cancellationToken) { if (string.Equals(id, mediaSourceId, StringComparison.OrdinalIgnoreCase)) { @@ -334,7 +334,6 @@ namespace Emby.Server.Implementations.LiveTv bool isVideo; ILiveTvService service; IDirectStreamProvider directStreamProvider = null; - var assumeInterlaced = false; if (isChannel) { @@ -383,12 +382,7 @@ namespace Emby.Server.Implementations.LiveTv Normalize(info, service, isVideo); - if (!(service is EmbyTV.EmbyTV)) - { - assumeInterlaced = true; - } - - return new Tuple(info, directStreamProvider, assumeInterlaced); + return new Tuple(info, directStreamProvider); } private void Normalize(MediaSourceInfo mediaSource, ILiveTvService service, bool isVideo) @@ -492,6 +486,12 @@ namespace Emby.Server.Implementations.LiveTv { stream.NalLengthSize = "0"; } + + if (stream.Type == MediaStreamType.Video) + { + stream.IsInterlaced = true; + stream.AllowStreamCopy = false; + } } } } diff --git a/Emby.Server.Implementations/LiveTv/LiveTvMediaSourceProvider.cs b/Emby.Server.Implementations/LiveTv/LiveTvMediaSourceProvider.cs index 747e0fdd3..a9c449f83 100644 --- a/Emby.Server.Implementations/LiveTv/LiveTvMediaSourceProvider.cs +++ b/Emby.Server.Implementations/LiveTv/LiveTvMediaSourceProvider.cs @@ -104,7 +104,7 @@ namespace Emby.Server.Implementations.LiveTv openKeys.Add(item.Id.ToString("N")); openKeys.Add(source.Id ?? string.Empty); source.OpenToken = string.Join(StreamIdDelimeterString, openKeys.ToArray()); - } + } // Dummy this up so that direct play checks can still run if (string.IsNullOrEmpty(source.Path) && source.Protocol == MediaProtocol.Http) @@ -142,7 +142,7 @@ namespace Emby.Server.Implementations.LiveTv { if (!stream.SupportsProbing || stream.MediaStreams.Any(i => i.Index != -1)) { - await AddMediaInfo(stream, isAudio, cancellationToken).ConfigureAwait(false); + AddMediaInfo(stream, isAudio, cancellationToken); } else { @@ -158,7 +158,7 @@ namespace Emby.Server.Implementations.LiveTv return new Tuple(stream, directStreamProvider); } - private async Task AddMediaInfo(MediaSourceInfo mediaSource, bool isAudio, CancellationToken cancellationToken) + private void AddMediaInfo(MediaSourceInfo mediaSource, bool isAudio, CancellationToken cancellationToken) { mediaSource.DefaultSubtitleStreamIndex = null; diff --git a/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs b/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs index 5242c5b1f..c8fa6be8c 100644 --- a/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs +++ b/MediaBrowser.Controller/LiveTv/ILiveTvManager.cs @@ -157,7 +157,7 @@ namespace MediaBrowser.Controller.LiveTv /// The media source identifier. /// The cancellation token. /// Task{StreamResponseInfo}. - Task> GetChannelStream(string id, string mediaSourceId, CancellationToken cancellationToken); + Task> GetChannelStream(string id, string mediaSourceId, CancellationToken cancellationToken); /// /// Gets the program. diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs index 530ff1343..dd31d39b1 100644 --- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs +++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs @@ -743,6 +743,11 @@ namespace MediaBrowser.Controller.MediaEncoding public bool CanStreamCopyVideo(EncodingJobInfo state, MediaStream videoStream) { + if (!videoStream.AllowStreamCopy) + { + return false; + } + var request = state.BaseRequest; if (videoStream.IsInterlaced) @@ -883,6 +888,11 @@ namespace MediaBrowser.Controller.MediaEncoding public bool CanStreamCopyAudio(EncodingJobInfo state, MediaStream audioStream, List supportedAudioCodecs) { + if (!audioStream.AllowStreamCopy) + { + return false; + } + var request = state.BaseRequest; // Source and target codecs must match diff --git a/MediaBrowser.Model/Entities/MediaStream.cs b/MediaBrowser.Model/Entities/MediaStream.cs index 3cd3e7dde..133b9e566 100644 --- a/MediaBrowser.Model/Entities/MediaStream.cs +++ b/MediaBrowser.Model/Entities/MediaStream.cs @@ -13,6 +13,11 @@ namespace MediaBrowser.Model.Entities [DebuggerDisplay("StreamType = {Type}")] public class MediaStream { + public MediaStream() + { + AllowStreamCopy = true; + } + /// /// Gets or sets the codec. /// @@ -153,6 +158,8 @@ namespace MediaBrowser.Model.Entities public bool? IsAVC { get; set; } + public bool AllowStreamCopy { get; set; } + /// /// Gets or sets the channel layout. /// diff --git a/MediaBrowser.Model/Net/IpAddressInfo.cs b/MediaBrowser.Model/Net/IpAddressInfo.cs index 00a16c03d..57a0039c4 100644 --- a/MediaBrowser.Model/Net/IpAddressInfo.cs +++ b/MediaBrowser.Model/Net/IpAddressInfo.cs @@ -12,13 +12,13 @@ namespace MediaBrowser.Model.Net public string Address { get; set; } public IpAddressFamily AddressFamily { get; set; } - public IpAddressInfo() - { - - } - public IpAddressInfo(string address, IpAddressFamily addressFamily) { + if (string.IsNullOrWhiteSpace(address)) + { + throw new ArgumentNullException("address"); + } + Address = address; AddressFamily = addressFamily; } diff --git a/RSSDP/SsdpCommunicationsServer.cs b/RSSDP/SsdpCommunicationsServer.cs index cc464e689..e9dc4c54f 100644 --- a/RSSDP/SsdpCommunicationsServer.cs +++ b/RSSDP/SsdpCommunicationsServer.cs @@ -247,10 +247,7 @@ namespace Rssdp.Infrastructure { await SendMessageIfSocketNotDisposed(messageData, new IpEndPointInfo { - IpAddress = new IpAddressInfo - { - Address = SsdpConstants.MulticastLocalAdminAddress - }, + IpAddress = new IpAddressInfo(SsdpConstants.MulticastLocalAdminAddress, IpAddressFamily.InterNetwork), Port = SsdpConstants.MulticastPort }, cancellationToken).ConfigureAwait(false); -- cgit v1.2.3 From 8d1ca8ca2718b61b6167ffd6dfe61af0c75c7257 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Fri, 31 Mar 2017 15:50:55 -0400 Subject: improve direct play to transcoding fallback --- .../Emby.Server.Implementations.csproj | 4 ++-- .../LiveTv/Listings/XmlTvListingsProvider.cs | 4 ++-- Emby.Server.Implementations/packages.config | 2 +- MediaBrowser.Api/Playback/MediaInfoService.cs | 23 +++++++++++++++++----- .../MediaEncoding/EncodingHelper.cs | 18 +++++++++++++++++ .../MediaEncoding/EncodingJobOptions.cs | 5 +++++ .../MediaInfo/PlaybackInfoRequest.cs | 4 ++++ 7 files changed, 50 insertions(+), 10 deletions(-) (limited to 'MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs') diff --git a/Emby.Server.Implementations/Emby.Server.Implementations.csproj b/Emby.Server.Implementations/Emby.Server.Implementations.csproj index 670acd37f..5166d5413 100644 --- a/Emby.Server.Implementations/Emby.Server.Implementations.csproj +++ b/Emby.Server.Implementations/Emby.Server.Implementations.csproj @@ -296,8 +296,8 @@ {4f26d5d8-a7b0-42b3-ba42-7cb7d245934e} SocketHttpListener.Portable - - ..\packages\Emby.XmlTv.1.0.7\lib\portable-net45+win8\Emby.XmlTv.dll + + ..\packages\Emby.XmlTv.1.0.8\lib\portable-net45+win8\Emby.XmlTv.dll True diff --git a/Emby.Server.Implementations/LiveTv/Listings/XmlTvListingsProvider.cs b/Emby.Server.Implementations/LiveTv/Listings/XmlTvListingsProvider.cs index 21c4006a6..fc0a826b4 100644 --- a/Emby.Server.Implementations/LiveTv/Listings/XmlTvListingsProvider.cs +++ b/Emby.Server.Implementations/LiveTv/Listings/XmlTvListingsProvider.cs @@ -268,12 +268,12 @@ namespace Emby.Server.Implementations.LiveTv.Listings var results = reader.GetChannels(); // Should this method be async? - return results.Select(c => new ChannelInfo() + return results.Select(c => new ChannelInfo { Id = c.Id, Name = c.DisplayName, ImageUrl = c.Icon != null && !String.IsNullOrEmpty(c.Icon.Source) ? c.Icon.Source : null, - Number = c.Id + Number = string.IsNullOrWhiteSpace(c.Number) ? c.Id : c.Number }).ToList(); } diff --git a/Emby.Server.Implementations/packages.config b/Emby.Server.Implementations/packages.config index ccabbc27b..ac4e885c7 100644 --- a/Emby.Server.Implementations/packages.config +++ b/Emby.Server.Implementations/packages.config @@ -1,6 +1,6 @@  - + diff --git a/MediaBrowser.Api/Playback/MediaInfoService.cs b/MediaBrowser.Api/Playback/MediaInfoService.cs index 4e4e8858e..0ee0dab30 100644 --- a/MediaBrowser.Api/Playback/MediaInfoService.cs +++ b/MediaBrowser.Api/Playback/MediaInfoService.cs @@ -127,7 +127,7 @@ namespace MediaBrowser.Api.Playback SetDeviceSpecificData(item, result.MediaSource, profile, authInfo, request.MaxStreamingBitrate, request.StartTimeTicks ?? 0, result.MediaSource.Id, request.AudioStreamIndex, - request.SubtitleStreamIndex, request.MaxAudioChannels, request.PlaySessionId, request.UserId, true, true, true, true); + request.SubtitleStreamIndex, request.MaxAudioChannels, request.PlaySessionId, request.UserId, true, true, true, true, true, true); } else { @@ -169,7 +169,7 @@ namespace MediaBrowser.Api.Playback { var mediaSourceId = request.MediaSourceId; - SetDeviceSpecificData(request.Id, info, profile, authInfo, request.MaxStreamingBitrate ?? profile.MaxStreamingBitrate, request.StartTimeTicks ?? 0, mediaSourceId, request.AudioStreamIndex, request.SubtitleStreamIndex, request.MaxAudioChannels, request.UserId, request.EnableDirectPlay, request.ForceDirectPlayRemoteMediaSource, request.EnableDirectStream, request.EnableTranscoding); + SetDeviceSpecificData(request.Id, info, profile, authInfo, request.MaxStreamingBitrate ?? profile.MaxStreamingBitrate, request.StartTimeTicks ?? 0, mediaSourceId, request.AudioStreamIndex, request.SubtitleStreamIndex, request.MaxAudioChannels, request.UserId, request.EnableDirectPlay, request.ForceDirectPlayRemoteMediaSource, request.EnableDirectStream, request.EnableTranscoding, request.AllowVideoStreamCopy, request.AllowAudioStreamCopy); } return info; @@ -255,13 +255,15 @@ namespace MediaBrowser.Api.Playback bool enableDirectPlay, bool forceDirectPlayRemoteMediaSource, bool enableDirectStream, - bool enableTranscoding) + bool enableTranscoding, + bool allowVideoStreamCopy, + bool allowAudioStreamCopy) { var item = _libraryManager.GetItemById(itemId); foreach (var mediaSource in result.MediaSources) { - SetDeviceSpecificData(item, mediaSource, profile, auth, maxBitrate, startTimeTicks, mediaSourceId, audioStreamIndex, subtitleStreamIndex, maxAudioChannels, result.PlaySessionId, userId, enableDirectPlay, forceDirectPlayRemoteMediaSource, enableDirectStream, enableTranscoding); + SetDeviceSpecificData(item, mediaSource, profile, auth, maxBitrate, startTimeTicks, mediaSourceId, audioStreamIndex, subtitleStreamIndex, maxAudioChannels, result.PlaySessionId, userId, enableDirectPlay, forceDirectPlayRemoteMediaSource, enableDirectStream, enableTranscoding, allowVideoStreamCopy, allowAudioStreamCopy); } SortMediaSources(result, maxBitrate); @@ -282,7 +284,9 @@ namespace MediaBrowser.Api.Playback bool enableDirectPlay, bool forceDirectPlayRemoteMediaSource, bool enableDirectStream, - bool enableTranscoding) + bool enableTranscoding, + bool allowVideoStreamCopy, + bool allowAudioStreamCopy) { var streamBuilder = new StreamBuilder(_mediaEncoder, Logger); @@ -418,6 +422,15 @@ namespace MediaBrowser.Api.Playback { streamInfo.StartPositionTicks = startTimeTicks; mediaSource.TranscodingUrl = streamInfo.ToUrl("-", auth.Token).TrimStart('-'); + + if (!allowVideoStreamCopy) + { + mediaSource.TranscodingUrl += "&allowVideoStreamCopy=false"; + } + if (!allowAudioStreamCopy) + { + mediaSource.TranscodingUrl += "&allowAudioStreamCopy=false"; + } mediaSource.TranscodingContainer = streamInfo.Container; mediaSource.TranscodingSubProtocol = streamInfo.SubProtocol; } diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs index dd31d39b1..996009524 100644 --- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs +++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs @@ -188,6 +188,14 @@ namespace MediaBrowser.Controller.MediaEncoding { return null; } + if (string.Equals(container, "ogm", StringComparison.OrdinalIgnoreCase)) + { + return null; + } + if (string.Equals(container, "divx", StringComparison.OrdinalIgnoreCase)) + { + return null; + } // Seeing reported failures here, not sure yet if this is related to specfying input format if (string.Equals(container, "m4v", StringComparison.OrdinalIgnoreCase)) @@ -750,6 +758,11 @@ namespace MediaBrowser.Controller.MediaEncoding var request = state.BaseRequest; + if (!request.AllowVideoStreamCopy) + { + return false; + } + if (videoStream.IsInterlaced) { if (request.DeInterlace) @@ -895,6 +908,11 @@ namespace MediaBrowser.Controller.MediaEncoding var request = state.BaseRequest; + if (!request.AllowAudioStreamCopy) + { + return false; + } + // Source and target codecs must match if (string.IsNullOrEmpty(audioStream.Codec) || !supportedAudioCodecs.Contains(audioStream.Codec, StringComparer.OrdinalIgnoreCase)) { diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingJobOptions.cs b/MediaBrowser.Controller/MediaEncoding/EncodingJobOptions.cs index 73be78dc9..f044db3d0 100644 --- a/MediaBrowser.Controller/MediaEncoding/EncodingJobOptions.cs +++ b/MediaBrowser.Controller/MediaEncoding/EncodingJobOptions.cs @@ -72,6 +72,9 @@ namespace MediaBrowser.Controller.MediaEncoding [ApiMember(Name = "EnableAutoStreamCopy", Description = "Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true.", IsRequired = false, DataType = "bool", ParameterType = "query", Verb = "GET")] public bool EnableAutoStreamCopy { get; set; } + public bool AllowVideoStreamCopy { get; set; } + public bool AllowAudioStreamCopy { get; set; } + /// /// Gets or sets the audio sample rate. /// @@ -218,6 +221,8 @@ namespace MediaBrowser.Controller.MediaEncoding public BaseEncodingJobOptions() { EnableAutoStreamCopy = true; + AllowVideoStreamCopy = true; + AllowAudioStreamCopy = true; Context = EncodingContext.Streaming; } } diff --git a/MediaBrowser.Model/MediaInfo/PlaybackInfoRequest.cs b/MediaBrowser.Model/MediaInfo/PlaybackInfoRequest.cs index 16c9464ac..0518064c9 100644 --- a/MediaBrowser.Model/MediaInfo/PlaybackInfoRequest.cs +++ b/MediaBrowser.Model/MediaInfo/PlaybackInfoRequest.cs @@ -28,6 +28,8 @@ namespace MediaBrowser.Model.MediaInfo public bool EnableDirectStream { get; set; } public bool EnableTranscoding { get; set; } public bool ForceDirectPlayRemoteMediaSource { get; set; } + public bool AllowVideoStreamCopy { get; set; } + public bool AllowAudioStreamCopy { get; set; } public PlaybackInfoRequest() { @@ -35,6 +37,8 @@ namespace MediaBrowser.Model.MediaInfo EnableDirectPlay = true; EnableDirectStream = true; EnableTranscoding = true; + AllowVideoStreamCopy = true; + AllowAudioStreamCopy = true; } } } -- cgit v1.2.3 From 372d40598d37a29ffa9de8627114fa12c477fc83 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sat, 1 Apr 2017 15:49:36 -0400 Subject: remove qsv hevc decoding for now --- Emby.Server.Implementations/Dto/DtoService.cs | 9 ----- .../Emby.Server.Implementations.csproj | 1 - .../Sorting/MetascoreComparer.cs | 41 ---------------------- MediaBrowser.Api/ItemUpdateService.cs | 6 ---- MediaBrowser.Controller/Entities/Folder.cs | 11 ------ MediaBrowser.Controller/Entities/IHasMetascore.cs | 15 -------- MediaBrowser.Controller/Entities/Movies/Movie.cs | 2 +- .../MediaBrowser.Controller.csproj | 1 - .../MediaEncoding/EncodingHelper.cs | 14 ++++---- .../Parsers/BaseItemXmlParser.cs | 16 --------- MediaBrowser.LocalMetadata/Savers/BaseXmlSaver.cs | 7 ---- MediaBrowser.Model/Dto/BaseItemDto.cs | 2 -- MediaBrowser.Model/Querying/ItemFields.cs | 5 --- MediaBrowser.Model/Querying/ItemSortBy.cs | 1 - MediaBrowser.Providers/Manager/ProviderUtils.cs | 15 -------- MediaBrowser.Providers/Omdb/OmdbProvider.cs | 11 ------ MediaBrowser.ServerApplication/MainStartup.cs | 2 +- MediaBrowser.XbmcMetadata/Parsers/BaseNfoParser.cs | 16 --------- MediaBrowser.XbmcMetadata/Savers/BaseNfoSaver.cs | 7 ---- 19 files changed, 9 insertions(+), 173 deletions(-) delete mode 100644 Emby.Server.Implementations/Sorting/MetascoreComparer.cs delete mode 100644 MediaBrowser.Controller/Entities/IHasMetascore.cs (limited to 'MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs') diff --git a/Emby.Server.Implementations/Dto/DtoService.cs b/Emby.Server.Implementations/Dto/DtoService.cs index d477008a5..e65e98f21 100644 --- a/Emby.Server.Implementations/Dto/DtoService.cs +++ b/Emby.Server.Implementations/Dto/DtoService.cs @@ -882,15 +882,6 @@ namespace Emby.Server.Implementations.Dto dto.AspectRatio = hasAspectRatio.AspectRatio; } - if (fields.Contains(ItemFields.Metascore)) - { - var hasMetascore = item as IHasMetascore; - if (hasMetascore != null) - { - dto.Metascore = hasMetascore.Metascore; - } - } - if (fields.Contains(ItemFields.AwardSummary)) { var hasAwards = item as IHasAwards; diff --git a/Emby.Server.Implementations/Emby.Server.Implementations.csproj b/Emby.Server.Implementations/Emby.Server.Implementations.csproj index 5166d5413..4b1418007 100644 --- a/Emby.Server.Implementations/Emby.Server.Implementations.csproj +++ b/Emby.Server.Implementations/Emby.Server.Implementations.csproj @@ -247,7 +247,6 @@ - diff --git a/Emby.Server.Implementations/Sorting/MetascoreComparer.cs b/Emby.Server.Implementations/Sorting/MetascoreComparer.cs deleted file mode 100644 index 9759e0228..000000000 --- a/Emby.Server.Implementations/Sorting/MetascoreComparer.cs +++ /dev/null @@ -1,41 +0,0 @@ -using MediaBrowser.Controller.Entities; -using MediaBrowser.Controller.Sorting; -using MediaBrowser.Model.Querying; - -namespace Emby.Server.Implementations.Sorting -{ - public class MetascoreComparer : IBaseItemComparer - { - /// - /// Compares the specified x. - /// - /// The x. - /// The y. - /// System.Int32. - public int Compare(BaseItem x, BaseItem y) - { - return GetValue(x).CompareTo(GetValue(y)); - } - - private float GetValue(BaseItem x) - { - var hasMetascore = x as IHasMetascore; - - if (hasMetascore != null) - { - return hasMetascore.Metascore ?? 0; - } - - return 0; - } - - /// - /// Gets the name. - /// - /// The name. - public string Name - { - get { return ItemSortBy.Metascore; } - } - } -} diff --git a/MediaBrowser.Api/ItemUpdateService.cs b/MediaBrowser.Api/ItemUpdateService.cs index cadf52be1..686a3a296 100644 --- a/MediaBrowser.Api/ItemUpdateService.cs +++ b/MediaBrowser.Api/ItemUpdateService.cs @@ -336,12 +336,6 @@ namespace MediaBrowser.Api video.Video3DFormat = request.Video3DFormat; } - var hasMetascore = item as IHasMetascore; - if (hasMetascore != null) - { - hasMetascore.Metascore = request.Metascore; - } - var hasAwards = item as IHasAwards; if (hasAwards != null) { diff --git a/MediaBrowser.Controller/Entities/Folder.cs b/MediaBrowser.Controller/Entities/Folder.cs index a323a2439..be41d896d 100644 --- a/MediaBrowser.Controller/Entities/Folder.cs +++ b/MediaBrowser.Controller/Entities/Folder.cs @@ -761,11 +761,6 @@ namespace MediaBrowser.Controller.Entities Logger.Debug("Query requires post-filtering due to ItemSortBy.GameSystem"); return true; } - if (query.SortBy.Contains(ItemSortBy.Metascore, StringComparer.OrdinalIgnoreCase)) - { - Logger.Debug("Query requires post-filtering due to ItemSortBy.Metascore"); - return true; - } if (query.SortBy.Contains(ItemSortBy.Players, StringComparer.OrdinalIgnoreCase)) { Logger.Debug("Query requires post-filtering due to ItemSortBy.Players"); @@ -778,12 +773,6 @@ namespace MediaBrowser.Controller.Entities } } - if (query.ItemIds.Length > 0) - { - Logger.Debug("Query requires post-filtering due to ItemIds"); - return true; - } - if (query.IsInBoxSet.HasValue) { Logger.Debug("Query requires post-filtering due to IsInBoxSet"); diff --git a/MediaBrowser.Controller/Entities/IHasMetascore.cs b/MediaBrowser.Controller/Entities/IHasMetascore.cs deleted file mode 100644 index a3445bbba..000000000 --- a/MediaBrowser.Controller/Entities/IHasMetascore.cs +++ /dev/null @@ -1,15 +0,0 @@ - -namespace MediaBrowser.Controller.Entities -{ - /// - /// Interface IHasMetascore - /// - public interface IHasMetascore - { - /// - /// Gets or sets the metascore. - /// - /// The metascore. - float? Metascore { get; set; } - } -} diff --git a/MediaBrowser.Controller/Entities/Movies/Movie.cs b/MediaBrowser.Controller/Entities/Movies/Movie.cs index dfa9ac416..ce671a2dc 100644 --- a/MediaBrowser.Controller/Entities/Movies/Movie.cs +++ b/MediaBrowser.Controller/Entities/Movies/Movie.cs @@ -17,7 +17,7 @@ namespace MediaBrowser.Controller.Entities.Movies /// /// Class Movie /// - public class Movie : Video, IHasSpecialFeatures, IHasTrailers, IHasAwards, IHasMetascore, IHasLookupInfo, ISupportsBoxSetGrouping + public class Movie : Video, IHasSpecialFeatures, IHasTrailers, IHasAwards, IHasLookupInfo, ISupportsBoxSetGrouping { public List SpecialFeatureIds { get; set; } diff --git a/MediaBrowser.Controller/MediaBrowser.Controller.csproj b/MediaBrowser.Controller/MediaBrowser.Controller.csproj index 88153868f..1f10fab73 100644 --- a/MediaBrowser.Controller/MediaBrowser.Controller.csproj +++ b/MediaBrowser.Controller/MediaBrowser.Controller.csproj @@ -114,7 +114,6 @@ - diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs index 996009524..36f0f67bd 100644 --- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs +++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs @@ -1741,13 +1741,13 @@ namespace MediaBrowser.Controller.MediaEncoding return "-c:v h264_qsv "; } break; - case "hevc": - case "h265": - if (_mediaEncoder.SupportsDecoder("hevc_qsv")) - { - return "-c:v hevc_qsv "; - } - break; + //case "hevc": + //case "h265": + // if (_mediaEncoder.SupportsDecoder("hevc_qsv")) + // { + // return "-c:v hevc_qsv "; + // } + // break; case "mpeg2video": if (_mediaEncoder.SupportsDecoder("mpeg2_qsv")) { diff --git a/MediaBrowser.LocalMetadata/Parsers/BaseItemXmlParser.cs b/MediaBrowser.LocalMetadata/Parsers/BaseItemXmlParser.cs index a1fd71ab2..e56bfb49c 100644 --- a/MediaBrowser.LocalMetadata/Parsers/BaseItemXmlParser.cs +++ b/MediaBrowser.LocalMetadata/Parsers/BaseItemXmlParser.cs @@ -207,22 +207,6 @@ namespace MediaBrowser.LocalMetadata.Parsers break; } - case "Metascore": - { - var text = reader.ReadElementContentAsString(); - var hasMetascore = item as IHasMetascore; - if (hasMetascore != null) - { - float value; - if (float.TryParse(text, NumberStyles.Any, _usCulture, out value)) - { - hasMetascore.Metascore = value; - } - } - - break; - } - case "AwardSummary": { var text = reader.ReadElementContentAsString(); diff --git a/MediaBrowser.LocalMetadata/Savers/BaseXmlSaver.cs b/MediaBrowser.LocalMetadata/Savers/BaseXmlSaver.cs index 6a2e2263b..105e685f4 100644 --- a/MediaBrowser.LocalMetadata/Savers/BaseXmlSaver.cs +++ b/MediaBrowser.LocalMetadata/Savers/BaseXmlSaver.cs @@ -68,7 +68,6 @@ namespace MediaBrowser.LocalMetadata.Savers "LockData", "LockedFields", "Format3D", - "Metascore", // Deprecated. No longer saving in this field. "MPAARating", @@ -421,12 +420,6 @@ namespace MediaBrowser.LocalMetadata.Savers writer.WriteElementString("DisplayOrder", hasDisplayOrder.DisplayOrder); } - var hasMetascore = item as IHasMetascore; - if (hasMetascore != null && hasMetascore.Metascore.HasValue) - { - writer.WriteElementString("Metascore", hasMetascore.Metascore.Value.ToString(UsCulture)); - } - var hasAwards = item as IHasAwards; if (hasAwards != null && !string.IsNullOrEmpty(hasAwards.AwardSummary)) { diff --git a/MediaBrowser.Model/Dto/BaseItemDto.cs b/MediaBrowser.Model/Dto/BaseItemDto.cs index 5122227e1..ae7d13868 100644 --- a/MediaBrowser.Model/Dto/BaseItemDto.cs +++ b/MediaBrowser.Model/Dto/BaseItemDto.cs @@ -81,8 +81,6 @@ namespace MediaBrowser.Model.Dto public string AwardSummary { get; set; } - public float? Metascore { get; set; } - /// /// Gets or sets a value indicating whether [supports synchronize]. /// diff --git a/MediaBrowser.Model/Querying/ItemFields.cs b/MediaBrowser.Model/Querying/ItemFields.cs index 82e4acaec..0caf64538 100644 --- a/MediaBrowser.Model/Querying/ItemFields.cs +++ b/MediaBrowser.Model/Querying/ItemFields.cs @@ -122,11 +122,6 @@ /// MediaSources, - /// - /// The metascore - /// - Metascore, - OfficialRatingDescription, OriginalTitle, diff --git a/MediaBrowser.Model/Querying/ItemSortBy.cs b/MediaBrowser.Model/Querying/ItemSortBy.cs index b379298a5..66bdc8aa5 100644 --- a/MediaBrowser.Model/Querying/ItemSortBy.cs +++ b/MediaBrowser.Model/Querying/ItemSortBy.cs @@ -71,7 +71,6 @@ namespace MediaBrowser.Model.Querying public const string SeriesSortName = "SeriesSortName"; public const string VideoBitRate = "VideoBitRate"; public const string AirTime = "AirTime"; - public const string Metascore = "Metascore"; public const string Studio = "Studio"; public const string Players = "Players"; public const string GameSystem = "GameSystem"; diff --git a/MediaBrowser.Providers/Manager/ProviderUtils.cs b/MediaBrowser.Providers/Manager/ProviderUtils.cs index 5281b8788..34cf63350 100644 --- a/MediaBrowser.Providers/Manager/ProviderUtils.cs +++ b/MediaBrowser.Providers/Manager/ProviderUtils.cs @@ -195,7 +195,6 @@ namespace MediaBrowser.Providers.Manager } MergeAlbumArtist(source, target, lockedFields, replaceData); - MergeMetascore(source, target, lockedFields, replaceData); MergeCriticRating(source, target, lockedFields, replaceData); MergeAwards(source, target, lockedFields, replaceData); MergeTrailers(source, target, lockedFields, replaceData); @@ -246,20 +245,6 @@ namespace MediaBrowser.Providers.Manager } } - private static void MergeMetascore(BaseItem source, BaseItem target, List lockedFields, bool replaceData) - { - var sourceCast = source as IHasMetascore; - var targetCast = target as IHasMetascore; - - if (sourceCast != null && targetCast != null) - { - if (replaceData || !targetCast.Metascore.HasValue) - { - targetCast.Metascore = sourceCast.Metascore; - } - } - } - private static void MergeAwards(BaseItem source, BaseItem target, List lockedFields, bool replaceData) { var sourceCast = source as IHasAwards; diff --git a/MediaBrowser.Providers/Omdb/OmdbProvider.cs b/MediaBrowser.Providers/Omdb/OmdbProvider.cs index 024853778..148bfc8a8 100644 --- a/MediaBrowser.Providers/Omdb/OmdbProvider.cs +++ b/MediaBrowser.Providers/Omdb/OmdbProvider.cs @@ -409,17 +409,6 @@ namespace MediaBrowser.Providers.Omdb } } - var hasMetascore = item as IHasMetascore; - if (hasMetascore != null) - { - float metascore; - - if (!string.IsNullOrEmpty(result.Metascore) && float.TryParse(result.Metascore, NumberStyles.Any, _usCulture, out metascore) && metascore >= 0) - { - hasMetascore.Metascore = metascore; - } - } - var hasAwards = item as IHasAwards; if (hasAwards != null && !string.IsNullOrEmpty(result.Awards)) { diff --git a/MediaBrowser.ServerApplication/MainStartup.cs b/MediaBrowser.ServerApplication/MainStartup.cs index b02c5d6ac..3643aab48 100644 --- a/MediaBrowser.ServerApplication/MainStartup.cs +++ b/MediaBrowser.ServerApplication/MainStartup.cs @@ -207,7 +207,7 @@ namespace MediaBrowser.ServerApplication { _logger.Info("Found a duplicate process. Giving it time to exit."); - if (!duplicate.WaitForExit(30000)) + if (!duplicate.WaitForExit(40000)) { _logger.Info("The duplicate process did not exit."); return true; diff --git a/MediaBrowser.XbmcMetadata/Parsers/BaseNfoParser.cs b/MediaBrowser.XbmcMetadata/Parsers/BaseNfoParser.cs index 650d7a138..c44970ff5 100644 --- a/MediaBrowser.XbmcMetadata/Parsers/BaseNfoParser.cs +++ b/MediaBrowser.XbmcMetadata/Parsers/BaseNfoParser.cs @@ -320,22 +320,6 @@ namespace MediaBrowser.XbmcMetadata.Parsers break; } - case "metascore": - { - var text = reader.ReadElementContentAsString(); - var hasMetascore = item as IHasMetascore; - if (hasMetascore != null) - { - float value; - if (float.TryParse(text, NumberStyles.Any, _usCulture, out value)) - { - hasMetascore.Metascore = value; - } - } - - break; - } - case "awardsummary": { var text = reader.ReadElementContentAsString(); diff --git a/MediaBrowser.XbmcMetadata/Savers/BaseNfoSaver.cs b/MediaBrowser.XbmcMetadata/Savers/BaseNfoSaver.cs index 100b9c36c..02929f83d 100644 --- a/MediaBrowser.XbmcMetadata/Savers/BaseNfoSaver.cs +++ b/MediaBrowser.XbmcMetadata/Savers/BaseNfoSaver.cs @@ -87,7 +87,6 @@ namespace MediaBrowser.XbmcMetadata.Savers "awardsummary", "enddate", "lockedfields", - "metascore", "zap2itid", "tvrageid", "gamesdbid", @@ -683,12 +682,6 @@ namespace MediaBrowser.XbmcMetadata.Savers writer.WriteElementString("votes", item.VoteCount.Value.ToString(UsCulture)); } - var hasMetascore = item as IHasMetascore; - if (hasMetascore != null && hasMetascore.Metascore.HasValue) - { - writer.WriteElementString("metascore", hasMetascore.Metascore.Value.ToString(UsCulture)); - } - // Use original runtime here, actual file runtime later in MediaInfo var runTimeTicks = item.RunTimeTicks; -- cgit v1.2.3 From 99417105a6f527a43918690df82ed5c1c07e9b8b Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Tue, 4 Apr 2017 01:20:07 -0400 Subject: update subtitle embedding --- MediaBrowser.Api/Playback/Hls/VideoHlsService.cs | 2 +- .../MediaEncoding/EncodingHelper.cs | 41 +++++++++++++--------- 2 files changed, 25 insertions(+), 18 deletions(-) (limited to 'MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs') diff --git a/MediaBrowser.Api/Playback/Hls/VideoHlsService.cs b/MediaBrowser.Api/Playback/Hls/VideoHlsService.cs index f9164c36f..8b828ddfe 100644 --- a/MediaBrowser.Api/Playback/Hls/VideoHlsService.cs +++ b/MediaBrowser.Api/Playback/Hls/VideoHlsService.cs @@ -96,7 +96,7 @@ namespace MediaBrowser.Api.Playback.Hls var keyFrameArg = string.Format(" -force_key_frames \"expr:gte(t,n_forced*{0})\"", state.SegmentLength.ToString(UsCulture)); - var hasGraphicalSubs = state.SubtitleStream != null && !state.SubtitleStream.IsTextSubtitleStream && state.VideoRequest.SubtitleMethod == SubtitleDeliveryMethod.Encode; + var hasGraphicalSubs = state.SubtitleStream != null && !state.SubtitleStream.IsTextSubtitleStream && state.SubtitleDeliveryMethod == SubtitleDeliveryMethod.Encode; var encodingOptions = ApiEntryPoint.Instance.GetEncodingOptions(); args += " " + EncodingHelper.GetVideoQualityParam(state, codec, encodingOptions, GetDefaultH264Preset()) + keyFrameArg; diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs index 36f0f67bd..90ec5aac7 100644 --- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs +++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs @@ -377,7 +377,7 @@ namespace MediaBrowser.Controller.MediaEncoding var arg = string.Format("-i {0}", GetInputPathArgument(state)); - if (state.SubtitleStream != null && request.SubtitleMethod == SubtitleDeliveryMethod.Encode) + if (state.SubtitleStream != null && state.SubtitleDeliveryMethod == SubtitleDeliveryMethod.Encode) { if (state.SubtitleStream.IsExternal && !state.SubtitleStream.IsTextSubtitleStream) { @@ -410,7 +410,7 @@ namespace MediaBrowser.Controller.MediaEncoding { if (GetVideoEncoder(state, encodingOptions).IndexOf("vaapi", StringComparison.OrdinalIgnoreCase) != -1) { - var hasGraphicalSubs = state.SubtitleStream != null && !state.SubtitleStream.IsTextSubtitleStream && request.SubtitleMethod == SubtitleDeliveryMethod.Encode; + var hasGraphicalSubs = state.SubtitleStream != null && !state.SubtitleStream.IsTextSubtitleStream && state.SubtitleDeliveryMethod == SubtitleDeliveryMethod.Encode; var hwOutputFormat = "vaapi"; if (hasGraphicalSubs) @@ -782,7 +782,7 @@ namespace MediaBrowser.Controller.MediaEncoding // Can't stream copy if we're burning in subtitles if (request.SubtitleStreamIndex.HasValue) { - if (request.SubtitleMethod == SubtitleDeliveryMethod.Encode) + if (state.SubtitleDeliveryMethod == SubtitleDeliveryMethod.Encode) { return false; } @@ -1042,7 +1042,7 @@ namespace MediaBrowser.Controller.MediaEncoding var pts = string.Empty; - if (state.SubtitleStream != null && state.SubtitleStream.IsTextSubtitleStream && state.BaseRequest.SubtitleMethod == SubtitleDeliveryMethod.Encode && !state.CopyTimestamps) + if (state.SubtitleStream != null && state.SubtitleStream.IsTextSubtitleStream && state.SubtitleDeliveryMethod == SubtitleDeliveryMethod.Encode && !state.CopyTimestamps) { var seconds = TimeSpan.FromTicks(state.StartTimeTicks ?? 0).TotalSeconds; @@ -1205,7 +1205,7 @@ namespace MediaBrowser.Controller.MediaEncoding args += " -map -0:a"; } - var subtitleMethod = state.BaseRequest.SubtitleMethod; + var subtitleMethod = state.SubtitleDeliveryMethod; if (state.SubtitleStream == null || subtitleMethod == SubtitleDeliveryMethod.Hls) { args += " -map -0:s"; @@ -1421,7 +1421,7 @@ namespace MediaBrowser.Controller.MediaEncoding var output = string.Empty; - if (state.SubtitleStream != null && state.SubtitleStream.IsTextSubtitleStream && request.SubtitleMethod == SubtitleDeliveryMethod.Encode) + if (state.SubtitleStream != null && state.SubtitleStream.IsTextSubtitleStream && state.SubtitleDeliveryMethod == SubtitleDeliveryMethod.Encode) { var subParam = GetTextSubtitleParam(state); @@ -1696,6 +1696,8 @@ namespace MediaBrowser.Controller.MediaEncoding } EnforceResolutionLimit(state); + + NormalizeSubtitleEmbed(state); } else { @@ -1705,6 +1707,21 @@ namespace MediaBrowser.Controller.MediaEncoding state.MediaSource = mediaSource; } + private void NormalizeSubtitleEmbed(EncodingJobInfo state) + { + if (state.SubtitleStream == null || state.SubtitleDeliveryMethod != SubtitleDeliveryMethod.Embed) + { + return ; + } + + // This is tricky to remux in, after converting to dvdsub it's not positioned correctly + // Therefore, let's just burn it in + if (string.Equals(state.SubtitleStream.Codec, "DVBSUB", StringComparison.OrdinalIgnoreCase)) + { + state.SubtitleDeliveryMethod = SubtitleDeliveryMethod.Encode; + } + } + /// /// Gets the name of the output video codec /// @@ -1810,16 +1827,6 @@ namespace MediaBrowser.Controller.MediaEncoding codec = format; } - // Muxing in dvbsub via either copy or -codec dvbsub does not seem to work - // It doesn't throw any errors but vlc on android will not render them - // They will need to be converted to an alternative format - // TODO: This is incorrectly assuming that dvdsub will be supported by the player - // The api will need to be expanded to accomodate this. - if (string.Equals(state.SubtitleStream.Codec, "DVBSUB", StringComparison.OrdinalIgnoreCase)) - { - codec = "dvdsub"; - } - var args = " -codec:s:0 " + codec; args += " -disposition:s:0 default"; @@ -1894,7 +1901,7 @@ namespace MediaBrowser.Controller.MediaEncoding args += keyFrameArg; - var hasGraphicalSubs = state.SubtitleStream != null && !state.SubtitleStream.IsTextSubtitleStream && state.BaseRequest.SubtitleMethod == SubtitleDeliveryMethod.Encode; + var hasGraphicalSubs = state.SubtitleStream != null && !state.SubtitleStream.IsTextSubtitleStream && state.SubtitleDeliveryMethod == SubtitleDeliveryMethod.Encode; var hasCopyTs = false; // Add resolution params, if specified -- cgit v1.2.3