capture more transcoding info

This commit is contained in:
Luke Pulverenti
2017-06-24 14:33:19 -04:00
parent 8dcfda89d1
commit a107ff0369
14 changed files with 338 additions and 45 deletions

View File

@@ -487,7 +487,7 @@ namespace MediaBrowser.Controller.Entities
var folder = this;
innerProgress.RegisterAction(p =>
{
double newPct = .70 * p + 10;
double newPct = .80 * p + 10;
progress.Report(newPct);
ProviderManager.OnRefreshProgress(folder, newPct);
});
@@ -498,11 +498,11 @@ namespace MediaBrowser.Controller.Entities
if (refreshChildMetadata)
{
progress.Report(80);
progress.Report(90);
if (recursive)
{
ProviderManager.OnRefreshProgress(this, 80);
ProviderManager.OnRefreshProgress(this, 90);
}
var container = this as IMetadataContainer;
@@ -512,7 +512,7 @@ namespace MediaBrowser.Controller.Entities
var folder = this;
innerProgress.RegisterAction(p =>
{
double newPct = .20 * p + 80;
double newPct = .10 * p + 90;
progress.Report(newPct);
if (recursive)
{

View File

@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Model.Dlna;
using MediaBrowser.Model.Dto;
@@ -9,6 +10,7 @@ using MediaBrowser.Model.IO;
using MediaBrowser.Model.Logging;
using MediaBrowser.Model.MediaInfo;
using MediaBrowser.Model.Drawing;
using MediaBrowser.Model.Session;
namespace MediaBrowser.Controller.MediaEncoding
{
@@ -40,6 +42,24 @@ namespace MediaBrowser.Controller.MediaEncoding
public bool ReadInputAtNativeFramerate { get; set; }
private List<TranscodeReason> _transcodeReasons = null;
public List<TranscodeReason> TranscodeReasons
{
get
{
if (_transcodeReasons == null)
{
_transcodeReasons = (BaseRequest.TranscodeReasons ?? string.Empty)
.Split(',')
.Where(i => !string.IsNullOrWhiteSpace(i))
.Select(v => (TranscodeReason)Enum.Parse(typeof(TranscodeReason), v, true))
.ToList();
}
return _transcodeReasons;
}
}
public bool IgnoreInputDts
{
get
@@ -251,7 +271,7 @@ namespace MediaBrowser.Controller.MediaEncoding
{
return AudioStream.SampleRate;
}
}
}
else if (BaseRequest.AudioSampleRate.HasValue)
{

View File

@@ -204,6 +204,8 @@ namespace MediaBrowser.Controller.MediaEncoding
public string SubtitleCodec { get; set; }
public string TranscodeReasons { get; set; }
/// <summary>
/// Gets or sets the index of the audio stream.
/// </summary>