Преглед изворни кода

reduce file system access by dlna manager

Luke Pulverenti пре 9 година
родитељ
комит
5f71a615c4
29 измењених фајлова са 204 додато и 135 уклоњено
  1. 56 54
      MediaBrowser.Dlna/DlnaManager.cs
  2. 5 3
      MediaBrowser.Dlna/Main/DlnaEntryPoint.cs
  3. 1 1
      MediaBrowser.Dlna/Profiles/LgTvProfile.cs
  4. 3 3
      MediaBrowser.Dlna/Profiles/Xml/BubbleUPnp.xml
  5. 3 3
      MediaBrowser.Dlna/Profiles/Xml/Default.xml
  6. 3 3
      MediaBrowser.Dlna/Profiles/Xml/Denon AVR.xml
  7. 4 2
      MediaBrowser.Dlna/Profiles/Xml/DirecTV HD-DVR.xml
  8. 7 3
      MediaBrowser.Dlna/Profiles/Xml/Dish Hopper-Joey.xml
  9. 3 3
      MediaBrowser.Dlna/Profiles/Xml/Kodi.xml
  10. 6 3
      MediaBrowser.Dlna/Profiles/Xml/LG Smart TV.xml
  11. 3 3
      MediaBrowser.Dlna/Profiles/Xml/Linksys DMA2100.xml
  12. 3 3
      MediaBrowser.Dlna/Profiles/Xml/MediaMonkey.xml
  13. 4 3
      MediaBrowser.Dlna/Profiles/Xml/Panasonic Viera.xml
  14. 8 3
      MediaBrowser.Dlna/Profiles/Xml/Popcorn Hour.xml
  15. 8 3
      MediaBrowser.Dlna/Profiles/Xml/Samsung Smart TV.xml
  16. 5 3
      MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player 2013.xml
  17. 6 3
      MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player.xml
  18. 9 3
      MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2010).xml
  19. 9 3
      MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2011).xml
  20. 6 3
      MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2012).xml
  21. 5 3
      MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2013).xml
  22. 5 3
      MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2014).xml
  23. 7 3
      MediaBrowser.Dlna/Profiles/Xml/Sony PlayStation 3.xml
  24. 7 3
      MediaBrowser.Dlna/Profiles/Xml/Sony PlayStation 4.xml
  25. 3 3
      MediaBrowser.Dlna/Profiles/Xml/Vlc.xml
  26. 5 3
      MediaBrowser.Dlna/Profiles/Xml/WDTV Live.xml
  27. 8 3
      MediaBrowser.Dlna/Profiles/Xml/Xbox 360.xml
  28. 9 3
      MediaBrowser.Dlna/Profiles/Xml/Xbox One.xml
  29. 3 3
      MediaBrowser.Dlna/Profiles/Xml/foobar2000.xml

+ 56 - 54
MediaBrowser.Dlna/DlnaManager.cs

@@ -29,7 +29,7 @@ namespace MediaBrowser.Dlna
         private readonly IJsonSerializer _jsonSerializer;
         private readonly IJsonSerializer _jsonSerializer;
         private readonly IServerApplicationHost _appHost;
         private readonly IServerApplicationHost _appHost;
 
 
-        private readonly Dictionary<string, DeviceProfile> _profiles = new Dictionary<string, DeviceProfile>(StringComparer.Ordinal);
+        private readonly Dictionary<string, Tuple<InternalProfileInfo, DeviceProfile>> _profiles = new Dictionary<string, Tuple<InternalProfileInfo, DeviceProfile>>(StringComparer.Ordinal);
 
 
         public DlnaManager(IXmlSerializer xmlSerializer,
         public DlnaManager(IXmlSerializer xmlSerializer,
             IFileSystem fileSystem,
             IFileSystem fileSystem,
@@ -45,50 +45,40 @@ namespace MediaBrowser.Dlna
             _appHost = appHost;
             _appHost = appHost;
         }
         }
 
 
-        public IEnumerable<DeviceProfile> GetProfiles()
+        public void InitProfiles()
         {
         {
-            ExtractProfilesIfNeeded();
+            try
+            {
+                ExtractSystemProfiles();
+                LoadProfiles();
+            }
+            catch (Exception ex)
+            {
+                _logger.ErrorException("Error extracting DLNA profiles.", ex);
+            }
+        }
 
 
+        private void LoadProfiles()
+        {
             var list = GetProfiles(UserProfilesPath, DeviceProfileType.User)
             var list = GetProfiles(UserProfilesPath, DeviceProfileType.User)
                 .OrderBy(i => i.Name)
                 .OrderBy(i => i.Name)
                 .ToList();
                 .ToList();
 
 
             list.AddRange(GetProfiles(SystemProfilesPath, DeviceProfileType.System)
             list.AddRange(GetProfiles(SystemProfilesPath, DeviceProfileType.System)
                 .OrderBy(i => i.Name));
                 .OrderBy(i => i.Name));
-
-            return list;
         }
         }
 
 
-        private bool _extracted;
-        private readonly object _syncLock = new object();
-        private void ExtractProfilesIfNeeded()
+        public IEnumerable<DeviceProfile> GetProfiles()
         {
         {
-            if (!_extracted)
+            lock (_profiles)
             {
             {
-                lock (_syncLock)
-                {
-                    if (!_extracted)
-                    {
-                        try
-                        {
-                            ExtractSystemProfiles();
-                        }
-                        catch (Exception ex)
-                        {
-                            _logger.ErrorException("Error extracting DLNA profiles.", ex);
-                        }
-
-                        _extracted = true;
-                    }
-
-                }
+                var list = _profiles.Values.ToList();
+                return list.Select(i => i.Item2).OrderBy(i => i.Name);
             }
             }
         }
         }
 
 
         public DeviceProfile GetDefaultProfile()
         public DeviceProfile GetDefaultProfile()
         {
         {
-            ExtractProfilesIfNeeded();
-
             return new DefaultProfile();
             return new DefaultProfile();
         }
         }
 
 
