updated nuget
This commit is contained in:
parent
4fa822c00d
commit
1fba8d077b
|
@ -35,7 +35,13 @@ namespace MediaBrowser.Model.ApiClient
|
|||
/// Occurs when [remote logged out].
|
||||
/// </summary>
|
||||
event EventHandler<EventArgs> RemoteLoggedOut;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets the device.
|
||||
/// </summary>
|
||||
/// <value>The device.</value>
|
||||
IDevice Device { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the connect user.
|
||||
/// </summary>
|
||||
|
|
|
@ -316,12 +316,14 @@ namespace MediaBrowser.Model.Dlna
|
|||
|
||||
MediaStream videoStream = item.VideoStream;
|
||||
|
||||
int? maxBitrateSetting = options.GetMaxBitrate();
|
||||
// TODO: This doesn't accout for situation of device being able to handle media bitrate, but wifi connection not fast enough
|
||||
bool isEligibleForDirectPlay = IsEligibleForDirectPlay(item, options.Profile.MaxStaticBitrate, subtitleStream, options);
|
||||
bool isEligibleForDirectStream = IsEligibleForDirectPlay(item, options.GetMaxBitrate(), subtitleStream, options);
|
||||
|
||||
if (IsEligibleForDirectPlay(item, maxBitrateSetting, subtitleStream, options))
|
||||
if (isEligibleForDirectPlay || isEligibleForDirectStream)
|
||||
{
|
||||
// See if it can be direct played
|
||||
var directPlay = GetVideoDirectPlayProfile(options, options.Profile, item, videoStream, audioStream);
|
||||
PlayMethod? directPlay = GetVideoDirectPlayProfile(options.Profile, item, videoStream, audioStream, isEligibleForDirectPlay, isEligibleForDirectStream);
|
||||
|
||||
if (directPlay != null)
|
||||
{
|
||||
|
@ -416,6 +418,7 @@ namespace MediaBrowser.Model.Dlna
|
|||
playlistItem.AudioBitrate = GetAudioBitrate(playlistItem.TargetAudioChannels, playlistItem.TargetAudioCodec);
|
||||
}
|
||||
|
||||
int? maxBitrateSetting = options.GetMaxBitrate();
|
||||
// Honor max rate
|
||||
if (maxBitrateSetting.HasValue)
|
||||
{
|
||||
|
@ -448,11 +451,12 @@ namespace MediaBrowser.Model.Dlna
|
|||
return 128000;
|
||||
}
|
||||
|
||||
private PlayMethod? GetVideoDirectPlayProfile(VideoOptions options,
|
||||
DeviceProfile profile,
|
||||
private PlayMethod? GetVideoDirectPlayProfile(DeviceProfile profile,
|
||||
MediaSourceInfo mediaSource,
|
||||
MediaStream videoStream,
|
||||
MediaStream audioStream)
|
||||
MediaStream audioStream,
|
||||
bool isEligibleForDirectPlay,
|
||||
bool isEligibleForDirectStream)
|
||||
{
|
||||
// See if it can be direct played
|
||||
DirectPlayProfile directPlay = null;
|
||||
|
@ -571,28 +575,34 @@ namespace MediaBrowser.Model.Dlna
|
|||
}
|
||||
}
|
||||
|
||||
if (mediaSource.Protocol == MediaProtocol.Http)
|
||||
if (isEligibleForDirectPlay)
|
||||
{
|
||||
if (_localPlayer.CanAccessUrl(mediaSource.Path, mediaSource.RequiredHttpHeaders.Count > 0))
|
||||
if (mediaSource.Protocol == MediaProtocol.Http)
|
||||
{
|
||||
return PlayMethod.DirectPlay;
|
||||
if (_localPlayer.CanAccessUrl(mediaSource.Path, mediaSource.RequiredHttpHeaders.Count > 0))
|
||||
{
|
||||
return PlayMethod.DirectPlay;
|
||||
}
|
||||
}
|
||||
|
||||
else if (mediaSource.Protocol == MediaProtocol.File)
|
||||
{
|
||||
if (_localPlayer.CanAccessFile(mediaSource.Path))
|
||||
{
|
||||
return PlayMethod.DirectPlay;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
else if (mediaSource.Protocol == MediaProtocol.File)
|
||||
if (isEligibleForDirectStream)
|
||||
{
|
||||
if (_localPlayer.CanAccessFile(mediaSource.Path))
|
||||
if (mediaSource.SupportsDirectStream)
|
||||
{
|
||||
return PlayMethod.DirectPlay;
|
||||
return PlayMethod.DirectStream;
|
||||
}
|
||||
}
|
||||
|
||||
if (!mediaSource.SupportsDirectStream)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
return PlayMethod.DirectStream;
|
||||
return null;
|
||||
}
|
||||
|
||||
private bool IsEligibleForDirectPlay(MediaSourceInfo item,
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>MediaBrowser.Common.Internal</id>
|
||||
<version>3.0.595</version>
|
||||
<version>3.0.597</version>
|
||||
<title>MediaBrowser.Common.Internal</title>
|
||||
<authors>Luke</authors>
|
||||
<owners>ebr,Luke,scottisafool</owners>
|
||||
|
@ -12,7 +12,7 @@
|
|||
<description>Contains common components shared by Media Browser Theater and Media Browser Server. Not intended for plugin developer consumption.</description>
|
||||
<copyright>Copyright © Media Browser 2013</copyright>
|
||||
<dependencies>
|
||||
<dependency id="MediaBrowser.Common" version="3.0.595" />
|
||||
<dependency id="MediaBrowser.Common" version="3.0.597" />
|
||||
<dependency id="NLog" version="3.2.0.0" />
|
||||
<dependency id="SimpleInjector" version="2.7.0" />
|
||||
</dependencies>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>MediaBrowser.Common</id>
|
||||
<version>3.0.595</version>
|
||||
<version>3.0.597</version>
|
||||
<title>MediaBrowser.Common</title>
|
||||
<authors>Media Browser Team</authors>
|
||||
<owners>ebr,Luke,scottisafool</owners>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<package xmlns="http://schemas.microsoft.com/packaging/2011/08/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>MediaBrowser.Model.Signed</id>
|
||||
<version>3.0.595</version>
|
||||
<version>3.0.597</version>
|
||||
<title>MediaBrowser.Model - Signed Edition</title>
|
||||
<authors>Media Browser Team</authors>
|
||||
<owners>ebr,Luke,scottisafool</owners>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
|
||||
<metadata>
|
||||
<id>MediaBrowser.Server.Core</id>
|
||||
<version>3.0.595</version>
|
||||
<version>3.0.597</version>
|
||||
<title>Media Browser.Server.Core</title>
|
||||
<authors>Media Browser Team</authors>
|
||||
<owners>ebr,Luke,scottisafool</owners>
|
||||
|
@ -12,7 +12,7 @@
|
|||
<description>Contains core components required to build plugins for Media Browser Server.</description>
|
||||
<copyright>Copyright © Media Browser 2013</copyright>
|
||||
<dependencies>
|
||||
<dependency id="MediaBrowser.Common" version="3.0.595" />
|
||||
<dependency id="MediaBrowser.Common" version="3.0.597" />
|
||||
</dependencies>
|
||||
</metadata>
|
||||
<files>
|
||||
|
|
Loading…
Reference in New Issue
Block a user