aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2017-05-29 08:35:59 -0400
committerLuke Pulverenti <luke.pulverenti@gmail.com>2017-05-29 08:35:59 -0400
commit3e15b28b1816b656ba4b5d5fc8b640f457b8df64 (patch)
tree5293f3eebf9757885e4285d6536e2074a23862d5 /MediaBrowser.Model
parent316b1c9b7bed715a3a6c4453748f6f6b1f2a6203 (diff)
add IsInterlaced param
Diffstat (limited to 'MediaBrowser.Model')
-rw-r--r--MediaBrowser.Model/Dlna/ConditionProcessor.cs3
-rw-r--r--MediaBrowser.Model/Dlna/ContentFeatureBuilder.cs2
-rw-r--r--MediaBrowser.Model/Dlna/DeviceProfile.cs3
-rw-r--r--MediaBrowser.Model/Dlna/StreamBuilder.cs10
-rw-r--r--MediaBrowser.Model/Dlna/StreamInfo.cs18
5 files changed, 31 insertions, 5 deletions
diff --git a/MediaBrowser.Model/Dlna/ConditionProcessor.cs b/MediaBrowser.Model/Dlna/ConditionProcessor.cs
index 63e962c4e3..a388bf98b2 100644
--- a/MediaBrowser.Model/Dlna/ConditionProcessor.cs
+++ b/MediaBrowser.Model/Dlna/ConditionProcessor.cs
@@ -20,6 +20,7 @@ namespace MediaBrowser.Model.Dlna
int? packetLength,
TransportStreamTimestamp? timestamp,
bool? isAnamorphic,
+ bool? isInterlaced,
int? refFrames,
int? numVideoStreams,
int? numAudioStreams,
@@ -28,6 +29,8 @@ namespace MediaBrowser.Model.Dlna
{
switch (condition.Property)
{
+ case ProfileConditionValue.IsInterlaced:
+ return IsConditionSatisfied(condition, isInterlaced);
case ProfileConditionValue.IsAnamorphic:
return IsConditionSatisfied(condition, isAnamorphic);
case ProfileConditionValue.IsAvc:
diff --git a/MediaBrowser.Model/Dlna/ContentFeatureBuilder.cs b/MediaBrowser.Model/Dlna/ContentFeatureBuilder.cs
index cd1a29d6b6..6f6994a7e1 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? isInterlaced,
int? refFrames,
int? numVideoStreams,
int? numAudioStreams,
@@ -158,6 +159,7 @@ namespace MediaBrowser.Model.Dlna
packetLength,
timestamp,
isAnamorphic,
+ isInterlaced,
refFrames,
numVideoStreams,
numAudioStreams,
diff --git a/MediaBrowser.Model/Dlna/DeviceProfile.cs b/MediaBrowser.Model/Dlna/DeviceProfile.cs
index cd3c9e92b5..33d73e3bb5 100644
--- a/MediaBrowser.Model/Dlna/DeviceProfile.cs
+++ b/MediaBrowser.Model/Dlna/DeviceProfile.cs
@@ -293,6 +293,7 @@ namespace MediaBrowser.Model.Dlna
int? packetLength,
TransportStreamTimestamp timestamp,
bool? isAnamorphic,
+ bool? isInterlaced,
int? refFrames,
int? numVideoStreams,
int? numAudioStreams,
@@ -331,7 +332,7 @@ namespace MediaBrowser.Model.Dlna
var anyOff = false;
foreach (ProfileCondition c in i.Conditions)
{
- if (!conditionProcessor.IsVideoConditionSatisfied(GetModelProfileCondition(c), width, height, bitDepth, videoBitrate, videoProfile, videoLevel, videoFramerate, packetLength, timestamp, isAnamorphic, refFrames, numVideoStreams, numAudioStreams, videoCodecTag, isAvc))
+ if (!conditionProcessor.IsVideoConditionSatisfied(GetModelProfileCondition(c), width, height, bitDepth, videoBitrate, videoProfile, videoLevel, videoFramerate, packetLength, timestamp, isAnamorphic, isInterlaced, refFrames, numVideoStreams, numAudioStreams, videoCodecTag, isAvc))
{
anyOff = true;
break;
diff --git a/MediaBrowser.Model/Dlna/StreamBuilder.cs b/MediaBrowser.Model/Dlna/StreamBuilder.cs
index 6ff3ce94c5..1e64c04d2d 100644
--- a/MediaBrowser.Model/Dlna/StreamBuilder.cs
+++ b/MediaBrowser.Model/Dlna/StreamBuilder.cs
@@ -558,6 +558,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? isInterlaced = videoStream == null ? (bool?)null : videoStream.IsInterlaced;
string videoCodecTag = videoStream == null ? null : videoStream.CodecTag;
bool? isAvc = videoStream == null ? null : videoStream.IsAVC;
@@ -568,7 +569,7 @@ namespace MediaBrowser.Model.Dlna
int? numAudioStreams = item.GetStreamCount(MediaStreamType.Audio);
int? numVideoStreams = item.GetStreamCount(MediaStreamType.Video);
- if (!conditionProcessor.IsVideoConditionSatisfied(applyCondition, width, height, bitDepth, videoBitrate, videoProfile, videoLevel, videoFramerate, packetLength, timestamp, isAnamorphic, refFrames, numVideoStreams, numAudioStreams, videoCodecTag, isAvc))
+ if (!conditionProcessor.IsVideoConditionSatisfied(applyCondition, width, height, bitDepth, videoBitrate, videoProfile, videoLevel, videoFramerate, packetLength, timestamp, isAnamorphic, isInterlaced, refFrames, numVideoStreams, numAudioStreams, videoCodecTag, isAvc))
{
LogConditionFailure(options.Profile, "VideoCodecProfile", applyCondition, item);
applyConditions = false;
@@ -748,6 +749,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? isInterlaced = videoStream == null ? (bool?)null : videoStream.IsInterlaced;
string videoCodecTag = videoStream == null ? null : videoStream.CodecTag;
bool? isAvc = videoStream == null ? null : videoStream.IsAVC;
@@ -766,7 +768,7 @@ namespace MediaBrowser.Model.Dlna
// Check container conditions
foreach (ProfileCondition i in conditions)
{
- if (!conditionProcessor.IsVideoConditionSatisfied(i, width, height, bitDepth, videoBitrate, videoProfile, videoLevel, videoFramerate, packetLength, timestamp, isAnamorphic, refFrames, numVideoStreams, numAudioStreams, videoCodecTag, isAvc))
+ if (!conditionProcessor.IsVideoConditionSatisfied(i, width, height, bitDepth, videoBitrate, videoProfile, videoLevel, videoFramerate, packetLength, timestamp, isAnamorphic, isInterlaced, refFrames, numVideoStreams, numAudioStreams, videoCodecTag, isAvc))
{
LogConditionFailure(profile, "VideoContainerProfile", i, mediaSource);
@@ -793,7 +795,7 @@ namespace MediaBrowser.Model.Dlna
bool applyConditions = true;
foreach (ProfileCondition applyCondition in i.ApplyConditions)
{
- if (!conditionProcessor.IsVideoConditionSatisfied(applyCondition, width, height, bitDepth, videoBitrate, videoProfile, videoLevel, videoFramerate, packetLength, timestamp, isAnamorphic, refFrames, numVideoStreams, numAudioStreams, videoCodecTag, isAvc))
+ if (!conditionProcessor.IsVideoConditionSatisfied(applyCondition, width, height, bitDepth, videoBitrate, videoProfile, videoLevel, videoFramerate, packetLength, timestamp, isAnamorphic, isInterlaced, refFrames, numVideoStreams, numAudioStreams, videoCodecTag, isAvc))
{
LogConditionFailure(profile, "VideoCodecProfile", applyCondition, mediaSource);
applyConditions = false;
@@ -813,7 +815,7 @@ namespace MediaBrowser.Model.Dlna
foreach (ProfileCondition i in conditions)
{
- if (!conditionProcessor.IsVideoConditionSatisfied(i, width, height, bitDepth, videoBitrate, videoProfile, videoLevel, videoFramerate, packetLength, timestamp, isAnamorphic, refFrames, numVideoStreams, numAudioStreams, videoCodecTag, isAvc))
+ if (!conditionProcessor.IsVideoConditionSatisfied(i, width, height, bitDepth, videoBitrate, videoProfile, videoLevel, videoFramerate, packetLength, timestamp, isAnamorphic, isInterlaced, refFrames, numVideoStreams, numAudioStreams, videoCodecTag, isAvc))
{
LogConditionFailure(profile, "VideoCodecProfile", i, mediaSource);
diff --git a/MediaBrowser.Model/Dlna/StreamInfo.cs b/MediaBrowser.Model/Dlna/StreamInfo.cs
index 2c009b37ff..ba5251e8c9 100644
--- a/MediaBrowser.Model/Dlna/StreamInfo.cs
+++ b/MediaBrowser.Model/Dlna/StreamInfo.cs
@@ -746,6 +746,24 @@ namespace MediaBrowser.Model.Dlna
}
}
+ public bool? IsTargetInterlaced
+ {
+ get
+ {
+ if (IsDirectStream)
+ {
+ return TargetVideoStream == null ? (bool?)null : TargetVideoStream.IsInterlaced;
+ }
+
+ if (DeInterlace)
+ {
+ return false;
+ }
+
+ return TargetVideoStream == null ? (bool?)null : TargetVideoStream.IsInterlaced;
+ }
+ }
+
public bool? IsTargetAVC
{
get