mirror of
https://gitee.com/csharpui/CPF.git
synced 2025-09-19 01:58:20 +08:00
初始化
This commit is contained in:
38
CPF.Mac/Mac/QTKit/QTTime.cs
Normal file
38
CPF.Mac/Mac/QTKit/QTTime.cs
Normal 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}]";
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user