From 4afe2c3f731562efbe42147d1bcbdc0a7542cfeb Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Tue, 1 Apr 2014 00:16:25 -0400 Subject: [PATCH] updated dlna profile format --- .../Playback/BaseStreamingService.cs | 30 ++++--------- MediaBrowser.Controller/Dlna/DeviceProfile.cs | 16 +++---- .../{MediaProfile.cs => ResponseProfile.cs} | 4 +- .../Dlna/TranscodingProfile.cs | 23 +--------- .../MediaBrowser.Controller.csproj | 2 +- MediaBrowser.Dlna/PlayTo/PlaylistItem.cs | 8 ---- .../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 ++--- .../Profiles/Xml/LG Smart TV.xml | 14 ++---- .../Profiles/Xml/Linksys DMA2100.xml | 12 ++--- .../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 +- 37 files changed, 217 insertions(+), 387 deletions(-) rename MediaBrowser.Controller/Dlna/{MediaProfile.cs => ResponseProfile.cs} (95%) diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs index e6ec38846b..6c406a11cf 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 c1fc713e4a..bb9629c28b 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/ResponseProfile.cs similarity index 95% rename from MediaBrowser.Controller/Dlna/MediaProfile.cs rename to MediaBrowser.Controller/Dlna/ResponseProfile.cs index bf3057294c..163a95d5ac 100644 --- a/MediaBrowser.Controller/Dlna/MediaProfile.cs +++ b/MediaBrowser.Controller/Dlna/ResponseProfile.cs @@ -4,7 +4,7 @@ using System.Xml.Serialization; namespace MediaBrowser.Controller.Dlna { - public class MediaProfile + public class ResponseProfile { [XmlAttribute("container")] public string Container { get; set; } @@ -26,7 +26,7 @@ namespace MediaBrowser.Controller.Dlna public ProfileCondition[] Conditions { get; set; } - public MediaProfile() + public ResponseProfile() { Conditions = new ProfileCondition[] {}; } diff --git a/MediaBrowser.Controller/Dlna/TranscodingProfile.cs b/MediaBrowser.Controller/Dlna/TranscodingProfile.cs index 707f0c5731..704ba54d26 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 16834a945f..a233c1f12f 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 50605c61fe..9f990bcb7b 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 c14a851cab..6a42e6a756 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 6b5513e289..e6b5668faf 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 122bde875f..b008947d3f 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 c5025edbb6..972fc48ed7 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 8f29ad76e3..870b97fe72 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 eaf6979a6b..2bba58696e 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 41d057ef8a..f8a6dcfbd7 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 386a36ae0c..56eaf47f4f 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 351a13f001..06d721f52e 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 f0b95d4e88..c3b88f7bfc 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 38d08adef7..3fae85f594 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 058c69e1ff..59372655c0 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 895cb99d32..9d72d68d23 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 58c5cefbc5..31ab8b85c7 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 53781ad324..0e9ce618e7 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 fc833b9186..39822e0a38 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 49fd05b1e0..ab815a645f 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 75c50aae36..bd17802a24 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 5bd27c7716..53b515e106 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 f5502ca14a..76b52c7438 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 1337b59361..8c41cc3b7e 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 b022c10a51..1ccd5f1dec 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 cbef70b378..b578a98b61 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 47db46ce11..fe5c63f90d 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 d9aa441bb4..f0db13e2af 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 0f4ad54a77..bebdb2b45e 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 1e8d8164c3..a2ac02ff91 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 f6c338b2f5..aa2081dc0d 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 f682e4c421..02a1529f3d 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 fa9b879061..e6b67b0df6 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 2c7e1b52b6..c2934807c9 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",