-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathFrameSpec.cs
More file actions
26 lines (23 loc) · 842 Bytes
/
FrameSpec.cs
File metadata and controls
26 lines (23 loc) · 842 Bytes
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
namespace MotionJpegLatencyTest
{
public class FrameSpec
{
public int Width { get; set; }
public int Height { get; set; }
public int Center { get; set; }
public int Radius { get; set; }
// seconds per full circle revolution
public int SpinDurationSec { get; set; }
// we hope to get 60 frames per second, so subdiv each second into 60 ticks
public int SpinSubdivisions { get; set; }
public FrameSpec(int width, int height, int spinDurationSec, int spinSubdivisionsPerSec = 60)
{
Width = width;
Height = height;
Radius = (Height / 3) | 0;
Center = (Radius / 2) | 0;
SpinDurationSec = spinDurationSec;
SpinSubdivisions = SpinDurationSec * spinSubdivisionsPerSec;
}
}
}