The Free Software Media System - Server Backend & API
add new device profiles
Luke Pulverenti87aee1625da9
diff --git a/MediaBrowser.Api/SearchService.cs b/MediaBrowser.Api/SearchService.csindex f46c6b8e30..662c728e46 100644--- a/MediaBrowser.Api/SearchService.cs+++ b/MediaBrowser.Api/SearchService.cs@@ -1,5 +1,4 @@-using System;-using MediaBrowser.Controller.Drawing;+using MediaBrowser.Controller.Drawing;using MediaBrowser.Controller.Dto;using MediaBrowser.Controller.Entities;using MediaBrowser.Controller.Entities.Audio;@@ -8,6 +7,7 @@ using MediaBrowser.Controller.Library;using MediaBrowser.Model.Entities;using MediaBrowser.Model.Search;using ServiceStack;+using System;using System.Linq;using System.Threading.Tasks;@@ -16,8 +16,7 @@ namespace MediaBrowser.Api/// <summary>/// Class GetSearchHints/// </summary>- [Route("/Search/Hints", "GET")]- [Api(Description = "Gets search hints based on a search term")]+ [Route("/Search/Hints", "GET", Summary = "Gets search hints based on a search term")]public class GetSearchHints : IReturn<SearchHintResult>{/// <summary>@@ -66,7 +65,7 @@ namespace MediaBrowser.Api[ApiMember(Name = "IncludeItemTypes", Description = "Optional. If specified, results will be filtered based on item type. This allows multiple, comma delimeted.", IsRequired = false, DataType = "string", ParameterType = "query", Verb = "GET", AllowMultiple = true)]public string IncludeItemTypes { get; set; }-+public GetSearchHints(){IncludeArtists = true;diff --git a/MediaBrowser.Api/SessionsService.cs b/MediaBrowser.Api/SessionsService.csindex e73e3490ec..070fe9e598 100644--- a/MediaBrowser.Api/SessionsService.cs+++ b/MediaBrowser.Api/SessionsService.cs@@ -14,8 +14,7 @@ namespace MediaBrowser.Api/// <summary>/// Class GetSessions/// </summary>- [Route("/Sessions", "GET")]- [Api(("Gets a list of sessions"))]+ [Route("/Sessions", "GET", Summary = "Gets a list of sessions")]public class GetSessions : IReturn<List<SessionInfoDto>>{/// <summary>@@ -35,8 +34,7 @@ namespace MediaBrowser.Api/// <summary>/// Class BrowseTo/// </summary>- [Route("/Sessions/{Id}/Viewing", "POST")]- [Api(("Instructs a session to browse to an item or view"))]+ [Route("/Sessions/{Id}/Viewing", "POST", Summary = "Instructs a session to browse to an item or view")]public class BrowseTo : IReturnVoid{/// <summary>@@ -77,8 +75,7 @@ namespace MediaBrowser.Apipublic string Context { get; set; }}- [Route("/Sessions/{Id}/Playing", "POST")]- [Api(("Instructs a session to play an item"))]+ [Route("/Sessions/{Id}/Playing", "POST", Summary = "Instructs a session to play an item")]public class Play : IReturnVoid{/// <summary>@@ -110,8 +107,7 @@ namespace MediaBrowser.Apipublic PlayCommand PlayCommand { get; set; }}- [Route("/Sessions/{Id}/Playing/{Command}", "POST")]- [Api(("Issues a playstate command to a client"))]+ [Route("/Sessions/{Id}/Playing/{Command}", "POST", Summary = "Issues a playstate command to a client")]public class SendPlaystateCommand : IReturnVoid{/// <summary>@@ -135,8 +131,7 @@ namespace MediaBrowser.Apipublic PlaystateCommand Command { get; set; }}- [Route("/Sessions/{Id}/System/{Command}", "POST")]- [Api(("Issues a system command to a client"))]+ [Route("/Sessions/{Id}/System/{Command}", "POST", Summary = "Issues a system command to a client")]public class SendSystemCommand : IReturnVoid{/// <summary>@@ -154,8 +149,7 @@ namespace MediaBrowser.Apipublic SystemCommand Command { get; set; }}- [Route("/Sessions/{Id}/Message", "POST")]- [Api(("Issues a command to a client to display a message to the user"))]+ [Route("/Sessions/{Id}/Message", "POST", Summary = "Issues a command to a client to display a message to the user")]public class SendMessageCommand : IReturnVoid{/// <summary>@@ -175,8 +169,7 @@ namespace MediaBrowser.Apipublic long? TimeoutMs { get; set; }}- [Route("/Sessions/{Id}/Users/{UserId}", "POST")]- [Api(("Adds an additional user to a session"))]+ [Route("/Sessions/{Id}/Users/{UserId}", "POST", Summary = "Adds an additional user to a session")]public class AddUserToSession : IReturnVoid{[ApiMember(Name = "Id", Description = "Session Id", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "POST")]@@ -186,8 +179,7 @@ namespace MediaBrowser.Apipublic Guid UserId { get; set; }}- [Route("/Sessions/{Id}/Users/{UserId}", "DELETE")]- [Api(("Removes an additional user from a session"))]+ [Route("/Sessions/{Id}/Users/{UserId}", "DELETE", Summary = "Removes an additional user from a session")]public class RemoveUserFromSession : IReturnVoid{[ApiMember(Name = "Id", Description = "Session Id", IsRequired = true, DataType = "string", ParameterType = "path", Verb = "POST")]@@ -197,8 +189,7 @@ namespace MediaBrowser.Apipublic Guid UserId { get; set; }}- [Route("/Sessions/{Id}/Capabilities", "POST")]- [Api(("Updates capabilities for a device"))]+ [Route("/Sessions/{Id}/Capabilities", "POST", Summary = "Updates capabilities for a device")]public class PostCapabilities : IReturnVoid{/// <summary>diff --git a/MediaBrowser.Api/SystemService.cs b/MediaBrowser.Api/SystemService.csindex 9f5f3716ec..2f0741434a 100644--- a/MediaBrowser.Api/SystemService.cs+++ b/MediaBrowser.Api/SystemService.cs@@ -8,8 +8,7 @@ namespace MediaBrowser.Api/// <summary>/// Class GetSystemInfo/// </summary>- [Route("/System/Info", "GET")]- [Api(Description = "Gets information about the server")]+ [Route("/System/Info", "GET", Summary = "Gets information about the server")]public class GetSystemInfo : IReturn<SystemInfo>{@@ -18,18 +17,16 @@ namespace MediaBrowser.Api/// <summary>/// Class RestartApplication/// </summary>- [Route("/System/Restart", "POST")]- [Api(("Restarts the application, if needed"))]+ [Route("/System/Restart", "POST", Summary = "Restarts the application, if needed")]public class RestartApplication{}- [Route("/System/Shutdown", "POST")]- [Api(("Shuts down the application"))]+ [Route("/System/Shutdown", "POST", Summary = "Shuts down the application")]public class ShutdownApplication{}-+/// <summary>/// Class SystemInfoService/// </summary>diff --git a/MediaBrowser.Api/TvShowsService.cs b/MediaBrowser.Api/TvShowsService.csindex a805b7b551..7fa586a7d7 100644--- a/MediaBrowser.Api/TvShowsService.cs+++ b/MediaBrowser.Api/TvShowsService.cs@@ -17,8 +17,7 @@ namespace MediaBrowser.Api/// <summary>/// Class GetNextUpEpisodes/// </summary>- [Route("/Shows/NextUp", "GET")]- [Api(("Gets a list of next up episodes"))]+ [Route("/Shows/NextUp", "GET", Summary = "Gets a list of next up episodes")]public class GetNextUpEpisodes : IReturn<ItemsResult>, IHasItemFields{/// <summary>@@ -53,8 +52,7 @@ namespace MediaBrowser.Apipublic string SeriesId { get; set; }}- [Route("/Shows/Upcoming", "GET")]- [Api(("Gets a list of upcoming episodes"))]+ [Route("/Shows/Upcoming", "GET", Summary = "Gets a list of upcoming episodes")]public class GetUpcomingEpisodes : IReturn<ItemsResult>, IHasItemFields{/// <summary>@@ -86,14 +84,12 @@ namespace MediaBrowser.Apipublic string Fields { get; set; }}- [Route("/Shows/{Id}/Similar", "GET")]- [Api(Description = "Finds tv shows similar to a given one.")]+ [Route("/Shows/{Id}/Similar", "GET", Summary = "Finds tv shows similar to a given one.")]public class GetSimilarShows : BaseGetSimilarItemsFromItem{}- [Route("/Shows/{Id}/Episodes", "GET")]- [Api(Description = "Gets episodes for a tv season")]+ [Route("/Shows/{Id}/Episodes", "GET", Summary = "Gets episodes for a tv season")]public class GetEpisodes : IReturn<ItemsResult>, IHasItemFields{/// <summary>@@ -129,8 +125,7 @@ namespace MediaBrowser.Apipublic string AdjacentTo { get; set; }}- [Route("/Shows/{Id}/Seasons", "GET")]- [Api(Description = "Gets seasons for a tv series")]+ [Route("/Shows/{Id}/Seasons", "GET", Summary = "Gets seasons for a tv series")]public class GetSeasons : IReturn<ItemsResult>, IHasItemFields{/// <summary>@@ -320,7 +315,7 @@ namespace MediaBrowser.Apireturn 0;})- .ThenByDescending(i =>i.Item2)+ .ThenByDescending(i => i.Item2).ThenByDescending(i => i.Item1.PremiereDate ?? DateTime.MinValue).Select(i => i.Item1);}diff --git a/MediaBrowser.Api/UserService.cs b/MediaBrowser.Api/UserService.csindex 18c3bd0962..2f1b161078 100644--- a/MediaBrowser.Api/UserService.cs+++ b/MediaBrowser.Api/UserService.cs@@ -17,8 +17,7 @@ namespace MediaBrowser.Api/// <summary>/// Class GetUsers/// </summary>- [Route("/Users", "GET")]- [Api(Description = "Gets a list of users")]+ [Route("/Users", "GET", Summary = "Gets a list of users")]public class GetUsers : IReturn<List<UserDto>>{[ApiMember(Name = "IsHidden", Description = "Optional filter by IsHidden=true or false", IsRequired = false, DataType = "bool", ParameterType = "query", Verb = "GET")]@@ -28,8 +27,7 @@ namespace MediaBrowser.Apipublic bool? IsDisabled { get; set; }}- [Route("/Users/Public", "GET")]- [Api(Description = "Gets a list of publicly visible users for display on a login screen.")]+ [Route("/Users/Public", "GET", Summary = "Gets a list of publicly visible users for display on a login screen.")]public class GetPublicUsers : IReturn<List<UserDto>>{}@@ -37,8 +35,7 @@ namespace MediaBrowser.Api/// <summary>/// Class GetUser/// </summary>- [Route("/Users/{Id}", "GET")]- [Api(Description = "Gets a user by Id")]+ [Route("/Users/{Id}", "GET", Summary = "Gets a user by Id")]public class GetUser : IReturn<UserDto>{/// <summary>@@ -52,8 +49,7 @@ namespace MediaBrowser.Api/// <summary>/// Class DeleteUser/// </summary>- [Route("/Users/{Id}", "DELETE")]- [Api(Description = "Deletes a user")]+ [Route("/Users/{Id}", "DELETE", Summary = "Deletes a user")]public class DeleteUser : IReturnVoid{/// <summary>@@ -67,8 +63,7 @@ namespace MediaBrowser.Api/// <summary>/// Class AuthenticateUser/// </summary>- [Route("/Users/{Id}/Authenticate", "POST")]- [Api(Description = "Authenticates a user")]+ [Route("/Users/{Id}/Authenticate", "POST", Summary = "Authenticates a user")]public class AuthenticateUser : IReturn<AuthenticationResult>{/// <summary>@@ -89,8 +84,7 @@ namespace MediaBrowser.Api/// <summary>/// Class AuthenticateUser/// </summary>- [Route("/Users/AuthenticateByName", "POST")]- [Api(Description = "Authenticates a user")]+ [Route("/Users/AuthenticateByName", "POST", Summary = "Authenticates a user")]public class AuthenticateUserByName : IReturn<AuthenticationResult>{/// <summary>@@ -111,8 +105,7 @@ namespace MediaBrowser.Api/// <summary>/// Class UpdateUserPassword/// </summary>- [Route("/Users/{Id}/Password", "POST")]- [Api(Description = "Updates a user's password")]+ [Route("/Users/{Id}/Password", "POST", Summary = "Updates a user's password")]public class UpdateUserPassword : IReturnVoid{/// <summary>@@ -143,8 +136,7 @@ namespace MediaBrowser.Api/// <summary>/// Class UpdateUser/// </summary>- [Route("/Users/{Id}", "POST")]- [Api(Description = "Updates a user")]+ [Route("/Users/{Id}", "POST", Summary = "Updates a user")]public class UpdateUser : UserDto, IReturnVoid{}@@ -152,8 +144,7 @@ namespace MediaBrowser.Api/// <summary>/// Class CreateUser/// </summary>- [Route("/Users", "POST")]- [Api(Description = "Creates a user")]+ [Route("/Users", "POST", Summary = "Creates a user")]public class CreateUser : UserDto, IReturn<UserDto>{}diff --git a/MediaBrowser.Controller/Dlna/CodecProfile.cs b/MediaBrowser.Controller/Dlna/CodecProfile.csindex 1dc7f21396..5621c7ef23 100644--- a/MediaBrowser.Controller/Dlna/CodecProfile.cs+++ b/MediaBrowser.Controller/Dlna/CodecProfile.cs@@ -61,6 +61,8 @@ namespace MediaBrowser.Controller.DlnaVideoBitrate,VideoFramerate,VideoLevel,- VideoProfile+ VideoPacketLength,+ VideoProfile,+ VideoTimestamp}}diff --git a/MediaBrowser.Controller/Dlna/MediaProfile.cs b/MediaBrowser.Controller/Dlna/MediaProfile.csindex 5fa41b18aa..1d2613face 100644--- a/MediaBrowser.Controller/Dlna/MediaProfile.cs+++ b/MediaBrowser.Controller/Dlna/MediaProfile.cs@@ -13,6 +13,13 @@ namespace MediaBrowser.Controller.Dlnapublic string OrgPn { get; set; }public string MimeType { get; set; }+ public ProfileCondition[] Conditions { get; set; }++ public MediaProfile()+ {+ Conditions = new ProfileCondition[] {};+ }+public List<string> GetAudioCodecs(){return (AudioCodec ?? string.Empty).Split(',').Where(i => !string.IsNullOrWhiteSpace(i)).ToList();diff --git a/MediaBrowser.Dlna/DlnaManager.cs b/MediaBrowser.Dlna/DlnaManager.csindex d4fdf92d8d..25a82f5290 100644--- a/MediaBrowser.Dlna/DlnaManager.cs+++ b/MediaBrowser.Dlna/DlnaManager.cs@@ -34,6 +34,8 @@ namespace MediaBrowser.Dlnalist.Add(new Xbox360Profile());list.Add(new XboxOneProfile());++ list.Add(new SonyPs3Profile());list.Add(new SonyBravia2010Profile());@@ -43,6 +45,9 @@ namespace MediaBrowser.Dlnalist.Add(new SonyBravia2013Profile());+ list.Add(new SonyBlurayPlayer2013Profile());+ list.Add(new SonyBlurayPlayerProfile());+list.Add(new PanasonicVieraProfile());list.Add(new WdtvLiveProfile());diff --git a/MediaBrowser.Dlna/MediaBrowser.Dlna.csproj b/MediaBrowser.Dlna/MediaBrowser.Dlna.csprojindex c370882463..31eed483fe 100644--- a/MediaBrowser.Dlna/MediaBrowser.Dlna.csproj+++ b/MediaBrowser.Dlna/MediaBrowser.Dlna.csproj@@ -86,10 +86,13 @@<Compile Include="Profiles\LinksysDMA2100Profile.cs" /><Compile Include="Profiles\PanasonicVieraProfile.cs" /><Compile Include="Profiles\SamsungSmartTvProfile.cs" />+ <Compile Include="Profiles\SonyBlurayPlayer2013Profile.cs" />+ <Compile Include="Profiles\SonyBlurayPlayerProfile.cs" /><Compile Include="Profiles\SonyBravia2010Profile.cs" /><Compile Include="Profiles\SonyBravia2011Profile.cs" /><Compile Include="Profiles\SonyBravia2012Profile.cs" /><Compile Include="Profiles\SonyBravia2013Profile.cs" />+ <Compile Include="Profiles\SonyPs3Profile.cs" /><Compile Include="Profiles\WdtvLiveProfile.cs" /><Compile Include="Profiles\Xbox360Profile.cs" /><Compile Include="Profiles\XboxOneProfile.cs" />diff --git a/MediaBrowser.Dlna/PlayTo/PlaylistItemFactory.cs b/MediaBrowser.Dlna/PlayTo/PlaylistItemFactory.csindex 31f15b1c31..e4c49a224c 100644--- a/MediaBrowser.Dlna/PlayTo/PlaylistItemFactory.cs+++ b/MediaBrowser.Dlna/PlayTo/PlaylistItemFactory.cs@@ -251,6 +251,11 @@ namespace MediaBrowser.Dlna.PlayTo/// <exception cref="System.InvalidOperationException">Unexpected ProfileConditionType</exception>private bool IsConditionSatisfied(ProfileCondition condition, string mediaPath, MediaStream videoStream, MediaStream audioStream){+ if (condition.Property == ProfileConditionValue.Has64BitOffsets)+ {+ // TODO: Determine how to evaluate this+ }+if (condition.Property == ProfileConditionValue.VideoProfile){var profile = videoStream == null ? null : videoStream.Profile;@@ -346,6 +351,12 @@ namespace MediaBrowser.Dlna.PlayToreturn videoStream == null ? null : videoStream.Width;case ProfileConditionValue.VideoLevel:return videoStream == null ? null : ConvertToLong(videoStream.Level);+ case ProfileConditionValue.VideoPacketLength:+ // TODO: Determine how to get this+ return null;+ case ProfileConditionValue.VideoTimestamp:+ // TODO: Determine how to get this+ return null;default:throw new InvalidOperationException("Unexpected Property");}diff --git a/MediaBrowser.Dlna/Profiles/SonyBlurayPlayer2013Profile.cs b/MediaBrowser.Dlna/Profiles/SonyBlurayPlayer2013Profile.csnew file mode 100644index 0000000000..49aa47027a--- /dev/null+++ b/MediaBrowser.Dlna/Profiles/SonyBlurayPlayer2013Profile.cs@@ -0,0 +1,180 @@+using MediaBrowser.Controller.Dlna;++namespace MediaBrowser.Dlna.Profiles+{+ public class SonyBlurayPlayer2013Profile : DefaultProfile+ {+ public SonyBlurayPlayer2013Profile()+ {+ Identification = new DeviceIdentification+ {+ FriendlyName = @"Blu-ray Disc Player",+ Manufacturer = "Sony",+ ModelNumber = "BDP-2013"+ };++ ModelName = "Windows Media Player Sharing";+ ModelNumber = "3.0";+ Manufacturer = "Microsoft Corporation";++ ProtocolInfo = "http-get:*:video/divx:DLNA.ORG_PN=MATROSKA;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_PS_PAL;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_PS_NTSC;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_SD_EU;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_SD_NA;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_SD_KO;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:audio/x-ms-wma:DLNA.ORG_PN=WMABASE;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:audio/x-ms-wma:DLNA.ORG_PN=WMAFULL;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/mp4:DLNA.ORG_PN=AVC_MP4_MP_SD_AAC_MULT5;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:audio/mpeg:DLNA.ORG_PN=MP3;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:audio/L16;rate=44100;channels=1:DLNA.ORG_PN=LPCM;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:audio/L16;rate=44100;channels=2:DLNA.ORG_PN=LPCM;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:audio/L16;rate=48000;channels=1:DLNA.ORG_PN=LPCM;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:audio/L16;rate=48000;channels=2:DLNA.ORG_PN=LPCM;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:audio/mp4:DLNA.ORG_PN=AAC_ISO;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:audio/mp4:DLNA.ORG_PN=AAC_ISO_320;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:audio/vnd.dlna.adts:DLNA.ORG_PN=AAC_ADTS;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:audio/vnd.dlna.adts:DLNA.ORG_PN=AAC_ADTS_320;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:audio/flac:DLNA.ORG_PN=FLAC;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:audio/ogg:DLNA.ORG_PN=OGG;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_SM;DLNA.ORG_OP=00;DLNA.ORG_FLAGS=00D00000000000000000000000000000,http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_MED;DLNA.ORG_OP=00;DLNA.ORG_FLAGS=00D00000000000000000000000000000,http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_LRG;DLNA.ORG_OP=00;DLNA.ORG_FLAGS=00D00000000000000000000000000000,http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_TN;DLNA.ORG_OP=00;DLNA.ORG_FLAGS=00D00000000000000000000000000000,http-get:*:image/png:DLNA.ORG_PN=PNG_LRG;DLNA.ORG_OP=00;DLNA.ORG_FLAGS=00D00000000000000000000000000000,http-get:*:image/png:DLNA.ORG_PN=PNG_TN;DLNA.ORG_OP=00;DLNA.ORG_FLAGS=00D00000000000000000000000000000,http-get:*:image/gif:DLNA.ORG_PN=GIF_LRG;DLNA.ORG_OP=00;DLNA.ORG_FLAGS=00D00000000000000000000000000000,http-get:*:video/mpeg:DLNA.ORG_PN=MPEG1;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_SD_EU_T;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_TS_SD_EU_ISO;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_SD_NA_T;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_TS_SD_NA_ISO;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_SD_KO_T;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_TS_SD_KO_ISO;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_JP_T;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/x-msvideo:DLNA.ORG_PN=AVI;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/x-flv:DLNA.ORG_PN=FLV;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/x-ms-dvr:DLNA.ORG_PN=DVR_MS;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/wtv:DLNA.ORG_PN=WTV;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/ogg:DLNA.ORG_PN=OGV;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/vnd.rn-realvideo:DLNA.ORG_PN=REAL_VIDEO;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/x-ms-wmv:DLNA.ORG_PN=WMVMED_BASE;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/x-ms-wmv:DLNA.ORG_PN=WMVMED_FULL;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/x-ms-wmv:DLNA.ORG_PN=WMVHIGH_FULL;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/x-ms-wmv:DLNA.ORG_PN=WMVMED_PRO;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/x-ms-wmv:DLNA.ORG_PN=WMVHIGH_PRO;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/x-ms-asf:DLNA.ORG_PN=VC1_ASF_AP_L1_WMA;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/x-ms-asf:DLNA.ORG_PN=VC1_ASF_AP_L2_WMA;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/x-ms-asf:DLNA.ORG_PN=VC1_ASF_AP_L3_WMA;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/3gpp:DLNA.ORG_PN=MPEG4_P2_3GPP_SP_L0B_AAC;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/3gpp:DLNA.ORG_PN=MPEG4_P2_3GPP_SP_L0B_AMR;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/3gpp:DLNA.ORG_PN=MPEG4_H263_3GPP_P0_L10_AMR;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/3gpp:DLNA.ORG_PN=MPEG4_H263_MP4_P0_L10_AAC;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000";++ TranscodingProfiles = new[]+ {+ new TranscodingProfile+ {+ Container = "mp3",+ AudioCodec = "mp3",+ Type = DlnaProfileType.Audio+ },++ new TranscodingProfile+ {+ Container = "ts",+ VideoCodec = "h264",+ AudioCodec = "ac3",+ Type = DlnaProfileType.Video+ },++ new TranscodingProfile+ {+ Container = "jpeg",+ Type = DlnaProfileType.Photo+ }+ };++ DirectPlayProfiles = new[]+ {+ new DirectPlayProfile+ {+ Container = "ts",+ VideoCodec = "mpeg1video,mpeg2video,h264",+ AudioCodec = "ac3,aac,mp3,pcm",+ Type = DlnaProfileType.Video+ },+ new DirectPlayProfile+ {+ Container = "mpeg",+ VideoCodec = "mpeg1video,mpeg2video",+ AudioCodec = "ac3,mp3,mp2,pcm",+ Type = DlnaProfileType.Video+ },+ new DirectPlayProfile+ {+ Container = "mp4",+ VideoCodec = "mpeg4,h264",+ AudioCodec = "ac3,aac,pcm,mp3",+ Type = DlnaProfileType.Video+ },+ new DirectPlayProfile+ {+ Container = "avi",+ VideoCodec = "mpeg4,h264",+ AudioCodec = "ac3,aac,mp3,pcm",+ Type = DlnaProfileType.Video+ },+ new DirectPlayProfile+ {+ Container = "mkv",+ VideoCodec = "mpeg4,h264",+ AudioCodec = "ac3,dca,aac,mp3,pcm",+ Type = DlnaProfileType.Video+ },+ new DirectPlayProfile+ {+ Container = "mp3",+ AudioCodec = "mp3",+ Type = DlnaProfileType.Audio+ },+ new DirectPlayProfile+ {+ Container = "mp4",+ AudioCodec = "aac",+ Type = DlnaProfileType.Audio+ },+ new DirectPlayProfile+ {+ Container = "asf",+ AudioCodec = "wmav2,wmapro,wmavoice",+ Type = DlnaProfileType.Audio+ },+ new DirectPlayProfile+ {+ Container = "jpeg",+ Type = DlnaProfileType.Photo+ }+ };++ CodecProfiles = new[]+ {+ new CodecProfile+ {+ Type = CodecType.VideoCodec,+ Codec = "h264",+ Conditions = new []+ {+ new ProfileCondition+ {+ Condition = ProfileConditionType.LessThanEqual,+ Property = ProfileConditionValue.Width,+ Value = "1920"+ },+ new ProfileCondition+ {+ Condition = ProfileConditionType.LessThanEqual,+ Property = ProfileConditionValue.Height,+ Value = "1080"+ },+ new ProfileCondition+ {+ Condition = ProfileConditionType.LessThanEqual,+ Property = ProfileConditionValue.VideoFramerate,+ Value = "30",+ IsRequired = false+ }+ }+ },++ new CodecProfile+ {+ Type = CodecType.VideoAudioCodec,+ Codec = "ac3",+ Conditions = new []+ {+ new ProfileCondition+ {+ Condition = ProfileConditionType.LessThanEqual,+ Property = ProfileConditionValue.AudioChannels,+ Value = "6",+ IsRequired = false+ }+ }+ }+ };++ ContainerProfiles = new[]+ {+ new ContainerProfile+ {+ Type = DlnaProfileType.Photo,++ Conditions = new []+ {+ new ProfileCondition+ {+ Condition = ProfileConditionType.LessThanEqual,+ Property = ProfileConditionValue.Width,+ Value = "1920"+ },+ new ProfileCondition+ {+ Condition = ProfileConditionType.LessThanEqual,+ Property = ProfileConditionValue.Height,+ Value = "1080"+ }+ }+ }+ };+ }+ }+}diff --git a/MediaBrowser.Dlna/Profiles/SonyBlurayPlayerProfile.cs b/MediaBrowser.Dlna/Profiles/SonyBlurayPlayerProfile.csnew file mode 100644index 0000000000..5121726706--- /dev/null+++ b/MediaBrowser.Dlna/Profiles/SonyBlurayPlayerProfile.cs@@ -0,0 +1,261 @@+using MediaBrowser.Controller.Dlna;++namespace MediaBrowser.Dlna.Profiles+{+ public class SonyBlurayPlayerProfile : DefaultProfile+ {+ public SonyBlurayPlayerProfile()+ {+ Identification = new DeviceIdentification+ {+ FriendlyName = @"Blu-ray Disc Player",+ Manufacturer = "Sony",++ Headers = new[]+ {+ new HttpHeaderInfo+ {+ Name = "X-AV-Client-Info",+ Value = @"(Blu-ray Disc Player|Home Theater System|Home Theatre System|Media Player)",+ Match = HeaderMatchType.Regex+ },++ new HttpHeaderInfo+ {+ Name = "X-AV-Physical-Unit-Info",+ Value = @"(Blu-ray Disc Player|Home Theater System|Home Theatre System|Media Player)",+ Match = HeaderMatchType.Regex+ }+ }+ };++ ModelName = "Windows Media Player Sharing";+ ModelNumber = "3.0";+ Manufacturer = "Microsoft Corporation";++ ProtocolInfo = "http-get:*:video/divx:DLNA.ORG_PN=MATROSKA;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_PS_PAL;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_PS_NTSC;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_SD_EU;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_SD_NA;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_SD_KO;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:audio/x-ms-wma:DLNA.ORG_PN=WMABASE;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:audio/x-ms-wma:DLNA.ORG_PN=WMAFULL;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/mp4:DLNA.ORG_PN=AVC_MP4_MP_SD_AAC_MULT5;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:audio/mpeg:DLNA.ORG_PN=MP3;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:audio/L16;rate=44100;channels=1:DLNA.ORG_PN=LPCM;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:audio/L16;rate=44100;channels=2:DLNA.ORG_PN=LPCM;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:audio/L16;rate=48000;channels=1:DLNA.ORG_PN=LPCM;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:audio/L16;rate=48000;channels=2:DLNA.ORG_PN=LPCM;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:audio/mp4:DLNA.ORG_PN=AAC_ISO;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:audio/mp4:DLNA.ORG_PN=AAC_ISO_320;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:audio/vnd.dlna.adts:DLNA.ORG_PN=AAC_ADTS;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:audio/vnd.dlna.adts:DLNA.ORG_PN=AAC_ADTS_320;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:audio/flac:DLNA.ORG_PN=FLAC;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:audio/ogg:DLNA.ORG_PN=OGG;DLNA.ORG_OP=01;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_SM;DLNA.ORG_OP=00;DLNA.ORG_FLAGS=00D00000000000000000000000000000,http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_MED;DLNA.ORG_OP=00;DLNA.ORG_FLAGS=00D00000000000000000000000000000,http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_LRG;DLNA.ORG_OP=00;DLNA.ORG_FLAGS=00D00000000000000000000000000000,http-get:*:image/jpeg:DLNA.ORG_PN=JPEG_TN;DLNA.ORG_OP=00;DLNA.ORG_FLAGS=00D00000000000000000000000000000,http-get:*:image/png:DLNA.ORG_PN=PNG_LRG;DLNA.ORG_OP=00;DLNA.ORG_FLAGS=00D00000000000000000000000000000,http-get:*:image/png:DLNA.ORG_PN=PNG_TN;DLNA.ORG_OP=00;DLNA.ORG_FLAGS=00D00000000000000000000000000000,http-get:*:image/gif:DLNA.ORG_PN=GIF_LRG;DLNA.ORG_OP=00;DLNA.ORG_FLAGS=00D00000000000000000000000000000,http-get:*:video/mpeg:DLNA.ORG_PN=MPEG1;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_SD_EU_T;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_TS_SD_EU_ISO;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_SD_NA_T;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_TS_SD_NA_ISO;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_SD_KO_T;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/mpeg:DLNA.ORG_PN=MPEG_TS_SD_KO_ISO;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/vnd.dlna.mpeg-tts:DLNA.ORG_PN=MPEG_TS_JP_T;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/x-msvideo:DLNA.ORG_PN=AVI;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/x-flv:DLNA.ORG_PN=FLV;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/x-ms-dvr:DLNA.ORG_PN=DVR_MS;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/wtv:DLNA.ORG_PN=WTV;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/ogg:DLNA.ORG_PN=OGV;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/vnd.rn-realvideo:DLNA.ORG_PN=REAL_VIDEO;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/x-ms-wmv:DLNA.ORG_PN=WMVMED_BASE;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/x-ms-wmv:DLNA.ORG_PN=WMVMED_FULL;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/x-ms-wmv:DLNA.ORG_PN=WMVHIGH_FULL;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/x-ms-wmv:DLNA.ORG_PN=WMVMED_PRO;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/x-ms-wmv:DLNA.ORG_PN=WMVHIGH_PRO;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/x-ms-asf:DLNA.ORG_PN=VC1_ASF_AP_L1_WMA;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/x-ms-asf:DLNA.ORG_PN=VC1_ASF_AP_L2_WMA;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/x-ms-asf:DLNA.ORG_PN=VC1_ASF_AP_L3_WMA;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/3gpp:DLNA.ORG_PN=MPEG4_P2_3GPP_SP_L0B_AAC;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/3gpp:DLNA.ORG_PN=MPEG4_P2_3GPP_SP_L0B_AMR;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/3gpp:DLNA.ORG_PN=MPEG4_H263_3GPP_P0_L10_AMR;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000,http-get:*:video/3gpp:DLNA.ORG_PN=MPEG4_H263_MP4_P0_L10_AAC;DLNA.ORG_OP=11;DLNA.ORG_FLAGS=81500000000000000000000000000000";++ TranscodingProfiles = new[]+ {+ new TranscodingProfile+ {+ Container = "mp3",+ AudioCodec = "mp3",+ Type = DlnaProfileType.Audio+ },++ new TranscodingProfile+ {+ Container = "ts",+ VideoCodec = "mpeg2video",+ AudioCodec = "ac3",+ Type = DlnaProfileType.Video+ },++ new TranscodingProfile+ {+ Container = "jpeg",+ Type = DlnaProfileType.Photo+ }+ };++ DirectPlayProfiles = new[]+ {+ new DirectPlayProfile+ {+ Container = "ts",+ VideoCodec = "mpeg1video,mpeg2video,h264",+ AudioCodec = "ac3,aac,mp3,pcm",+ Type = DlnaProfileType.Video+ },+ new DirectPlayProfile+ {+ Container = "mpeg",+ VideoCodec = "mpeg1video,mpeg2video",+ AudioCodec = "ac3,mp3,pcm",+ Type = DlnaProfileType.Video+ },+ new DirectPlayProfile+ {+ Container = "avi,mp4",+ VideoCodec = "mpeg4,h264",+ AudioCodec = "ac3,aac,mp3,pcm",+ Type = DlnaProfileType.Video+ },+ new DirectPlayProfile+ {+ Container = "mp3",+ AudioCodec = "mp3",+ Type = DlnaProfileType.Audio+ },+ new DirectPlayProfile+ {+ Container = "asf",+ AudioCodec = "wmav2,wmapro,wmavoice",+ Type = DlnaProfileType.Audio+ },+ new DirectPlayProfile+ {+ Container = "jpeg",+ Type = DlnaProfileType.Photo+ }+ };++ CodecProfiles = new[]+ {+ new CodecProfile+ {+ Type = CodecType.VideoCodec,+ Codec = "h264",+ Conditions = new []+ {+ new ProfileCondition+ {+ Condition = ProfileConditionType.LessThanEqual,+ Property = ProfileConditionValue.Width,+ Value = "1920"+ },+ new ProfileCondition+ {+ Condition = ProfileConditionType.LessThanEqual,+ Property = ProfileConditionValue.Height,+ Value = "1080"+ },+ new ProfileCondition+ {+ Condition = ProfileConditionType.LessThanEqual,+ Property = ProfileConditionValue.VideoFramerate,+ Value = "30",+ IsRequired = false+ },+ new ProfileCondition+ {+ Condition = ProfileConditionType.LessThanEqual,+ Property = ProfileConditionValue.VideoLevel,+ Value = "41",+ IsRequired = false+ },+ new ProfileCondition+ {+ Condition = ProfileConditionType.LessThanEqual,+ Property = ProfileConditionValue.VideoBitrate,+ Value = "15360000",+ IsRequired = false+ }+ }+ },++ new CodecProfile+ {+ Type = CodecType.VideoAudioCodec,+ Codec = "ac3",+ Conditions = new []+ {+ new ProfileCondition+ {+ Condition = ProfileConditionType.LessThanEqual,+ Property = ProfileConditionValue.AudioChannels,+ Value = "6",+ IsRequired = false+ }+ }+ },++ new CodecProfile+ {+ Type = CodecType.VideoAudioCodec,+ Codec = "aac",+ Conditions = new []+ {+ new ProfileCondition+ {+ Condition = ProfileConditionType.LessThanEqual,+ Property = ProfileConditionValue.AudioChannels,+ Value = "2",+ IsRequired = false+ }+ }+ }+ };++ ContainerProfiles = new[]+ {+ new ContainerProfile+ {+ Type = DlnaProfileType.Photo,++ Conditions = new []+ {+ new ProfileCondition+ {+ Condition = ProfileConditionType.LessThanEqual,+ Property = ProfileConditionValue.Width,+ Value = "1920"+ },+ new ProfileCondition+ {+ Condition = ProfileConditionType.LessThanEqual,+ Property = ProfileConditionValue.Height,+ Value = "1080"+ }+ }+ }+ };++ MediaProfiles = new[]+ {+ new MediaProfile+ {+ Container = "ts",+ VideoCodec = "h264,mpeg4,vc1",+ AudioCodec = "ac3,aac,mp3",+ MimeType = "video/vnd.dlna.mpeg-tts",+ OrgPn="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO",+ Type = DlnaProfileType.Video+ },++ new MediaProfile+ {+ Container = "avi",+ MimeType = "video/mpeg",+ Type = DlnaProfileType.Video+ },++ new MediaProfile+ {+ Container = "mkv",+ MimeType = "video/vnd.dlna.mpeg-tts",+ Type = DlnaProfileType.Video+ },++ new MediaProfile+ {+ Container = "ts",+ MimeType = "video/vnd.dlna.mpeg-tts",+ Type = DlnaProfileType.Video+ },++ new MediaProfile+ {+ Container = "mp4",+ MimeType = "video/mpeg",+ Type = DlnaProfileType.Video+ },++ new MediaProfile+ {+ Container = "mpeg",+ MimeType = "video/mpeg",+ Type = DlnaProfileType.Video+ },++ new MediaProfile+ {+ Container = "mp3",+ MimeType = "audio/mpeg",+ Type = DlnaProfileType.Audio+ }+ };+ }+ }+}diff --git a/MediaBrowser.Dlna/Profiles/SonyBravia2010Profile.cs b/MediaBrowser.Dlna/Profiles/SonyBravia2010Profile.csindex 010a18c8d1..042cc0a965 100644--- a/MediaBrowser.Dlna/Profiles/SonyBravia2010Profile.cs+++ b/MediaBrowser.Dlna/Profiles/SonyBravia2010Profile.cs@@ -13,7 +13,7 @@ namespace MediaBrowser.Dlna.ProfilesFriendlyName = @"KDL-\d{2}[EHLNPB]X\d[01]\d.*",Manufacturer = "Sony",- Headers = new []+ Headers = new[]{new HttpHeaderInfo{@@ -91,16 +91,61 @@ namespace MediaBrowser.Dlna.Profiles{new MediaProfile{- Container = "avi",- MimeType = "video/avi",+ Container = "ts",+ VideoCodec="h264",+ AudioCodec="ac3,aac,mp3",+ MimeType = "video/vnd.dlna.mpeg-tts",+ OrgPn="AVC_TS_HD_24_AC3_T,AVC_TS_HD_50_AC3_T,AVC_TS_HD_60_AC3_T,AVC_TS_HD_EU_T",+ Type = DlnaProfileType.Video,++ Conditions = new []+ {+ new ProfileCondition{ Condition= ProfileConditionType.Equals, Property= ProfileConditionValue.VideoPacketLength, Value="192"},+ new ProfileCondition{ Condition= ProfileConditionType.Equals, Property= ProfileConditionValue.VideoTimestamp, Value="1"}+ }+ },++ new MediaProfile+ {+ Container = "ts",+ VideoCodec="h264",+ AudioCodec="ac3,aac,mp3",+ MimeType = "video/mpeg",+ OrgPn="AVC_TS_HD_24_AC3_ISO,AVC_TS_HD_50_AC3_ISO,AVC_TS_HD_60_AC3_ISO,AVC_TS_HD_EU_ISO",+ Type = DlnaProfileType.Video,++ Conditions = new []+ {+ new ProfileCondition{ Condition= ProfileConditionType.Equals, Property= ProfileConditionValue.VideoPacketLength, Value="188"}+ }+ },++ new MediaProfile+ {+ Container = "ts",+ VideoCodec="h264",+ AudioCodec="ac3,aac,mp3",+ MimeType = "video/vnd.dlna.mpeg-tts",+ OrgPn="AVC_TS_HD_24_AC3,AVC_TS_HD_50_AC3,AVC_TS_HD_60_AC3,AVC_TS_HD_EU",Type = DlnaProfileType.Video},new MediaProfile{- Container = "asf",- MimeType = "video/x-ms-wmv",- Type = DlnaProfileType.Audio+ Container = "ts",+ VideoCodec="mpeg2video",+ MimeType = "video/vnd.dlna.mpeg-tts",+ OrgPn="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO",+ Type = DlnaProfileType.Video+ },++ new MediaProfile+ {+ Container = "mpeg",+ VideoCodec="mpeg1video,mpeg2video",+ MimeType = "video/mpeg",+ OrgPn="MPEG_PS_NTSC,MPEG_PS_PAL",+ Type = DlnaProfileType.Video}};diff --git a/MediaBrowser.Dlna/Profiles/SonyBravia2011Profile.cs b/MediaBrowser.Dlna/Profiles/SonyBravia2011Profile.csindex 50fd6e2567..401c40c362 100644--- a/MediaBrowser.Dlna/Profiles/SonyBravia2011Profile.cs+++ b/MediaBrowser.Dlna/Profiles/SonyBravia2011Profile.cs@@ -105,23 +105,6 @@ namespace MediaBrowser.Dlna.Profiles}};- MediaProfiles = new[]- {- new MediaProfile- {- Container = "avi",- MimeType = "video/avi",- Type = DlnaProfileType.Video- },-- new MediaProfile- {- Container = "asf",- MimeType = "video/x-ms-wmv",- Type = DlnaProfileType.Audio- }- };-ContainerProfiles = new[]{new ContainerProfile@@ -146,6 +129,68 @@ namespace MediaBrowser.Dlna.Profiles}};+ MediaProfiles = new[]+ {+ new MediaProfile+ {+ Container = "ts",+ VideoCodec="h264",+ AudioCodec="ac3,aac,mp3",+ MimeType = "video/vnd.dlna.mpeg-tts",+ OrgPn="AVC_TS_HD_24_AC3_T,AVC_TS_HD_50_AC3_T,AVC_TS_HD_60_AC3_T,AVC_TS_HD_EU_T",+ Type = DlnaProfileType.Video,++ Conditions = new []+ {+ new ProfileCondition{ Condition= ProfileConditionType.Equals, Property= ProfileConditionValue.VideoPacketLength, Value="192"},+ new ProfileCondition{ Condition= ProfileConditionType.Equals, Property= ProfileConditionValue.VideoTimestamp, Value="1"}+ }+ },++ new MediaProfile+ {+ Container = "ts",+ VideoCodec="h264",+ AudioCodec="ac3,aac,mp3",+ MimeType = "video/mpeg",+ OrgPn="AVC_TS_HD_24_AC3_ISO,AVC_TS_HD_50_AC3_ISO,AVC_TS_HD_60_AC3_ISO,AVC_TS_HD_EU_ISO",+ Type = DlnaProfileType.Video,++ Conditions = new []+ {+ new ProfileCondition{ Condition= ProfileConditionType.Equals, Property= ProfileConditionValue.VideoPacketLength, Value="188"}+ }+ },++ new MediaProfile+ {+ Container = "ts",+ VideoCodec="h264",+ AudioCodec="ac3,aac,mp3",+ MimeType = "video/vnd.dlna.mpeg-tts",+ OrgPn="AVC_TS_HD_24_AC3,AVC_TS_HD_50_AC3,AVC_TS_HD_60_AC3,AVC_TS_HD_EU",+ Type = DlnaProfileType.Video+ },++ new MediaProfile+ {+ Container = "ts",+ VideoCodec="mpeg2video",+ MimeType = "video/vnd.dlna.mpeg-tts",+ OrgPn="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO",+ Type = DlnaProfileType.Video+ },++ new MediaProfile+ {+ Container = "mpeg",+ VideoCodec="mpeg1video,mpeg2video",+ MimeType = "video/mpeg",+ OrgPn="MPEG_PS_NTSC,MPEG_PS_PAL",+ Type = DlnaProfileType.Video+ }+ };+CodecProfiles = new[]{new CodecProfilediff --git a/MediaBrowser.Dlna/Profiles/SonyBravia2012Profile.cs b/MediaBrowser.Dlna/Profiles/SonyBravia2012Profile.csindex b476d9c3f6..2d24c406e3 100644--- a/MediaBrowser.Dlna/Profiles/SonyBravia2012Profile.cs+++ b/MediaBrowser.Dlna/Profiles/SonyBravia2012Profile.cs@@ -121,16 +121,61 @@ namespace MediaBrowser.Dlna.Profiles{new MediaProfile{- Container = "avi",- MimeType = "video/avi",+ Container = "ts",+ VideoCodec="h264",+ AudioCodec="ac3,aac,mp3",+ MimeType = "video/vnd.dlna.mpeg-tts",+ OrgPn="AVC_TS_HD_24_AC3_T,AVC_TS_HD_50_AC3_T,AVC_TS_HD_60_AC3_T,AVC_TS_HD_EU_T",+ Type = DlnaProfileType.Video,++ Conditions = new []+ {+ new ProfileCondition{ Condition= ProfileConditionType.Equals, Property= ProfileConditionValue.VideoPacketLength, Value="192"},+ new ProfileCondition{ Condition= ProfileConditionType.Equals, Property= ProfileConditionValue.VideoTimestamp, Value="1"}+ }+ },++ new MediaProfile+ {+ Container = "ts",+ VideoCodec="h264",+ AudioCodec="ac3,aac,mp3",+ MimeType = "video/mpeg",+ OrgPn="AVC_TS_HD_24_AC3_ISO,AVC_TS_HD_50_AC3_ISO,AVC_TS_HD_60_AC3_ISO,AVC_TS_HD_EU_ISO",+ Type = DlnaProfileType.Video,++ Conditions = new []+ {+ new ProfileCondition{ Condition= ProfileConditionType.Equals, Property= ProfileConditionValue.VideoPacketLength, Value="188"}+ }+ },++ new MediaProfile+ {+ Container = "ts",+ VideoCodec="h264",+ AudioCodec="ac3,aac,mp3",+ MimeType = "video/vnd.dlna.mpeg-tts",+ OrgPn="AVC_TS_HD_24_AC3,AVC_TS_HD_50_AC3,AVC_TS_HD_60_AC3,AVC_TS_HD_EU",Type = DlnaProfileType.Video},new MediaProfile{- Container = "asf",- MimeType = "video/x-ms-wmv",- Type = DlnaProfileType.Audio+ Container = "ts",+ VideoCodec="mpeg2video",+ MimeType = "video/vnd.dlna.mpeg-tts",+ OrgPn="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO",+ Type = DlnaProfileType.Video+ },++ new MediaProfile+ {+ Container = "mpeg",+ VideoCodec="mpeg1video,mpeg2video",+ MimeType = "video/mpeg",+ OrgPn="MPEG_PS_NTSC,MPEG_PS_PAL",+ Type = DlnaProfileType.Video}};diff --git a/MediaBrowser.Dlna/Profiles/SonyBravia2013Profile.cs b/MediaBrowser.Dlna/Profiles/SonyBravia2013Profile.csindex ccb655adda..10f7129581 100644--- a/MediaBrowser.Dlna/Profiles/SonyBravia2013Profile.cs+++ b/MediaBrowser.Dlna/Profiles/SonyBravia2013Profile.cs@@ -177,33 +177,65 @@ namespace MediaBrowser.Dlna.Profiles{new MediaProfile{- Container = "avi",- MimeType = "video/avi",- Type = DlnaProfileType.Video+ Container = "ts",+ VideoCodec="h264",+ AudioCodec="ac3,aac,mp3",+ MimeType = "video/vnd.dlna.mpeg-tts",+ OrgPn="AVC_TS_HD_24_AC3_T,AVC_TS_HD_50_AC3_T,AVC_TS_HD_60_AC3_T,AVC_TS_HD_EU_T",+ Type = DlnaProfileType.Video,++ Conditions = new []+ {+ new ProfileCondition{ Condition= ProfileConditionType.Equals, Property= ProfileConditionValue.VideoPacketLength, Value="192"},+ new ProfileCondition{ Condition= ProfileConditionType.Equals, Property= ProfileConditionValue.VideoTimestamp, Value="1"}+ }},new MediaProfile{- Container = "mp4",- MimeType = "video/mp4",+ Container = "ts",+ VideoCodec="h264",+ AudioCodec="ac3,aac,mp3",+ MimeType = "video/mpeg",+ OrgPn="AVC_TS_HD_24_AC3_ISO,AVC_TS_HD_50_AC3_ISO,AVC_TS_HD_60_AC3_ISO,AVC_TS_HD_EU_ISO",+ Type = DlnaProfileType.Video,++ Conditions = new []+ {+ new ProfileCondition{ Condition= ProfileConditionType.Equals, Property= ProfileConditionValue.VideoPacketLength, Value="188"}+ }+ },++ new MediaProfile+ {+ Container = "ts",+ VideoCodec="h264",+ AudioCodec="ac3,aac,mp3",+ MimeType = "video/vnd.dlna.mpeg-tts",+ OrgPn="AVC_TS_HD_24_AC3,AVC_TS_HD_50_AC3,AVC_TS_HD_60_AC3,AVC_TS_HD_EU",Type = DlnaProfileType.Video},new MediaProfile{Container = "ts",- MimeType = "video/mpeg",+ VideoCodec="mpeg2video",+ MimeType = "video/vnd.dlna.mpeg-tts",+ OrgPn="MPEG_TS_SD_EU,MPEG_TS_SD_NA,MPEG_TS_SD_KO",Type = DlnaProfileType.Video},new MediaProfile{- Container = "wma",- MimeType = "video/x-ms-wma",- Type = DlnaProfileType.Audio+ Container = "mpeg",+ VideoCodec="mpeg1video,mpeg2video",+ MimeType = "video/mpeg",+ OrgPn="MPEG_PS_NTSC,MPEG_PS_PAL",+ Type = DlnaProfileType.Video}};+CodecProfiles = new[]{new CodecProfilediff --git a/MediaBrowser.Dlna/Profiles/SonyPs3Profile.cs b/MediaBrowser.Dlna/Profiles/SonyPs3Profile.csnew file mode 100644index 0000000000..e5fc1ed073--- /dev/null+++ b/MediaBrowser.Dlna/Profiles/SonyPs3Profile.cs@@ -0,0 +1,233 @@+using MediaBrowser.Controller.Dlna;++namespace MediaBrowser.Dlna.Profiles+{+ public class SonyPs3Profile : DefaultProfile+ {+ public SonyPs3Profile()+ {+ Name = "Sony Bravia (2010)";++ Identification = new DeviceIdentification+ {+ Headers = new[]+ {+ new HttpHeaderInfo+ {+ Name = "User-Agent",+ Value = @"PLAYSTATION 3",+ Match = HeaderMatchType.Substring+ },++ new HttpHeaderInfo+ {+ Name = "X-AV-Client-Info",+ Value = @"PLAYSTATION 3",+ Match = HeaderMatchType.Substring+ }+ }+ };++ SonyAggregationFlags = "10";+ XDlnaDoc = "DMS-1.50";++ TranscodingProfiles = new[]+ {+ new TranscodingProfile+ {+ Container = "mp3",+ AudioCodec = "mp3",+ Type = DlnaProfileType.Audio+ },+ new TranscodingProfile+ {+ Container = "ts",+ VideoCodec = "h264",+ AudioCodec = "mp3",+ Type = DlnaProfileType.Video+ },+ new TranscodingProfile+ {+ Container = "jpeg",+ Type = DlnaProfileType.Photo+ }+ };++ ContainerProfiles = new[]+ {+ new ContainerProfile+ {+ Type = DlnaProfileType.Photo,++ Conditions = new []+ {+ new ProfileCondition+ {+ Condition = ProfileConditionType.LessThanEqual,+ Property = ProfileConditionValue.Width,+ Value = "1920"+ },+ new ProfileCondition+ {+ Condition = ProfileConditionType.LessThanEqual,+ Property = ProfileConditionValue.Height,+ Value = "1080"+ }+ }+ }+ };++ CodecProfiles = new[]+ {+ new CodecProfile+ {+ Type = CodecType.VideoCodec,+ Codec = "h264",++ Conditions = new []+ {+ new ProfileCondition+ {+ Condition = ProfileConditionType.LessThanEqual,+ Property = ProfileConditionValue.Width,+ Value = "1920"+ },+ new ProfileCondition+ {+ Condition = ProfileConditionType.LessThanEqual,+ Property = ProfileConditionValue.Height,+ Value = "1080"+ },+ new ProfileCondition+ {+ Condition = ProfileConditionType.LessThanEqual,+ Property = ProfileConditionValue.VideoFramerate,+ Value = "30",+ IsRequired = false+ },+ new ProfileCondition+ {+ Condition = ProfileConditionType.LessThanEqual,+ Property = ProfileConditionValue.VideoBitrate,+ Value = "15360000",+ IsRequired = false+ },+ new ProfileCondition+ {+ Condition = ProfileConditionType.LessThanEqual,+ Property = ProfileConditionValue.VideoLevel,+ Value = "41",+ IsRequired = false+ }+ }+ },++ new CodecProfile+ {+ Type = CodecType.VideoAudioCodec,+ Codec = "ac3",++ Conditions = new []+ {+ new ProfileCondition+ {+ Condition = ProfileConditionType.LessThanEqual,+ Property = ProfileConditionValue.AudioChannels,+ Value = "6",+ IsRequired = false+ },++ new ProfileCondition+ {+ Condition = ProfileConditionType.LessThanEqual,+ Property = ProfileConditionValue.AudioBitrate,+ Value = "640000",+ IsRequired = false+ }+ }+ },++ new CodecProfile+ {+ Type = CodecType.VideoAudioCodec,+ Codec = "wmapro",++ Conditions = new []+ {+ new ProfileCondition+ {+ Condition = ProfileConditionType.LessThanEqual,+ Property = ProfileConditionValue.AudioChannels,+ Value = "2"+ }+ }+ },++ new CodecProfile+ {+ Type = CodecType.VideoAudioCodec,+ Codec = "aac",++ Conditions = new []+ {+ new ProfileCondition+ {+ Condition = ProfileConditionType.NotEquals,+ Property = ProfileConditionValue.AudioProfile,+ Value = "he-aac",+ IsRequired = false+ }+ }+ },++ new CodecProfile+ {+ Type = CodecType.VideoAudioCodec,+ Codec = "aac",++ Conditions = new []+ {+ new ProfileCondition+ {+ Condition = ProfileConditionType.LessThanEqual,+ Property = ProfileConditionValue.AudioChannels,+ Value = "2"+ },+ new ProfileCondition+ {+ Condition = ProfileConditionType.NotEquals,+ Property = ProfileConditionValue.AudioProfile,+ Value = "he-aac"+ }+ }+ }+ };++ MediaProfiles = new[]+ {+ new MediaProfile+ {+ Container = "mp4,mov",+ AudioCodec="aac",+ MimeType = "video/mp4",+ Type = DlnaProfileType.Video+ },++ new MediaProfile+ {+ Container = "avi",+ MimeType = "video/divx",+ OrgPn="AVI",+ Type = DlnaProfileType.Video+ },++ new MediaProfile+ {+ Container = "wav",+ MimeType = "audio/wav",+ Type = DlnaProfileType.Audio+ }+ };+ }+ }+}diff --git a/MediaBrowser.Dlna/Profiles/XboxOneProfile.cs b/MediaBrowser.Dlna/Profiles/XboxOneProfile.csindex db45029a47..0daa5d7a2a 100644--- a/MediaBrowser.Dlna/Profiles/XboxOneProfile.cs+++ b/MediaBrowser.Dlna/Profiles/XboxOneProfile.cs@@ -35,7 +35,7 @@ namespace MediaBrowser.Dlna.Profiles{new DirectPlayProfile{- Container = "mp3",+ Container = "mp3,wma",Type = DlnaProfileType.Audio}};