ホーム › Media.DirectShow › DVD_MenuAttributes
DVD_MenuAttributes
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| fCompatibleRegion | BOOL | 32 | +0 | +0 | 各リージョンとの互換性を示す真偽値の配列。 |
| VideoAttributes | DVD_VideoAttributes | 52 | +32 | +32 | メニューのビデオ属性を示すDVD_VideoAttributes構造体。 |
| fAudioPresent | BOOL | 4 | +84 | +84 | メニューにオーディオが存在するかを示す真偽値。 |
| AudioAttributes | DVD_AudioAttributes | 40 | +88 | +88 | メニューのオーディオ属性を示すDVD_AudioAttributes構造体。 |
| fSubpicturePresent | BOOL | 4 | +128 | +128 | メニューにサブピクチャが存在するかを示す真偽値。 |
| SubpictureAttributes | DVD_SubpictureAttributes | 16 | +132 | +132 | メニューのサブピクチャ属性を示すDVD_SubpictureAttributes構造体。 |
各言語での定義
#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_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_MenuAttributes (x64 148 / x86 148 バイト)
typedef struct DVD_MenuAttributes {
BOOL fCompatibleRegion[8];
DVD_VideoAttributes VideoAttributes;
BOOL fAudioPresent;
DVD_AudioAttributes AudioAttributes;
BOOL fSubpicturePresent;
DVD_SubpictureAttributes SubpictureAttributes;
} DVD_MenuAttributes;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_SubpictureAttributes
{
public int Type;
public int CodingMode;
public uint Language;
public int LanguageExtension;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DVD_MenuAttributes
{
[MarshalAs(UnmanagedType.ByValArray, ArraySubType = UnmanagedType.Bool, SizeConst = 8)] public bool[] fCompatibleRegion;
public DVD_VideoAttributes VideoAttributes;
[MarshalAs(UnmanagedType.Bool)] public bool fAudioPresent;
public DVD_AudioAttributes AudioAttributes;
[MarshalAs(UnmanagedType.Bool)] public bool fSubpicturePresent;
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_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_MenuAttributes
<MarshalAs(UnmanagedType.ByValArray, ArraySubType:=UnmanagedType.Bool, SizeConst:=8)> Public fCompatibleRegion() As Boolean
Public VideoAttributes As DVD_VideoAttributes
<MarshalAs(UnmanagedType.Bool)> Public fAudioPresent As Boolean
Public AudioAttributes As DVD_AudioAttributes
<MarshalAs(UnmanagedType.Bool)> Public fSubpicturePresent As Boolean
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_SubpictureAttributes(ctypes.Structure):
_fields_ = [
("Type", ctypes.c_int),
("CodingMode", ctypes.c_int),
("Language", wintypes.DWORD),
("LanguageExtension", ctypes.c_int),
]
class DVD_MenuAttributes(ctypes.Structure):
_fields_ = [
("fCompatibleRegion", wintypes.BOOL * 8),
("VideoAttributes", DVD_VideoAttributes),
("fAudioPresent", wintypes.BOOL),
("AudioAttributes", DVD_AudioAttributes),
("fSubpicturePresent", wintypes.BOOL),
("SubpictureAttributes", DVD_SubpictureAttributes),
]#[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_SubpictureAttributes {
pub Type: i32,
pub CodingMode: i32,
pub Language: u32,
pub LanguageExtension: i32,
}
#[repr(C)]
pub struct DVD_MenuAttributes {
pub fCompatibleRegion: [i32; 8],
pub VideoAttributes: DVD_VideoAttributes,
pub fAudioPresent: i32,
pub AudioAttributes: DVD_AudioAttributes,
pub fSubpicturePresent: i32,
pub SubpictureAttributes: DVD_SubpictureAttributes,
}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_SubpictureAttributes struct {
Type int32
CodingMode int32
Language uint32
LanguageExtension int32
}
type DVD_MenuAttributes struct {
fCompatibleRegion [8]int32
VideoAttributes DVD_VideoAttributes
fAudioPresent int32
AudioAttributes DVD_AudioAttributes
fSubpicturePresent int32
SubpictureAttributes 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_SubpictureAttributes = record
Type: Integer;
CodingMode: Integer;
Language: DWORD;
LanguageExtension: Integer;
end;
DVD_MenuAttributes = record
fCompatibleRegion: array[0..7] of BOOL;
VideoAttributes: DVD_VideoAttributes;
fAudioPresent: BOOL;
AudioAttributes: DVD_AudioAttributes;
fSubpicturePresent: BOOL;
SubpictureAttributes: 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_SubpictureAttributes = extern struct {
Type: i32,
CodingMode: i32,
Language: u32,
LanguageExtension: i32,
};
const DVD_MenuAttributes = extern struct {
fCompatibleRegion: [8]i32,
VideoAttributes: DVD_VideoAttributes,
fAudioPresent: i32,
AudioAttributes: DVD_AudioAttributes,
fSubpicturePresent: i32,
SubpictureAttributes: 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_SubpictureAttributes {.bycopy.} = object
Type: int32
CodingMode: int32
Language: uint32
LanguageExtension: int32
DVD_MenuAttributes {.bycopy.} = object
fCompatibleRegion: array[8, int32]
VideoAttributes: DVD_VideoAttributes
fAudioPresent: int32
AudioAttributes: DVD_AudioAttributes
fSubpicturePresent: int32
SubpictureAttributes: DVD_SubpictureAttributesstruct 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_SubpictureAttributes
{
int Type;
int CodingMode;
uint Language;
int LanguageExtension;
}
struct DVD_MenuAttributes
{
int[8] fCompatibleRegion;
DVD_VideoAttributes VideoAttributes;
int fAudioPresent;
DVD_AudioAttributes AudioAttributes;
int fSubpicturePresent;
DVD_SubpictureAttributes 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_MenuAttributes サイズ: 148 バイト(x64)
dim st, 37 ; 4byte整数×37(構造体サイズ 148 / 4 切り上げ)
; fCompatibleRegion : BOOL (+0, 32byte) varptr(st)+0 を基点に操作(32byte:入れ子/配列)
; VideoAttributes : DVD_VideoAttributes (+32, 52byte) varptr(st)+32 を基点に操作(52byte:入れ子/配列)
; fAudioPresent : BOOL (+84, 4byte) st.21 = 値 / 値 = st.21 (lpoke/lpeek も可)
; AudioAttributes : DVD_AudioAttributes (+88, 40byte) varptr(st)+88 を基点に操作(40byte:入れ子/配列)
; fSubpicturePresent : BOOL (+128, 4byte) st.32 = 値 / 値 = st.32 (lpoke/lpeek も可)
; SubpictureAttributes : DVD_SubpictureAttributes (+132, 16byte) varptr(st)+132 を基点に操作(16byte:入れ子/配列)
; ※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_SubpictureAttributes
#field int Type
#field int CodingMode
#field int Language
#field int LanguageExtension
#endstruct
#defstruct global DVD_MenuAttributes
#field bool fCompatibleRegion 8
#field DVD_VideoAttributes VideoAttributes
#field bool fAudioPresent
#field DVD_AudioAttributes AudioAttributes
#field bool fSubpicturePresent
#field DVD_SubpictureAttributes SubpictureAttributes
#endstruct
stdim st, DVD_MenuAttributes ; NSTRUCT 変数を確保
st->fAudioPresent = 100
mes "fAudioPresent=" + st->fAudioPresent