mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-26 05:02:36 +01:00
31 lines
1.4 KiB
C#
31 lines
1.4 KiB
C#
namespace Nikse.SubtitleEdit.Core.TransportStream
|
|
{
|
|
public class DisplayDefinitionSegment
|
|
{
|
|
public int DisplayDefinitionVersionNumber { get; set; }
|
|
public bool DisplayWindowFlag { get; set; }
|
|
public int DisplayWith { get; set; }
|
|
public int DisplayHeight { get; set; }
|
|
public int? DisplayWindowHorizontalPositionMinimum { get; set; }
|
|
public int? DisplayWindowHorizontalPositionMaximum { get; set; }
|
|
public int? DisplayWindowVerticalPositionMinimum { get; set; }
|
|
public int? DisplayWindowVerticalPositionMaximum { get; set; }
|
|
|
|
public DisplayDefinitionSegment(byte[] buffer, int index)
|
|
{
|
|
DisplayDefinitionVersionNumber = buffer[index] >> 4;
|
|
DisplayWindowFlag = (buffer[index] & Helper.B00001000) > 0;
|
|
DisplayWith = Helper.GetEndianWord(buffer, index + 1);
|
|
DisplayHeight = Helper.GetEndianWord(buffer, index + 3);
|
|
if (DisplayWindowFlag)
|
|
{
|
|
DisplayWindowHorizontalPositionMinimum = Helper.GetEndianWord(buffer, index + 5);
|
|
DisplayWindowHorizontalPositionMaximum = Helper.GetEndianWord(buffer, index + 7);
|
|
DisplayWindowVerticalPositionMinimum = Helper.GetEndianWord(buffer, index + 9);
|
|
DisplayWindowVerticalPositionMaximum = Helper.GetEndianWord(buffer, index + 11);
|
|
}
|
|
}
|
|
|
|
}
|
|
}
|