improve cancellation support of auto-organize

This commit is contained in:
Luke Pulverenti
2017-03-29 15:16:43 -04:00
parent cb5c9333c5
commit f641c501a7
10 changed files with 49 additions and 27 deletions

View File

@@ -157,7 +157,7 @@ namespace MediaBrowser.Controller.LiveTv
/// <param name="mediaSourceId">The media source identifier.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task{StreamResponseInfo}.</returns>
Task<Tuple<MediaSourceInfo, IDirectStreamProvider, bool>> GetChannelStream(string id, string mediaSourceId, CancellationToken cancellationToken);
Task<Tuple<MediaSourceInfo, IDirectStreamProvider>> GetChannelStream(string id, string mediaSourceId, CancellationToken cancellationToken);
/// <summary>
/// Gets the program.

View File

@@ -743,6 +743,11 @@ namespace MediaBrowser.Controller.MediaEncoding
public bool CanStreamCopyVideo(EncodingJobInfo state, MediaStream videoStream)
{
if (!videoStream.AllowStreamCopy)
{
return false;
}
var request = state.BaseRequest;
if (videoStream.IsInterlaced)
@@ -883,6 +888,11 @@ namespace MediaBrowser.Controller.MediaEncoding
public bool CanStreamCopyAudio(EncodingJobInfo state, MediaStream audioStream, List<string> supportedAudioCodecs)
{
if (!audioStream.AllowStreamCopy)
{
return false;
}
var request = state.BaseRequest;
// Source and target codecs must match