初始化

This commit is contained in:
xhm
2023-11-21 23:05:03 +08:00
commit 2455630dad
2252 changed files with 466529 additions and 0 deletions

View File

@@ -0,0 +1,38 @@
namespace CPF.Mac.QTKit
{
public struct QTTime
{
public static readonly QTTime Zero = new QTTime(0L, 1, (TimeFlags)0);
public static readonly QTTime IndefiniteTime = new QTTime(0L, 1, TimeFlags.TimeIsIndefinite);
public long TimeValue;
public int TimeScale;
public TimeFlags Flags;
public QTTime(long timeValue, int timeScale, TimeFlags flags)
{
TimeValue = timeValue;
TimeScale = timeScale;
Flags = flags;
}
public QTTime(long timeValue, int timeScale)
{
TimeValue = timeValue;
TimeScale = timeScale;
Flags = (TimeFlags)0;
}
public override string ToString()
{
if (Flags == (TimeFlags)0)
{
return $"[TimeValue={TimeValue} scale={TimeScale}]";
}
return $"[TimeValue={TimeValue} scale={TimeScale} Flags={Flags}]";
}
}
}