ホーム › Media.DirectShow › DVD_TitleAttributes
DVD_TitleAttributes
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| Anonymous | _Anonymous_e__Union | 4 | +0 | +0 | タイトルのアプリケーション属性を保持する無名共用体。 |
| VideoAttributes | DVD_VideoAttributes | 52 | +4 | +4 | タイトルのビデオ属性を示すDVD_VideoAttributes構造体。 |
| ulNumberOfAudioStreams | DWORD | 4 | +56 | +56 | タイトルに含まれるオーディオストリーム数を示す。 |
| AudioAttributes | DVD_AudioAttributes | 320 | +60 | +60 | 各オーディオストリームの属性を示すDVD_AudioAttributes配列。 |
| MultichannelAudioAttributes | DVD_MultichannelAudioAttributes | 2304 | +384 | +384 | 各ストリームのマルチチャンネル属性を示す配列。 |
| ulNumberOfSubpictureStreams | DWORD | 4 | +2688 | +2688 | タイトルに含まれるサブピクチャストリーム数を示す。 |
| SubpictureAttributes | DVD_SubpictureAttributes | 512 | +2692 | +2692 | 各サブピクチャストリームの属性を示す配列。 |
共用体: _Anonymous_e__Union x64 4B / x86 4B
| フィールド | 型 | サイズ | x64 | x86 |
|---|---|---|---|---|
| AppMode | DVD_TITLE_APPMODE | 4 | +0 | +0 |
| TitleLength | DVD_HMSF_TIMECODE | 4 | +0 | +0 |
各言語での定義
#include <windows.h>
// DVD_VideoAttributes (x64 52 / x86 52 バイト)
typedef struct DVD_VideoAttributes {
BOOL fPanscanPermitted;
BOOL fLetterboxPermitted;
DWORD ulAspectX;
DWORD ulAspectY;
DWORD ulFrameRate;
DWORD ulFrameHeight;
DVD_VIDEO_COMPRESSION Compression;
BOOL fLine21Field1InGOP;
BOOL fLine21Field2InGOP;
DWORD ulSourceResolutionX;
DWORD ulSourceResolutionY;
BOOL fIsSourceLetterboxed;
BOOL fIsFilmMode;
} DVD_VideoAttributes;
// DVD_AudioAttributes (x64 40 / x86 40 バイト)
typedef struct DVD_AudioAttributes {
DVD_AUDIO_APPMODE AppMode;
BYTE AppModeData;
DVD_AUDIO_FORMAT AudioFormat;
DWORD Language;
DVD_AUDIO_LANG_EXT LanguageExtension;
BOOL fHasMultichannelInfo;
DWORD dwFrequency;
BYTE bQuantization;
BYTE bNumberOfChannels;
DWORD dwReserved[2];
} DVD_AudioAttributes;
// DVD_MUA_MixingInfo (x64 20 / x86 20 バイト)
typedef struct DVD_MUA_MixingInfo {
BOOL fMixTo0;
BOOL fMixTo1;
BOOL fMix0InPhase;
BOOL fMix1InPhase;
DWORD dwSpeakerPosition;
} DVD_MUA_MixingInfo;
// DVD_MUA_Coeff (x64 16 / x86 16 バイト)
typedef struct DVD_MUA_Coeff {
DOUBLE log2_alpha;
DOUBLE log2_beta;
} DVD_MUA_Coeff;
// DVD_MultichannelAudioAttributes (x64 288 / x86 288 バイト)
typedef struct DVD_MultichannelAudioAttributes {
DVD_MUA_MixingInfo Info[8];
DVD_MUA_Coeff Coeff[8];
} DVD_MultichannelAudioAttributes;
// DVD_SubpictureAttributes (x64 16 / x86 16 バイト)
typedef struct DVD_SubpictureAttributes {
DVD_SUBPICTURE_TYPE Type;
DVD_SUBPICTURE_CODING CodingMode;
DWORD Language;
DVD_SUBPICTURE_LANG_EXT LanguageExtension;
} DVD_SubpictureAttributes;
// DVD_TitleAttributes (x64 3208 / x86 3208 バイト)
typedef struct DVD_TitleAttributes {
_Anonymous_e__Union Anonymous;
DVD_VideoAttributes VideoAttributes;
DWORD ulNumberOfAudioStreams;
DVD_AudioAttributes AudioAttributes[8];
DVD_MultichannelAudioAttributes MultichannelAudioAttributes[8];
DWORD ulNumberOfSubpictureStreams;
DVD_SubpictureAttributes SubpictureAttributes[32];
} DVD_TitleAttributes;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DVD_VideoAttributes
{
[MarshalAs(UnmanagedType.Bool)] public bool fPanscanPermitted;
[MarshalAs(UnmanagedType.Bool)] public bool fLetterboxPermitted;
public uint ulAspectX;
public uint ulAspectY;
public uint ulFrameRate;
public uint ulFrameHeight;
public int Compression;
[MarshalAs(UnmanagedType.Bool)] public bool fLine21Field1InGOP;
[MarshalAs(UnmanagedType.Bool)] public bool fLine21Field2InGOP;
public uint ulSourceResolutionX;
public uint ulSourceResolutionY;
[MarshalAs(UnmanagedType.Bool)] public bool fIsSourceLetterboxed;
[MarshalAs(UnmanagedType.Bool)] public bool fIsFilmMode;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DVD_AudioAttributes
{
public int AppMode;
public byte AppModeData;
public int AudioFormat;
public uint Language;
public int LanguageExtension;
[MarshalAs(UnmanagedType.Bool)] public bool fHasMultichannelInfo;
public uint dwFrequency;
public byte bQuantization;
public byte bNumberOfChannels;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] public uint[] dwReserved;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DVD_MUA_MixingInfo
{
[MarshalAs(UnmanagedType.Bool)] public bool fMixTo0;
[MarshalAs(UnmanagedType.Bool)] public bool fMixTo1;
[MarshalAs(UnmanagedType.Bool)] public bool fMix0InPhase;
[MarshalAs(UnmanagedType.Bool)] public bool fMix1InPhase;
public uint dwSpeakerPosition;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DVD_MUA_Coeff
{
public double log2_alpha;
public double log2_beta;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DVD_MultichannelAudioAttributes
{
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] public DVD_MUA_MixingInfo[] Info;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] public DVD_MUA_Coeff[] Coeff;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DVD_SubpictureAttributes
{
public int Type;
public int CodingMode;
public uint Language;
public int LanguageExtension;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DVD_TitleAttributes
{
public _Anonymous_e__Union Anonymous;
public DVD_VideoAttributes VideoAttributes;
public uint ulNumberOfAudioStreams;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] public DVD_AudioAttributes[] AudioAttributes;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] public DVD_MultichannelAudioAttributes[] MultichannelAudioAttributes;
public uint ulNumberOfSubpictureStreams;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)] public DVD_SubpictureAttributes[] SubpictureAttributes;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DVD_VideoAttributes
<MarshalAs(UnmanagedType.Bool)> Public fPanscanPermitted As Boolean
<MarshalAs(UnmanagedType.Bool)> Public fLetterboxPermitted As Boolean
Public ulAspectX As UInteger
Public ulAspectY As UInteger
Public ulFrameRate As UInteger
Public ulFrameHeight As UInteger
Public Compression As Integer
<MarshalAs(UnmanagedType.Bool)> Public fLine21Field1InGOP As Boolean
<MarshalAs(UnmanagedType.Bool)> Public fLine21Field2InGOP As Boolean
Public ulSourceResolutionX As UInteger
Public ulSourceResolutionY As UInteger
<MarshalAs(UnmanagedType.Bool)> Public fIsSourceLetterboxed As Boolean
<MarshalAs(UnmanagedType.Bool)> Public fIsFilmMode As Boolean
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DVD_AudioAttributes
Public AppMode As Integer
Public AppModeData As Byte
Public AudioFormat As Integer
Public Language As UInteger
Public LanguageExtension As Integer
<MarshalAs(UnmanagedType.Bool)> Public fHasMultichannelInfo As Boolean
Public dwFrequency As UInteger
Public bQuantization As Byte
Public bNumberOfChannels As Byte
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=2)> Public dwReserved() As UInteger
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DVD_MUA_MixingInfo
<MarshalAs(UnmanagedType.Bool)> Public fMixTo0 As Boolean
<MarshalAs(UnmanagedType.Bool)> Public fMixTo1 As Boolean
<MarshalAs(UnmanagedType.Bool)> Public fMix0InPhase As Boolean
<MarshalAs(UnmanagedType.Bool)> Public fMix1InPhase As Boolean
Public dwSpeakerPosition As UInteger
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DVD_MUA_Coeff
Public log2_alpha As Double
Public log2_beta As Double
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DVD_MultichannelAudioAttributes
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=8)> Public Info() As DVD_MUA_MixingInfo
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=8)> Public Coeff() As DVD_MUA_Coeff
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DVD_SubpictureAttributes
Public Type As Integer
Public CodingMode As Integer
Public Language As UInteger
Public LanguageExtension As Integer
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DVD_TitleAttributes
Public Anonymous As _Anonymous_e__Union
Public VideoAttributes As DVD_VideoAttributes
Public ulNumberOfAudioStreams As UInteger
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=8)> Public AudioAttributes() As DVD_AudioAttributes
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=8)> Public MultichannelAudioAttributes() As DVD_MultichannelAudioAttributes
Public ulNumberOfSubpictureStreams As UInteger
<MarshalAs(UnmanagedType.ByValArray, SizeConst:=32)> Public SubpictureAttributes() As DVD_SubpictureAttributes
End Structureimport ctypes
from ctypes import wintypes
class DVD_VideoAttributes(ctypes.Structure):
_fields_ = [
("fPanscanPermitted", wintypes.BOOL),
("fLetterboxPermitted", wintypes.BOOL),
("ulAspectX", wintypes.DWORD),
("ulAspectY", wintypes.DWORD),
("ulFrameRate", wintypes.DWORD),
("ulFrameHeight", wintypes.DWORD),
("Compression", ctypes.c_int),
("fLine21Field1InGOP", wintypes.BOOL),
("fLine21Field2InGOP", wintypes.BOOL),
("ulSourceResolutionX", wintypes.DWORD),
("ulSourceResolutionY", wintypes.DWORD),
("fIsSourceLetterboxed", wintypes.BOOL),
("fIsFilmMode", wintypes.BOOL),
]
class DVD_AudioAttributes(ctypes.Structure):
_fields_ = [
("AppMode", ctypes.c_int),
("AppModeData", ctypes.c_ubyte),
("AudioFormat", ctypes.c_int),
("Language", wintypes.DWORD),
("LanguageExtension", ctypes.c_int),
("fHasMultichannelInfo", wintypes.BOOL),
("dwFrequency", wintypes.DWORD),
("bQuantization", ctypes.c_ubyte),
("bNumberOfChannels", ctypes.c_ubyte),
("dwReserved", wintypes.DWORD * 2),
]
class DVD_MUA_MixingInfo(ctypes.Structure):
_fields_ = [
("fMixTo0", wintypes.BOOL),
("fMixTo1", wintypes.BOOL),
("fMix0InPhase", wintypes.BOOL),
("fMix1InPhase", wintypes.BOOL),
("dwSpeakerPosition", wintypes.DWORD),
]
class DVD_MUA_Coeff(ctypes.Structure):
_fields_ = [
("log2_alpha", ctypes.c_double),
("log2_beta", ctypes.c_double),
]
class DVD_MultichannelAudioAttributes(ctypes.Structure):
_fields_ = [
("Info", DVD_MUA_MixingInfo * 8),
("Coeff", DVD_MUA_Coeff * 8),
]
class DVD_SubpictureAttributes(ctypes.Structure):
_fields_ = [
("Type", ctypes.c_int),
("CodingMode", ctypes.c_int),
("Language", wintypes.DWORD),
("LanguageExtension", ctypes.c_int),
]
class DVD_TitleAttributes(ctypes.Structure):
_fields_ = [
("Anonymous", _Anonymous_e__Union),
("VideoAttributes", DVD_VideoAttributes),
("ulNumberOfAudioStreams", wintypes.DWORD),
("AudioAttributes", DVD_AudioAttributes * 8),
("MultichannelAudioAttributes", DVD_MultichannelAudioAttributes * 8),
("ulNumberOfSubpictureStreams", wintypes.DWORD),
("SubpictureAttributes", DVD_SubpictureAttributes * 32),
]#[repr(C)]
pub struct DVD_VideoAttributes {
pub fPanscanPermitted: i32,
pub fLetterboxPermitted: i32,
pub ulAspectX: u32,
pub ulAspectY: u32,
pub ulFrameRate: u32,
pub ulFrameHeight: u32,
pub Compression: i32,
pub fLine21Field1InGOP: i32,
pub fLine21Field2InGOP: i32,
pub ulSourceResolutionX: u32,
pub ulSourceResolutionY: u32,
pub fIsSourceLetterboxed: i32,
pub fIsFilmMode: i32,
}
#[repr(C)]
pub struct DVD_AudioAttributes {
pub AppMode: i32,
pub AppModeData: u8,
pub AudioFormat: i32,
pub Language: u32,
pub LanguageExtension: i32,
pub fHasMultichannelInfo: i32,
pub dwFrequency: u32,
pub bQuantization: u8,
pub bNumberOfChannels: u8,
pub dwReserved: [u32; 2],
}
#[repr(C)]
pub struct DVD_MUA_MixingInfo {
pub fMixTo0: i32,
pub fMixTo1: i32,
pub fMix0InPhase: i32,
pub fMix1InPhase: i32,
pub dwSpeakerPosition: u32,
}
#[repr(C)]
pub struct DVD_MUA_Coeff {
pub log2_alpha: f64,
pub log2_beta: f64,
}
#[repr(C)]
pub struct DVD_MultichannelAudioAttributes {
pub Info: [DVD_MUA_MixingInfo; 8],
pub Coeff: [DVD_MUA_Coeff; 8],
}
#[repr(C)]
pub struct DVD_SubpictureAttributes {
pub Type: i32,
pub CodingMode: i32,
pub Language: u32,
pub LanguageExtension: i32,
}
#[repr(C)]
pub struct DVD_TitleAttributes {
pub Anonymous: _Anonymous_e__Union,
pub VideoAttributes: DVD_VideoAttributes,
pub ulNumberOfAudioStreams: u32,
pub AudioAttributes: [DVD_AudioAttributes; 8],
pub MultichannelAudioAttributes: [DVD_MultichannelAudioAttributes; 8],
pub ulNumberOfSubpictureStreams: u32,
pub SubpictureAttributes: [DVD_SubpictureAttributes; 32],
}import "golang.org/x/sys/windows"
type DVD_VideoAttributes struct {
fPanscanPermitted int32
fLetterboxPermitted int32
ulAspectX uint32
ulAspectY uint32
ulFrameRate uint32
ulFrameHeight uint32
Compression int32
fLine21Field1InGOP int32
fLine21Field2InGOP int32
ulSourceResolutionX uint32
ulSourceResolutionY uint32
fIsSourceLetterboxed int32
fIsFilmMode int32
}
type DVD_AudioAttributes struct {
AppMode int32
AppModeData byte
AudioFormat int32
Language uint32
LanguageExtension int32
fHasMultichannelInfo int32
dwFrequency uint32
bQuantization byte
bNumberOfChannels byte
dwReserved [2]uint32
}
type DVD_MUA_MixingInfo struct {
fMixTo0 int32
fMixTo1 int32
fMix0InPhase int32
fMix1InPhase int32
dwSpeakerPosition uint32
}
type DVD_MUA_Coeff struct {
log2_alpha float64
log2_beta float64
}
type DVD_MultichannelAudioAttributes struct {
Info [8]DVD_MUA_MixingInfo
Coeff [8]DVD_MUA_Coeff
}
type DVD_SubpictureAttributes struct {
Type int32
CodingMode int32
Language uint32
LanguageExtension int32
}
type DVD_TitleAttributes struct {
Anonymous _Anonymous_e__Union
VideoAttributes DVD_VideoAttributes
ulNumberOfAudioStreams uint32
AudioAttributes [8]DVD_AudioAttributes
MultichannelAudioAttributes [8]DVD_MultichannelAudioAttributes
ulNumberOfSubpictureStreams uint32
SubpictureAttributes [32]DVD_SubpictureAttributes
}type
DVD_VideoAttributes = record
fPanscanPermitted: BOOL;
fLetterboxPermitted: BOOL;
ulAspectX: DWORD;
ulAspectY: DWORD;
ulFrameRate: DWORD;
ulFrameHeight: DWORD;
Compression: Integer;
fLine21Field1InGOP: BOOL;
fLine21Field2InGOP: BOOL;
ulSourceResolutionX: DWORD;
ulSourceResolutionY: DWORD;
fIsSourceLetterboxed: BOOL;
fIsFilmMode: BOOL;
end;
DVD_AudioAttributes = record
AppMode: Integer;
AppModeData: Byte;
AudioFormat: Integer;
Language: DWORD;
LanguageExtension: Integer;
fHasMultichannelInfo: BOOL;
dwFrequency: DWORD;
bQuantization: Byte;
bNumberOfChannels: Byte;
dwReserved: array[0..1] of DWORD;
end;
DVD_MUA_MixingInfo = record
fMixTo0: BOOL;
fMixTo1: BOOL;
fMix0InPhase: BOOL;
fMix1InPhase: BOOL;
dwSpeakerPosition: DWORD;
end;
DVD_MUA_Coeff = record
log2_alpha: Double;
log2_beta: Double;
end;
DVD_MultichannelAudioAttributes = record
Info: array[0..7] of DVD_MUA_MixingInfo;
Coeff: array[0..7] of DVD_MUA_Coeff;
end;
DVD_SubpictureAttributes = record
Type: Integer;
CodingMode: Integer;
Language: DWORD;
LanguageExtension: Integer;
end;
DVD_TitleAttributes = record
Anonymous: _Anonymous_e__Union;
VideoAttributes: DVD_VideoAttributes;
ulNumberOfAudioStreams: DWORD;
AudioAttributes: array[0..7] of DVD_AudioAttributes;
MultichannelAudioAttributes: array[0..7] of DVD_MultichannelAudioAttributes;
ulNumberOfSubpictureStreams: DWORD;
SubpictureAttributes: array[0..31] of DVD_SubpictureAttributes;
end;const DVD_VideoAttributes = extern struct {
fPanscanPermitted: i32,
fLetterboxPermitted: i32,
ulAspectX: u32,
ulAspectY: u32,
ulFrameRate: u32,
ulFrameHeight: u32,
Compression: i32,
fLine21Field1InGOP: i32,
fLine21Field2InGOP: i32,
ulSourceResolutionX: u32,
ulSourceResolutionY: u32,
fIsSourceLetterboxed: i32,
fIsFilmMode: i32,
};
const DVD_AudioAttributes = extern struct {
AppMode: i32,
AppModeData: u8,
AudioFormat: i32,
Language: u32,
LanguageExtension: i32,
fHasMultichannelInfo: i32,
dwFrequency: u32,
bQuantization: u8,
bNumberOfChannels: u8,
dwReserved: [2]u32,
};
const DVD_MUA_MixingInfo = extern struct {
fMixTo0: i32,
fMixTo1: i32,
fMix0InPhase: i32,
fMix1InPhase: i32,
dwSpeakerPosition: u32,
};
const DVD_MUA_Coeff = extern struct {
log2_alpha: f64,
log2_beta: f64,
};
const DVD_MultichannelAudioAttributes = extern struct {
Info: [8]DVD_MUA_MixingInfo,
Coeff: [8]DVD_MUA_Coeff,
};
const DVD_SubpictureAttributes = extern struct {
Type: i32,
CodingMode: i32,
Language: u32,
LanguageExtension: i32,
};
const DVD_TitleAttributes = extern struct {
Anonymous: _Anonymous_e__Union,
VideoAttributes: DVD_VideoAttributes,
ulNumberOfAudioStreams: u32,
AudioAttributes: [8]DVD_AudioAttributes,
MultichannelAudioAttributes: [8]DVD_MultichannelAudioAttributes,
ulNumberOfSubpictureStreams: u32,
SubpictureAttributes: [32]DVD_SubpictureAttributes,
};type
DVD_VideoAttributes {.bycopy.} = object
fPanscanPermitted: int32
fLetterboxPermitted: int32
ulAspectX: uint32
ulAspectY: uint32
ulFrameRate: uint32
ulFrameHeight: uint32
Compression: int32
fLine21Field1InGOP: int32
fLine21Field2InGOP: int32
ulSourceResolutionX: uint32
ulSourceResolutionY: uint32
fIsSourceLetterboxed: int32
fIsFilmMode: int32
DVD_AudioAttributes {.bycopy.} = object
AppMode: int32
AppModeData: uint8
AudioFormat: int32
Language: uint32
LanguageExtension: int32
fHasMultichannelInfo: int32
dwFrequency: uint32
bQuantization: uint8
bNumberOfChannels: uint8
dwReserved: array[2, uint32]
DVD_MUA_MixingInfo {.bycopy.} = object
fMixTo0: int32
fMixTo1: int32
fMix0InPhase: int32
fMix1InPhase: int32
dwSpeakerPosition: uint32
DVD_MUA_Coeff {.bycopy.} = object
log2_alpha: float64
log2_beta: float64
DVD_MultichannelAudioAttributes {.bycopy.} = object
Info: array[8, DVD_MUA_MixingInfo]
Coeff: array[8, DVD_MUA_Coeff]
DVD_SubpictureAttributes {.bycopy.} = object
Type: int32
CodingMode: int32
Language: uint32
LanguageExtension: int32
DVD_TitleAttributes {.bycopy.} = object
Anonymous: _Anonymous_e__Union
VideoAttributes: DVD_VideoAttributes
ulNumberOfAudioStreams: uint32
AudioAttributes: array[8, DVD_AudioAttributes]
MultichannelAudioAttributes: array[8, DVD_MultichannelAudioAttributes]
ulNumberOfSubpictureStreams: uint32
SubpictureAttributes: array[32, DVD_SubpictureAttributes]struct DVD_VideoAttributes
{
int fPanscanPermitted;
int fLetterboxPermitted;
uint ulAspectX;
uint ulAspectY;
uint ulFrameRate;
uint ulFrameHeight;
int Compression;
int fLine21Field1InGOP;
int fLine21Field2InGOP;
uint ulSourceResolutionX;
uint ulSourceResolutionY;
int fIsSourceLetterboxed;
int fIsFilmMode;
}
struct DVD_AudioAttributes
{
int AppMode;
ubyte AppModeData;
int AudioFormat;
uint Language;
int LanguageExtension;
int fHasMultichannelInfo;
uint dwFrequency;
ubyte bQuantization;
ubyte bNumberOfChannels;
uint[2] dwReserved;
}
struct DVD_MUA_MixingInfo
{
int fMixTo0;
int fMixTo1;
int fMix0InPhase;
int fMix1InPhase;
uint dwSpeakerPosition;
}
struct DVD_MUA_Coeff
{
double log2_alpha;
double log2_beta;
}
struct DVD_MultichannelAudioAttributes
{
DVD_MUA_MixingInfo[8] Info;
DVD_MUA_Coeff[8] Coeff;
}
struct DVD_SubpictureAttributes
{
int Type;
int CodingMode;
uint Language;
int LanguageExtension;
}
struct DVD_TitleAttributes
{
_Anonymous_e__Union Anonymous;
DVD_VideoAttributes VideoAttributes;
uint ulNumberOfAudioStreams;
DVD_AudioAttributes[8] AudioAttributes;
DVD_MultichannelAudioAttributes[8] MultichannelAudioAttributes;
uint ulNumberOfSubpictureStreams;
DVD_SubpictureAttributes[32] SubpictureAttributes;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DVD_TitleAttributes サイズ: 3208 バイト(x64)
dim st, 802 ; 4byte整数×802(構造体サイズ 3208 / 4 切り上げ)
; Anonymous : _Anonymous_e__Union (+0, 4byte) varptr(st)+0 を基点に操作(4byte:入れ子/配列)
; VideoAttributes : DVD_VideoAttributes (+4, 52byte) varptr(st)+4 を基点に操作(52byte:入れ子/配列)
; ulNumberOfAudioStreams : DWORD (+56, 4byte) st.14 = 値 / 値 = st.14 (lpoke/lpeek も可)
; AudioAttributes : DVD_AudioAttributes (+60, 320byte) varptr(st)+60 を基点に操作(320byte:入れ子/配列)
; MultichannelAudioAttributes : DVD_MultichannelAudioAttributes (+384, 2304byte) varptr(st)+384 を基点に操作(2304byte:入れ子/配列)
; ulNumberOfSubpictureStreams : DWORD (+2688, 4byte) st.672 = 値 / 値 = st.672 (lpoke/lpeek も可)
; SubpictureAttributes : DVD_SubpictureAttributes (+2692, 512byte) varptr(st)+2692 を基点に操作(512byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global DVD_VideoAttributes
#field bool fPanscanPermitted
#field bool fLetterboxPermitted
#field int ulAspectX
#field int ulAspectY
#field int ulFrameRate
#field int ulFrameHeight
#field int Compression
#field bool fLine21Field1InGOP
#field bool fLine21Field2InGOP
#field int ulSourceResolutionX
#field int ulSourceResolutionY
#field bool fIsSourceLetterboxed
#field bool fIsFilmMode
#endstruct
#defstruct global DVD_AudioAttributes
#field int AppMode
#field byte AppModeData
#field int AudioFormat
#field int Language
#field int LanguageExtension
#field bool fHasMultichannelInfo
#field int dwFrequency
#field byte bQuantization
#field byte bNumberOfChannels
#field int dwReserved 2
#endstruct
#defstruct global DVD_MUA_MixingInfo
#field bool fMixTo0
#field bool fMixTo1
#field bool fMix0InPhase
#field bool fMix1InPhase
#field int dwSpeakerPosition
#endstruct
#defstruct global DVD_MUA_Coeff
#field double log2_alpha
#field double log2_beta
#endstruct
#defstruct global DVD_MultichannelAudioAttributes
#field DVD_MUA_MixingInfo Info 8
#field DVD_MUA_Coeff Coeff 8
#endstruct
#defstruct global DVD_SubpictureAttributes
#field int Type
#field int CodingMode
#field int Language
#field int LanguageExtension
#endstruct
#defstruct global DVD_TitleAttributes
#field byte Anonymous 4
#field DVD_VideoAttributes VideoAttributes
#field int ulNumberOfAudioStreams
#field DVD_AudioAttributes AudioAttributes 8
#field DVD_MultichannelAudioAttributes MultichannelAudioAttributes 8
#field int ulNumberOfSubpictureStreams
#field DVD_SubpictureAttributes SubpictureAttributes 32
#endstruct
stdim st, DVD_TitleAttributes ; NSTRUCT 変数を確保
st->ulNumberOfAudioStreams = 100
mes "ulNumberOfAudioStreams=" + st->ulNumberOfAudioStreams
; ※union フィールドは byte 列で確保(NSTRUCT は union 非対応)。必要に応じ手動でアクセス。