@@ -304,20 +294,20 @@ namespace MediaBrowser.Dlna
         {
         {
             lock (_profiles)
             lock (_profiles)
             {
             {
-                DeviceProfile profile;
-                if (_profiles.TryGetValue(path, out profile))
+                Tuple<InternalProfileInfo, DeviceProfile> profileTuple;
+                if (_profiles.TryGetValue(path, out profileTuple))
                 {
                 {
-                    return profile;
+                    return profileTuple.Item2;
                 }
                 }
 
 
                 try
                 try
                 {
                 {
-                    profile = (DeviceProfile)_xmlSerializer.DeserializeFromFile(typeof(DeviceProfile), path);
+                    var profile = (DeviceProfile)_xmlSerializer.DeserializeFromFile(typeof(DeviceProfile), path);
 
 
                     profile.Id = path.ToLower().GetMD5().ToString("N");
                     profile.Id = path.ToLower().GetMD5().ToString("N");
                     profile.ProfileType = type;
                     profile.ProfileType = type;
 
 
-                    _profiles[path] = profile;
+                    _profiles[path] = new Tuple<InternalProfileInfo, DeviceProfile>(GetInternalProfileInfo(_fileSystem.GetFileInfo(path), type), profile);
 
 
                     return profile;
                     return profile;
                 }
                 }
@@ -344,12 +334,14 @@ namespace MediaBrowser.Dlna
 
 
         private IEnumerable<InternalProfileInfo> GetProfileInfosInternal()
         private IEnumerable<InternalProfileInfo> GetProfileInfosInternal()
         {
         {
-            ExtractProfilesIfNeeded();
-
-            return GetProfileInfos(UserProfilesPath, DeviceProfileType.User)
-                .Concat(GetProfileInfos(SystemProfilesPath, DeviceProfileType.System))
-                .OrderBy(i => i.Info.Type == DeviceProfileType.User ? 0 : 1)
-                .ThenBy(i => i.Info.Name);
+            lock (_profiles)
+            {
+                var list = _profiles.Values.ToList();
+                return list
+                    .Select(i => i.Item1)
+                    .OrderBy(i => i.Info.Type == DeviceProfileType.User ? 0 : 1)
+                    .ThenBy(i => i.Info.Name);
+            }
         }
         }
 
 
         public IEnumerable<DeviceProfileInfo> GetProfileInfos()
         public IEnumerable<DeviceProfileInfo> GetProfileInfos()
@@ -363,17 +355,7 @@ namespace MediaBrowser.Dlna
             {
             {
                 return _fileSystem.GetFiles(path)
                 return _fileSystem.GetFiles(path)
                     .Where(i => string.Equals(i.Extension, ".xml", StringComparison.OrdinalIgnoreCase))
                     .Where(i => string.Equals(i.Extension, ".xml", StringComparison.OrdinalIgnoreCase))
-                    .Select(i => new InternalProfileInfo
-                    {
-                        Path = i.FullName,
-
-                        Info = new DeviceProfileInfo
-                        {
-                            Id = i.FullName.ToLower().GetMD5().ToString("N"),
-                            Name = _fileSystem.GetFileNameWithoutExtension(i),
-                            Type = type
-                        }
-                    })
+                    .Select(i => GetInternalProfileInfo(i, type))
                     .ToList();
                     .ToList();
             }
             }
             catch (DirectoryNotFoundException)
             catch (DirectoryNotFoundException)
@@ -382,6 +364,21 @@ namespace MediaBrowser.Dlna
             }
             }
         }
         }
 
 
+        private InternalProfileInfo GetInternalProfileInfo(FileSystemMetadata file, DeviceProfileType type)
+        {
+            return new InternalProfileInfo
+            {
+                Path = file.FullName,
+
+                Info = new DeviceProfileInfo
+                {
+                    Id = file.FullName.ToLower().GetMD5().ToString("N"),
+                    Name = _fileSystem.GetFileNameWithoutExtension(file),
+                    Type = type
+                }
+            };
+        }
+
         private void ExtractSystemProfiles()
         private void ExtractSystemProfiles()
         {
         {
             var assembly = GetType().Assembly;
             var assembly = GetType().Assembly;
@@ -427,6 +424,11 @@ namespace MediaBrowser.Dlna
             }
             }
 
 
             _fileSystem.DeleteFile(info.Path);
             _fileSystem.DeleteFile(info.Path);
+
+            lock (_profiles)
+            {
+                _profiles.Remove(info.Path);
+            }
         }
         }
 
 
         public void CreateProfile(DeviceProfile profile)
         public void CreateProfile(DeviceProfile profile)
@@ -441,7 +443,7 @@ namespace MediaBrowser.Dlna
             var newFilename = _fileSystem.GetValidFilename(profile.Name) + ".xml";
             var newFilename = _fileSystem.GetValidFilename(profile.Name) + ".xml";
             var path = Path.Combine(UserProfilesPath, newFilename);
             var path = Path.Combine(UserProfilesPath, newFilename);
 
 
-            SaveProfile(profile, path);
+            SaveProfile(profile, path, DeviceProfileType.User);
         }
         }
 
 
         public void UpdateProfile(DeviceProfile profile)
         public void UpdateProfile(DeviceProfile profile)
@@ -468,14 +470,14 @@ namespace MediaBrowser.Dlna
                 _fileSystem.DeleteFile(current.Path);
                 _fileSystem.DeleteFile(current.Path);
             }
             }
 
 
-            SaveProfile(profile, path);
+            SaveProfile(profile, path, DeviceProfileType.User);
         }
         }
 
 
-        private void SaveProfile(DeviceProfile profile, string path)
+        private void SaveProfile(DeviceProfile profile, string path, DeviceProfileType type)
         {
         {
             lock (_profiles)
             lock (_profiles)
             {
             {
-                _profiles[path] = profile;
+                _profiles[path] = new Tuple<InternalProfileInfo, DeviceProfile>(GetInternalProfileInfo(_fileSystem.GetFileInfo(path), type), profile);
             }
             }
             _xmlSerializer.SerializeToFile(profile, path);
             _xmlSerializer.SerializeToFile(profile, path);
         }
         }

+ 5 - 3
MediaBrowser.Dlna/Main/DlnaEntryPoint.cs

