TrickplayInfoDto.cs 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. using System;
  2. using Jellyfin.Database.Implementations.Entities;
  3. namespace MediaBrowser.Model.Dto;
  4. /// <summary>
  5. /// The trickplay api model.
  6. /// </summary>
  7. public record TrickplayInfoDto
  8. {
  9. /// <summary>
  10. /// Initializes a new instance of the <see cref="TrickplayInfoDto"/> class.
  11. /// </summary>
  12. /// <param name="info">The trickplay info.</param>
  13. public TrickplayInfoDto(TrickplayInfo info)
  14. {
  15. ArgumentNullException.ThrowIfNull(info);
  16. Width = info.Width;
  17. Height = info.Height;
  18. TileWidth = info.TileWidth;
  19. TileHeight = info.TileHeight;
  20. ThumbnailCount = info.ThumbnailCount;
  21. Interval = info.Interval;
  22. Bandwidth = info.Bandwidth;
  23. }
  24. /// <summary>
  25. /// Gets the width of an individual thumbnail.
  26. /// </summary>
  27. public int Width { get; init; }
  28. /// <summary>
  29. /// Gets the height of an individual thumbnail.
  30. /// </summary>
  31. public int Height { get; init; }
  32. /// <summary>
  33. /// Gets the amount of thumbnails per row.
  34. /// </summary>
  35. public int TileWidth { get; init; }
  36. /// <summary>
  37. /// Gets the amount of thumbnails per column.
  38. /// </summary>
  39. public int TileHeight { get; init; }
  40. /// <summary>
  41. /// Gets the total amount of non-black thumbnails.
  42. /// </summary>
  43. public int ThumbnailCount { get; init; }
  44. /// <summary>
  45. /// Gets the interval in milliseconds between each trickplay thumbnail.
  46. /// </summary>
  47. public int Interval { get; init; }
  48. /// <summary>
  49. /// Gets the peak bandwidth usage in bits per second.
  50. /// </summary>
  51. public int Bandwidth { get; init; }
  52. }