-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathVideoInputBase.cs
More file actions
44 lines (37 loc) · 1.38 KB
/
VideoInputBase.cs
File metadata and controls
44 lines (37 loc) · 1.38 KB
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
// Copyright (c) TensorStack. All rights reserved.
// Licensed under the Apache 2.0 License.
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using System.Threading;
using System.Threading.Tasks;
using TensorStack.Common.Tensor;
using TensorStack.Common.Video;
namespace TensorStack.Video
{
/// <summary>
/// Class to handle processing of a video.
/// </summary>
public abstract class VideoInputBase : VideoTensor
{
/// <summary>
/// Initializes a new instance of the <see cref="VideoInput"/> class.
/// </summary>
/// <param name="videoTensor">The video tensor.</param>
public VideoInputBase(VideoTensor videoTensor) : base(videoTensor, videoTensor.FrameRate) { }
/// <summary>
/// Gets the source video filename.
/// </summary>
public abstract string SourceFile { get; }
/// <summary>
/// Save the Video to file
/// </summary>
/// <param name="filename">The filename.</param>
public abstract void Save(string filename);
/// <summary>
/// Save the Video to file
/// </summary>
/// <param name="filename">The filename.</param>
/// <param name="cancellationToken">The cancellation token</param>
public abstract Task SaveAsync(string filename, CancellationToken cancellationToken = default);
}
}