@@ -80,6 +80,8 @@ namespace MediaBrowser.Dlna.Main
 
 
         public void Run()
         public void Run()
         {
         {
+            ((DlnaManager)_dlnaManager).InitProfiles();
+
             ReloadComponents();
             ReloadComponents();
 
 
             _config.ConfigurationUpdated += _config_ConfigurationUpdated;
             _config.ConfigurationUpdated += _config_ConfigurationUpdated;
@@ -240,9 +242,9 @@ namespace MediaBrowser.Dlna.Main
 
 
                 var services = new List<string>
                 var services = new List<string>
                 {
                 {
-                    "upnp:rootdevice", 
-                    "urn:schemas-upnp-org:device:MediaServer:1", 
-                    "urn:schemas-upnp-org:service:ContentDirectory:1", 
+                    "upnp:rootdevice",
+                    "urn:schemas-upnp-org:device:MediaServer:1",
+                    "urn:schemas-upnp-org:service:ContentDirectory:1",
                     "urn:schemas-upnp-org:service:ConnectionManager:1",
                     "urn:schemas-upnp-org:service:ConnectionManager:1",
                     "urn:microsoft.com:service:X_MS_MediaReceiverRegistrar:1",
                     "urn:microsoft.com:service:X_MS_MediaReceiverRegistrar:1",
                     "uuid:" + udn
                     "uuid:" + udn

+ 1 - 1
MediaBrowser.Dlna/Profiles/LgTvProfile.cs

@@ -38,7 +38,7 @@ namespace MediaBrowser.Dlna.Profiles
                new TranscodingProfile
                new TranscodingProfile
                {
                {
                    Container = "ts",
                    Container = "ts",
-                   AudioCodec = "ac3",
+                   AudioCodec = "ac3,aac,mp3",
                    VideoCodec = "h264",
                    VideoCodec = "h264",
                    Type = DlnaProfileType.Video
                    Type = DlnaProfileType.Video
                },
                },

+ 3 - 3
MediaBrowser.Dlna/Profiles/Xml/BubbleUPnp.xml

@@ -40,9 +40,9 @@
     <DirectPlayProfile container="" type="Photo" />
     <DirectPlayProfile container="" type="Photo" />
   </DirectPlayProfiles>
   </DirectPlayProfiles>
   <TranscodingProfiles>
   <TranscodingProfiles>
-    <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
-    <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
-    <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
+    <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+    <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+    <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
   </TranscodingProfiles>
   </TranscodingProfiles>
   <ContainerProfiles />
   <ContainerProfiles />
   <CodecProfiles />
   <CodecProfiles />

+ 3 - 3
MediaBrowser.Dlna/Profiles/Xml/Default.xml

@@ -33,9 +33,9 @@
     <DirectPlayProfile container="avi,mp4" type="Video" />
     <DirectPlayProfile container="avi,mp4" type="Video" />
   </DirectPlayProfiles>
   </DirectPlayProfiles>
   <TranscodingProfiles>
   <TranscodingProfiles>
-    <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
-    <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
-    <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
+    <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+    <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+    <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
   </TranscodingProfiles>
   </TranscodingProfiles>
   <ContainerProfiles />
   <ContainerProfiles />
   <CodecProfiles />
   <CodecProfiles />

+ 3 - 3
MediaBrowser.Dlna/Profiles/Xml/Denon AVR.xml

@@ -37,9 +37,9 @@
     <DirectPlayProfile container="mp3,flac,m4a,wma" type="Audio" />
     <DirectPlayProfile container="mp3,flac,m4a,wma" type="Audio" />
   </DirectPlayProfiles>
   </DirectPlayProfiles>
   <TranscodingProfiles>
   <TranscodingProfiles>
-    <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
-    <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
-    <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
+    <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+    <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+    <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
   </TranscodingProfiles>
   </TranscodingProfiles>
   <ContainerProfiles />
   <ContainerProfiles />
   <CodecProfiles />
   <CodecProfiles />

+ 4 - 2
MediaBrowser.Dlna/Profiles/Xml/DirecTV HD-DVR.xml

@@ -39,8 +39,8 @@
     <DirectPlayProfile container="jpeg,jpg" type="Photo" />
     <DirectPlayProfile container="jpeg,jpg" type="Photo" />
   </DirectPlayProfiles>
   </DirectPlayProfiles>
   <TranscodingProfiles>
   <TranscodingProfiles>
-    <TranscodingProfile container="mpeg" type="Video" videoCodec="mpeg2video" audioCodec="mp2" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
-    <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
+    <TranscodingProfile container="mpeg" type="Video" videoCodec="mpeg2video" audioCodec="mp2" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+    <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
   </TranscodingProfiles>
   </TranscodingProfiles>
   <ContainerProfiles />
   <ContainerProfiles />
   <CodecProfiles>
   <CodecProfiles>
@@ -51,11 +51,13 @@
         <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="8192000" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="8192000" isRequired="true" />
       </Conditions>
       </Conditions>
+      <ApplyConditions />
     </CodecProfile>
     </CodecProfile>
     <CodecProfile type="Audio" codec="mp2">
     <CodecProfile type="Audio" codec="mp2">
       <Conditions>
       <Conditions>
         <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="true" />
       </Conditions>
       </Conditions>
+      <ApplyConditions />
     </CodecProfile>
     </CodecProfile>
   </CodecProfiles>
   </CodecProfiles>
   <ResponseProfiles />
   <ResponseProfiles />

+ 7 - 3
MediaBrowser.Dlna/Profiles/Xml/Dish Hopper-Joey.xml

@@ -43,9 +43,9 @@
     <DirectPlayProfile container="jpeg" type="Photo" />
     <DirectPlayProfile container="jpeg" type="Photo" />
   </DirectPlayProfiles>
   </DirectPlayProfiles>
   <TranscodingProfiles>
   <TranscodingProfiles>
-    <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
-    <TranscodingProfile container="mp4" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
-    <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
+    <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+    <TranscodingProfile container="mp4" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+    <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
   </TranscodingProfiles>
   </TranscodingProfiles>
   <ContainerProfiles />
   <ContainerProfiles />
   <CodecProfiles>
   <CodecProfiles>
@@ -57,6 +57,7 @@
         <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="20000000" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="20000000" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="VideoLevel" value="41" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="VideoLevel" value="41" isRequired="true" />
       </Conditions>
       </Conditions>
+      <ApplyConditions />
     </CodecProfile>
     </CodecProfile>
     <CodecProfile type="Video">
     <CodecProfile type="Video">
       <Conditions>
       <Conditions>
@@ -65,16 +66,19 @@
         <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="20000000" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="20000000" isRequired="true" />
       </Conditions>
       </Conditions>
+      <ApplyConditions />
     </CodecProfile>
     </CodecProfile>
     <CodecProfile type="VideoAudio" codec="ac3,he-aac">
     <CodecProfile type="VideoAudio" codec="ac3,he-aac">
       <Conditions>
       <Conditions>
         <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="6" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="6" isRequired="true" />
       </Conditions>
       </Conditions>
+      <ApplyConditions />
     </CodecProfile>
     </CodecProfile>
     <CodecProfile type="VideoAudio" codec="aac">
     <CodecProfile type="VideoAudio" codec="aac">
       <Conditions>
       <Conditions>
         <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="true" />
       </Conditions>
       </Conditions>
+      <ApplyConditions />
     </CodecProfile>
     </CodecProfile>
   </CodecProfiles>
   </CodecProfiles>
   <ResponseProfiles>
   <ResponseProfiles>

+ 3 - 3
MediaBrowser.Dlna/Profiles/Xml/Kodi.xml

@@ -40,9 +40,9 @@
     <DirectPlayProfile container="" type="Photo" />
     <DirectPlayProfile container="" type="Photo" />
   </DirectPlayProfiles>
   </DirectPlayProfiles>
   <TranscodingProfiles>
   <TranscodingProfiles>
-    <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
-    <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
-    <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
+    <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+    <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+    <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
   </TranscodingProfiles>
   </TranscodingProfiles>
   <ContainerProfiles />
   <ContainerProfiles />
   <CodecProfiles />
   <CodecProfiles />

+ 6 - 3
MediaBrowser.Dlna/Profiles/Xml/LG Smart TV.xml

@@ -42,9 +42,9 @@
     <DirectPlayProfile container="jpeg" type="Photo" />
     <DirectPlayProfile container="jpeg" type="Photo" />
   </DirectPlayProfiles>
   </DirectPlayProfiles>
   <TranscodingProfiles>
   <TranscodingProfiles>
-    <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
-    <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
-    <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
+    <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+    <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3,aac,mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+    <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
   </TranscodingProfiles>
   </TranscodingProfiles>
   <ContainerProfiles>
   <ContainerProfiles>
     <ContainerProfile type="Photo">
     <ContainerProfile type="Photo">
@@ -61,6 +61,7 @@
         <ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
       </Conditions>
       </Conditions>
+      <ApplyConditions />
     </CodecProfile>
     </CodecProfile>
     <CodecProfile type="Video" codec="h264">
     <CodecProfile type="Video" codec="h264">
       <Conditions>
       <Conditions>
@@ -69,11 +70,13 @@
         <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="VideoLevel" value="41" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="VideoLevel" value="41" isRequired="true" />
       </Conditions>
       </Conditions>
+      <ApplyConditions />
     </CodecProfile>
     </CodecProfile>
     <CodecProfile type="VideoAudio" codec="ac3,aac,mp3">
     <CodecProfile type="VideoAudio" codec="ac3,aac,mp3">
       <Conditions>
       <Conditions>
         <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="6" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="6" isRequired="true" />
       </Conditions>
       </Conditions>
+      <ApplyConditions />
     </CodecProfile>
     </CodecProfile>
   </CodecProfiles>
   </CodecProfiles>
   <ResponseProfiles />
   <ResponseProfiles />

+ 3 - 3
MediaBrowser.Dlna/Profiles/Xml/Linksys DMA2100.xml

@@ -37,9 +37,9 @@
     <DirectPlayProfile container="avi,mp4,mkv,ts" type="Video" />
     <DirectPlayProfile container="avi,mp4,mkv,ts" type="Video" />
   </DirectPlayProfiles>
   </DirectPlayProfiles>
   <TranscodingProfiles>
   <TranscodingProfiles>
-    <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
-    <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
-    <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
+    <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+    <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+    <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
   </TranscodingProfiles>
   </TranscodingProfiles>
   <ContainerProfiles />
   <ContainerProfiles />
   <CodecProfiles />
   <CodecProfiles />

+ 3 - 3
MediaBrowser.Dlna/Profiles/Xml/MediaMonkey.xml

@@ -43,9 +43,9 @@
     <DirectPlayProfile container="ogg" audioCodec="vorbis" type="Audio" />
     <DirectPlayProfile container="ogg" audioCodec="vorbis" type="Audio" />
   </DirectPlayProfiles>
   </DirectPlayProfiles>
   <TranscodingProfiles>
   <TranscodingProfiles>
-    <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
-    <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
-    <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
+    <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+    <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+    <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
   </TranscodingProfiles>
   </TranscodingProfiles>
   <ContainerProfiles />
   <ContainerProfiles />
   <CodecProfiles />
   <CodecProfiles />

+ 4 - 3
MediaBrowser.Dlna/Profiles/Xml/Panasonic Viera.xml

@@ -50,9 +50,9 @@
     <DirectPlayProfile container="jpeg" type="Photo" />
     <DirectPlayProfile container="jpeg" type="Photo" />
   </DirectPlayProfiles>
   </DirectPlayProfiles>
   <TranscodingProfiles>
   <TranscodingProfiles>
-    <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
-    <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
-    <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
+    <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+    <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+    <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
   </TranscodingProfiles>
   </TranscodingProfiles>
   <ContainerProfiles>
   <ContainerProfiles>
     <ContainerProfile type="Photo">
     <ContainerProfile type="Photo">
@@ -69,6 +69,7 @@
         <ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="VideoBitDepth" value="8" isRequired="false" />
         <ProfileCondition condition="LessThanEqual" property="VideoBitDepth" value="8" isRequired="false" />
       </Conditions>
       </Conditions>
+      <ApplyConditions />
     </CodecProfile>
     </CodecProfile>
   </CodecProfiles>
   </CodecProfiles>
   <ResponseProfiles>
   <ResponseProfiles>

+ 8 - 3
MediaBrowser.Dlna/Profiles/Xml/Popcorn Hour.xml

@@ -38,9 +38,9 @@
     <DirectPlayProfile container="jpeg,gif,bmp,png" type="Photo" />
     <DirectPlayProfile container="jpeg,gif,bmp,png" type="Photo" />
   </DirectPlayProfiles>
   </DirectPlayProfiles>
   <TranscodingProfiles>
   <TranscodingProfiles>
-    <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
-    <TranscodingProfile container="mp4" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
-    <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
+    <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+    <TranscodingProfile container="mp4" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+    <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
   </TranscodingProfiles>
   </TranscodingProfiles>
   <ContainerProfiles />
   <ContainerProfiles />
   <CodecProfiles>
   <CodecProfiles>
@@ -51,6 +51,7 @@
         <ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
         <ProfileCondition condition="NotEquals" property="IsAnamorphic" value="true" isRequired="false" />
         <ProfileCondition condition="NotEquals" property="IsAnamorphic" value="true" isRequired="false" />
       </Conditions>
       </Conditions>
+      <ApplyConditions />
     </CodecProfile>
     </CodecProfile>
     <CodecProfile type="Video">
     <CodecProfile type="Video">
       <Conditions>
       <Conditions>
@@ -58,22 +59,26 @@
         <ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
         <ProfileCondition condition="NotEquals" property="IsAnamorphic" value="true" isRequired="false" />
         <ProfileCondition condition="NotEquals" property="IsAnamorphic" value="true" isRequired="false" />
       </Conditions>
       </Conditions>
+      <ApplyConditions />
     </CodecProfile>
     </CodecProfile>
     <CodecProfile type="VideoAudio" codec="aac">
     <CodecProfile type="VideoAudio" codec="aac">
       <Conditions>
       <Conditions>
         <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="false" />
         <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="false" />
       </Conditions>
       </Conditions>
+      <ApplyConditions />
     </CodecProfile>
     </CodecProfile>
     <CodecProfile type="Audio" codec="aac">
     <CodecProfile type="Audio" codec="aac">
       <Conditions>
       <Conditions>
         <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="false" />
         <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="false" />
       </Conditions>
       </Conditions>
+      <ApplyConditions />
     </CodecProfile>
     </CodecProfile>
     <CodecProfile type="Audio" codec="mp3">
     <CodecProfile type="Audio" codec="mp3">
       <Conditions>
       <Conditions>
         <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="false" />
         <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="false" />
         <ProfileCondition condition="LessThanEqual" property="AudioBitrate" value="320000" isRequired="false" />
         <ProfileCondition condition="LessThanEqual" property="AudioBitrate" value="320000" isRequired="false" />
       </Conditions>
       </Conditions>
+      <ApplyConditions />
     </CodecProfile>
     </CodecProfile>
   </CodecProfiles>
   </CodecProfiles>
   <ResponseProfiles />
   <ResponseProfiles />

+ 8 - 3
MediaBrowser.Dlna/Profiles/Xml/Samsung Smart TV.xml

@@ -50,9 +50,9 @@
     <DirectPlayProfile container="jpeg" type="Photo" />
     <DirectPlayProfile container="jpeg" type="Photo" />
   </DirectPlayProfiles>
   </DirectPlayProfiles>
   <TranscodingProfiles>
   <TranscodingProfiles>
-    <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
-    <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="true" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
-    <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
+    <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+    <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="true" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+    <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
   </TranscodingProfiles>
   </TranscodingProfiles>
   <ContainerProfiles>
   <ContainerProfiles>
     <ContainerProfile type="Photo">
     <ContainerProfile type="Photo">
@@ -70,6 +70,7 @@
         <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="30720000" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="30720000" isRequired="true" />
       </Conditions>
       </Conditions>
+      <ApplyConditions />
     </CodecProfile>
     </CodecProfile>
     <CodecProfile type="Video" codec="mpeg4">
     <CodecProfile type="Video" codec="mpeg4">
       <Conditions>
       <Conditions>
@@ -78,6 +79,7 @@
         <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="8192000" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="8192000" isRequired="true" />
       </Conditions>
       </Conditions>
+      <ApplyConditions />
     </CodecProfile>
     </CodecProfile>
     <CodecProfile type="Video" codec="h264">
     <CodecProfile type="Video" codec="h264">
       <Conditions>
       <Conditions>
@@ -87,6 +89,7 @@
         <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="37500000" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="37500000" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="VideoLevel" value="41" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="VideoLevel" value="41" isRequired="true" />
       </Conditions>
       </Conditions>
+      <ApplyConditions />
     </CodecProfile>
     </CodecProfile>
     <CodecProfile type="Video" codec="wmv2,wmv3,vc1">
     <CodecProfile type="Video" codec="wmv2,wmv3,vc1">
       <Conditions>
       <Conditions>
@@ -95,11 +98,13 @@
         <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="25600000" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="25600000" isRequired="true" />
       </Conditions>
       </Conditions>
+      <ApplyConditions />
     </CodecProfile>
     </CodecProfile>
     <CodecProfile type="VideoAudio" codec="ac3,wmav2,dca,aac,mp3">
     <CodecProfile type="VideoAudio" codec="ac3,wmav2,dca,aac,mp3">
       <Conditions>
       <Conditions>
         <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="6" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="6" isRequired="true" />
       </Conditions>
       </Conditions>
+      <ApplyConditions />
     </CodecProfile>
     </CodecProfile>
   </CodecProfiles>
   </CodecProfiles>
   <ResponseProfiles>
   <ResponseProfiles>

+ 5 - 3
MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player 2013.xml

@@ -48,9 +48,9 @@
     <DirectPlayProfile container="jpeg" type="Photo" />
     <DirectPlayProfile container="jpeg" type="Photo" />
   </DirectPlayProfiles>
   </DirectPlayProfiles>
   <TranscodingProfiles>
   <TranscodingProfiles>
-    <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
-    <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
-    <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
+    <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+    <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+    <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
   </TranscodingProfiles>
   </TranscodingProfiles>
   <ContainerProfiles>
   <ContainerProfiles>
     <ContainerProfile type="Photo">
     <ContainerProfile type="Photo">
@@ -67,11 +67,13 @@
         <ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="false" />
         <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="false" />
       </Conditions>
       </Conditions>
+      <ApplyConditions />
     </CodecProfile>
     </CodecProfile>
     <CodecProfile type="VideoAudio" codec="ac3">
     <CodecProfile type="VideoAudio" codec="ac3">
       <Conditions>
       <Conditions>
         <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="6" isRequired="false" />
         <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="6" isRequired="false" />
       </Conditions>
       </Conditions>
+      <ApplyConditions />
     </CodecProfile>
     </CodecProfile>
   </CodecProfiles>
   </CodecProfiles>
   <ResponseProfiles />
   <ResponseProfiles />

+ 6 - 3
MediaBrowser.Dlna/Profiles/Xml/Sony Blu-ray Player.xml

@@ -47,9 +47,9 @@
     <DirectPlayProfile container="jpeg" type="Photo" />
     <DirectPlayProfile container="jpeg" type="Photo" />
   </DirectPlayProfiles>
   </DirectPlayProfiles>
   <TranscodingProfiles>
   <TranscodingProfiles>
-    <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
-    <TranscodingProfile container="ts" type="Video" videoCodec="mpeg2video" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
-    <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
+    <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+    <TranscodingProfile container="ts" type="Video" videoCodec="mpeg2video" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+    <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
   </TranscodingProfiles>
   </TranscodingProfiles>
   <ContainerProfiles>
   <ContainerProfiles>
     <ContainerProfile type="Photo">
     <ContainerProfile type="Photo">
@@ -68,16 +68,19 @@
         <ProfileCondition condition="LessThanEqual" property="VideoLevel" value="41" isRequired="false" />
         <ProfileCondition condition="LessThanEqual" property="VideoLevel" value="41" isRequired="false" />
         <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="15360000" isRequired="false" />
         <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="15360000" isRequired="false" />
       </Conditions>
       </Conditions>
+      <ApplyConditions />
     </CodecProfile>
     </CodecProfile>
     <CodecProfile type="VideoAudio" codec="ac3">
     <CodecProfile type="VideoAudio" codec="ac3">
       <Conditions>
       <Conditions>
         <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="6" isRequired="false" />
         <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="6" isRequired="false" />
       </Conditions>
       </Conditions>
+      <ApplyConditions />
     </CodecProfile>
     </CodecProfile>
     <CodecProfile type="VideoAudio" codec="aac">
     <CodecProfile type="VideoAudio" codec="aac">
       <Conditions>
       <Conditions>
         <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="false" />
         <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="false" />
       </Conditions>
       </Conditions>
+      <ApplyConditions />
     </CodecProfile>
     </CodecProfile>
   </CodecProfiles>
   </CodecProfiles>
   <ResponseProfiles>
   <ResponseProfiles>

+ 9 - 3
MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2010).xml

@@ -45,9 +45,9 @@
     <DirectPlayProfile container="mp3" audioCodec="mp3" type="Audio" />
     <DirectPlayProfile container="mp3" audioCodec="mp3" type="Audio" />
   </DirectPlayProfiles>
   </DirectPlayProfiles>
   <TranscodingProfiles>
   <TranscodingProfiles>
-    <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
-    <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="true" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
-    <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
+    <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+    <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="true" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+    <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
   </TranscodingProfiles>
   </TranscodingProfiles>
   <ContainerProfiles>
   <ContainerProfiles>
     <ContainerProfile type="Photo">
     <ContainerProfile type="Photo">
@@ -66,6 +66,7 @@
         <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="20000000" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="20000000" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="VideoLevel" value="41" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="VideoLevel" value="41" isRequired="true" />
       </Conditions>
       </Conditions>
+      <ApplyConditions />
     </CodecProfile>
     </CodecProfile>
     <CodecProfile type="Video" codec="mpeg2video">
     <CodecProfile type="Video" codec="mpeg2video">
       <Conditions>
       <Conditions>
@@ -74,6 +75,7 @@
         <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="20000000" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="20000000" isRequired="true" />
       </Conditions>
       </Conditions>
+      <ApplyConditions />
     </CodecProfile>
     </CodecProfile>
     <CodecProfile type="Video">
     <CodecProfile type="Video">
       <Conditions>
       <Conditions>
@@ -81,22 +83,26 @@
         <ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
       </Conditions>
       </Conditions>
+      <ApplyConditions />
     </CodecProfile>
     </CodecProfile>
     <CodecProfile type="VideoAudio" codec="ac3">
     <CodecProfile type="VideoAudio" codec="ac3">
       <Conditions>
       <Conditions>
         <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="6" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="6" isRequired="true" />
       </Conditions>
       </Conditions>
+      <ApplyConditions />
     </CodecProfile>
     </CodecProfile>
     <CodecProfile type="VideoAudio" codec="aac">
     <CodecProfile type="VideoAudio" codec="aac">
       <Conditions>
       <Conditions>
         <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="true" />
         <ProfileCondition condition="NotEquals" property="AudioProfile" value="he-aac" isRequired="true" />
         <ProfileCondition condition="NotEquals" property="AudioProfile" value="he-aac" isRequired="true" />
       </Conditions>
       </Conditions>
+      <ApplyConditions />
     </CodecProfile>
     </CodecProfile>
     <CodecProfile type="VideoAudio" codec="mp3,mp2">
     <CodecProfile type="VideoAudio" codec="mp3,mp2">
       <Conditions>
       <Conditions>
         <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="true" />
       </Conditions>
       </Conditions>
+      <ApplyConditions />
     </CodecProfile>
     </CodecProfile>
   </CodecProfiles>
   </CodecProfiles>
   <ResponseProfiles>
   <ResponseProfiles>

+ 9 - 3
MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2011).xml

@@ -48,9 +48,9 @@
     <DirectPlayProfile container="asf" audioCodec="wmav2,wmapro,wmavoice" type="Audio" />
     <DirectPlayProfile container="asf" audioCodec="wmav2,wmapro,wmavoice" type="Audio" />
   </DirectPlayProfiles>
   </DirectPlayProfiles>
   <TranscodingProfiles>
   <TranscodingProfiles>
-    <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
-    <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="true" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
-    <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
+    <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+    <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="true" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+    <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
   </TranscodingProfiles>
   </TranscodingProfiles>
   <ContainerProfiles>
   <ContainerProfiles>
     <ContainerProfile type="Photo">
     <ContainerProfile type="Photo">
@@ -69,6 +69,7 @@
         <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="20000000" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="20000000" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="VideoLevel" value="41" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="VideoLevel" value="41" isRequired="true" />
       </Conditions>
       </Conditions>
+      <ApplyConditions />
     </CodecProfile>
     </CodecProfile>
     <CodecProfile type="Video" codec="mpeg2video">
     <CodecProfile type="Video" codec="mpeg2video">
       <Conditions>
       <Conditions>
@@ -77,6 +78,7 @@
         <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="20000000" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="20000000" isRequired="true" />
       </Conditions>
       </Conditions>
+      <ApplyConditions />
     </CodecProfile>
     </CodecProfile>
     <CodecProfile type="Video">
     <CodecProfile type="Video">
       <Conditions>
       <Conditions>
@@ -84,22 +86,26 @@
         <ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
       </Conditions>
       </Conditions>
+      <ApplyConditions />
     </CodecProfile>
     </CodecProfile>
     <CodecProfile type="VideoAudio" codec="ac3">
     <CodecProfile type="VideoAudio" codec="ac3">
       <Conditions>
       <Conditions>
         <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="6" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="6" isRequired="true" />
       </Conditions>
       </Conditions>
+      <ApplyConditions />
     </CodecProfile>
     </CodecProfile>
     <CodecProfile type="VideoAudio" codec="aac">
     <CodecProfile type="VideoAudio" codec="aac">
       <Conditions>
       <Conditions>
         <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="true" />
         <ProfileCondition condition="NotEquals" property="AudioProfile" value="he-aac" isRequired="true" />
         <ProfileCondition condition="NotEquals" property="AudioProfile" value="he-aac" isRequired="true" />
       </Conditions>
       </Conditions>
+      <ApplyConditions />
     </CodecProfile>
     </CodecProfile>
     <CodecProfile type="VideoAudio" codec="mp3,mp2">
     <CodecProfile type="VideoAudio" codec="mp3,mp2">
       <Conditions>
       <Conditions>
         <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="true" />
       </Conditions>
       </Conditions>
+      <ApplyConditions />
     </CodecProfile>
     </CodecProfile>
   </CodecProfiles>
   </CodecProfiles>
   <ResponseProfiles>
   <ResponseProfiles>

+ 6 - 3
MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2012).xml

@@ -50,9 +50,9 @@
     <DirectPlayProfile container="jpeg" type="Photo" />
     <DirectPlayProfile container="jpeg" type="Photo" />
   </DirectPlayProfiles>
   </DirectPlayProfiles>
   <TranscodingProfiles>
   <TranscodingProfiles>
-    <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
-    <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="true" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
-    <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
+    <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+    <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="true" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+    <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
   </TranscodingProfiles>
   </TranscodingProfiles>
   <ContainerProfiles>
   <ContainerProfiles>
     <ContainerProfile type="Photo">
     <ContainerProfile type="Photo">
@@ -69,16 +69,19 @@
         <ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
       </Conditions>
       </Conditions>
+      <ApplyConditions />
     </CodecProfile>
     </CodecProfile>
     <CodecProfile type="VideoAudio" codec="ac3">
     <CodecProfile type="VideoAudio" codec="ac3">
       <Conditions>
       <Conditions>
         <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="6" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="6" isRequired="true" />
       </Conditions>
       </Conditions>
+      <ApplyConditions />
     </CodecProfile>
     </CodecProfile>
     <CodecProfile type="VideoAudio" codec="mp3,mp2">
     <CodecProfile type="VideoAudio" codec="mp3,mp2">
       <Conditions>
       <Conditions>
         <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="true" />
       </Conditions>
       </Conditions>
+      <ApplyConditions />
     </CodecProfile>
     </CodecProfile>
   </CodecProfiles>
   </CodecProfiles>
   <ResponseProfiles>
   <ResponseProfiles>

+ 5 - 3
MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2013).xml

