mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-22 01:54:42 +01:00
Kill ProgressiveFileCopier and seek to end for ongoing livetv
This commit is contained in:
20
MediaBrowser.Controller/Library/IDirectStreamProvider.cs
Normal file
20
MediaBrowser.Controller/Library/IDirectStreamProvider.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using System.IO;
|
||||
|
||||
namespace MediaBrowser.Controller.Library
|
||||
{
|
||||
/// <summary>
|
||||
/// The direct live TV stream provider.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// Deprecated.
|
||||
/// </remarks>
|
||||
public interface IDirectStreamProvider
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the live stream, optionally seeks to the end of the file first.
|
||||
/// </summary>
|
||||
/// <param name="seekNearEnd">A value indicating whether to seek to the end of the file.</param>
|
||||
/// <returns>The stream.</returns>
|
||||
Stream GetStream(bool seekNearEnd = true);
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,7 @@
|
||||
|
||||
#pragma warning disable CA1711, CS1591
|
||||
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using MediaBrowser.Model.Dto;
|
||||
@@ -25,5 +26,7 @@ namespace MediaBrowser.Controller.Library
|
||||
Task Open(CancellationToken openCancellationToken);
|
||||
|
||||
Task Close();
|
||||
|
||||
Stream GetStream(bool seekNearEnd = true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Jellyfin.Data.Entities;
|
||||
@@ -110,6 +109,13 @@ namespace MediaBrowser.Controller.Library
|
||||
|
||||
Task<Tuple<MediaSourceInfo, IDirectStreamProvider>> GetLiveStreamWithDirectStreamProvider(string id, CancellationToken cancellationToken);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the live stream info.
|
||||
/// </summary>
|
||||
/// <param name="id">The identifier.</param>
|
||||
/// <returns>An instance of <see cref="ILiveStream"/>.</returns>
|
||||
public ILiveStream GetLiveStreamInfo(string id);
|
||||
|
||||
/// <summary>
|
||||
/// Closes the media source.
|
||||
/// </summary>
|
||||
@@ -129,11 +135,4 @@ namespace MediaBrowser.Controller.Library
|
||||
|
||||
Task<IDirectStreamProvider> GetDirectStreamProviderByUniqueId(string uniqueId, CancellationToken cancellationToken);
|
||||
}
|
||||
|
||||
public interface IDirectStreamProvider
|
||||
{
|
||||
Task CopyToAsync(Stream stream, CancellationToken cancellationToken);
|
||||
|
||||
string GetFilePath();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user