-
Notifications
You must be signed in to change notification settings - Fork 53
/
Copy pathVideeClip.cs
29 lines (25 loc) · 933 Bytes
/
VideeClip.cs
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
using System;
using UnityDataTools.FileSystem.TypeTreeReaders;
namespace UnityDataTools.Analyzer.SerializedObjects;
public class VideoClip
{
public string Name { get; init; }
public double FrameRate { get; init; }
public uint Width { get; init; }
public uint Height { get; init; }
public UInt64 FrameCount { get; init; }
public long StreamDataSize { get; init; }
private VideoClip() {}
public static VideoClip Read(RandomAccessReader reader)
{
return new VideoClip()
{
Name = reader["m_Name"].GetValue<string>(),
FrameRate = reader["m_FrameRate"].GetValue<double>(),
Width = reader["Width"].GetValue<uint>(),
Height = reader["Height"].GetValue<uint>(),
FrameCount = reader["m_FrameCount"].GetValue<UInt64>(),
StreamDataSize = reader["m_ExternalResources"]["m_Size"].GetValue<long>()
};
}
}