ホーム › Media.MediaFoundation › DXVAHDETW_VIDEOPROCESSBLTHD
DXVAHDETW_VIDEOPROCESSBLTHD
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| pObject | ULONGLONG | 8 | +0 | +0 | 対象ビデオプロセッサオブジェクトのアドレスをETWトレース用に格納する64ビット値。 |
| pOutputSurface | ULONGLONG | 8 | +8 | +8 | 出力先サーフェスのアドレスを示す64ビット値。 |
| TargetRect | RECT | 16 | +16 | +16 | 出力サーフェス内の描画対象矩形領域。 |
| OutputFormat | D3DFORMAT | 4 | +32 | +32 | 出力サーフェスのピクセル形式を示すD3DFORMAT列挙値。 |
| ColorSpace | DWORD | 4 | +36 | +36 | 出力の色空間情報をビットフラグで示す値。 |
| OutputFrame | DWORD | 4 | +40 | +40 | 出力フレームの番号。 |
| StreamCount | DWORD | 4 | +44 | +44 | このBLT処理に含まれる入力ストリームの数。 |
| Enter | BOOL | 4 | +48 | +48 | BLT処理の開始時はTRUE、終了時はFALSEを示すフラグ。 |
各言語での定義
#include <windows.h>
// RECT (x64 16 / x86 16 バイト)
typedef struct RECT {
INT left;
INT top;
INT right;
INT bottom;
} RECT;
// DXVAHDETW_VIDEOPROCESSBLTHD (x64 56 / x86 56 バイト)
typedef struct DXVAHDETW_VIDEOPROCESSBLTHD {
ULONGLONG pObject;
ULONGLONG pOutputSurface;
RECT TargetRect;
D3DFORMAT OutputFormat;
DWORD ColorSpace;
DWORD OutputFrame;
DWORD StreamCount;
BOOL Enter;
} DXVAHDETW_VIDEOPROCESSBLTHD;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct RECT
{
public int left;
public int top;
public int right;
public int bottom;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DXVAHDETW_VIDEOPROCESSBLTHD
{
public ulong pObject;
public ulong pOutputSurface;
public RECT TargetRect;
public uint OutputFormat;
public uint ColorSpace;
public uint OutputFrame;
public uint StreamCount;
[MarshalAs(UnmanagedType.Bool)] public bool Enter;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure RECT
Public left As Integer
Public top As Integer
Public right As Integer
Public bottom As Integer
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DXVAHDETW_VIDEOPROCESSBLTHD
Public pObject As ULong
Public pOutputSurface As ULong
Public TargetRect As RECT
Public OutputFormat As UInteger
Public ColorSpace As UInteger
Public OutputFrame As UInteger
Public StreamCount As UInteger
<MarshalAs(UnmanagedType.Bool)> Public Enter As Boolean
End Structureimport ctypes
from ctypes import wintypes
class RECT(ctypes.Structure):
_fields_ = [
("left", ctypes.c_int),
("top", ctypes.c_int),
("right", ctypes.c_int),
("bottom", ctypes.c_int),
]
class DXVAHDETW_VIDEOPROCESSBLTHD(ctypes.Structure):
_fields_ = [
("pObject", ctypes.c_ulonglong),
("pOutputSurface", ctypes.c_ulonglong),
("TargetRect", RECT),
("OutputFormat", wintypes.DWORD),
("ColorSpace", wintypes.DWORD),
("OutputFrame", wintypes.DWORD),
("StreamCount", wintypes.DWORD),
("Enter", wintypes.BOOL),
]#[repr(C)]
pub struct RECT {
pub left: i32,
pub top: i32,
pub right: i32,
pub bottom: i32,
}
#[repr(C)]
pub struct DXVAHDETW_VIDEOPROCESSBLTHD {
pub pObject: u64,
pub pOutputSurface: u64,
pub TargetRect: RECT,
pub OutputFormat: u32,
pub ColorSpace: u32,
pub OutputFrame: u32,
pub StreamCount: u32,
pub Enter: i32,
}import "golang.org/x/sys/windows"
type RECT struct {
left int32
top int32
right int32
bottom int32
}
type DXVAHDETW_VIDEOPROCESSBLTHD struct {
pObject uint64
pOutputSurface uint64
TargetRect RECT
OutputFormat uint32
ColorSpace uint32
OutputFrame uint32
StreamCount uint32
Enter int32
}type
RECT = record
left: Integer;
top: Integer;
right: Integer;
bottom: Integer;
end;
DXVAHDETW_VIDEOPROCESSBLTHD = record
pObject: UInt64;
pOutputSurface: UInt64;
TargetRect: RECT;
OutputFormat: DWORD;
ColorSpace: DWORD;
OutputFrame: DWORD;
StreamCount: DWORD;
Enter: BOOL;
end;const RECT = extern struct {
left: i32,
top: i32,
right: i32,
bottom: i32,
};
const DXVAHDETW_VIDEOPROCESSBLTHD = extern struct {
pObject: u64,
pOutputSurface: u64,
TargetRect: RECT,
OutputFormat: u32,
ColorSpace: u32,
OutputFrame: u32,
StreamCount: u32,
Enter: i32,
};type
RECT {.bycopy.} = object
left: int32
top: int32
right: int32
bottom: int32
DXVAHDETW_VIDEOPROCESSBLTHD {.bycopy.} = object
pObject: uint64
pOutputSurface: uint64
TargetRect: RECT
OutputFormat: uint32
ColorSpace: uint32
OutputFrame: uint32
StreamCount: uint32
Enter: int32struct RECT
{
int left;
int top;
int right;
int bottom;
}
struct DXVAHDETW_VIDEOPROCESSBLTHD
{
ulong pObject;
ulong pOutputSurface;
RECT TargetRect;
uint OutputFormat;
uint ColorSpace;
uint OutputFrame;
uint StreamCount;
int Enter;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DXVAHDETW_VIDEOPROCESSBLTHD サイズ: 56 バイト(x64)
dim st, 14 ; 4byte整数×14(構造体サイズ 56 / 4 切り上げ)
; pObject : ULONGLONG (+0, 8byte) qpoke st,0,値 / qpeek(st,0) ※IronHSPのみ。3.7/3.8は lpoke st,0,下位 : lpoke st,4,上位
; pOutputSurface : ULONGLONG (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; TargetRect : RECT (+16, 16byte) varptr(st)+16 を基点に操作(16byte:入れ子/配列)
; OutputFormat : D3DFORMAT (+32, 4byte) st.8 = 値 / 値 = st.8 (lpoke/lpeek も可)
; ColorSpace : DWORD (+36, 4byte) st.9 = 値 / 値 = st.9 (lpoke/lpeek も可)
; OutputFrame : DWORD (+40, 4byte) st.10 = 値 / 値 = st.10 (lpoke/lpeek も可)
; StreamCount : DWORD (+44, 4byte) st.11 = 値 / 値 = st.11 (lpoke/lpeek も可)
; Enter : BOOL (+48, 4byte) st.12 = 値 / 値 = st.12 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global RECT
#field int left
#field int top
#field int right
#field int bottom
#endstruct
#defstruct global DXVAHDETW_VIDEOPROCESSBLTHD
#field int64 pObject
#field int64 pOutputSurface
#field RECT TargetRect
#field int OutputFormat
#field int ColorSpace
#field int OutputFrame
#field int StreamCount
#field bool Enter
#endstruct
stdim st, DXVAHDETW_VIDEOPROCESSBLTHD ; NSTRUCT 変数を確保
st->pObject = 100
mes "pObject=" + st->pObject