|
|
|
@ -1,18 +1,10 @@
|
|
|
|
|
using MediaBrowser.Controller.Library;
|
|
|
|
|
using System;
|
|
|
|
|
using System.IO;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using MediaBrowser.Controller.Library;
|
|
|
|
|
using MediaBrowser.Controller.MediaEncoding;
|
|
|
|
|
using MediaBrowser.Model.Dlna;
|
|
|
|
|
using MediaBrowser.Model.Drawing;
|
|
|
|
|
using MediaBrowser.Model.Dto;
|
|
|
|
|
using MediaBrowser.Model.Entities;
|
|
|
|
|
using MediaBrowser.Model.IO;
|
|
|
|
|
using MediaBrowser.Model.MediaInfo;
|
|
|
|
|
using MediaBrowser.Model.Net;
|
|
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.IO;
|
|
|
|
|
using System.Linq;
|
|
|
|
|
using System.Threading;
|
|
|
|
|
using System.Threading.Tasks;
|
|
|
|
|
using Microsoft.Extensions.Logging;
|
|
|
|
|
|
|
|
|
|
namespace MediaBrowser.MediaEncoding.Encoder
|
|
|
|
@ -153,7 +145,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|
|
|
|
{
|
|
|
|
|
var ticks = transcodingPosition.HasValue ? transcodingPosition.Value.Ticks : (long?)null;
|
|
|
|
|
|
|
|
|
|
// job.Framerate = framerate;
|
|
|
|
|
//job.Framerate = framerate;
|
|
|
|
|
|
|
|
|
|
if (!percentComplete.HasValue && ticks.HasValue && RunTimeTicks.HasValue)
|
|
|
|
|
{
|
|
|
|
@ -166,8 +158,9 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|
|
|
|
Progress.Report(percentComplete.Value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// job.TranscodingPositionTicks = ticks;
|
|
|
|
|
// job.BytesTranscoded = bytesTranscoded;
|
|
|
|
|
/*
|
|
|
|
|
job.TranscodingPositionTicks = ticks;
|
|
|
|
|
job.BytesTranscoded = bytesTranscoded;
|
|
|
|
|
|
|
|
|
|
var deviceId = Options.DeviceId;
|
|
|
|
|
|
|
|
|
@ -176,21 +169,21 @@ namespace MediaBrowser.MediaEncoding.Encoder
|
|
|
|
|
var audioCodec = ActualOutputVideoCodec;
|
|
|
|
|
var videoCodec = ActualOutputVideoCodec;
|
|
|
|
|
|
|
|
|
|
// SessionManager.ReportTranscodingInfo(deviceId, new TranscodingInfo
|
|
|
|
|
// {
|
|
|
|
|
// Bitrate = job.TotalOutputBitrate,
|
|
|
|
|
// AudioCodec = audioCodec,
|
|
|
|
|
// VideoCodec = videoCodec,
|
|
|
|
|
// Container = job.Options.OutputContainer,
|
|
|
|
|
// Framerate = framerate,
|
|
|
|
|
// CompletionPercentage = percentComplete,
|
|
|
|
|
// Width = job.OutputWidth,
|
|
|
|
|
// Height = job.OutputHeight,
|
|
|
|
|
// AudioChannels = job.OutputAudioChannels,
|
|
|
|
|
// IsAudioDirect = string.Equals(job.OutputAudioCodec, "copy", StringComparison.OrdinalIgnoreCase),
|
|
|
|
|
// IsVideoDirect = string.Equals(job.OutputVideoCodec, "copy", StringComparison.OrdinalIgnoreCase)
|
|
|
|
|
// });
|
|
|
|
|
}
|
|
|
|
|
SessionManager.ReportTranscodingInfo(deviceId, new TranscodingInfo
|
|
|
|
|
{
|
|
|
|
|
Bitrate = job.TotalOutputBitrate,
|
|
|
|
|
AudioCodec = audioCodec,
|
|
|
|
|
VideoCodec = videoCodec,
|
|
|
|
|
Container = job.Options.OutputContainer,
|
|
|
|
|
Framerate = framerate,
|
|
|
|
|
CompletionPercentage = percentComplete,
|
|
|
|
|
Width = job.OutputWidth,
|
|
|
|
|
Height = job.OutputHeight,
|
|
|
|
|
AudioChannels = job.OutputAudioChannels,
|
|
|
|
|
IsAudioDirect = string.Equals(job.OutputAudioCodec, "copy", StringComparison.OrdinalIgnoreCase),
|
|
|
|
|
IsVideoDirect = string.Equals(job.OutputVideoCodec, "copy", StringComparison.OrdinalIgnoreCase)
|
|
|
|
|
});
|
|
|
|
|
}*/
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|