CreateMainPlaylistRequest.cs 2.3 KB

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