fix dlna flag values
This commit is contained in:
parent
6a435d62f5
commit
73b771f9c5
|
@ -39,8 +39,8 @@ namespace MediaBrowser.Model.Dlna
|
||||||
//flagValue = flagValue | DlnaFlags.DLNA_ORG_FLAG_TIME_BASED_SEEK;
|
//flagValue = flagValue | DlnaFlags.DLNA_ORG_FLAG_TIME_BASED_SEEK;
|
||||||
}
|
}
|
||||||
|
|
||||||
var dlnaflags = string.Format(";DLNA.ORG_FLAGS={0}000000000000000000000000",
|
var dlnaflags = string.Format(";DLNA.ORG_FLAGS={0}",
|
||||||
Enum.Format(typeof(DlnaFlags), flagValue, "x"));
|
FlagsToString(flagValue));
|
||||||
|
|
||||||
var mediaProfile = _profile.GetAudioMediaProfile(container, audioCodec);
|
var mediaProfile = _profile.GetAudioMediaProfile(container, audioCodec);
|
||||||
|
|
||||||
|
@ -56,6 +56,12 @@ namespace MediaBrowser.Model.Dlna
|
||||||
return (contentFeatures + orgOp + orgCi + dlnaflags).Trim(';');
|
return (contentFeatures + orgOp + orgCi + dlnaflags).Trim(';');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static string FlagsToString(DlnaFlags flags)
|
||||||
|
{
|
||||||
|
//return Enum.Format(typeof(DlnaFlags), flags, "x");
|
||||||
|
return string.Format("{0:X8}{1:D24}", (ulong)flags, 0);
|
||||||
|
}
|
||||||
|
|
||||||
public string BuildVideoHeader(string container,
|
public string BuildVideoHeader(string container,
|
||||||
string videoCodec,
|
string videoCodec,
|
||||||
string audioCodec,
|
string audioCodec,
|
||||||
|
|
|
@ -9,6 +9,12 @@ namespace MediaBrowser.Model.Dlna
|
||||||
private readonly List<string> _fields;
|
private readonly List<string> _fields;
|
||||||
private readonly bool _all;
|
private readonly bool _all;
|
||||||
|
|
||||||
|
public Filter()
|
||||||
|
: this("*")
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
public Filter(string filter)
|
public Filter(string filter)
|
||||||
{
|
{
|
||||||
_all = string.Equals(filter, "*", StringComparison.OrdinalIgnoreCase);
|
_all = string.Equals(filter, "*", StringComparison.OrdinalIgnoreCase);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user