using System.Runtime.InteropServices;
namespace SabreTools.Data.Models.DVD
{
///
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
public sealed class VideoManagerIFO
{
///
/// "DVDVIDEO-VMG"
///
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 12)]
public string Signature = string.Empty;
///
/// Last sector of VMG set (last sector of BUP)
///
public uint LastVMGSetSector;
///
/// Last sector of IFO
///
public uint LastIFOSector;
///
/// Version number
/// - Byte 0 - Reserved, should be 0
/// - Byte 1, Bits 7-4 - Major version number
/// - Byte 1, Bits 3-0 - Minor version number
///
public ushort VersionNumber;
///
/// VMG category
///
/// byte1=prohibited region mask
public uint VMGCategory;
///
/// Number of volumes
///
public ushort NumberOfVolumes;
///
/// Volume number
///
public ushort VolumeNumber;
///
/// Side ID
///
public byte SideID;
///
/// Number of title sets
///
public ushort NumberOfTitleSets;
///
/// Provider ID
///
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)]
public byte[] ProviderID = new byte[32];
///
/// VMG POS
///
public ulong VMGPOS;
///
/// End byte address of VMGI_MAT
///
public uint InformationManagementTableEndByteAddress;
///
/// Start address of FP_PGC (First Play program chain)
///
public uint FirstPlayProgramChainStartAddress;
///
/// Start sector of Menu VOB
///
public uint MenuVOBStartSector;
///
/// Sector pointer to TT_SRPT (table of titles)
///
public uint TableOfTitlesSectorPointer;
///
/// Sector pointer to VMGM_PGCI_UT (Menu Program Chain table)
///
public uint MenuProgramChainTableSectorPointer;
///
/// Sector pointer to VMG_PTL_MAIT (Parental Management masks)
///
public uint ParentalManagementMasksSectorPointer;
///
/// Sector pointer to VMG_VTS_ATRT (copies of VTS audio/sub-picture attributes)
///
public uint AudioSubPictureAttributesSectorPointer;
///
/// Sector pointer to VMG_TXTDT_MG (text data)
///
public uint TextDataSectorPointer;
///
/// Sector pointer to VMGM_C_ADT (menu cell address table)
///
public uint MenuCellAddressTableSectorPointer;
///
/// Sector pointer to VMGM_VOBU_ADMAP (menu VOBU address map)
///
public uint MenuVOBUAddressMapSectorPointer;
///
/// Video attributes of VMGM_VOBS
///
public ushort VideoAttributes;
///
/// Number of audio streams in VMGM_VOBS
///
public ushort NumberOfAudioStreams;
///
/// Audio attributes of VMGM_VOBS
///
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)]
public ulong[] AudioAttributes = new ulong[8];
///
/// Unknown
///
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)]
public byte[] Unknown = new byte[16];
///
/// Number of subpicture streams in VMGM_VOBS (0 or 1)
///
public ushort NumberOfSubpictureStreams;
///
/// Subpicture attributes of VMGM_VOBS
///
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)]
public byte[] SubpictureAttributes = new byte[6];
///
/// Reserved
///
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 164)]
public byte[] Reserved = new byte[164];
}
}