added new cabac value

This commit is contained in:
Luke Pulverenti
2014-10-23 00:26:01 -04:00
parent 35f40993b2
commit 5a5b48feff
56 changed files with 786 additions and 893 deletions

View File

@@ -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:

View File

@@ -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>();

View File

@@ -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;

View File

@@ -16,6 +16,7 @@
VideoProfile = 11,
VideoTimestamp = 12,
IsAnamorphic = 13,
RefFrames = 14
RefFrames = 14,
IsCabac = 15
}
}

View File

@@ -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")
}
},

View File

@@ -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:

View File

@@ -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

View File

@@ -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; }
}
}

View File

@@ -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" />

View File

@@ -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[] { };
}
}
}

View File

@@ -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
}
}