forked from Myriadbits/MXFInspect
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMXFIndexEntry.cs
42 lines (38 loc) · 1.18 KB
/
MXFIndexEntry.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
30
31
32
33
34
35
36
37
38
39
40
41
42
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace MXFInspect
{
public class MXFIndexEntry : MXFObject
{
[CategoryAttribute("IndexEntry"), ReadOnly(true)]
public UInt64 Index { get; set; }
[CategoryAttribute("IndexEntry"), ReadOnly(true)]
public byte TemporalOffset { get; set; }
[CategoryAttribute("IndexEntry"), ReadOnly(true)]
public byte KeyFrameOffset { get; set; }
[CategoryAttribute("IndexEntry"), ReadOnly(true)]
public byte Flag { get; set; }
[CategoryAttribute("IndexEntry"), ReadOnly(true)]
public UInt64 StreamOffset { get; set; }
public MXFIndexEntry(UInt64 index, MXFReader reader)
{
this.Index = index;
this.TemporalOffset = reader.ReadB();
this.KeyFrameOffset = reader.ReadB();
this.Flag = reader.ReadB();
this.StreamOffset = reader.ReadL();
}
/// <summary>
/// Some output
/// </summary>
/// <returns></returns>
public override string ToString()
{
return string.Format("Index[{0}] - TemporalOffset {1}, KeyFrameOffset {2}, Offset {3}", this.Index, this.TemporalOffset, this.KeyFrameOffset, this.StreamOffset);
}
}
}