@@ -55,9 +55,9 @@
     <DirectPlayProfile container="jpeg" type="Photo" />
     <DirectPlayProfile container="jpeg" type="Photo" />
   </DirectPlayProfiles>
   </DirectPlayProfiles>
   <TranscodingProfiles>
   <TranscodingProfiles>
-    <TranscodingProfile container="mp3" type="Audio" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
-    <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="true" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
-    <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
+    <TranscodingProfile container="mp3" type="Audio" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+    <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="true" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+    <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
   </TranscodingProfiles>
   </TranscodingProfiles>
   <ContainerProfiles>
   <ContainerProfiles>
     <ContainerProfile type="Photo">
     <ContainerProfile type="Photo">
@@ -74,11 +74,13 @@
         <ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
       </Conditions>
       </Conditions>
+      <ApplyConditions />
     </CodecProfile>
     </CodecProfile>
     <CodecProfile type="VideoAudio" codec="mp3,mp2">
     <CodecProfile type="VideoAudio" codec="mp3,mp2">
       <Conditions>
       <Conditions>
         <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="true" />
       </Conditions>
       </Conditions>
+      <ApplyConditions />
     </CodecProfile>
     </CodecProfile>
   </CodecProfiles>
   </CodecProfiles>
   <ResponseProfiles>
   <ResponseProfiles>

