blob: 18f4ce047924c238aa57fd43b7cb03d52c57a4a3 (
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
|
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Jellyfin.MediaEncoding.Keyframes;
using MediaBrowser.Controller.IO;
using MediaBrowser.Controller.Persistence;
namespace Emby.Server.Implementations.Library;
/// <summary>
/// Manager for Keyframe data.
/// </summary>
public class KeyframeManager : IKeyframeManager
{
private readonly IKeyframeRepository _repository;
/// <summary>
/// Initializes a new instance of the <see cref="KeyframeManager"/> class.
/// </summary>
/// <param name="repository">The keyframe repository.</param>
public KeyframeManager(IKeyframeRepository repository)
{
_repository = repository;
}
/// <inheritdoc />
public IReadOnlyList<KeyframeData> GetKeyframeData(Guid itemId)
{
return _repository.GetKeyframeData(itemId);
}
/// <inheritdoc />
public async Task SaveKeyframeDataAsync(Guid itemId, KeyframeData data, CancellationToken cancellationToken)
{
await _repository.SaveKeyframeDataAsync(itemId, data, cancellationToken).ConfigureAwait(false);
}
/// <inheritdoc />
public async Task DeleteKeyframeDataAsync(Guid itemId, CancellationToken cancellationToken)
{
await _repository.DeleteKeyframeDataAsync(itemId, cancellationToken).ConfigureAwait(false);
}
}
|