ホーム › Graphics.Direct3D11 › D3D11_VIDEO_PROCESSOR_STREAM_BEHAVIOR_HINT
D3D11_VIDEO_PROCESSOR_STREAM_BEHAVIOR_HINT
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| Enable | BOOL | 4 | +0 | +0 | このストリームのヒントを有効にするか。TRUEで有効。 |
| Width | DWORD | 4 | +4 | +4 | 入力ストリームの幅(ピクセル)のヒント。 |
| Height | DWORD | 4 | +8 | +8 | 入力ストリームの高さ(ピクセル)のヒント。 |
| Format | DXGI_FORMAT | 4 | +12 | +12 | 入力ストリームのDXGIフォーマットのヒント。 |
各言語での定義
#include <windows.h>
// D3D11_VIDEO_PROCESSOR_STREAM_BEHAVIOR_HINT (x64 16 / x86 16 バイト)
typedef struct D3D11_VIDEO_PROCESSOR_STREAM_BEHAVIOR_HINT {
BOOL Enable;
DWORD Width;
DWORD Height;
DXGI_FORMAT Format;
} D3D11_VIDEO_PROCESSOR_STREAM_BEHAVIOR_HINT;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct D3D11_VIDEO_PROCESSOR_STREAM_BEHAVIOR_HINT
{
[MarshalAs(UnmanagedType.Bool)] public bool Enable;
public uint Width;
public uint Height;
public int Format;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure D3D11_VIDEO_PROCESSOR_STREAM_BEHAVIOR_HINT
<MarshalAs(UnmanagedType.Bool)> Public Enable As Boolean
Public Width As UInteger
Public Height As UInteger
Public Format As Integer
End Structureimport ctypes
from ctypes import wintypes
class D3D11_VIDEO_PROCESSOR_STREAM_BEHAVIOR_HINT(ctypes.Structure):
_fields_ = [
("Enable", wintypes.BOOL),
("Width", wintypes.DWORD),
("Height", wintypes.DWORD),
("Format", ctypes.c_int),
]#[repr(C)]
pub struct D3D11_VIDEO_PROCESSOR_STREAM_BEHAVIOR_HINT {
pub Enable: i32,
pub Width: u32,
pub Height: u32,
pub Format: i32,
}import "golang.org/x/sys/windows"
type D3D11_VIDEO_PROCESSOR_STREAM_BEHAVIOR_HINT struct {
Enable int32
Width uint32
Height uint32
Format int32
}type
D3D11_VIDEO_PROCESSOR_STREAM_BEHAVIOR_HINT = record
Enable: BOOL;
Width: DWORD;
Height: DWORD;
Format: Integer;
end;const D3D11_VIDEO_PROCESSOR_STREAM_BEHAVIOR_HINT = extern struct {
Enable: i32,
Width: u32,
Height: u32,
Format: i32,
};type
D3D11_VIDEO_PROCESSOR_STREAM_BEHAVIOR_HINT {.bycopy.} = object
Enable: int32
Width: uint32
Height: uint32
Format: int32struct D3D11_VIDEO_PROCESSOR_STREAM_BEHAVIOR_HINT
{
int Enable;
uint Width;
uint Height;
int Format;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; D3D11_VIDEO_PROCESSOR_STREAM_BEHAVIOR_HINT サイズ: 16 バイト(x64)
dim st, 4 ; 4byte整数×4(構造体サイズ 16 / 4 切り上げ)
; Enable : BOOL (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; Width : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; Height : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; Format : DXGI_FORMAT (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global D3D11_VIDEO_PROCESSOR_STREAM_BEHAVIOR_HINT
#field bool Enable
#field int Width
#field int Height
#field int Format
#endstruct
stdim st, D3D11_VIDEO_PROCESSOR_STREAM_BEHAVIOR_HINT ; NSTRUCT 変数を確保
st->Enable = 100
mes "Enable=" + st->Enable