+ 5 - 3
MediaBrowser.Dlna/Profiles/Xml/Sony Bravia (2014).xml

@@ -55,9 +55,9 @@
     <DirectPlayProfile container="jpeg" type="Photo" />
     <DirectPlayProfile container="jpeg" type="Photo" />
   </DirectPlayProfiles>
   </DirectPlayProfiles>
   <TranscodingProfiles>
   <TranscodingProfiles>
-    <TranscodingProfile container="mp3" type="Audio" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
-    <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="true" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
-    <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
+    <TranscodingProfile container="mp3" type="Audio" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+    <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3" estimateContentLength="false" enableMpegtsM2TsMode="true" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+    <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
   </TranscodingProfiles>
   </TranscodingProfiles>
   <ContainerProfiles>
   <ContainerProfiles>
     <ContainerProfile type="Photo">
     <ContainerProfile type="Photo">
@@ -74,11 +74,13 @@
         <ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="true" />
       </Conditions>
       </Conditions>
+      <ApplyConditions />
     </CodecProfile>
     </CodecProfile>
     <CodecProfile type="VideoAudio" codec="mp3,mp2">
     <CodecProfile type="VideoAudio" codec="mp3,mp2">
       <Conditions>
       <Conditions>
         <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="true" />
       </Conditions>
       </Conditions>
