aboutsummaryrefslogtreecommitdiff
path: root/src/Jellyfin.LiveTv/IO/IRecorder.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Jellyfin.LiveTv/IO/IRecorder.cs')
-rw-r--r--src/Jellyfin.LiveTv/IO/IRecorder.cs27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/Jellyfin.LiveTv/IO/IRecorder.cs b/src/Jellyfin.LiveTv/IO/IRecorder.cs
new file mode 100644
index 000000000..ab4506414
--- /dev/null
+++ b/src/Jellyfin.LiveTv/IO/IRecorder.cs
@@ -0,0 +1,27 @@
+#pragma warning disable CS1591
+
+using System;
+using System.Threading;
+using System.Threading.Tasks;
+using MediaBrowser.Controller.Library;
+using MediaBrowser.Model.Dto;
+
+namespace Jellyfin.LiveTv.IO
+{
+ public interface IRecorder : IDisposable
+ {
+ /// <summary>
+ /// Records the specified media source.
+ /// </summary>
+ /// <param name="directStreamProvider">The direct stream provider, or <c>null</c>.</param>
+ /// <param name="mediaSource">The media source.</param>
+ /// <param name="targetFile">The target file.</param>
+ /// <param name="duration">The duration to record.</param>
+ /// <param name="onStarted">An action to perform when recording starts.</param>
+ /// <param name="cancellationToken">The cancellation token.</param>
+ /// <returns>A <see cref="Task"/> that represents the recording operation.</returns>
+ Task Record(IDirectStreamProvider? directStreamProvider, MediaSourceInfo mediaSource, string targetFile, TimeSpan duration, Action onStarted, CancellationToken cancellationToken);
+
+ string GetOutputPath(MediaSourceInfo mediaSource, string targetFile);
+ }
+}