update hdhr streaming

This commit is contained in:
Luke Pulverenti
2016-04-03 20:01:03 -04:00
parent 0bf4d35f53
commit d9dcd21c47
19 changed files with 26 additions and 123 deletions

View File

@@ -89,7 +89,10 @@ namespace MediaBrowser.Server.Implementations.LiveTv.TunerHosts.HdHomerun
Number = i.GuideNumber.ToString(CultureInfo.InvariantCulture),
Id = GetChannelId(info, i),
IsFavorite = i.Favorite,
TunerHostId = info.Id
TunerHostId = info.Id,
IsHD = i.HD == 1,
AudioCodec = i.AudioCodec,
VideoCodec = i.VideoCodec
});
}
@@ -303,14 +306,14 @@ namespace MediaBrowser.Server.Implementations.LiveTv.TunerHosts.HdHomerun
if (string.IsNullOrWhiteSpace(videoCodec))
{
var lineup = await GetLineup(info, CancellationToken.None).ConfigureAwait(false);
var channel = lineup.FirstOrDefault(i => string.Equals(i.GuideNumber, channelId, StringComparison.OrdinalIgnoreCase));
var channels = await GetChannels(info, true, CancellationToken.None).ConfigureAwait(false);
var channel = channels.FirstOrDefault(i => string.Equals(i.Number, channelId, StringComparison.OrdinalIgnoreCase));
if (channel != null)
{
videoCodec = channel.VideoCodec;
audioCodec = channel.AudioCodec;
videoBitrate = channel.HD == 1 ? 15000000 : 2000000;
videoBitrate = (channel.IsHD ?? true) ? 15000000 : 2000000;
}
}
@@ -343,7 +346,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.TunerHosts.HdHomerun
Width = width,
Height = height,
BitRate = videoBitrate
},
new MediaStream
{

View File

@@ -2755,7 +2755,7 @@ namespace MediaBrowser.Server.Implementations.Persistence
_saveStreamCommand.GetParameter(index++).Value = stream.BitDepth;
_saveStreamCommand.GetParameter(index++).Value = stream.IsAnamorphic;
_saveStreamCommand.GetParameter(index++).Value = stream.RefFrames;
_saveStreamCommand.GetParameter(index++).Value = stream.IsCabac;
_saveStreamCommand.GetParameter(index++).Value = null;
_saveStreamCommand.GetParameter(index++).Value = stream.CodecTag;
_saveStreamCommand.GetParameter(index++).Value = stream.Comment;
@@ -2907,10 +2907,7 @@ namespace MediaBrowser.Server.Implementations.Persistence
item.RefFrames = reader.GetInt32(24);
}
if (!reader.IsDBNull(25))
{
item.IsCabac = reader.GetBoolean(25);
}
// cabac no longer used
if (!reader.IsDBNull(26))
{