+      <ApplyConditions />
     </CodecProfile>
     </CodecProfile>
   </CodecProfiles>
   </CodecProfiles>
   <ResponseProfiles>
   <ResponseProfiles>

+ 7 - 3
MediaBrowser.Dlna/Profiles/Xml/Sony PlayStation 3.xml

@@ -45,9 +45,9 @@
     <DirectPlayProfile container="jpeg,png,gif,bmp,tiff" type="Photo" />
     <DirectPlayProfile container="jpeg,png,gif,bmp,tiff" type="Photo" />
   </DirectPlayProfiles>
   </DirectPlayProfiles>
   <TranscodingProfiles>
   <TranscodingProfiles>
-    <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
-    <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3,aac,mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
-    <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
+    <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+    <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="ac3,aac,mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+    <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
   </TranscodingProfiles>
   </TranscodingProfiles>
   <ContainerProfiles>
   <ContainerProfiles>
     <ContainerProfile type="Photo">
     <ContainerProfile type="Photo">
@@ -66,22 +66,26 @@
         <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="15360000" isRequired="false" />
         <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="15360000" isRequired="false" />
         <ProfileCondition condition="LessThanEqual" property="VideoLevel" value="41" isRequired="false" />
         <ProfileCondition condition="LessThanEqual" property="VideoLevel" value="41" isRequired="false" />
       </Conditions>
       </Conditions>
