ホーム › Media.MediaFoundation › D3D12_FEATURE_DATA_VIDEO_EXTENSION_COMMAND_SIZE
D3D12_FEATURE_DATA_VIDEO_EXTENSION_COMMAND_SIZE
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| NodeIndex | DWORD | 4 | +0 | +0 | 対象とする物理アダプタノードのインデックス。 |
| CommandId | GUID | 16 | +4 | +4 | サイズを問い合わせるビデオ拡張コマンドのGUID。 |
| pCreationParameters | void* | 8/4 | +24 | +20 | コマンド作成パラメータへのポインタ。 |
| CreationParametersSizeInBytes | UINT_PTR | 8/4 | +32 | +24 | pCreationParametersが指すデータのサイズ(バイト単位)。 |
| MemoryPoolL0Size | ULONGLONG | 8 | +40 | +32 | メモリプールL0に必要なサイズ(バイト単位、出力)。 |
| MemoryPoolL1Size | ULONGLONG | 8 | +48 | +40 | メモリプールL1に必要なサイズ(バイト単位、出力)。 |
各言語での定義
#include <windows.h>
// D3D12_FEATURE_DATA_VIDEO_EXTENSION_COMMAND_SIZE (x64 56 / x86 48 バイト)
typedef struct D3D12_FEATURE_DATA_VIDEO_EXTENSION_COMMAND_SIZE {
DWORD NodeIndex;
GUID CommandId;
void* pCreationParameters;
UINT_PTR CreationParametersSizeInBytes;
ULONGLONG MemoryPoolL0Size;
ULONGLONG MemoryPoolL1Size;
} D3D12_FEATURE_DATA_VIDEO_EXTENSION_COMMAND_SIZE;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct D3D12_FEATURE_DATA_VIDEO_EXTENSION_COMMAND_SIZE
{
public uint NodeIndex;
public Guid CommandId;
public IntPtr pCreationParameters;
public UIntPtr CreationParametersSizeInBytes;
public ulong MemoryPoolL0Size;
public ulong MemoryPoolL1Size;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure D3D12_FEATURE_DATA_VIDEO_EXTENSION_COMMAND_SIZE
Public NodeIndex As UInteger
Public CommandId As Guid
Public pCreationParameters As IntPtr
Public CreationParametersSizeInBytes As UIntPtr
Public MemoryPoolL0Size As ULong
Public MemoryPoolL1Size As ULong
End Structureimport ctypes
from ctypes import wintypes
class D3D12_FEATURE_DATA_VIDEO_EXTENSION_COMMAND_SIZE(ctypes.Structure):
_fields_ = [
("NodeIndex", wintypes.DWORD),
("CommandId", GUID),
("pCreationParameters", ctypes.c_void_p),
("CreationParametersSizeInBytes", ctypes.c_size_t),
("MemoryPoolL0Size", ctypes.c_ulonglong),
("MemoryPoolL1Size", ctypes.c_ulonglong),
]#[repr(C)]
pub struct D3D12_FEATURE_DATA_VIDEO_EXTENSION_COMMAND_SIZE {
pub NodeIndex: u32,
pub CommandId: GUID,
pub pCreationParameters: *mut core::ffi::c_void,
pub CreationParametersSizeInBytes: usize,
pub MemoryPoolL0Size: u64,
pub MemoryPoolL1Size: u64,
}import "golang.org/x/sys/windows"
type D3D12_FEATURE_DATA_VIDEO_EXTENSION_COMMAND_SIZE struct {
NodeIndex uint32
CommandId windows.GUID
pCreationParameters uintptr
CreationParametersSizeInBytes uintptr
MemoryPoolL0Size uint64
MemoryPoolL1Size uint64
}type
D3D12_FEATURE_DATA_VIDEO_EXTENSION_COMMAND_SIZE = record
NodeIndex: DWORD;
CommandId: TGUID;
pCreationParameters: Pointer;
CreationParametersSizeInBytes: NativeUInt;
MemoryPoolL0Size: UInt64;
MemoryPoolL1Size: UInt64;
end;const D3D12_FEATURE_DATA_VIDEO_EXTENSION_COMMAND_SIZE = extern struct {
NodeIndex: u32,
CommandId: GUID,
pCreationParameters: ?*anyopaque,
CreationParametersSizeInBytes: usize,
MemoryPoolL0Size: u64,
MemoryPoolL1Size: u64,
};type
D3D12_FEATURE_DATA_VIDEO_EXTENSION_COMMAND_SIZE {.bycopy.} = object
NodeIndex: uint32
CommandId: GUID
pCreationParameters: pointer
CreationParametersSizeInBytes: uint
MemoryPoolL0Size: uint64
MemoryPoolL1Size: uint64struct D3D12_FEATURE_DATA_VIDEO_EXTENSION_COMMAND_SIZE
{
uint NodeIndex;
GUID CommandId;
void* pCreationParameters;
size_t CreationParametersSizeInBytes;
ulong MemoryPoolL0Size;
ulong MemoryPoolL1Size;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; D3D12_FEATURE_DATA_VIDEO_EXTENSION_COMMAND_SIZE サイズ: 48 バイト(x86)
dim st, 12 ; 4byte整数×12(構造体サイズ 48 / 4 切り上げ)
; NodeIndex : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; CommandId : GUID (+4, 16byte) varptr(st)+4 を基点に操作(16byte:入れ子/配列)
; pCreationParameters : void* (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; CreationParametersSizeInBytes : UINT_PTR (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; MemoryPoolL0Size : ULONGLONG (+32, 8byte) qpoke st,32,値 / qpeek(st,32) ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; MemoryPoolL1Size : ULONGLONG (+40, 8byte) qpoke st,40,値 / qpeek(st,40) ※IronHSPのみ。3.7/3.8は lpoke st,40,下位 : lpoke st,44,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; D3D12_FEATURE_DATA_VIDEO_EXTENSION_COMMAND_SIZE サイズ: 56 バイト(x64)
dim st, 14 ; 4byte整数×14(構造体サイズ 56 / 4 切り上げ)
; NodeIndex : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; CommandId : GUID (+4, 16byte) varptr(st)+4 を基点に操作(16byte:入れ子/配列)
; pCreationParameters : void* (+24, 8byte) qpoke st,24,値 / qpeek(st,24) ※IronHSPのみ。3.7/3.8は lpoke st,24,下位 : lpoke st,28,上位
; CreationParametersSizeInBytes : UINT_PTR (+32, 8byte) qpoke st,32,値 / qpeek(st,32) ※IronHSPのみ。3.7/3.8は lpoke st,32,下位 : lpoke st,36,上位
; MemoryPoolL0Size : ULONGLONG (+40, 8byte) qpoke st,40,値 / qpeek(st,40) ※IronHSPのみ。3.7/3.8は lpoke st,40,下位 : lpoke st,44,上位
; MemoryPoolL1Size : ULONGLONG (+48, 8byte) qpoke st,48,値 / qpeek(st,48) ※IronHSPのみ。3.7/3.8は lpoke st,48,下位 : lpoke st,52,上位
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global GUID, pack=1
#field int Data1
#field short Data2
#field short Data3
#field byte Data4 8
#endstruct
#defstruct global D3D12_FEATURE_DATA_VIDEO_EXTENSION_COMMAND_SIZE
#field int NodeIndex
#field GUID CommandId
#field intptr pCreationParameters
#field intptr CreationParametersSizeInBytes
#field int64 MemoryPoolL0Size
#field int64 MemoryPoolL1Size
#endstruct
stdim st, D3D12_FEATURE_DATA_VIDEO_EXTENSION_COMMAND_SIZE ; NSTRUCT 変数を確保
st->NodeIndex = 100
mes "NodeIndex=" + st->NodeIndex