3.0.5582.0
This commit is contained in:
parent
1fdaee1bb9
commit
5fe9b054c8
|
@ -736,7 +736,7 @@ namespace MediaBrowser.Api.Playback.Hls
|
|||
).Trim();
|
||||
}
|
||||
|
||||
return string.Format("{0} {1} -map_metadata -1 -threads {2} {3} {4} -flags -global_header -sc_threshold 0 {5} -hls_time {6} -start_number {7} -hls_list_size {8} -y \"{9}\"",
|
||||
return string.Format("{0} {1} -map_metadata -1 -threads {2} {3} {4} -flags -global_header -copyts -sc_threshold 0 {5} -hls_time {6} -start_number {7} -hls_list_size {8} -y \"{9}\"",
|
||||
inputModifier,
|
||||
GetInputArgument(state),
|
||||
threads,
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
using MediaBrowser.Common.Extensions;
|
||||
using System.Globalization;
|
||||
using MediaBrowser.Common.Extensions;
|
||||
using MediaBrowser.Common.IO;
|
||||
using MediaBrowser.Controller.Channels;
|
||||
using MediaBrowser.Controller.Collections;
|
||||
|
@ -1892,5 +1893,18 @@ namespace MediaBrowser.Controller.Entities
|
|||
|
||||
return video.RefreshMetadata(newOptions, cancellationToken);
|
||||
}
|
||||
|
||||
public string GetEtag()
|
||||
{
|
||||
return string.Join("|", GetEtagValues().ToArray()).GetMD5().ToString("N");
|
||||
}
|
||||
|
||||
protected virtual List<string> GetEtagValues()
|
||||
{
|
||||
return new List<string>
|
||||
{
|
||||
DateLastSaved.Ticks.ToString(CultureInfo.InvariantCulture)
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -280,7 +280,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||
|
||||
private async Task<List<int>> GetKeyFrames(string inputPath, int videoStreamIndex, CancellationToken cancellationToken)
|
||||
{
|
||||
const string args = "-i {0} -select_streams v:{1} -show_frames -print_format compact";
|
||||
const string args = "-i {0} -select_streams v:{1} -show_frames -show_entries frame=pkt_dts,key_frame -print_format compact";
|
||||
|
||||
var process = new Process
|
||||
{
|
||||
|
@ -310,15 +310,12 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||
StartProcess(processWrapper);
|
||||
|
||||
var lines = new List<int>();
|
||||
var outputCancellationSource = new CancellationTokenSource(4000);
|
||||
|
||||
try
|
||||
{
|
||||
process.BeginErrorReadLine();
|
||||
|
||||
var linkedCancellationTokenSource = CancellationTokenSource.CreateLinkedTokenSource(outputCancellationSource.Token, cancellationToken);
|
||||
|
||||
await StartReadingOutput(process.StandardOutput.BaseStream, lines, 120000, outputCancellationSource, linkedCancellationTokenSource.Token).ConfigureAwait(false);
|
||||
await StartReadingOutput(process.StandardOutput.BaseStream, lines, 120000, cancellationToken).ConfigureAwait(false);
|
||||
}
|
||||
catch (OperationCanceledException)
|
||||
{
|
||||
|
@ -335,7 +332,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||
return lines;
|
||||
}
|
||||
|
||||
private async Task StartReadingOutput(Stream source, List<int> lines, int timeoutMs, CancellationTokenSource cancellationTokenSource, CancellationToken cancellationToken)
|
||||
private async Task StartReadingOutput(Stream source, List<int> lines, int timeoutMs, CancellationToken cancellationToken)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@ -362,11 +359,6 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|||
{
|
||||
lines.Add(frameMs);
|
||||
}
|
||||
|
||||
if (frameMs > timeoutMs)
|
||||
{
|
||||
cancellationTokenSource.Cancel();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -37,6 +37,12 @@ namespace MediaBrowser.Model.Dto
|
|||
/// <value>The id.</value>
|
||||
public string Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the etag.
|
||||
/// </summary>
|
||||
/// <value>The etag.</value>
|
||||
public string Etag { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the playlist item identifier.
|
||||
/// </summary>
|
||||
|
|
|
@ -75,6 +75,11 @@
|
|||
/// </summary>
|
||||
DisplayMediaType,
|
||||
|
||||
/// <summary>
|
||||
/// The etag
|
||||
/// </summary>
|
||||
Etag,
|
||||
|
||||
/// <summary>
|
||||
/// The external urls
|
||||
/// </summary>
|
||||
|
|
|
@ -357,6 +357,8 @@ namespace MediaBrowser.Server.Implementations.Dto
|
|||
: item.CanDownload(user);
|
||||
}
|
||||
|
||||
|
||||
|
||||
return dto;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
using System.Reflection;
|
||||
|
||||
[assembly: AssemblyVersion("3.0.*")]
|
||||
//[assembly: AssemblyVersion("3.0.5572.0")]
|
||||
//[assembly: AssemblyVersion("3.0.*")]
|
||||
[assembly: AssemblyVersion("3.0.5582.0")]
|
||||
|
|
Loading…
Reference in New Issue
Block a user