add IsInterlaced param

This commit is contained in:
Luke Pulverenti 2017-05-29 08:35:59 -04:00
parent 316b1c9b7b
commit 3e15b28b18
13 changed files with 88 additions and 20 deletions

View File

@ -224,6 +224,7 @@ namespace Emby.Dlna.Didl
streamInfo.TargetPacketLength, streamInfo.TargetPacketLength,
streamInfo.TranscodeSeekInfo, streamInfo.TranscodeSeekInfo,
streamInfo.IsTargetAnamorphic, streamInfo.IsTargetAnamorphic,
streamInfo.IsTargetInterlaced,
streamInfo.TargetRefFrames, streamInfo.TargetRefFrames,
streamInfo.TargetVideoStreamCount, streamInfo.TargetVideoStreamCount,
streamInfo.TargetAudioStreamCount, streamInfo.TargetAudioStreamCount,
@ -364,6 +365,7 @@ namespace Emby.Dlna.Didl
streamInfo.TargetPacketLength, streamInfo.TargetPacketLength,
streamInfo.TargetTimestamp, streamInfo.TargetTimestamp,
streamInfo.IsTargetAnamorphic, streamInfo.IsTargetAnamorphic,
streamInfo.IsTargetInterlaced,
streamInfo.TargetRefFrames, streamInfo.TargetRefFrames,
streamInfo.TargetVideoStreamCount, streamInfo.TargetVideoStreamCount,
streamInfo.TargetAudioStreamCount, streamInfo.TargetAudioStreamCount,

View File

@ -556,6 +556,7 @@ namespace Emby.Dlna.PlayTo
streamInfo.TargetPacketLength, streamInfo.TargetPacketLength,
streamInfo.TranscodeSeekInfo, streamInfo.TranscodeSeekInfo,
streamInfo.IsTargetAnamorphic, streamInfo.IsTargetAnamorphic,
streamInfo.IsTargetInterlaced,
streamInfo.TargetRefFrames, streamInfo.TargetRefFrames,
streamInfo.TargetVideoStreamCount, streamInfo.TargetVideoStreamCount,
streamInfo.TargetAudioStreamCount, streamInfo.TargetAudioStreamCount,

View File

@ -105,7 +105,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
} }
else else
{ {
name += " " + info.StartDate.ToString("yyyy-MM-dd") + " " + info.Id; name += " " + info.StartDate.ToString("yyyy-MM-dd");
} }
return name; return name;

View File

@ -423,7 +423,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun
IsInfiniteStream = true, IsInfiniteStream = true,
IgnoreDts = true, IgnoreDts = true,
//IgnoreIndex = true, //IgnoreIndex = true,
//ReadAtNativeFramerate = true ReadAtNativeFramerate = true
}; };
mediaSource.InferTotalBitrate(); mediaSource.InferTotalBitrate();

View File

@ -880,6 +880,7 @@ namespace MediaBrowser.Api.Playback
state.TargetPacketLength, state.TargetPacketLength,
state.TargetTimestamp, state.TargetTimestamp,
state.IsTargetAnamorphic, state.IsTargetAnamorphic,
state.IsTargetInterlaced,
state.TargetRefFrames, state.TargetRefFrames,
state.TargetVideoStreamCount, state.TargetVideoStreamCount,
state.TargetAudioStreamCount, state.TargetAudioStreamCount,
@ -989,6 +990,7 @@ namespace MediaBrowser.Api.Playback
state.TargetPacketLength, state.TargetPacketLength,
state.TranscodeSeekInfo, state.TranscodeSeekInfo,
state.IsTargetAnamorphic, state.IsTargetAnamorphic,
state.IsTargetInterlaced,
state.TargetRefFrames, state.TargetRefFrames,
state.TargetVideoStreamCount, state.TargetVideoStreamCount,
state.TargetAudioStreamCount, state.TargetAudioStreamCount,

View File