+      <ApplyConditions />
     </CodecProfile>
     </CodecProfile>
     <CodecProfile type="VideoAudio" codec="ac3">
     <CodecProfile type="VideoAudio" codec="ac3">
       <Conditions>
       <Conditions>
         <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="6" isRequired="false" />
         <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="6" isRequired="false" />
         <ProfileCondition condition="LessThanEqual" property="AudioBitrate" value="640000" isRequired="false" />
         <ProfileCondition condition="LessThanEqual" property="AudioBitrate" value="640000" isRequired="false" />
       </Conditions>
       </Conditions>
+      <ApplyConditions />
     </CodecProfile>
     </CodecProfile>
     <CodecProfile type="VideoAudio" codec="wmapro">
     <CodecProfile type="VideoAudio" codec="wmapro">
       <Conditions>
       <Conditions>
         <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="true" />
       </Conditions>
       </Conditions>
+      <ApplyConditions />
     </CodecProfile>
     </CodecProfile>
     <CodecProfile type="VideoAudio" codec="aac">
     <CodecProfile type="VideoAudio" codec="aac">
       <Conditions>
       <Conditions>
         <ProfileCondition condition="NotEquals" property="AudioProfile" value="he-aac" isRequired="false" />
         <ProfileCondition condition="NotEquals" property="AudioProfile" value="he-aac" isRequired="false" />
       </Conditions>
       </Conditions>
+      <ApplyConditions />
     </CodecProfile>
     </CodecProfile>
   </CodecProfiles>
   </CodecProfiles>
   <ResponseProfiles>
   <ResponseProfiles>

+ 7 - 3
MediaBrowser.Dlna/Profiles/Xml/Sony PlayStation 4.xml

@@ -45,9 +45,9 @@
     <DirectPlayProfile container="jpeg,png,gif,bmp,tiff" type="Photo" />
     <DirectPlayProfile container="jpeg,png,gif,bmp,tiff" type="Photo" />
   </DirectPlayProfiles>
   </DirectPlayProfiles>
   <TranscodingProfiles>
   <TranscodingProfiles>
-    <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
-    <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
-    <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
+    <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+    <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+    <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
   </TranscodingProfiles>
   </TranscodingProfiles>
   <ContainerProfiles>
   <ContainerProfiles>
     <ContainerProfile type="Photo">
     <ContainerProfile type="Photo">
@@ -66,22 +66,26 @@
         <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="15360000" isRequired="false" />
         <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="15360000" isRequired="false" />
         <ProfileCondition condition="LessThanEqual" property="VideoLevel" value="41" isRequired="false" />
         <ProfileCondition condition="LessThanEqual" property="VideoLevel" value="41" isRequired="false" />
       </Conditions>
       </Conditions>
+      <ApplyConditions />
     </CodecProfile>
     </CodecProfile>
     <CodecProfile type="VideoAudio" codec="ac3">
     <CodecProfile type="VideoAudio" codec="ac3">
       <Conditions>
       <Conditions>
         <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="6" isRequired="false" />
         <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="6" isRequired="false" />
         <ProfileCondition condition="LessThanEqual" property="AudioBitrate" value="640000" isRequired="false" />
         <ProfileCondition condition="LessThanEqual" property="AudioBitrate" value="640000" isRequired="false" />
       </Conditions>
       </Conditions>
+      <ApplyConditions />
     </CodecProfile>
     </CodecProfile>
     <CodecProfile type="VideoAudio" codec="wmapro">
     <CodecProfile type="VideoAudio" codec="wmapro">
       <Conditions>
       <Conditions>
         <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="true" />
       </Conditions>
       </Conditions>
+      <ApplyConditions />
     </CodecProfile>
     </CodecProfile>
     <CodecProfile type="VideoAudio" codec="aac">
     <CodecProfile type="VideoAudio" codec="aac">
       <Conditions>
       <Conditions>
         <ProfileCondition condition="NotEquals" property="AudioProfile" value="he-aac" isRequired="false" />
         <ProfileCondition condition="NotEquals" property="AudioProfile" value="he-aac" isRequired="false" />
       </Conditions>
       </Conditions>
+      <ApplyConditions />
     </CodecProfile>
     </CodecProfile>
   </CodecProfiles>
   </CodecProfiles>
   <ResponseProfiles>
   <ResponseProfiles>

+ 3 - 3
MediaBrowser.Dlna/Profiles/Xml/Vlc.xml

@@ -40,9 +40,9 @@
     <DirectPlayProfile container="" type="Photo" />
     <DirectPlayProfile container="" type="Photo" />
   </DirectPlayProfiles>
   </DirectPlayProfiles>
   <TranscodingProfiles>
   <TranscodingProfiles>
-    <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
-    <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
-    <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
+    <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+    <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+    <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
   </TranscodingProfiles>
   </TranscodingProfiles>
   <ContainerProfiles />
   <ContainerProfiles />
   <CodecProfiles />
   <CodecProfiles />

+ 5 - 3
MediaBrowser.Dlna/Profiles/Xml/WDTV Live.xml

@@ -51,9 +51,9 @@
     <DirectPlayProfile container="jpeg,png,gif,bmp,tiff" type="Photo" />
     <DirectPlayProfile container="jpeg,png,gif,bmp,tiff" type="Photo" />
   </DirectPlayProfiles>
   </DirectPlayProfiles>
   <TranscodingProfiles>
   <TranscodingProfiles>
-    <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
-    <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
-    <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
+    <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+    <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+    <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
   </TranscodingProfiles>
   </TranscodingProfiles>
   <ContainerProfiles>
   <ContainerProfiles>
     <ContainerProfile type="Photo">
     <ContainerProfile type="Photo">
@@ -70,11 +70,13 @@
         <ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="Height" value="1080" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="VideoLevel" value="41" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="VideoLevel" value="41" isRequired="true" />
       </Conditions>
       </Conditions>
+      <ApplyConditions />
     </CodecProfile>
     </CodecProfile>
     <CodecProfile type="VideoAudio" codec="aac">
     <CodecProfile type="VideoAudio" codec="aac">
       <Conditions>
       <Conditions>
         <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="true" />
         <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="true" />
       </Conditions>
       </Conditions>
+      <ApplyConditions />
     </CodecProfile>
     </CodecProfile>
   </CodecProfiles>
   </CodecProfiles>
   <ResponseProfiles>
   <ResponseProfiles>

+ 8 - 3
MediaBrowser.Dlna/Profiles/Xml/Xbox 360.xml

@@ -46,9 +46,9 @@
     <DirectPlayProfile container="jpeg" type="Photo" />
     <DirectPlayProfile container="jpeg" type="Photo" />
   </DirectPlayProfiles>
   </DirectPlayProfiles>
   <TranscodingProfiles>
   <TranscodingProfiles>
-    <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
-    <TranscodingProfile container="asf" type="Video" videoCodec="wmv2" audioCodec="wmav2" estimateContentLength="true" enableMpegtsM2TsMode="false" transcodeSeekInfo="Bytes" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
-    <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
+    <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+    <TranscodingProfile container="asf" type="Video" videoCodec="wmv2" audioCodec="wmav2" estimateContentLength="true" enableMpegtsM2TsMode="false" transcodeSeekInfo="Bytes" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+    <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
   </TranscodingProfiles>
   </TranscodingProfiles>
   <ContainerProfiles>
   <ContainerProfiles>
     <ContainerProfile type="Video" container="mp4,mov">
     <ContainerProfile type="Video" container="mp4,mov">
@@ -71,6 +71,7 @@
         <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="false" />
         <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="false" />
         <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="5120000" isRequired="false" />
         <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="5120000" isRequired="false" />
       </Conditions>
       </Conditions>
+      <ApplyConditions />
     </CodecProfile>
     </CodecProfile>
     <CodecProfile type="Video" codec="h264">
     <CodecProfile type="Video" codec="h264">
       <Conditions>
       <Conditions>
