rework live stream creation

This commit is contained in:
Luke Pulverenti
2017-09-28 13:04:06 -04:00
parent 2e0e1697a8
commit 539fecd08b
9 changed files with 16 additions and 101 deletions

View File

@@ -36,7 +36,7 @@ namespace MediaBrowser.Controller.LiveTv
/// <param name="streamId">The stream identifier.</param>
/// <param name="cancellationToken">The cancellation token.</param>
/// <returns>Task&lt;MediaSourceInfo&gt;.</returns>
Task<LiveStream> GetChannelStream(string channelId, string streamId, CancellationToken cancellationToken);
Task<ILiveStream> GetChannelStream(string channelId, string streamId, CancellationToken cancellationToken);
/// <summary>
/// Gets the channel stream media sources.
/// </summary>
@@ -56,4 +56,17 @@ namespace MediaBrowser.Controller.LiveTv
/// <returns>Task.</returns>
Task Validate(TunerHostInfo info);
}
public interface ILiveStream
{
Task Open(CancellationToken cancellationToken);
Task Close();
int ConsumerCount { get; }
string OriginalStreamId { get; set; }
bool EnableStreamSharing { get; set; }
ITunerHost TunerHost { get; set; }
MediaSourceInfo OpenedMediaSource { get; set; }
string UniqueId { get; }
List<string> SharedStreamIds { get; }
}
}