skyscraper8/skyscraper8/Mpeg2/Descriptors/0x0C_MultiplexBufferUtilizationDescriptor.cs
feyris-tan ef86554f9a Import
2025-05-12 22:09:16 +02:00

34 lines
1005 B
C#

using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using skyscraper5.Skyscraper.IO;
using skyscraper5.Skyscraper.Plugins;
namespace skyscraper5.Mpeg2.Descriptors
{
[SkyscraperPlugin]
[TsDescriptor(0x0c,"PMT")]
[BannedTable("EIT")]
class MultiplexBufferUtilizationDescriptor : TsDescriptor
{
public MultiplexBufferUtilizationDescriptor(byte[] buffer)
{
MemoryStream ms = new MemoryStream(buffer);
ushort readUInt16Be = ms.ReadUInt16BE();
BoundValidFlag = (readUInt16Be & 0x8000) != 0;
LtwOffsetLowerBound = (readUInt16Be & 0x7fff);
readUInt16Be = ms.ReadUInt16BE();
LtwOffsetUpperBound = (readUInt16Be & 0x7ffe) >> 1;
}
public int LtwOffsetUpperBound { get; private set; }
public int LtwOffsetLowerBound { get; private set; }
public bool BoundValidFlag { get; private set; }
}
}