ホーム › Media.DirectShow › DVD_SubpictureAttributes
DVD_SubpictureAttributes
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| Type | DVD_SUBPICTURE_TYPE | 4 | +0 | +0 | サブピクチャの種別を示すDVD_SUBPICTURE_TYPE値。 |
| CodingMode | DVD_SUBPICTURE_CODING | 4 | +4 | +4 | サブピクチャの符号化方式を示すDVD_SUBPICTURE_CODING値。 |
| Language | DWORD | 4 | +8 | +8 | サブピクチャの言語をLCID(ロケール識別子)で示す。 |
| LanguageExtension | DVD_SUBPICTURE_LANG_EXT | 4 | +12 | +12 | 言語の用途拡張を示すDVD_SUBPICTURE_LANG_EXT値。 |
各言語での定義
#include <windows.h>
// 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;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DVD_SubpictureAttributes
{
public int Type;
public int CodingMode;
public uint Language;
public int LanguageExtension;
}Imports System.Runtime.InteropServices
<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 Structureimport ctypes
from ctypes import wintypes
class DVD_SubpictureAttributes(ctypes.Structure):
_fields_ = [
("Type", ctypes.c_int),
("CodingMode", ctypes.c_int),
("Language", wintypes.DWORD),
("LanguageExtension", ctypes.c_int),
]#[repr(C)]
pub struct DVD_SubpictureAttributes {
pub Type: i32,
pub CodingMode: i32,
pub Language: u32,
pub LanguageExtension: i32,
}import "golang.org/x/sys/windows"
type DVD_SubpictureAttributes struct {
Type int32
CodingMode int32
Language uint32
LanguageExtension int32
}type
DVD_SubpictureAttributes = record
Type: Integer;
CodingMode: Integer;
Language: DWORD;
LanguageExtension: Integer;
end;const DVD_SubpictureAttributes = extern struct {
Type: i32,
CodingMode: i32,
Language: u32,
LanguageExtension: i32,
};type
DVD_SubpictureAttributes {.bycopy.} = object
Type: int32
CodingMode: int32
Language: uint32
LanguageExtension: int32struct DVD_SubpictureAttributes
{
int Type;
int CodingMode;
uint Language;
int LanguageExtension;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DVD_SubpictureAttributes サイズ: 16 バイト(x64)
dim st, 4 ; 4byte整数×4(構造体サイズ 16 / 4 切り上げ)
; Type : DVD_SUBPICTURE_TYPE (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; CodingMode : DVD_SUBPICTURE_CODING (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; Language : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; LanguageExtension : DVD_SUBPICTURE_LANG_EXT (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global DVD_SubpictureAttributes
#field int Type
#field int CodingMode
#field int Language
#field int LanguageExtension
#endstruct
stdim st, DVD_SubpictureAttributes ; NSTRUCT 変数を確保
st->Type = 100
mes "Type=" + st->Type