mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-25 10:07:15 +01:00
added new cabac value
This commit is contained in:
@@ -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:
|
||||
|
||||
@@ -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>();
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
VideoProfile = 11,
|
||||
VideoTimestamp = 12,
|
||||
IsAnamorphic = 13,
|
||||
RefFrames = 14
|
||||
RefFrames = 14,
|
||||
IsCabac = 15
|
||||
}
|
||||
}
|
||||
@@ -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")
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user