@@ -79,6 +80,7 @@
         <ProfileCondition condition="LessThanEqual" property="VideoLevel" value="41" isRequired="false" />
         <ProfileCondition condition="LessThanEqual" property="VideoLevel" value="41" isRequired="false" />
         <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="10240000" isRequired="false" />
         <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="10240000" isRequired="false" />
       </Conditions>
       </Conditions>
+      <ApplyConditions />
     </CodecProfile>
     </CodecProfile>
     <CodecProfile type="Video" codec="wmv2,wmv3,vc1">
     <CodecProfile type="Video" codec="wmv2,wmv3,vc1">
       <Conditions>
       <Conditions>
@@ -87,17 +89,20 @@
         <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="false" />
         <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="false" />
         <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="15360000" isRequired="false" />
         <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="15360000" isRequired="false" />
       </Conditions>
       </Conditions>
+      <ApplyConditions />
     </CodecProfile>
     </CodecProfile>
     <CodecProfile type="VideoAudio" codec="ac3,wmav2,wmapro">
     <CodecProfile type="VideoAudio" codec="ac3,wmav2,wmapro">
       <Conditions>
       <Conditions>
         <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="6" isRequired="false" />
         <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="6" isRequired="false" />
       </Conditions>
       </Conditions>
+      <ApplyConditions />
     </CodecProfile>
     </CodecProfile>
     <CodecProfile type="VideoAudio" codec="aac">
     <CodecProfile type="VideoAudio" codec="aac">
       <Conditions>
       <Conditions>
         <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="false" />
         <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="false" />
         <ProfileCondition condition="Equals" property="AudioProfile" value="lc" isRequired="false" />
         <ProfileCondition condition="Equals" property="AudioProfile" value="lc" isRequired="false" />
       </Conditions>
       </Conditions>
+      <ApplyConditions />
     </CodecProfile>
     </CodecProfile>
   </CodecProfiles>
   </CodecProfiles>
   <ResponseProfiles>
   <ResponseProfiles>

+ 9 - 3
MediaBrowser.Dlna/Profiles/Xml/Xbox One.xml

@@ -46,9 +46,9 @@
     <DirectPlayProfile container="jpeg" type="Photo" />
     <DirectPlayProfile container="jpeg" type="Photo" />
   </DirectPlayProfiles>
   </DirectPlayProfiles>
   <TranscodingProfiles>
   <TranscodingProfiles>
-    <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
-    <TranscodingProfile container="jpeg" type="Photo" videoCodec="jpeg" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
-    <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
+    <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+    <TranscodingProfile container="jpeg" type="Photo" videoCodec="jpeg" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+    <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
   </TranscodingProfiles>
   </TranscodingProfiles>
   <ContainerProfiles>
   <ContainerProfiles>
     <ContainerProfile type="Video" container="mp4,mov">
     <ContainerProfile type="Video" container="mp4,mov">
@@ -67,6 +67,7 @@
         <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="false" />
         <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="false" />
         <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="5120000" isRequired="false" />
         <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="5120000" isRequired="false" />
       </Conditions>
       </Conditions>
+      <ApplyConditions />
     </CodecProfile>
     </CodecProfile>
     <CodecProfile type="Video" codec="h264">
     <CodecProfile type="Video" codec="h264">
       <Conditions>
       <Conditions>
@@ -77,6 +78,7 @@
         <ProfileCondition condition="LessThanEqual" property="VideoLevel" value="41" isRequired="false" />
         <ProfileCondition condition="LessThanEqual" property="VideoLevel" value="41" isRequired="false" />
         <ProfileCondition condition="EqualsAny" property="VideoProfile" value="high|main|baseline|constrained baseline" isRequired="false" />
         <ProfileCondition condition="EqualsAny" property="VideoProfile" value="high|main|baseline|constrained baseline" isRequired="false" />
       </Conditions>
       </Conditions>
+      <ApplyConditions />
     </CodecProfile>
     </CodecProfile>
     <CodecProfile type="Video" codec="wmv2,wmv3,vc1">
     <CodecProfile type="Video" codec="wmv2,wmv3,vc1">
       <Conditions>
       <Conditions>
@@ -87,23 +89,27 @@
         <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="false" />
         <ProfileCondition condition="LessThanEqual" property="VideoFramerate" value="30" isRequired="false" />
         <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="15360000" isRequired="false" />
         <ProfileCondition condition="LessThanEqual" property="VideoBitrate" value="15360000" isRequired="false" />
       </Conditions>
       </Conditions>
+      <ApplyConditions />
     </CodecProfile>
     </CodecProfile>
     <CodecProfile type="Video">
     <CodecProfile type="Video">
       <Conditions>
       <Conditions>
         <ProfileCondition condition="NotEquals" property="IsAnamorphic" value="true" isRequired="false" />
         <ProfileCondition condition="NotEquals" property="IsAnamorphic" value="true" isRequired="false" />
         <ProfileCondition condition="LessThanEqual" property="VideoBitDepth" value="8" isRequired="false" />
         <ProfileCondition condition="LessThanEqual" property="VideoBitDepth" value="8" isRequired="false" />
       </Conditions>
       </Conditions>
+      <ApplyConditions />
     </CodecProfile>
     </CodecProfile>
     <CodecProfile type="VideoAudio" codec="ac3,wmav2,wmapro">
     <CodecProfile type="VideoAudio" codec="ac3,wmav2,wmapro">
       <Conditions>
       <Conditions>
         <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="6" isRequired="false" />
         <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="6" isRequired="false" />
       </Conditions>
       </Conditions>
+      <ApplyConditions />
     </CodecProfile>
     </CodecProfile>
     <CodecProfile type="VideoAudio" codec="aac">
     <CodecProfile type="VideoAudio" codec="aac">
       <Conditions>
       <Conditions>
         <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="false" />
         <ProfileCondition condition="LessThanEqual" property="AudioChannels" value="2" isRequired="false" />
         <ProfileCondition condition="Equals" property="AudioProfile" value="lc" isRequired="false" />
         <ProfileCondition condition="Equals" property="AudioProfile" value="lc" isRequired="false" />
       </Conditions>
       </Conditions>
+      <ApplyConditions />
     </CodecProfile>
     </CodecProfile>
   </CodecProfiles>
   </CodecProfiles>
   <ResponseProfiles>
   <ResponseProfiles>

+ 3 - 3
MediaBrowser.Dlna/Profiles/Xml/foobar2000.xml

@@ -43,9 +43,9 @@
     <DirectPlayProfile container="ogg" audioCodec="vorbis" type="Audio" />
     <DirectPlayProfile container="ogg" audioCodec="vorbis" type="Audio" />
   </DirectPlayProfiles>
   </DirectPlayProfiles>
   <TranscodingProfiles>
   <TranscodingProfiles>
-    <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
-    <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
-    <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" />
+    <TranscodingProfile container="mp3" type="Audio" audioCodec="mp3" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+    <TranscodingProfile container="ts" type="Video" videoCodec="h264" audioCodec="aac" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
+    <TranscodingProfile container="jpeg" type="Photo" estimateContentLength="false" enableMpegtsM2TsMode="false" transcodeSeekInfo="Auto" copyTimestamps="false" context="Streaming" forceLiveStream="false" enableSubtitlesInManifest="false" />
   </TranscodingProfiles>
   </TranscodingProfiles>
   <ContainerProfiles />
   <ContainerProfiles />
   <CodecProfiles />
   <CodecProfiles />