-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathVideoInputStreamBase.cs
More file actions
64 lines (53 loc) · 1.73 KB
/
VideoInputStreamBase.cs
File metadata and controls
64 lines (53 loc) · 1.73 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
// Copyright (c) TensorStack. All rights reserved.
// Licensed under the Apache 2.0 License.
using System;
using TensorStack.Common.Tensor;
namespace TensorStack.Video
{
public class VideoInputStreamBase
{
private readonly VideoInfo _videoInfo;
/// <summary>
/// Initializes a new instance of the <see cref="VideoInputStreamBase"/> class.
/// </summary>
/// <param name="videoInfo">The video information.</param>
/// <param name="videoCodec">The video codec.</param>
public VideoInputStreamBase(VideoInfo videoInfo)
{
_videoInfo = videoInfo;
}
/// <summary>
/// Gets the filename.
/// </summary>
/// <value>The filename.</value>
public string SourceFile => _videoInfo.FileName;
/// <summary>
/// Gets the video width.
/// </summary>
public int Width => _videoInfo.Width;
/// <summary>
/// Gets the video height.
/// </summary>
public int Height => _videoInfo.Height;
/// <summary>
/// Gets the video frame rate.
/// </summary>
public float FrameRate => _videoInfo.FrameRate;
/// <summary>
/// Gets the video frame count.
/// </summary>
public int FrameCount => _videoInfo.FrameCount;
/// <summary>
/// Gets the video codec.
/// </summary>
public string VideoCodec => _videoInfo.VideoCodec;
/// <summary>
/// Gets the duration.
/// </summary>
public TimeSpan Duration => _videoInfo.Duration;
/// <summary>
/// Gets the thumbnail.
/// </summary>
public ImageTensor Thumbnail => _videoInfo.Thumbnail;
}
}