| | | 1 | | using System; |
| | | 2 | | |
| | | 3 | | namespace Jellyfin.MediaEncoding.Hls.Playlist; |
| | | 4 | | |
| | | 5 | | /// <summary> |
| | | 6 | | /// Request class for the <see cref="IDynamicHlsPlaylistGenerator.CreateMainPlaylist(CreateMainPlaylistRequest)"/> metho |
| | | 7 | | /// </summary> |
| | | 8 | | public class CreateMainPlaylistRequest |
| | | 9 | | { |
| | | 10 | | /// <summary> |
| | | 11 | | /// Initializes a new instance of the <see cref="CreateMainPlaylistRequest"/> class. |
| | | 12 | | /// </summary> |
| | | 13 | | /// <param name="mediaSourceId">The media source id.</param> |
| | | 14 | | /// <param name="filePath">The absolute file path to the file.</param> |
| | | 15 | | /// <param name="desiredSegmentLengthMs">The desired segment length in milliseconds.</param> |
| | | 16 | | /// <param name="totalRuntimeTicks">The total duration of the file in ticks.</param> |
| | | 17 | | /// <param name="segmentContainer">The desired segment container eg. "ts".</param> |
| | | 18 | | /// <param name="endpointPrefix">The URI prefix for the relative URL in the playlist.</param> |
| | | 19 | | /// <param name="queryString">The desired query string to append (must start with ?).</param> |
| | | 20 | | /// <param name="isRemuxingVideo">Whether the video is being remuxed.</param> |
| | | 21 | | public CreateMainPlaylistRequest(Guid? mediaSourceId, string filePath, int desiredSegmentLengthMs, long totalRuntime |
| | 0 | 22 | | { |
| | | 23 | | MediaSourceId = mediaSourceId; |
| | | 24 | | FilePath = filePath; |
| | | 25 | | DesiredSegmentLengthMs = desiredSegmentLengthMs; |
| | | 26 | | TotalRuntimeTicks = totalRuntimeTicks; |
| | | 27 | | SegmentContainer = segmentContainer; |
| | | 28 | | EndpointPrefix = endpointPrefix; |
| | | 29 | | QueryString = queryString; |
| | | 30 | | IsRemuxingVideo = isRemuxingVideo; |
| | 0 | 31 | | } |
| | | 32 | | |
| | | 33 | | /// <summary> |
| | | 34 | | /// Gets the media source id. |
| | | 35 | | /// </summary> |
| | | 36 | | public Guid? MediaSourceId { get; } |
| | | 37 | | |
| | | 38 | | /// <summary> |
| | | 39 | | /// Gets the file path. |
| | | 40 | | /// </summary> |
| | | 41 | | public string FilePath { get; } |
| | | 42 | | |
| | | 43 | | /// <summary> |
| | | 44 | | /// Gets the desired segment length in milliseconds. |
| | | 45 | | /// </summary> |
| | | 46 | | public int DesiredSegmentLengthMs { get; } |
| | | 47 | | |
| | | 48 | | /// <summary> |
| | | 49 | | /// Gets the total runtime in ticks. |
| | | 50 | | /// </summary> |
| | | 51 | | public long TotalRuntimeTicks { get; } |
| | | 52 | | |
| | | 53 | | /// <summary> |
| | | 54 | | /// Gets the segment container. |
| | | 55 | | /// </summary> |
| | | 56 | | public string SegmentContainer { get; } |
| | | 57 | | |
| | | 58 | | /// <summary> |
| | | 59 | | /// Gets the endpoint prefix for the URL. |
| | | 60 | | /// </summary> |
| | | 61 | | public string EndpointPrefix { get; } |
| | | 62 | | |
| | | 63 | | /// <summary> |
| | | 64 | | /// Gets the query string. |
| | | 65 | | /// </summary> |
| | | 66 | | public string QueryString { get; } |
| | | 67 | | |
| | | 68 | | /// <summary> |
| | | 69 | | /// Gets a value indicating whether the video is being remuxed. |
| | | 70 | | /// </summary> |
| | | 71 | | public bool IsRemuxingVideo { get; } |
| | | 72 | | } |