aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Model/Dto/TrickplayInfoDto.cs
blob: 0c5f6e8171e7b126e27713e34fd374db70b1b883 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
using System;
using Jellyfin.Database.Implementations.Entities;

namespace MediaBrowser.Model.Dto;

/// <summary>
/// The trickplay api model.
/// </summary>
public record TrickplayInfoDto
{
    /// <summary>
    /// Initializes a new instance of the <see cref="TrickplayInfoDto"/> class.
    /// </summary>
    /// <param name="info">The trickplay info.</param>
    public TrickplayInfoDto(TrickplayInfo info)
    {
        ArgumentNullException.ThrowIfNull(info);

        Width = info.Width;
        Height = info.Height;
        TileWidth = info.TileWidth;
        TileHeight = info.TileHeight;
        ThumbnailCount = info.ThumbnailCount;
        Interval = info.Interval;
        Bandwidth = info.Bandwidth;
    }

    /// <summary>
    /// Gets the width of an individual thumbnail.
    /// </summary>
    public int Width { get; init; }

    /// <summary>
    /// Gets the height of an individual thumbnail.
    /// </summary>
    public int Height { get; init; }

    /// <summary>
    /// Gets the amount of thumbnails per row.
    /// </summary>
    public int TileWidth { get; init; }

    /// <summary>
    /// Gets the amount of thumbnails per column.
    /// </summary>
    public int TileHeight { get; init; }

    /// <summary>
    /// Gets the total amount of non-black thumbnails.
    /// </summary>
    public int ThumbnailCount { get; init; }

    /// <summary>
    /// Gets the interval in milliseconds between each trickplay thumbnail.
    /// </summary>
    public int Interval { get; init; }

    /// <summary>
    /// Gets the peak bandwidth usage in bits per second.
    /// </summary>
    public int Bandwidth { get; init; }
}