From f756e39b9d5b461e6bcaa4e71006038983d28213 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Sun, 30 Mar 2014 12:49:40 -0400 Subject: restored live tv playback in the web client --- .../Encoder/InternalEncodingTaskFactory.cs | 323 +++++++++++++++++++++ 1 file changed, 323 insertions(+) create mode 100644 MediaBrowser.MediaEncoding/Encoder/InternalEncodingTaskFactory.cs (limited to 'MediaBrowser.MediaEncoding/Encoder/InternalEncodingTaskFactory.cs') diff --git a/MediaBrowser.MediaEncoding/Encoder/InternalEncodingTaskFactory.cs b/MediaBrowser.MediaEncoding/Encoder/InternalEncodingTaskFactory.cs new file mode 100644 index 000000000..fa9b87906 --- /dev/null +++ b/MediaBrowser.MediaEncoding/Encoder/InternalEncodingTaskFactory.cs @@ -0,0 +1,323 @@ +using MediaBrowser.Controller.Configuration; +using MediaBrowser.Controller.Dlna; +using MediaBrowser.Controller.Entities; +using MediaBrowser.Controller.Library; +using MediaBrowser.Controller.LiveTv; +using MediaBrowser.Controller.MediaEncoding; +using MediaBrowser.Controller.Persistence; +using MediaBrowser.Model.Configuration; +using MediaBrowser.Model.Entities; +using MediaBrowser.Model.LiveTv; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; + +namespace MediaBrowser.MediaEncoding.Encoder +{ + public class InternalEncodingTaskFactory + { + private readonly ILibraryManager _libraryManager; + private readonly ILiveTvManager _liveTvManager; + private readonly IItemRepository _itemRepo; + private readonly IServerConfigurationManager _config; + + public InternalEncodingTaskFactory(ILibraryManager libraryManager, ILiveTvManager liveTvManager, IItemRepository itemRepo, IServerConfigurationManager config) + { + _libraryManager = libraryManager; + _liveTvManager = liveTvManager; + _itemRepo = itemRepo; + _config = config; + } + + public async Task Create(EncodingOptions request, CancellationToken cancellationToken) + { + ValidateInput(request); + + var state = new InternalEncodingTask + { + Request = request + }; + + var item = string.IsNullOrEmpty(request.MediaSourceId) ? + _libraryManager.GetItemById(new Guid(request.ItemId)) : + _libraryManager.GetItemById(new Guid(request.MediaSourceId)); + + if (item is ILiveTvRecording) + { + var recording = await _liveTvManager.GetInternalRecording(request.ItemId, cancellationToken).ConfigureAwait(false); + + if (string.Equals(recording.MediaType, MediaType.Video, StringComparison.OrdinalIgnoreCase)) + { + state.InputVideoType = VideoType.VideoFile; + } + + var path = recording.RecordingInfo.Path; + var mediaUrl = recording.RecordingInfo.Url; + + if (string.IsNullOrWhiteSpace(path) && string.IsNullOrWhiteSpace(mediaUrl)) + { + var streamInfo = await _liveTvManager.GetRecordingStream(request.ItemId, cancellationToken).ConfigureAwait(false); + + state.LiveTvStreamId = streamInfo.Id; + + path = streamInfo.Path; + mediaUrl = streamInfo.Url; + } + + if (!string.IsNullOrEmpty(path) && File.Exists(path)) + { + state.MediaPath = path; + state.IsInputRemote = false; + } + else if (!string.IsNullOrEmpty(mediaUrl)) + { + state.MediaPath = mediaUrl; + state.IsInputRemote = true; + } + + state.InputRunTimeTicks = recording.RunTimeTicks; + if (recording.RecordingInfo.Status == RecordingStatus.InProgress && !state.IsInputRemote) + { + await Task.Delay(1000, cancellationToken).ConfigureAwait(false); + } + + state.ReadInputAtNativeFramerate = recording.RecordingInfo.Status == RecordingStatus.InProgress; + state.AudioSync = "1000"; + state.DeInterlace = true; + state.InputVideoSync = "-1"; + state.InputAudioSync = "1"; + } + else if (item is LiveTvChannel) + { + var channel = _liveTvManager.GetInternalChannel(request.ItemId); + + if (string.Equals(channel.MediaType, MediaType.Video, StringComparison.OrdinalIgnoreCase)) + { + state.InputVideoType = VideoType.VideoFile; + } + + var streamInfo = await _liveTvManager.GetChannelStream(request.ItemId, cancellationToken).ConfigureAwait(false); + + state.LiveTvStreamId = streamInfo.Id; + + if (!string.IsNullOrEmpty(streamInfo.Path) && File.Exists(streamInfo.Path)) + { + state.MediaPath = streamInfo.Path; + state.IsInputRemote = false; + + await Task.Delay(1000, cancellationToken).ConfigureAwait(false); + } + else if (!string.IsNullOrEmpty(streamInfo.Url)) + { + state.MediaPath = streamInfo.Url; + state.IsInputRemote = true; + } + + state.ReadInputAtNativeFramerate = true; + state.AudioSync = "1000"; + state.DeInterlace = true; + state.InputVideoSync = "-1"; + state.InputAudioSync = "1"; + } + else + { + state.MediaPath = item.Path; + state.IsInputRemote = item.LocationType == LocationType.Remote; + + var video = item as Video; + + if (video != null) + { + state.InputVideoType = video.VideoType; + state.IsoType = video.IsoType; + + state.StreamFileNames = video.PlayableStreamFileNames.ToList(); + } + + state.InputRunTimeTicks = item.RunTimeTicks; + } + + var videoRequest = request as VideoEncodingOptions; + + var mediaStreams = _itemRepo.GetMediaStreams(new MediaStreamQuery + { + ItemId = item.Id + + }).ToList(); + + if (videoRequest != null) + { + state.VideoStream = GetMediaStream(mediaStreams, videoRequest.VideoStreamIndex, MediaStreamType.Video); + state.SubtitleStream = GetMediaStream(mediaStreams, videoRequest.SubtitleStreamIndex, MediaStreamType.Subtitle, false); + state.AudioStream = GetMediaStream(mediaStreams, videoRequest.AudioStreamIndex, MediaStreamType.Audio); + + if (state.VideoStream != null && state.VideoStream.IsInterlaced) + { + state.DeInterlace = true; + } + } + else + { + state.AudioStream = GetMediaStream(mediaStreams, null, MediaStreamType.Audio, true); + } + + state.HasMediaStreams = mediaStreams.Count > 0; + + state.SegmentLength = state.ReadInputAtNativeFramerate ? 5 : 10; + state.HlsListSize = state.ReadInputAtNativeFramerate ? 100 : 1440; + + state.QualitySetting = GetQualitySetting(); + + ApplyDeviceProfileSettings(state); + + return state; + } + + private void ValidateInput(EncodingOptions request) + { + if (string.IsNullOrWhiteSpace(request.ItemId)) + { + throw new ArgumentException("ItemId is required."); + } + if (string.IsNullOrWhiteSpace(request.OutputPath)) + { + throw new ArgumentException("OutputPath is required."); + } + if (string.IsNullOrWhiteSpace(request.Container)) + { + throw new ArgumentException("Container is required."); + } + if (string.IsNullOrWhiteSpace(request.AudioCodec)) + { + throw new ArgumentException("AudioCodec is required."); + } + + var videoRequest = request as VideoEncodingOptions; + + if (videoRequest == null) + { + return; + } + } + + /// + /// Determines which stream will be used for playback + /// + /// All stream. + /// Index of the desired. + /// The type. + /// if set to true [return first if no index]. + /// MediaStream. + private MediaStream GetMediaStream(IEnumerable allStream, int? desiredIndex, MediaStreamType type, bool returnFirstIfNoIndex = true) + { + var streams = allStream.Where(s => s.Type == type).OrderBy(i => i.Index).ToList(); + + if (desiredIndex.HasValue) + { + var stream = streams.FirstOrDefault(s => s.Index == desiredIndex.Value); + + if (stream != null) + { + return stream; + } + } + + if (returnFirstIfNoIndex && type == MediaStreamType.Audio) + { + return streams.FirstOrDefault(i => i.Channels.HasValue && i.Channels.Value > 0) ?? + streams.FirstOrDefault(); + } + + // Just return the first one + return returnFirstIfNoIndex ? streams.FirstOrDefault() : null; + } + + private void ApplyDeviceProfileSettings(InternalEncodingTask state) + { + var profile = state.Request.DeviceProfile; + + if (profile == null) + { + // Don't use settings from the default profile. + // Only use a specific profile if it was requested. + return; + } + + var container = state.Request.Container; + + var audioCodec = state.Request.AudioCodec; + + if (string.Equals(audioCodec, "copy", StringComparison.OrdinalIgnoreCase) && state.AudioStream != null) + { + audioCodec = state.AudioStream.Codec; + } + + var videoCodec = state.VideoRequest == null ? null : state.VideoRequest.VideoCodec; + + if (string.Equals(videoCodec, "copy", StringComparison.OrdinalIgnoreCase) && state.VideoStream != null) + { + videoCodec = state.VideoStream.Codec; + } + + var mediaProfile = state.VideoRequest == null ? + profile.GetAudioMediaProfile(container, audioCodec, state.AudioStream) : + profile.GetVideoMediaProfile(container, audioCodec, videoCodec, state.AudioStream, state.VideoStream); + + if (mediaProfile != null) + { + state.MimeType = mediaProfile.MimeType; + state.OrgPn = mediaProfile.OrgPn; + } + + var transcodingProfile = state.VideoRequest == null ? + profile.GetAudioTranscodingProfile(container, audioCodec) : + profile.GetVideoTranscodingProfile(container, audioCodec, videoCodec); + + if (transcodingProfile != null) + { + //state.EstimateContentLength = transcodingProfile.EstimateContentLength; + state.EnableMpegtsM2TsMode = transcodingProfile.EnableMpegtsM2TsMode; + //state.TranscodeSeekInfo = transcodingProfile.TranscodeSeekInfo; + + foreach (var setting in transcodingProfile.Settings) + { + switch (setting.Name) + { + case TranscodingSettingType.VideoProfile: + { + if (state.VideoRequest != null && string.IsNullOrWhiteSpace(state.VideoRequest.VideoProfile)) + { + state.VideoRequest.VideoProfile = setting.Value; + } + break; + } + default: + throw new ArgumentException("Unrecognized TranscodingSettingType"); + } + } + } + } + + private EncodingQuality GetQualitySetting() + { + var quality = _config.Configuration.MediaEncodingQuality; + + if (quality == EncodingQuality.Auto) + { + var cpuCount = Environment.ProcessorCount; + + if (cpuCount >= 4) + { + //return EncodingQuality.HighQuality; + } + + return EncodingQuality.HighSpeed; + } + + return quality; + } + } +} -- cgit v1.2.3 From 4afe2c3f731562efbe42147d1bcbdc0a7542cfeb Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Tue, 1 Apr 2014 00:16:25 -0400 Subject: updated dlna profile format --- MediaBrowser.Api/Playback/BaseStreamingService.cs | 30 ++++--------- MediaBrowser.Controller/Dlna/DeviceProfile.cs | 16 +++---- MediaBrowser.Controller/Dlna/MediaProfile.cs | 49 ---------------------- MediaBrowser.Controller/Dlna/ResponseProfile.cs | 49 ++++++++++++++++++++++ MediaBrowser.Controller/Dlna/TranscodingProfile.cs | 23 +--------- .../MediaBrowser.Controller.csproj | 2 +- MediaBrowser.Dlna/PlayTo/PlaylistItem.cs | 8 ---- MediaBrowser.Dlna/PlayTo/PlaylistItemFactory.cs | 3 -- MediaBrowser.Dlna/Profiles/DefaultProfile.cs | 6 +-- .../Profiles/SamsungSmartTvProfile.cs | 6 +-- .../Profiles/SonyBlurayPlayerProfile.cs | 16 +++---- .../Profiles/SonyBravia2010Profile.cs | 12 +++--- .../Profiles/SonyBravia2011Profile.cs | 12 +++--- .../Profiles/SonyBravia2012Profile.cs | 12 +++--- .../Profiles/SonyBravia2013Profile.cs | 12 +++--- MediaBrowser.Dlna/Profiles/SonyPs3Profile.cs | 8 ++-- MediaBrowser.Dlna/Profiles/WdtvLiveProfile.cs | 10 ++--- MediaBrowser.Dlna/Profiles/Xbox360Profile.cs | 12 ++---- MediaBrowser.Dlna/Profiles/XboxOneProfile.cs | 4 +- MediaBrowser.Dlna/Profiles/Xml/Default.xml | 12 ++---- MediaBrowser.Dlna/Profiles/Xml/Denon AVR.xml | 12 ++---- MediaBrowser.Dlna/Profiles/Xml/LG Smart TV.xml | 14 ++----- MediaBrowser.Dlna/Profiles/Xml/Linksys DMA2100.xml | 12 ++---- MediaBrowser.Dlna/Profiles/Xml/Panasonic Viera.xml | 14 ++----- .../Profiles/Xml/Samsung Smart TV.xml | 24 ++++------- .../Profiles/Xml/Sony Blu-ray Player 2013.xml | 14 ++----- .../Profiles/Xml/Sony Blu-ray Player.xml | 44 +++++++++---------- .../Profiles/Xml/Sony Bravia (2010).xml | 36 +++++++--------- .../Profiles/Xml/Sony Bravia (2011).xml | 36 +++++++--------- .../Profiles/Xml/Sony Bravia (2012).xml | 36 +++++++--------- .../Profiles/Xml/Sony Bravia (2013).xml | 36 +++++++--------- .../Profiles/Xml/Sony PlayStation 3.xml | 28 +++++-------- MediaBrowser.Dlna/Profiles/Xml/WDTV Live.xml | 22 ++++------ MediaBrowser.Dlna/Profiles/Xml/Xbox 360.xml | 22 ++++------ MediaBrowser.Dlna/Profiles/Xml/Xbox One.xml | 16 +++---- MediaBrowser.Dlna/Profiles/Xml/foobar2000.xml | 12 ++---- .../Encoder/InternalEncodingTaskFactory.cs | 16 +------ .../Localization/Server/fr.json | 2 +- 38 files changed, 264 insertions(+), 434 deletions(-) delete mode 100644 MediaBrowser.Controller/Dlna/MediaProfile.cs create mode 100644 MediaBrowser.Controller/Dlna/ResponseProfile.cs (limited to 'MediaBrowser.MediaEncoding/Encoder/InternalEncodingTaskFactory.cs') diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs index e6ec38846..6c406a11c 100644 --- a/MediaBrowser.Api/Playback/BaseStreamingService.cs +++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs @@ -1492,21 +1492,9 @@ namespace MediaBrowser.Api.Playback state.EnableMpegtsM2TsMode = transcodingProfile.EnableMpegtsM2TsMode; state.TranscodeSeekInfo = transcodingProfile.TranscodeSeekInfo; - foreach (var setting in transcodingProfile.Settings) + if (state.VideoRequest != null && string.IsNullOrWhiteSpace(state.VideoRequest.Profile)) { - switch (setting.Name) - { - case TranscodingSettingType.VideoProfile: - { - if (state.VideoRequest != null && string.IsNullOrWhiteSpace(state.VideoRequest.Profile)) - { - state.VideoRequest.Profile = setting.Value; - } - break; - } - default: - throw new ArgumentException("Unrecognized TranscodingSettingType"); - } + state.VideoRequest.Profile = transcodingProfile.VideoProfile; } } } @@ -1523,12 +1511,6 @@ namespace MediaBrowser.Api.Playback { var timeSeek = GetHeader("TimeSeekRange.dlna.org"); - if (!string.IsNullOrEmpty(timeSeek)) - { - ResultFactory.ThrowError(406, "Time seek not supported during encoding.", responseHeaders); - return; - } - var transferMode = GetHeader("transferMode.dlna.org"); responseHeaders["transferMode.dlna.org"] = string.IsNullOrEmpty(transferMode) ? "Streaming" : transferMode; responseHeaders["realTimeInfo.dlna.org"] = "DLNA.ORG_TLAG=*"; @@ -1537,7 +1519,13 @@ namespace MediaBrowser.Api.Playback var extension = GetOutputFileExtension(state); // first bit means Time based seek supported, second byte range seek supported (not sure about the order now), so 01 = only byte seek, 10 = time based, 11 = both, 00 = none - var orgOp = isStaticallyStreamed || state.TranscodeSeekInfo == TranscodeSeekInfo.Bytes ? ";DLNA.ORG_OP=01" : ";DLNA.ORG_OP=00"; + var orgOp = ";DLNA.ORG_OP="; + + // Time-based seeking currently only possible when transcoding + orgOp += isStaticallyStreamed ? "0" : "1"; + + // Byte-based seeking only possible when not transcoding + orgOp += isStaticallyStreamed || state.TranscodeSeekInfo == TranscodeSeekInfo.Bytes ? "1" : "0"; // 0 = native, 1 = transcoded var orgCi = isStaticallyStreamed ? ";DLNA.ORG_CI=0" : ";DLNA.ORG_CI=1"; diff --git a/MediaBrowser.Controller/Dlna/DeviceProfile.cs b/MediaBrowser.Controller/Dlna/DeviceProfile.cs index c1fc713e4..bb9629c28 100644 --- a/MediaBrowser.Controller/Dlna/DeviceProfile.cs +++ b/MediaBrowser.Controller/Dlna/DeviceProfile.cs @@ -74,13 +74,13 @@ namespace MediaBrowser.Controller.Dlna public ContainerProfile[] ContainerProfiles { get; set; } public CodecProfile[] CodecProfiles { get; set; } - public MediaProfile[] MediaProfiles { get; set; } + public ResponseProfile[] ResponseProfiles { get; set; } public DeviceProfile() { DirectPlayProfiles = new DirectPlayProfile[] { }; TranscodingProfiles = new TranscodingProfile[] { }; - MediaProfiles = new MediaProfile[] { }; + ResponseProfiles = new ResponseProfile[] { }; CodecProfiles = new CodecProfile[] { }; ContainerProfiles = new ContainerProfile[] { }; @@ -147,11 +147,11 @@ namespace MediaBrowser.Controller.Dlna }); } - public MediaProfile GetAudioMediaProfile(string container, string audioCodec, MediaStream audioStream) + public ResponseProfile GetAudioMediaProfile(string container, string audioCodec, MediaStream audioStream) { container = (container ?? string.Empty).TrimStart('.'); - return MediaProfiles.FirstOrDefault(i => + return ResponseProfiles.FirstOrDefault(i => { if (i.Type != DlnaProfileType.Audio) { @@ -174,11 +174,11 @@ namespace MediaBrowser.Controller.Dlna }); } - public MediaProfile GetVideoMediaProfile(string container, string audioCodec, string videoCodec, MediaStream audioStream, MediaStream videoStream) + public ResponseProfile GetVideoMediaProfile(string container, string audioCodec, string videoCodec, MediaStream audioStream, MediaStream videoStream) { container = (container ?? string.Empty).TrimStart('.'); - return MediaProfiles.FirstOrDefault(i => + return ResponseProfiles.FirstOrDefault(i => { if (i.Type != DlnaProfileType.Video) { @@ -207,11 +207,11 @@ namespace MediaBrowser.Controller.Dlna }); } - public MediaProfile GetPhotoMediaProfile(string container) + public ResponseProfile GetPhotoMediaProfile(string container) { container = (container ?? string.Empty).TrimStart('.'); - return MediaProfiles.FirstOrDefault(i => + return ResponseProfiles.FirstOrDefault(i => { if (i.Type != DlnaProfileType.Photo) { diff --git a/MediaBrowser.Controller/Dlna/MediaProfile.cs b/MediaBrowser.Controller/Dlna/MediaProfile.cs deleted file mode 100644 index bf3057294..000000000 --- a/MediaBrowser.Controller/Dlna/MediaProfile.cs +++ /dev/null @@ -1,49 +0,0 @@ -using System.Collections.Generic; -using System.Linq; -using System.Xml.Serialization; - -namespace MediaBrowser.Controller.Dlna -{ - public class MediaProfile - { - [XmlAttribute("container")] - public string Container { get; set; } - - [XmlAttribute("audioCodec")] - public string AudioCodec { get; set; } - - [XmlAttribute("videoCodec")] - public string VideoCodec { get; set; } - - [XmlAttribute("type")] - public DlnaProfileType Type { get; set; } - - [XmlAttribute("orgPn")] - public string OrgPn { get; set; } - - [XmlAttribute("mimeType")] - public string MimeType { get; set; } - - public ProfileCondition[] Conditions { get; set; } - - public MediaProfile() - { - Conditions = new ProfileCondition[] {}; - } - - public List GetContainers() - { - return (Container ?? string.Empty).Split(',').Where(i => !string.IsNullOrWhiteSpace(i)).ToList(); - } - - public List GetAudioCodecs() - { - return (AudioCodec ?? string.Empty).Split(',').Where(i => !string.IsNullOrWhiteSpace(i)).ToList(); - } - - public List GetVideoCodecs() - { - return (VideoCodec ?? string.Empty).Split(',').Where(i => !string.IsNullOrWhiteSpace(i)).ToList(); - } - } -} diff --git a/MediaBrowser.Controller/Dlna/ResponseProfile.cs b/MediaBrowser.Controller/Dlna/ResponseProfile.cs new file mode 100644 index 000000000..163a95d5a --- /dev/null +++ b/MediaBrowser.Controller/Dlna/ResponseProfile.cs @@ -0,0 +1,49 @@ +using System.Collections.Generic; +using System.Linq; +using System.Xml.Serialization; + +namespace MediaBrowser.Controller.Dlna +{ + public class ResponseProfile + { + [XmlAttribute("container")] + public string Container { get; set; } + + [XmlAttribute("audioCodec")] + public string AudioCodec { get; set; } + + [XmlAttribute("videoCodec")] + public string VideoCodec { get; set; } + + [XmlAttribute("type")] + public DlnaProfileType Type { get; set; } + + [XmlAttribute("orgPn")] + public string OrgPn { get; set; } + + [XmlAttribute("mimeType")] + public string MimeType { get; set; } + + public ProfileCondition[] Conditions { get; set; } + + public ResponseProfile() + { + Conditions = new ProfileCondition[] {}; + } + + public List GetContainers() + { + return (Container ?? string.Empty).Split(',').Where(i => !string.IsNullOrWhiteSpace(i)).ToList(); + } + + public List GetAudioCodecs() + { + return (AudioCodec ?? string.Empty).Split(',').Where(i => !string.IsNullOrWhiteSpace(i)).ToList(); + } + + public List GetVideoCodecs() + { + return (VideoCodec ?? string.Empty).Split(',').Where(i => !string.IsNullOrWhiteSpace(i)).ToList(); + } + } +} diff --git a/MediaBrowser.Controller/Dlna/TranscodingProfile.cs b/MediaBrowser.Controller/Dlna/TranscodingProfile.cs index 707f0c573..704ba54d2 100644 --- a/MediaBrowser.Controller/Dlna/TranscodingProfile.cs +++ b/MediaBrowser.Controller/Dlna/TranscodingProfile.cs @@ -30,13 +30,8 @@ namespace MediaBrowser.Controller.Dlna [XmlAttribute("transcodeSeekInfo")] public TranscodeSeekInfo TranscodeSeekInfo { get; set; } - public TranscodingSetting[] Settings { get; set; } - - public TranscodingProfile() - { - Settings = new TranscodingSetting[] { }; - } - + [XmlAttribute("videoProfile")] + public string VideoProfile { get; set; } public List GetAudioCodecs() { @@ -44,20 +39,6 @@ namespace MediaBrowser.Controller.Dlna } } - public class TranscodingSetting - { - [XmlAttribute("name")] - public TranscodingSettingType Name { get; set; } - - [XmlAttribute("value")] - public string Value { get; set; } - } - - public enum TranscodingSettingType - { - VideoProfile = 0 - } - public enum TranscodeSeekInfo { Auto = 0, diff --git a/MediaBrowser.Controller/MediaBrowser.Controller.csproj b/MediaBrowser.Controller/MediaBrowser.Controller.csproj index 16834a945..a233c1f12 100644 --- a/MediaBrowser.Controller/MediaBrowser.Controller.csproj +++ b/MediaBrowser.Controller/MediaBrowser.Controller.csproj @@ -84,7 +84,7 @@ - + diff --git a/MediaBrowser.Dlna/PlayTo/PlaylistItem.cs b/MediaBrowser.Dlna/PlayTo/PlaylistItem.cs index 50605c61f..9f990bcb7 100644 --- a/MediaBrowser.Dlna/PlayTo/PlaylistItem.cs +++ b/MediaBrowser.Dlna/PlayTo/PlaylistItem.cs @@ -1,5 +1,4 @@ using MediaBrowser.Controller.Dlna; -using System.Collections.Generic; namespace MediaBrowser.Dlna.PlayTo { @@ -27,8 +26,6 @@ namespace MediaBrowser.Dlna.PlayTo public string AudioCodec { get; set; } - public List TranscodingSettings { get; set; } - public int? AudioStreamIndex { get; set; } public int? SubtitleStreamIndex { get; set; } @@ -47,10 +44,5 @@ namespace MediaBrowser.Dlna.PlayTo public int? MaxFramerate { get; set; } public string DeviceProfileId { get; set; } - - public PlaylistItem() - { - TranscodingSettings = new List(); - } } } \ No newline at end of file diff --git a/MediaBrowser.Dlna/PlayTo/PlaylistItemFactory.cs b/MediaBrowser.Dlna/PlayTo/PlaylistItemFactory.cs index c14a851ca..6a42e6a75 100644 --- a/MediaBrowser.Dlna/PlayTo/PlaylistItemFactory.cs +++ b/MediaBrowser.Dlna/PlayTo/PlaylistItemFactory.cs @@ -48,7 +48,6 @@ namespace MediaBrowser.Dlna.PlayTo if (transcodingProfile != null) { playlistItem.Transcode = true; - playlistItem.TranscodingSettings = transcodingProfile.Settings.ToList(); playlistItem.Container = "." + transcodingProfile.Container.TrimStart('.'); playlistItem.AudioCodec = transcodingProfile.AudioCodec; @@ -88,7 +87,6 @@ namespace MediaBrowser.Dlna.PlayTo if (transcodingProfile != null) { playlistItem.Transcode = true; - playlistItem.TranscodingSettings = transcodingProfile.Settings.ToList(); playlistItem.Container = "." + transcodingProfile.Container.TrimStart('.'); } @@ -137,7 +135,6 @@ namespace MediaBrowser.Dlna.PlayTo if (transcodingProfile != null) { playlistItem.Transcode = true; - playlistItem.TranscodingSettings = transcodingProfile.Settings.ToList(); playlistItem.Container = "." + transcodingProfile.Container.TrimStart('.'); playlistItem.AudioCodec = transcodingProfile.AudioCodec.Split(',').FirstOrDefault(); playlistItem.VideoCodec = transcodingProfile.VideoCodec; diff --git a/MediaBrowser.Dlna/Profiles/DefaultProfile.cs b/MediaBrowser.Dlna/Profiles/DefaultProfile.cs index 6b5513e28..e6b5668fa 100644 --- a/MediaBrowser.Dlna/Profiles/DefaultProfile.cs +++ b/MediaBrowser.Dlna/Profiles/DefaultProfile.cs @@ -35,11 +35,7 @@ namespace MediaBrowser.Dlna.Profiles Type = DlnaProfileType.Video, AudioCodec = "aac", VideoCodec = "h264", - - Settings = new [] - { - new TranscodingSetting {Name = TranscodingSettingType.VideoProfile, Value = "baseline"} - } + VideoProfile= "baseline" } }; diff --git a/MediaBrowser.Dlna/Profiles/SamsungSmartTvProfile.cs b/MediaBrowser.Dlna/Profiles/SamsungSmartTvProfile.cs index 122bde875..b008947d3 100644 --- a/MediaBrowser.Dlna/Profiles/SamsungSmartTvProfile.cs +++ b/MediaBrowser.Dlna/Profiles/SamsungSmartTvProfile.cs @@ -302,16 +302,16 @@ namespace MediaBrowser.Dlna.Profiles } }; - MediaProfiles = new[] + ResponseProfiles = new[] { - new MediaProfile + new ResponseProfile { Container = "avi", MimeType = "video/x-msvideo", Type = DlnaProfileType.Video }, - new MediaProfile + new ResponseProfile { Container = "mkv", MimeType = "video/x-mkv", diff --git a/MediaBrowser.Dlna/Profiles/SonyBlurayPlayerProfile.cs b/MediaBrowser.Dlna/Profiles/SonyBlurayPlayerProfile.cs index c5025edbb..972fc48ed 100644 --- a/MediaBrowser.Dlna/Profiles/SonyBlurayPlayerProfile.cs +++ b/MediaBrowser.Dlna/Profiles/SonyBlurayPlayerProfile.cs @@ -206,9 +206,9 @@ namespace MediaBrowser.Dlna.Profiles } }; - MediaProfiles = new[] + ResponseProfiles = new[] { - new MediaProfile + new ResponseProfile { Container = "ts", VideoCodec = "h264,mpeg4,vc1", @@ -218,42 +218,42 @@ namespace MediaBrowser.Dlna.Profiles Type = DlnaProfileType.Video }, - new MediaProfile + new ResponseProfile { Container = "avi", MimeType = "video/mpeg", Type = DlnaProfileType.Video }, - new MediaProfile + new ResponseProfile { Container = "mkv", MimeType = "video/vnd.dlna.mpeg-tts", Type = DlnaProfileType.Video }, - new MediaProfile + new ResponseProfile { Container = "ts", MimeType = "video/vnd.dlna.mpeg-tts", Type = DlnaProfileType.Video }, - new MediaProfile + new ResponseProfile { Container = "mp4", MimeType = "video/mpeg", Type = DlnaProfileType.Video }, - new MediaProfile + new ResponseProfile { Container = "mpeg", MimeType = "video/mpeg", Type = DlnaProfileType.Video }, - new MediaProfile + new ResponseProfile { Container = "mp3", MimeType = "audio/mpeg", diff --git a/MediaBrowser.Dlna/Profiles/SonyBravia2010Profile.cs b/MediaBrowser.Dlna/Profiles/SonyBravia2010Profile.cs index 8f29ad76e..870b97fe7 100644 --- a/MediaBrowser.Dlna/Profiles/SonyBravia2010Profile.cs +++ b/MediaBrowser.Dlna/Profiles/SonyBravia2010Profile.cs @@ -89,9 +89,9 @@ namespace MediaBrowser.Dlna.Profiles } }; - MediaProfiles = new[] + ResponseProfiles = new[] { - new MediaProfile + new ResponseProfile { Container = "ts", VideoCodec="h264", @@ -101,7 +101,7 @@ namespace MediaBrowser.Dlna.Profiles Type = DlnaProfileType.Video }, - new MediaProfile + new ResponseProfile { Container = "ts", VideoCodec="h264", @@ -111,7 +111,7 @@ namespace MediaBrowser.Dlna.Profiles Type = DlnaProfileType.Video }, - new MediaProfile + new ResponseProfile { Container = "ts", VideoCodec="h264", @@ -121,7 +121,7 @@ namespace MediaBrowser.Dlna.Profiles Type = DlnaProfileType.Video }, - new MediaProfile + new ResponseProfile { Container = "ts", VideoCodec="mpeg2video", @@ -130,7 +130,7 @@ namespace MediaBrowser.Dlna.Profiles Type = DlnaProfileType.Video }, - new MediaProfile + new ResponseProfile { Container = "mpeg", VideoCodec="mpeg1video,mpeg2video", diff --git a/MediaBrowser.Dlna/Profiles/SonyBravia2011Profile.cs b/MediaBrowser.Dlna/Profiles/SonyBravia2011Profile.cs index eaf6979a6..2bba58696 100644 --- a/MediaBrowser.Dlna/Profiles/SonyBravia2011Profile.cs +++ b/MediaBrowser.Dlna/Profiles/SonyBravia2011Profile.cs @@ -131,9 +131,9 @@ namespace MediaBrowser.Dlna.Profiles } }; - MediaProfiles = new[] + ResponseProfiles = new[] { - new MediaProfile + new ResponseProfile { Container = "ts", VideoCodec="h264", @@ -143,7 +143,7 @@ namespace MediaBrowser.Dlna.Profiles Type = DlnaProfileType.Video }, - new MediaProfile + new ResponseProfile { Container = "ts", VideoCodec="h264", @@ -153,7 +153,7 @@ namespace MediaBrowser.Dlna.Profiles Type = DlnaProfileType.Video }, - new MediaProfile + new ResponseProfile { Container = "ts", VideoCodec="h264", @@ -163,7 +163,7 @@ namespace MediaBrowser.Dlna.Profiles Type = DlnaProfileType.Video }, - new MediaProfile + new ResponseProfile { Container = "ts", VideoCodec="mpeg2video", @@ -172,7 +172,7 @@ namespace MediaBrowser.Dlna.Profiles Type = DlnaProfileType.Video }, - new MediaProfile + new ResponseProfile { Container = "mpeg", VideoCodec="mpeg1video,mpeg2video", diff --git a/MediaBrowser.Dlna/Profiles/SonyBravia2012Profile.cs b/MediaBrowser.Dlna/Profiles/SonyBravia2012Profile.cs index 41d057ef8..f8a6dcfbd 100644 --- a/MediaBrowser.Dlna/Profiles/SonyBravia2012Profile.cs +++ b/MediaBrowser.Dlna/Profiles/SonyBravia2012Profile.cs @@ -119,9 +119,9 @@ namespace MediaBrowser.Dlna.Profiles } }; - MediaProfiles = new[] + ResponseProfiles = new[] { - new MediaProfile + new ResponseProfile { Container = "ts", VideoCodec="h264", @@ -131,7 +131,7 @@ namespace MediaBrowser.Dlna.Profiles Type = DlnaProfileType.Video }, - new MediaProfile + new ResponseProfile { Container = "ts", VideoCodec="h264", @@ -141,7 +141,7 @@ namespace MediaBrowser.Dlna.Profiles Type = DlnaProfileType.Video }, - new MediaProfile + new ResponseProfile { Container = "ts", VideoCodec="h264", @@ -151,7 +151,7 @@ namespace MediaBrowser.Dlna.Profiles Type = DlnaProfileType.Video }, - new MediaProfile + new ResponseProfile { Container = "ts", VideoCodec="mpeg2video", @@ -160,7 +160,7 @@ namespace MediaBrowser.Dlna.Profiles Type = DlnaProfileType.Video }, - new MediaProfile + new ResponseProfile { Container = "mpeg", VideoCodec="mpeg1video,mpeg2video", diff --git a/MediaBrowser.Dlna/Profiles/SonyBravia2013Profile.cs b/MediaBrowser.Dlna/Profiles/SonyBravia2013Profile.cs index 386a36ae0..56eaf47f4 100644 --- a/MediaBrowser.Dlna/Profiles/SonyBravia2013Profile.cs +++ b/MediaBrowser.Dlna/Profiles/SonyBravia2013Profile.cs @@ -175,9 +175,9 @@ namespace MediaBrowser.Dlna.Profiles } }; - MediaProfiles = new[] + ResponseProfiles = new[] { - new MediaProfile + new ResponseProfile { Container = "ts", VideoCodec="h264", @@ -187,7 +187,7 @@ namespace MediaBrowser.Dlna.Profiles Type = DlnaProfileType.Video }, - new MediaProfile + new ResponseProfile { Container = "ts", VideoCodec="h264", @@ -197,7 +197,7 @@ namespace MediaBrowser.Dlna.Profiles Type = DlnaProfileType.Video }, - new MediaProfile + new ResponseProfile { Container = "ts", VideoCodec="h264", @@ -207,7 +207,7 @@ namespace MediaBrowser.Dlna.Profiles Type = DlnaProfileType.Video }, - new MediaProfile + new ResponseProfile { Container = "ts", VideoCodec="mpeg2video", @@ -216,7 +216,7 @@ namespace MediaBrowser.Dlna.Profiles Type = DlnaProfileType.Video }, - new MediaProfile + new ResponseProfile { Container = "mpeg", VideoCodec="mpeg1video,mpeg2video", diff --git a/MediaBrowser.Dlna/Profiles/SonyPs3Profile.cs b/MediaBrowser.Dlna/Profiles/SonyPs3Profile.cs index 351a13f00..06d721f52 100644 --- a/MediaBrowser.Dlna/Profiles/SonyPs3Profile.cs +++ b/MediaBrowser.Dlna/Profiles/SonyPs3Profile.cs @@ -207,9 +207,9 @@ namespace MediaBrowser.Dlna.Profiles } }; - MediaProfiles = new[] + ResponseProfiles = new[] { - new MediaProfile + new ResponseProfile { Container = "mp4,mov", AudioCodec="aac", @@ -217,7 +217,7 @@ namespace MediaBrowser.Dlna.Profiles Type = DlnaProfileType.Video }, - new MediaProfile + new ResponseProfile { Container = "avi", MimeType = "video/divx", @@ -225,7 +225,7 @@ namespace MediaBrowser.Dlna.Profiles Type = DlnaProfileType.Video }, - new MediaProfile + new ResponseProfile { Container = "wav", MimeType = "audio/wav", diff --git a/MediaBrowser.Dlna/Profiles/WdtvLiveProfile.cs b/MediaBrowser.Dlna/Profiles/WdtvLiveProfile.cs index f0b95d4e8..c3b88f7bf 100644 --- a/MediaBrowser.Dlna/Profiles/WdtvLiveProfile.cs +++ b/MediaBrowser.Dlna/Profiles/WdtvLiveProfile.cs @@ -43,11 +43,7 @@ namespace MediaBrowser.Dlna.Profiles Type = DlnaProfileType.Video, VideoCodec = "h264", AudioCodec = "aac", - - Settings = new [] - { - new TranscodingSetting {Name = TranscodingSettingType.VideoProfile, Value = "baseline"} - } + VideoProfile= "baseline" }, new TranscodingProfile { @@ -157,9 +153,9 @@ namespace MediaBrowser.Dlna.Profiles } }; - MediaProfiles = new[] + ResponseProfiles = new[] { - new MediaProfile + new ResponseProfile { Container = "ts", OrgPn = "MPEG_TS_SD_NA", diff --git a/MediaBrowser.Dlna/Profiles/Xbox360Profile.cs b/MediaBrowser.Dlna/Profiles/Xbox360Profile.cs index 38d08adef..3fae85f59 100644 --- a/MediaBrowser.Dlna/Profiles/Xbox360Profile.cs +++ b/MediaBrowser.Dlna/Profiles/Xbox360Profile.cs @@ -25,7 +25,7 @@ namespace MediaBrowser.Dlna.Profiles { ModelName = "Xbox 360", - Headers = new [] + Headers = new[] { new HttpHeaderInfo {Name = "User-Agent", Value = "Xbox", Match = HeaderMatchType.Substring}, new HttpHeaderInfo {Name = "User-Agent", Value = "Xenon", Match = HeaderMatchType.Substring} @@ -48,11 +48,7 @@ namespace MediaBrowser.Dlna.Profiles Type = DlnaProfileType.Video, TranscodeSeekInfo = TranscodeSeekInfo.Bytes, EstimateContentLength = true, - - Settings = new [] - { - new TranscodingSetting {Name = TranscodingSettingType.VideoProfile, Value = "baseline"} - } + VideoProfile= "baseline" }, new TranscodingProfile { @@ -110,9 +106,9 @@ namespace MediaBrowser.Dlna.Profiles } }; - MediaProfiles = new[] + ResponseProfiles = new[] { - new MediaProfile + new ResponseProfile { Container = "avi", MimeType = "video/avi", diff --git a/MediaBrowser.Dlna/Profiles/XboxOneProfile.cs b/MediaBrowser.Dlna/Profiles/XboxOneProfile.cs index 058c69e1f..59372655c 100644 --- a/MediaBrowser.Dlna/Profiles/XboxOneProfile.cs +++ b/MediaBrowser.Dlna/Profiles/XboxOneProfile.cs @@ -42,9 +42,9 @@ namespace MediaBrowser.Dlna.Profiles } }; - MediaProfiles = new[] + ResponseProfiles = new[] { - new MediaProfile + new ResponseProfile { Container = "avi", MimeType = "video/x-msvideo", diff --git a/MediaBrowser.Dlna/Profiles/Xml/Default.xml b/MediaBrowser.Dlna/Profiles/Xml/Default.xml index 895cb99d3..9d72d68d2 100644 --- a/MediaBrowser.Dlna/Profiles/Xml/Default.xml +++ b/MediaBrowser.Dlna/Profiles/Xml/Default.xml @@ -20,16 +20,10 @@ - - - - - - - - + + - + \ No newline at end of file diff --git a/MediaBrowser.Dlna/Profiles/Xml/Denon AVR.xml b/MediaBrowser.Dlna/Profiles/Xml/Denon AVR.xml index 58c5cefbc..31ab8b85c 100644 --- a/MediaBrowser.Dlna/Profiles/Xml/Denon AVR.xml +++ b/MediaBrowser.Dlna/Profiles/Xml/Denon AVR.xml @@ -24,16 +24,10 @@ - - - - - - - - + + - + \ No newline at end of file diff --git a/MediaBrowser.Dlna/Profiles/Xml/LG Smart TV.xml b/MediaBrowser.Dlna/Profiles/Xml/LG Smart TV.xml index 53781ad32..0e9ce618e 100644 --- a/MediaBrowser.Dlna/Profiles/Xml/LG Smart TV.xml +++ b/MediaBrowser.Dlna/Profiles/Xml/LG Smart TV.xml @@ -29,15 +29,9 @@ - - - - - - - - - + + + @@ -69,5 +63,5 @@ - + \ No newline at end of file diff --git a/MediaBrowser.Dlna/Profiles/Xml/Linksys DMA2100.xml b/MediaBrowser.Dlna/Profiles/Xml/Linksys DMA2100.xml index fc833b918..39822e0a3 100644 --- a/MediaBrowser.Dlna/Profiles/Xml/Linksys DMA2100.xml +++ b/MediaBrowser.Dlna/Profiles/Xml/Linksys DMA2100.xml @@ -24,16 +24,10 @@ - - - - - - - - + + - + \ No newline at end of file diff --git a/MediaBrowser.Dlna/Profiles/Xml/Panasonic Viera.xml b/MediaBrowser.Dlna/Profiles/Xml/Panasonic Viera.xml index 49fd05b1e..ab815a645 100644 --- a/MediaBrowser.Dlna/Profiles/Xml/Panasonic Viera.xml +++ b/MediaBrowser.Dlna/Profiles/Xml/Panasonic Viera.xml @@ -35,15 +35,9 @@ - - - - - - - - - + + + @@ -62,5 +56,5 @@ - + \ No newline at end of file diff --git a/MediaBrowser.Dlna/Profiles/Xml/Samsung Smart TV.xml b/MediaBrowser.Dlna/Profiles/Xml/Samsung Smart TV.xml index 75c50aae3..bd17802a2 100644 --- a/MediaBrowser.Dlna/Profiles/Xml/Samsung Smart TV.xml +++ b/MediaBrowser.Dlna/Profiles/Xml/Samsung Smart TV.xml @@ -33,15 +33,9 @@ - - - - - - - - - + + + @@ -91,12 +85,12 @@ - - + + - - + + - - + + \ No newline at end of file diff --git a/MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player 2013.xml b/MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player 2013.xml index 5bd27c771..53b515e10 100644 --- a/MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player 2013.xml +++ b/MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player 2013.xml @@ -33,15 +33,9 @@ - - - - - - - - - + + + @@ -65,5 +59,5 @@ - + \ No newline at end of file diff --git a/MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player.xml b/MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player.xml index f5502ca14..76b52c743 100644 --- a/MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player.xml +++ b/MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player.xml @@ -32,15 +32,9 @@ - - - - - - - - - + + + @@ -71,27 +65,27 @@ - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + \ No newline at end of file diff --git a/MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2010).xml b/MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2010).xml index 1337b5936..8c41cc3b7 100644 --- a/MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2010).xml +++ b/MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2010).xml @@ -30,15 +30,9 @@ - - - - - - - - - + + + @@ -80,21 +74,21 @@ - - + + - - + + - - + + - - + + - - + + - - + + \ No newline at end of file diff --git a/MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2011).xml b/MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2011).xml index b022c10a5..1ccd5f1de 100644 --- a/MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2011).xml +++ b/MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2011).xml @@ -33,15 +33,9 @@ - - - - - - - - - + + + @@ -83,21 +77,21 @@ - - + + - - + + - - + + - - + + - - + + - - + + \ No newline at end of file diff --git a/MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2012).xml b/MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2012).xml index cbef70b37..b578a98b6 100644 --- a/MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2012).xml +++ b/MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2012).xml @@ -35,15 +35,9 @@ - - - - - - - - - + + + @@ -66,21 +60,21 @@ - - + + - - + + - - + + - - + + - - + + - - + + \ No newline at end of file diff --git a/MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2013).xml b/MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2013).xml index 47db46ce1..fe5c63f90 100644 --- a/MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2013).xml +++ b/MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2013).xml @@ -40,15 +40,9 @@ - - - - - - - - - + + + @@ -66,21 +60,21 @@ - - + + - - + + - - + + - - + + - - + + - - + + \ No newline at end of file diff --git a/MediaBrowser.Dlna/Profiles/Xml/Sony PlayStation 3.xml b/MediaBrowser.Dlna/Profiles/Xml/Sony PlayStation 3.xml index d9aa441bb..f0db13e2a 100644 --- a/MediaBrowser.Dlna/Profiles/Xml/Sony PlayStation 3.xml +++ b/MediaBrowser.Dlna/Profiles/Xml/Sony PlayStation 3.xml @@ -29,15 +29,9 @@ - - - - - - - - - + + + @@ -80,15 +74,15 @@ - - + + - - + + - - + + - - + + \ No newline at end of file diff --git a/MediaBrowser.Dlna/Profiles/Xml/WDTV Live.xml b/MediaBrowser.Dlna/Profiles/Xml/WDTV Live.xml index 0f4ad54a7..bebdb2b45 100644 --- a/MediaBrowser.Dlna/Profiles/Xml/WDTV Live.xml +++ b/MediaBrowser.Dlna/Profiles/Xml/WDTV Live.xml @@ -38,17 +38,9 @@ - - - - - - - - - - - + + + @@ -72,9 +64,9 @@ - - + + - - + + \ No newline at end of file diff --git a/MediaBrowser.Dlna/Profiles/Xml/Xbox 360.xml b/MediaBrowser.Dlna/Profiles/Xml/Xbox 360.xml index 1e8d8164c..a2ac02ff9 100644 --- a/MediaBrowser.Dlna/Profiles/Xml/Xbox 360.xml +++ b/MediaBrowser.Dlna/Profiles/Xml/Xbox 360.xml @@ -33,17 +33,9 @@ - - - - - - - - - - - + + + @@ -95,9 +87,9 @@ - - + + - - + + \ No newline at end of file diff --git a/MediaBrowser.Dlna/Profiles/Xml/Xbox One.xml b/MediaBrowser.Dlna/Profiles/Xml/Xbox One.xml index f6c338b2f..aa2081dc0 100644 --- a/MediaBrowser.Dlna/Profiles/Xml/Xbox One.xml +++ b/MediaBrowser.Dlna/Profiles/Xml/Xbox One.xml @@ -24,18 +24,14 @@ - - - - - - + + - - + + - - + + \ No newline at end of file diff --git a/MediaBrowser.Dlna/Profiles/Xml/foobar2000.xml b/MediaBrowser.Dlna/Profiles/Xml/foobar2000.xml index f682e4c42..02a1529f3 100644 --- a/MediaBrowser.Dlna/Profiles/Xml/foobar2000.xml +++ b/MediaBrowser.Dlna/Profiles/Xml/foobar2000.xml @@ -26,16 +26,10 @@ - - - - - - - - + + - + \ No newline at end of file diff --git a/MediaBrowser.MediaEncoding/Encoder/InternalEncodingTaskFactory.cs b/MediaBrowser.MediaEncoding/Encoder/InternalEncodingTaskFactory.cs index fa9b87906..e6b67b0df 100644 --- a/MediaBrowser.MediaEncoding/Encoder/InternalEncodingTaskFactory.cs +++ b/MediaBrowser.MediaEncoding/Encoder/InternalEncodingTaskFactory.cs @@ -282,21 +282,9 @@ namespace MediaBrowser.MediaEncoding.Encoder state.EnableMpegtsM2TsMode = transcodingProfile.EnableMpegtsM2TsMode; //state.TranscodeSeekInfo = transcodingProfile.TranscodeSeekInfo; - foreach (var setting in transcodingProfile.Settings) + if (state.VideoRequest != null && string.IsNullOrWhiteSpace(state.VideoRequest.VideoProfile)) { - switch (setting.Name) - { - case TranscodingSettingType.VideoProfile: - { - if (state.VideoRequest != null && string.IsNullOrWhiteSpace(state.VideoRequest.VideoProfile)) - { - state.VideoRequest.VideoProfile = setting.Value; - } - break; - } - default: - throw new ArgumentException("Unrecognized TranscodingSettingType"); - } + state.VideoRequest.VideoProfile = transcodingProfile.VideoProfile; } } } diff --git a/MediaBrowser.Server.Implementations/Localization/Server/fr.json b/MediaBrowser.Server.Implementations/Localization/Server/fr.json index 2c7e1b52b..c2934807c 100644 --- a/MediaBrowser.Server.Implementations/Localization/Server/fr.json +++ b/MediaBrowser.Server.Implementations/Localization/Server/fr.json @@ -30,7 +30,7 @@ "LabelEnableVideoImageExtraction": "Activer l'extraction d'image des videos", "VideoImageExtractionHelp": "Pour les vid\u00e9os sans images et que nous n'avons pas trouv\u00e9 par Internet. Ce processus prolongera la mise \u00e0 jour initiale de biblioth\u00e8que mais offrira une meilleure pr\u00e9sentation visuelle.", "LabelEnableChapterImageExtractionForMovies": "Extraire les images de chapitre pour les films", - "LabelChapterImageExtractionForMoviesHelp": "Extracting chapter images will allow clients to display graphical scene selection menus. The process can be slow, cpu-intensive and may require several gigabytes of space. It runs as a nightly scheduled task at 4am, although this is configurable in the scheduled tasks area. It is not recommended to run this task during peak usage hours.", + "LabelChapterImageExtractionForMoviesHelp": "L'extraction d'images de chapitre permettra aux clients d'afficher des menus graphiques des sc\u00e8nes. Le processus peut \u00eatre long et exigeant en ressource processeur et de stockage (plusieurs Gigabytes). Il s'ex\u00e9cute par d\u00e9faut dans les t\u00e2ches programm\u00e9es \u00e0 4:00 AM mais peut \u00eatre modifi\u00e9 dans les options de t\u00e2ches programm\u00e9es. Il n'est pas recommand\u00e9 d'ex\u00e9cuter cette t\u00e2che dans les heures d'utilisation standard.", "LabelEnableAutomaticPortMapping": "Activer la configuration automatique de port", "LabelEnableAutomaticPortMappingHelp": "UPnP permet la configuration automatique de routeur pour un acc\u00e8s distance facile. Ceci peut ne pas fonctionner sur certains mod\u00e8les de routeur.", "ButtonOk": "Ok", -- cgit v1.2.3