ホーム › Media.MediaFoundation › D3D12_FEATURE_DATA_VIDEO_DECODE_FORMAT_COUNT
D3D12_FEATURE_DATA_VIDEO_DECODE_FORMAT_COUNT
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| NodeIndex | DWORD | 4 | +0 | +0 | 対象とする物理アダプタノードのインデックス。 |
| Configuration | D3D12_VIDEO_DECODE_CONFIGURATION | 24 | +4 | +4 | 問い合わせるデコード構成を示すD3D12_VIDEO_DECODE_CONFIGURATION。 |
| FormatCount | DWORD | 4 | +28 | +28 | サポートされる出力フォーマット数(出力)。 |
各言語での定義
#include <windows.h>
// D3D12_VIDEO_DECODE_CONFIGURATION (x64 24 / x86 24 バイト)
typedef struct D3D12_VIDEO_DECODE_CONFIGURATION {
GUID DecodeProfile;
D3D12_BITSTREAM_ENCRYPTION_TYPE BitstreamEncryption;
D3D12_VIDEO_FRAME_CODED_INTERLACE_TYPE InterlaceType;
} D3D12_VIDEO_DECODE_CONFIGURATION;
// D3D12_FEATURE_DATA_VIDEO_DECODE_FORMAT_COUNT (x64 32 / x86 32 バイト)
typedef struct D3D12_FEATURE_DATA_VIDEO_DECODE_FORMAT_COUNT {
DWORD NodeIndex;
D3D12_VIDEO_DECODE_CONFIGURATION Configuration;
DWORD FormatCount;
} D3D12_FEATURE_DATA_VIDEO_DECODE_FORMAT_COUNT;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct D3D12_VIDEO_DECODE_CONFIGURATION
{
public Guid DecodeProfile;
public int BitstreamEncryption;
public int InterlaceType;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct D3D12_FEATURE_DATA_VIDEO_DECODE_FORMAT_COUNT
{
public uint NodeIndex;
public D3D12_VIDEO_DECODE_CONFIGURATION Configuration;
public uint FormatCount;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure D3D12_VIDEO_DECODE_CONFIGURATION
Public DecodeProfile As Guid
Public BitstreamEncryption As Integer
Public InterlaceType As Integer
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure D3D12_FEATURE_DATA_VIDEO_DECODE_FORMAT_COUNT
Public NodeIndex As UInteger
Public Configuration As D3D12_VIDEO_DECODE_CONFIGURATION
Public FormatCount As UInteger
End Structureimport ctypes
from ctypes import wintypes
class D3D12_VIDEO_DECODE_CONFIGURATION(ctypes.Structure):
_fields_ = [
("DecodeProfile", GUID),
("BitstreamEncryption", ctypes.c_int),
("InterlaceType", ctypes.c_int),
]
class D3D12_FEATURE_DATA_VIDEO_DECODE_FORMAT_COUNT(ctypes.Structure):
_fields_ = [
("NodeIndex", wintypes.DWORD),
("Configuration", D3D12_VIDEO_DECODE_CONFIGURATION),
("FormatCount", wintypes.DWORD),
]#[repr(C)]
pub struct D3D12_VIDEO_DECODE_CONFIGURATION {
pub DecodeProfile: GUID,
pub BitstreamEncryption: i32,
pub InterlaceType: i32,
}
#[repr(C)]
pub struct D3D12_FEATURE_DATA_VIDEO_DECODE_FORMAT_COUNT {
pub NodeIndex: u32,
pub Configuration: D3D12_VIDEO_DECODE_CONFIGURATION,
pub FormatCount: u32,
}import "golang.org/x/sys/windows"
type D3D12_VIDEO_DECODE_CONFIGURATION struct {
DecodeProfile windows.GUID
BitstreamEncryption int32
InterlaceType int32
}
type D3D12_FEATURE_DATA_VIDEO_DECODE_FORMAT_COUNT struct {
NodeIndex uint32
Configuration D3D12_VIDEO_DECODE_CONFIGURATION
FormatCount uint32
}type
D3D12_VIDEO_DECODE_CONFIGURATION = record
DecodeProfile: TGUID;
BitstreamEncryption: Integer;
InterlaceType: Integer;
end;
D3D12_FEATURE_DATA_VIDEO_DECODE_FORMAT_COUNT = record
NodeIndex: DWORD;
Configuration: D3D12_VIDEO_DECODE_CONFIGURATION;
FormatCount: DWORD;
end;const D3D12_VIDEO_DECODE_CONFIGURATION = extern struct {
DecodeProfile: GUID,
BitstreamEncryption: i32,
InterlaceType: i32,
};
const D3D12_FEATURE_DATA_VIDEO_DECODE_FORMAT_COUNT = extern struct {
NodeIndex: u32,
Configuration: D3D12_VIDEO_DECODE_CONFIGURATION,
FormatCount: u32,
};type
D3D12_VIDEO_DECODE_CONFIGURATION {.bycopy.} = object
DecodeProfile: GUID
BitstreamEncryption: int32
InterlaceType: int32
D3D12_FEATURE_DATA_VIDEO_DECODE_FORMAT_COUNT {.bycopy.} = object
NodeIndex: uint32
Configuration: D3D12_VIDEO_DECODE_CONFIGURATION
FormatCount: uint32struct D3D12_VIDEO_DECODE_CONFIGURATION
{
GUID DecodeProfile;
int BitstreamEncryption;
int InterlaceType;
}
struct D3D12_FEATURE_DATA_VIDEO_DECODE_FORMAT_COUNT
{
uint NodeIndex;
D3D12_VIDEO_DECODE_CONFIGURATION Configuration;
uint FormatCount;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; D3D12_FEATURE_DATA_VIDEO_DECODE_FORMAT_COUNT サイズ: 32 バイト(x64)
dim st, 8 ; 4byte整数×8(構造体サイズ 32 / 4 切り上げ)
; NodeIndex : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; Configuration : D3D12_VIDEO_DECODE_CONFIGURATION (+4, 24byte) varptr(st)+4 を基点に操作(24byte:入れ子/配列)
; FormatCount : DWORD (+28, 4byte) st.7 = 値 / 値 = st.7 (lpoke/lpeek も可)
; ※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_VIDEO_DECODE_CONFIGURATION
#field GUID DecodeProfile
#field int BitstreamEncryption
#field int InterlaceType
#endstruct
#defstruct global D3D12_FEATURE_DATA_VIDEO_DECODE_FORMAT_COUNT
#field int NodeIndex
#field D3D12_VIDEO_DECODE_CONFIGURATION Configuration
#field int FormatCount
#endstruct
stdim st, D3D12_FEATURE_DATA_VIDEO_DECODE_FORMAT_COUNT ; NSTRUCT 変数を確保
st->NodeIndex = 100
mes "NodeIndex=" + st->NodeIndex