ホーム › Media.MediaFoundation › D3D12_VIDEO_DECODE_CONFIGURATION
D3D12_VIDEO_DECODE_CONFIGURATION
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| DecodeProfile | GUID | 16 | +0 | +0 | デコードプロファイルを識別するGUID(コーデック/プロファイル)。 |
| BitstreamEncryption | D3D12_BITSTREAM_ENCRYPTION_TYPE | 4 | +16 | +16 | ビットストリーム暗号化方式を示すD3D12_BITSTREAM_ENCRYPTION_TYPE。 |
| InterlaceType | D3D12_VIDEO_FRAME_CODED_INTERLACE_TYPE | 4 | +20 | +20 | 符号化映像のインターレース種別を示すD3D12_VIDEO_FRAME_CODED_INTERLACE_TYPE。 |
各言語での定義
#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;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;
}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 Structureimport ctypes
from ctypes import wintypes
class D3D12_VIDEO_DECODE_CONFIGURATION(ctypes.Structure):
_fields_ = [
("DecodeProfile", GUID),
("BitstreamEncryption", ctypes.c_int),
("InterlaceType", ctypes.c_int),
]#[repr(C)]
pub struct D3D12_VIDEO_DECODE_CONFIGURATION {
pub DecodeProfile: GUID,
pub BitstreamEncryption: i32,
pub InterlaceType: i32,
}import "golang.org/x/sys/windows"
type D3D12_VIDEO_DECODE_CONFIGURATION struct {
DecodeProfile windows.GUID
BitstreamEncryption int32
InterlaceType int32
}type
D3D12_VIDEO_DECODE_CONFIGURATION = record
DecodeProfile: TGUID;
BitstreamEncryption: Integer;
InterlaceType: Integer;
end;const D3D12_VIDEO_DECODE_CONFIGURATION = extern struct {
DecodeProfile: GUID,
BitstreamEncryption: i32,
InterlaceType: i32,
};type
D3D12_VIDEO_DECODE_CONFIGURATION {.bycopy.} = object
DecodeProfile: GUID
BitstreamEncryption: int32
InterlaceType: int32struct D3D12_VIDEO_DECODE_CONFIGURATION
{
GUID DecodeProfile;
int BitstreamEncryption;
int InterlaceType;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; D3D12_VIDEO_DECODE_CONFIGURATION サイズ: 24 バイト(x64)
dim st, 6 ; 4byte整数×6(構造体サイズ 24 / 4 切り上げ)
; DecodeProfile : GUID (+0, 16byte) varptr(st)+0 を基点に操作(16byte:入れ子/配列)
; BitstreamEncryption : D3D12_BITSTREAM_ENCRYPTION_TYPE (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; InterlaceType : D3D12_VIDEO_FRAME_CODED_INTERLACE_TYPE (+20, 4byte) st.5 = 値 / 値 = st.5 (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
stdim st, D3D12_VIDEO_DECODE_CONFIGURATION ; NSTRUCT 変数を確保
st->BitstreamEncryption = 100
mes "BitstreamEncryption=" + st->BitstreamEncryption