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

35 lines
993 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(0x10,"PMT")]
[BannedTable("TSDT","EIT")]
class SmoothingBufferDescriptor : TsDescriptor
{
public SmoothingBufferDescriptor(byte[] buffer)
{
byte[] tmpBuffer = new byte[4];
tmpBuffer[0] = buffer[2];
tmpBuffer[1] = buffer[1];
tmpBuffer[2] = buffer[0];
SbLeakRate = BitConverter.ToUInt32(tmpBuffer, 0) & 0x003fffff;
tmpBuffer[0] = buffer[5];
tmpBuffer[1] = buffer[4];
tmpBuffer[2] = buffer[3];
SbSize = BitConverter.ToUInt32(tmpBuffer, 0) & 0x003fffff;
}
public uint SbSize { get; private set; }
public uint SbLeakRate { get; private set; }
}
}