diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-10-23 00:26:01 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2014-10-23 00:26:01 -0400 |
| commit | 5a5b48feff3a0b0a660aaaa9bdfd04fd0fe711ed (patch) | |
| tree | 47079574a89158a371f91392992e9ebe9b7840ba /MediaBrowser.Model | |
| parent | 35f40993b2b85efc6fbb677d373b337aebfe0465 (diff) | |
added new cabac value
Diffstat (limited to 'MediaBrowser.Model')
| -rw-r--r-- | MediaBrowser.Model/Dlna/ConditionProcessor.cs | 3 | ||||
| -rw-r--r-- | MediaBrowser.Model/Dlna/ContentFeatureBuilder.cs | 2 | ||||
| -rw-r--r-- | MediaBrowser.Model/Dlna/DeviceProfile.cs | 3 | ||||
| -rw-r--r-- | MediaBrowser.Model/Dlna/ProfileConditionValue.cs | 3 | ||||
| -rw-r--r-- | MediaBrowser.Model/Dlna/Profiles/AndroidProfile.cs | 3 | ||||
| -rw-r--r-- | MediaBrowser.Model/Dlna/StreamBuilder.cs | 6 | ||||
| -rw-r--r-- | MediaBrowser.Model/Dlna/StreamInfo.cs | 13 | ||||
| -rw-r--r-- | MediaBrowser.Model/Entities/MediaStream.cs | 6 | ||||
| -rw-r--r-- | MediaBrowser.Model/MediaBrowser.Model.csproj | 1 | ||||
| -rw-r--r-- | MediaBrowser.Model/Querying/ItemsResult.cs | 21 | ||||
| -rw-r--r-- | MediaBrowser.Model/Weather/WeatherUnits.cs | 17 |
11 files changed, 35 insertions, 43 deletions
diff --git a/MediaBrowser.Model/Dlna/ConditionProcessor.cs b/MediaBrowser.Model/Dlna/ConditionProcessor.cs index 4fedb36d6..e0a8e239e 100644 --- a/MediaBrowser.Model/Dlna/ConditionProcessor.cs +++ b/MediaBrowser.Model/Dlna/ConditionProcessor.cs @@ -19,6 +19,7 @@ namespace MediaBrowser.Model.Dlna int? packetLength, TransportStreamTimestamp? timestamp, bool? isAnamorphic, + bool? isCabac, int? refFrames) { switch (condition.Property) @@ -31,6 +32,8 @@ namespace MediaBrowser.Model.Dlna return true; case ProfileConditionValue.IsAnamorphic: return IsConditionSatisfied(condition, isAnamorphic); + case ProfileConditionValue.IsCabac: + return IsConditionSatisfied(condition, isCabac); case ProfileConditionValue.VideoFramerate: return IsConditionSatisfied(condition, videoFramerate); case ProfileConditionValue.VideoLevel: diff --git a/MediaBrowser.Model/Dlna/ContentFeatureBuilder.cs b/MediaBrowser.Model/Dlna/ContentFeatureBuilder.cs index 5ded415aa..a3eeecff2 100644 --- a/MediaBrowser.Model/Dlna/ContentFeatureBuilder.cs +++ b/MediaBrowser.Model/Dlna/ContentFeatureBuilder.cs @@ -116,6 +116,7 @@ namespace MediaBrowser.Model.Dlna int? packetLength, TranscodeSeekInfo transcodeSeekInfo, bool? isAnamorphic, + bool? isCabac, int? refFrames) { // first bit means Time based seek supported, second byte range seek supported (not sure about the order now), so 01 = only byte seek, 10 = time based, 11 = both, 00 = none @@ -156,6 +157,7 @@ namespace MediaBrowser.Model.Dlna packetLength, timestamp, isAnamorphic, + isCabac, refFrames); List<string> orgPnValues = new List<string>(); diff --git a/MediaBrowser.Model/Dlna/DeviceProfile.cs b/MediaBrowser.Model/Dlna/DeviceProfile.cs index 94de34a28..66f593615 100644 --- a/MediaBrowser.Model/Dlna/DeviceProfile.cs +++ b/MediaBrowser.Model/Dlna/DeviceProfile.cs @@ -281,6 +281,7 @@ namespace MediaBrowser.Model.Dlna int? packetLength, TransportStreamTimestamp timestamp, bool? isAnamorphic, + bool? isCabac, int? refFrames) { container = StringHelper.TrimStart((container ?? string.Empty), '.'); @@ -315,7 +316,7 @@ namespace MediaBrowser.Model.Dlna var anyOff = false; foreach (ProfileCondition c in i.Conditions) { - if (!conditionProcessor.IsVideoConditionSatisfied(c, audioBitrate, audioChannels, width, height, bitDepth, videoBitrate, videoProfile, videoLevel, videoFramerate, packetLength, timestamp, isAnamorphic, refFrames)) + if (!conditionProcessor.IsVideoConditionSatisfied(c, audioBitrate, audioChannels, width, height, bitDepth, videoBitrate, videoProfile, videoLevel, videoFramerate, packetLength, timestamp, isAnamorphic, isCabac, refFrames)) { anyOff = true; break; diff --git a/MediaBrowser.Model/Dlna/ProfileConditionValue.cs b/MediaBrowser.Model/Dlna/ProfileConditionValue.cs index 27abf9878..ae6dc74c8 100644 --- a/MediaBrowser.Model/Dlna/ProfileConditionValue.cs +++ b/MediaBrowser.Model/Dlna/ProfileConditionValue.cs @@ -16,6 +16,7 @@ VideoProfile = 11, VideoTimestamp = 12, IsAnamorphic = 13, - RefFrames = 14 + RefFrames = 14, + IsCabac = 15 } }
\ No newline at end of file diff --git a/MediaBrowser.Model/Dlna/Profiles/AndroidProfile.cs b/MediaBrowser.Model/Dlna/Profiles/AndroidProfile.cs index 1f27e5991..04b4a808d 100644 --- a/MediaBrowser.Model/Dlna/Profiles/AndroidProfile.cs +++ b/MediaBrowser.Model/Dlna/Profiles/AndroidProfile.cs @@ -114,7 +114,8 @@ namespace MediaBrowser.Model.Dlna.Profiles new ProfileCondition(ProfileConditionType.LessThanEqual, ProfileConditionValue.Width, "1920"), new ProfileCondition(ProfileConditionType.LessThanEqual, ProfileConditionValue.Height, "1080"), new ProfileCondition(ProfileConditionType.LessThanEqual, ProfileConditionValue.VideoBitDepth, "8"), - new ProfileCondition(ProfileConditionType.NotEquals, ProfileConditionValue.IsAnamorphic, "true") + new ProfileCondition(ProfileConditionType.NotEquals, ProfileConditionValue.IsAnamorphic, "true"), + new ProfileCondition(ProfileConditionType.Equals, ProfileConditionValue.IsCabac, "true") } }, diff --git a/MediaBrowser.Model/Dlna/StreamBuilder.cs b/MediaBrowser.Model/Dlna/StreamBuilder.cs index 227fb3ad6..792e6de91 100644 --- a/MediaBrowser.Model/Dlna/StreamBuilder.cs +++ b/MediaBrowser.Model/Dlna/StreamBuilder.cs @@ -419,6 +419,7 @@ namespace MediaBrowser.Model.Dlna string videoProfile = videoStream == null ? null : videoStream.Profile; float? videoFramerate = videoStream == null ? null : videoStream.AverageFrameRate ?? videoStream.AverageFrameRate; bool? isAnamorphic = videoStream == null ? null : videoStream.IsAnamorphic; + bool? isCabac = videoStream == null ? null : videoStream.IsCabac; int? audioBitrate = audioStream == null ? null : audioStream.BitRate; int? audioChannels = audioStream == null ? null : audioStream.Channels; @@ -431,7 +432,7 @@ namespace MediaBrowser.Model.Dlna // Check container conditions foreach (ProfileCondition i in conditions) { - if (!conditionProcessor.IsVideoConditionSatisfied(i, audioBitrate, audioChannels, width, height, bitDepth, videoBitrate, videoProfile, videoLevel, videoFramerate, packetLength, timestamp, isAnamorphic, refFrames)) + if (!conditionProcessor.IsVideoConditionSatisfied(i, audioBitrate, audioChannels, width, height, bitDepth, videoBitrate, videoProfile, videoLevel, videoFramerate, packetLength, timestamp, isAnamorphic, isCabac, refFrames)) { return null; } @@ -458,7 +459,7 @@ namespace MediaBrowser.Model.Dlna foreach (ProfileCondition i in conditions) { - if (!conditionProcessor.IsVideoConditionSatisfied(i, audioBitrate, audioChannels, width, height, bitDepth, videoBitrate, videoProfile, videoLevel, videoFramerate, packetLength, timestamp, isAnamorphic, refFrames)) + if (!conditionProcessor.IsVideoConditionSatisfied(i, audioBitrate, audioChannels, width, height, bitDepth, videoBitrate, videoProfile, videoLevel, videoFramerate, packetLength, timestamp, isAnamorphic, isCabac, refFrames)) { return null; } @@ -647,6 +648,7 @@ namespace MediaBrowser.Model.Dlna } case ProfileConditionValue.AudioProfile: case ProfileConditionValue.IsAnamorphic: + case ProfileConditionValue.IsCabac: case ProfileConditionValue.Has64BitOffsets: case ProfileConditionValue.PacketLength: case ProfileConditionValue.VideoTimestamp: diff --git a/MediaBrowser.Model/Dlna/StreamInfo.cs b/MediaBrowser.Model/Dlna/StreamInfo.cs index 58848ff50..4c03201f1 100644 --- a/MediaBrowser.Model/Dlna/StreamInfo.cs +++ b/MediaBrowser.Model/Dlna/StreamInfo.cs @@ -456,6 +456,19 @@ namespace MediaBrowser.Model.Dlna } } + public bool? IsTargetCabac + { + get + { + if (IsDirectStream) + { + return TargetVideoStream == null ? null : TargetVideoStream.IsCabac; + } + + return true; + } + } + public int? TargetWidth { get diff --git a/MediaBrowser.Model/Entities/MediaStream.cs b/MediaBrowser.Model/Entities/MediaStream.cs index b71f68d18..4a9b765c2 100644 --- a/MediaBrowser.Model/Entities/MediaStream.cs +++ b/MediaBrowser.Model/Entities/MediaStream.cs @@ -175,5 +175,11 @@ namespace MediaBrowser.Model.Entities /// </summary> /// <value><c>true</c> if this instance is anamorphic; otherwise, <c>false</c>.</value> public bool? IsAnamorphic { get; set; } + + /// <summary> + /// Gets or sets a value indicating whether this instance is cabac. + /// </summary> + /// <value><c>null</c> if [is cabac] contains no value, <c>true</c> if [is cabac]; otherwise, <c>false</c>.</value> + public bool? IsCabac { get; set; } } } diff --git a/MediaBrowser.Model/MediaBrowser.Model.csproj b/MediaBrowser.Model/MediaBrowser.Model.csproj index bb6f94b11..32f655ae7 100644 --- a/MediaBrowser.Model/MediaBrowser.Model.csproj +++ b/MediaBrowser.Model/MediaBrowser.Model.csproj @@ -402,7 +402,6 @@ <Compile Include="Updates\PackageInfo.cs" /> <Compile Include="Updates\PackageVersionInfo.cs" /> <Compile Include="Users\AuthenticationResult.cs" /> - <Compile Include="Weather\WeatherUnits.cs" /> <None Include="Fody.targets" /> <None Include="FodyWeavers.xml" /> <None Include="MediaBrowser.Model.snk" /> diff --git a/MediaBrowser.Model/Querying/ItemsResult.cs b/MediaBrowser.Model/Querying/ItemsResult.cs index b3f771e4b..3b9c59733 100644 --- a/MediaBrowser.Model/Querying/ItemsResult.cs +++ b/MediaBrowser.Model/Querying/ItemsResult.cs @@ -5,26 +5,7 @@ namespace MediaBrowser.Model.Querying /// <summary> /// Represents the result of a query for items /// </summary> - public class ItemsResult + public class ItemsResult : QueryResult<BaseItemDto> { - /// <summary> - /// The set of items returned based on sorting, paging, etc - /// </summary> - /// <value>The items.</value> - public BaseItemDto[] Items { get; set; } - - /// <summary> - /// The total number of records available - /// </summary> - /// <value>The total record count.</value> - public int TotalRecordCount { get; set; } - - /// <summary> - /// Initializes a new instance of the <see cref="ItemsResult"/> class. - /// </summary> - public ItemsResult() - { - Items = new BaseItemDto[] { }; - } } } diff --git a/MediaBrowser.Model/Weather/WeatherUnits.cs b/MediaBrowser.Model/Weather/WeatherUnits.cs deleted file mode 100644 index d27982e95..000000000 --- a/MediaBrowser.Model/Weather/WeatherUnits.cs +++ /dev/null @@ -1,17 +0,0 @@ -namespace MediaBrowser.Model.Weather -{ - /// <summary> - /// Enum WeatherUnits - /// </summary> - public enum WeatherUnits - { - /// <summary> - /// The fahrenheit - /// </summary> - Fahrenheit, - /// <summary> - /// The celsius - /// </summary> - Celsius - } -}
\ No newline at end of file |