@ -367,6 +367,37 @@ namespace MediaBrowser.Api.Playback
} }
} }
public bool? IsTargetAnamorphic
{
get
{
if (Request.Static)
{
return VideoStream == null ? null : VideoStream.IsAnamorphic;
}
return false;
}
}
public bool? IsTargetInterlaced
{
get
{
if (Request.Static)
{
return VideoStream == null ? (bool?)null : VideoStream.IsInterlaced;
}
if (DeInterlace)
{
return false;
}
return VideoStream == null ? (bool?)null : VideoStream.IsInterlaced;
}
}
private int? GetMediaStreamCount(MediaStreamType type, int limit) private int? GetMediaStreamCount(MediaStreamType type, int limit)
{ {
var count = MediaSource.GetStreamCount(type); var count = MediaSource.GetStreamCount(type);
@ -448,19 +479,6 @@ namespace MediaBrowser.Api.Playback
} }
} }
public bool? IsTargetAnamorphic
{
get
{
if (Request.Static)
{
return VideoStream == null ? null : VideoStream.IsAnamorphic;
}
return false;
}
}
public bool? IsTargetAVC public bool? IsTargetAVC
{ {
get get

View File

@ -325,6 +325,24 @@ namespace MediaBrowser.MediaEncoding.Encoder
} }
} }
public bool? IsTargetInterlaced
{
get
{
if (Options.Static)
{
return VideoStream == null ? (bool?)null : VideoStream.IsInterlaced;
}
if (DeInterlace)
{
return false;
}
return VideoStream == null ? (bool?)null : VideoStream.IsInterlaced;
}
}
public bool? IsTargetAVC public bool? IsTargetAVC
{ {
get get

View File

@ -277,6 +277,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
state.TargetPacketLength, state.TargetPacketLength,
state.TargetTimestamp, state.TargetTimestamp,
state.IsTargetAnamorphic, state.IsTargetAnamorphic,
state.IsTargetInterlaced,
state.TargetRefFrames, state.TargetRefFrames,
state.TargetVideoStreamCount, state.TargetVideoStreamCount,
state.TargetAudioStreamCount, state.TargetAudioStreamCount,

View File

@ -20,6 +20,7 @@ namespace MediaBrowser.Model.Dlna
int? packetLength, int? packetLength,
TransportStreamTimestamp? timestamp, TransportStreamTimestamp? timestamp,
bool? isAnamorphic, bool? isAnamorphic,
bool? isInterlaced,
int? refFrames, int? refFrames,
int? numVideoStreams, int? numVideoStreams,
int? numAudioStreams, int? numAudioStreams,
@ -28,6 +29,8 @@ namespace MediaBrowser.Model.Dlna
{ {
switch (condition.Property) switch (condition.Property)
{ {
case ProfileConditionValue.IsInterlaced:
return IsConditionSatisfied(condition, isInterlaced);
case ProfileConditionValue.IsAnamorphic: case ProfileConditionValue.IsAnamorphic:
return IsConditionSatisfied(condition, isAnamorphic); return IsConditionSatisfied(condition, isAnamorphic);
case ProfileConditionValue.IsAvc: case ProfileConditionValue.IsAvc:

View File

@ -116,6 +116,7 @@ namespace MediaBrowser.Model.Dlna
int? packetLength, int? packetLength,
TranscodeSeekInfo transcodeSeekInfo, TranscodeSeekInfo transcodeSeekInfo,
bool? isAnamorphic, bool? isAnamorphic,
bool? isInterlaced,
int? refFrames, int? refFrames,
int? numVideoStreams, int? numVideoStreams,
int? numAudioStreams, int? numAudioStreams,
@ -158,6 +159,7 @@ namespace MediaBrowser.Model.Dlna
packetLength, packetLength,
timestamp, timestamp,
isAnamorphic, isAnamorphic,
isInterlaced,
refFrames, refFrames,
numVideoStreams, numVideoStreams,
numAudioStreams, numAudioStreams,

View File

@ -293,6 +293,7 @@ namespace MediaBrowser.Model.Dlna
int? packetLength, int? packetLength,
TransportStreamTimestamp timestamp, TransportStreamTimestamp timestamp,
bool? isAnamorphic, bool? isAnamorphic,
bool? isInterlaced,
int? refFrames, int? refFrames,
int? numVideoStreams, int? numVideoStreams,
int? numAudioStreams, int? numAudioStreams,
@ -331,7 +332,7 @@ namespace MediaBrowser.Model.Dlna
var anyOff = false; var anyOff = false;
foreach (ProfileCondition c in i.Conditions) 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; anyOff = true;
break; break;

View File

@ -558,6 +558,7 @@ namespace MediaBrowser.Model.Dlna
string videoProfile = videoStream == null ? null : videoStream.Profile; string videoProfile = videoStream == null ? null : videoStream.Profile;
float? videoFramerate = videoStream == null ? null : videoStream.AverageFrameRate ?? videoStream.AverageFrameRate; float? videoFramerate = videoStream == null ? null : videoStream.AverageFrameRate ?? videoStream.AverageFrameRate;
bool? isAnamorphic = videoStream == null ? null : videoStream.IsAnamorphic; bool? isAnamorphic = videoStream == null ? null : videoStream.IsAnamorphic;
bool? isInterlaced = videoStream == null ? (bool?)null : videoStream.IsInterlaced;
string videoCodecTag = videoStream == null ? null : videoStream.CodecTag; string videoCodecTag = videoStream == null ? null : videoStream.CodecTag;
bool? isAvc = videoStream == null ? null : videoStream.IsAVC; bool? isAvc = videoStream == null ? null : videoStream.IsAVC;
@ -568,7 +569,7 @@ namespace MediaBrowser.Model.Dlna
int? numAudioStreams = item.GetStreamCount(MediaStreamType.Audio); int? numAudioStreams = item.GetStreamCount(MediaStreamType.Audio);
int? numVideoStreams = item.GetStreamCount(MediaStreamType.Video); 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); LogConditionFailure(options.Profile, "VideoCodecProfile", applyCondition, item);
applyConditions = false; applyConditions = false;
@ -748,6 +749,7 @@ namespace MediaBrowser.Model.Dlna
string videoProfile = videoStream == null ? null : videoStream.Profile; string videoProfile = videoStream == null ? null : videoStream.Profile;
float? videoFramerate = videoStream == null ? null : videoStream.AverageFrameRate ?? videoStream.AverageFrameRate; float? videoFramerate = videoStream == null ? null : videoStream.AverageFrameRate ?? videoStream.AverageFrameRate;
bool? isAnamorphic = videoStream == null ? null : videoStream.IsAnamorphic; bool? isAnamorphic = videoStream == null ? null : videoStream.IsAnamorphic;
bool? isInterlaced = videoStream == null ? (bool?)null : videoStream.IsInterlaced;
string videoCodecTag = videoStream == null ? null : videoStream.CodecTag; string videoCodecTag = videoStream == null ? null : videoStream.CodecTag;
bool? isAvc = videoStream == null ? null : videoStream.IsAVC; bool? isAvc = videoStream == null ? null : videoStream.IsAVC;
@ -766,7 +768,7 @@ namespace MediaBrowser.Model.Dlna
// Check container conditions // Check container conditions
foreach (ProfileCondition i in 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); LogConditionFailure(profile, "VideoContainerProfile", i, mediaSource);
@ -793,7 +795,7 @@ namespace MediaBrowser.Model.Dlna
bool applyConditions = true; bool applyConditions = true;
foreach (ProfileCondition applyCondition in i.ApplyConditions) 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); LogConditionFailure(profile, "VideoCodecProfile", applyCondition, mediaSource);
applyConditions = false; applyConditions = false;
@ -813,7 +815,7 @@ namespace MediaBrowser.Model.Dlna
foreach (ProfileCondition i in 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, "VideoCodecProfile", i, mediaSource); LogConditionFailure(profile, "VideoCodecProfile", i, mediaSource);

View File

@ -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 public bool? IsTargetAVC
{ {
get get