ホーム › Media.MediaFoundation › DXVAHDETW_VIDEOPROCESSBLTHD_STREAM
DXVAHDETW_VIDEOPROCESSBLTHD_STREAM
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| pObject | ULONGLONG | 8 | +0 | +0 | 対象ビデオプロセッサオブジェクトのアドレスをETWトレース用に格納する64ビット値。 |
| pInputSurface | ULONGLONG | 8 | +8 | +8 | 入力サーフェスのアドレスを示す64ビット値。 |
| SourceRect | RECT | 16 | +16 | +16 | 入力サーフェス内で処理対象とするソース矩形領域。 |
| DestinationRect | RECT | 16 | +32 | +32 | 出力サーフェス内の描画先矩形領域。 |
| InputFormat | D3DFORMAT | 4 | +48 | +48 | 入力サーフェスのピクセル形式を示すD3DFORMAT列挙値。 |
| FrameFormat | DXVAHD_FRAME_FORMAT | 4 | +52 | +52 | プログレッシブやインターレースなどフレーム構成を示すDXVAHD_FRAME_FORMAT列挙値。 |
| ColorSpace | DWORD | 4 | +56 | +56 | 入力の色空間情報をビットフラグで示す値。 |
| StreamNumber | DWORD | 4 | +60 | +60 | 対象とする入力ストリームの番号。0始まり。 |
| OutputIndex | DWORD | 4 | +64 | +64 | 出力フレームのインデックス。 |
| InputFrameOrField | DWORD | 4 | +68 | +68 | 入力フレームまたはフィールドのインデックス。 |
| PastFrames | DWORD | 4 | +72 | +72 | デインターレース等で参照する過去フレームの数。 |
| FutureFrames | DWORD | 4 | +76 | +76 | デインターレース等で参照する未来フレームの数。 |
各言語での定義
#include <windows.h>
// RECT (x64 16 / x86 16 バイト)
typedef struct RECT {
INT left;
INT top;
INT right;
INT bottom;
} RECT;
// DXVAHDETW_VIDEOPROCESSBLTHD_STREAM (x64 80 / x86 80 バイト)
typedef struct DXVAHDETW_VIDEOPROCESSBLTHD_STREAM {
ULONGLONG pObject;
ULONGLONG pInputSurface;
RECT SourceRect;
RECT DestinationRect;
D3DFORMAT InputFormat;
DXVAHD_FRAME_FORMAT FrameFormat;
DWORD ColorSpace;
DWORD StreamNumber;
DWORD OutputIndex;
DWORD InputFrameOrField;
DWORD PastFrames;
DWORD FutureFrames;
} DXVAHDETW_VIDEOPROCESSBLTHD_STREAM;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_STREAM
{
public ulong pObject;
public ulong pInputSurface;
public RECT SourceRect;
public RECT DestinationRect;
public uint InputFormat;
public int FrameFormat;
public uint ColorSpace;
public uint StreamNumber;
public uint OutputIndex;
public uint InputFrameOrField;
public uint PastFrames;
public uint FutureFrames;
}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_STREAM
Public pObject As ULong
Public pInputSurface As ULong
Public SourceRect As RECT
Public DestinationRect As RECT
Public InputFormat As UInteger
Public FrameFormat As Integer
Public ColorSpace As UInteger
Public StreamNumber As UInteger
Public OutputIndex As UInteger
Public InputFrameOrField As UInteger
Public PastFrames As UInteger
Public FutureFrames As UInteger
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_STREAM(ctypes.Structure):
_fields_ = [
("pObject", ctypes.c_ulonglong),
("pInputSurface", ctypes.c_ulonglong),
("SourceRect", RECT),
("DestinationRect", RECT),
("InputFormat", wintypes.DWORD),
("FrameFormat", ctypes.c_int),
("ColorSpace", wintypes.DWORD),
("StreamNumber", wintypes.DWORD),
("OutputIndex", wintypes.DWORD),
("InputFrameOrField", wintypes.DWORD),
("PastFrames", wintypes.DWORD),
("FutureFrames", wintypes.DWORD),
]#[repr(C)]
pub struct RECT {
pub left: i32,
pub top: i32,
pub right: i32,
pub bottom: i32,
}
#[repr(C)]
pub struct DXVAHDETW_VIDEOPROCESSBLTHD_STREAM {
pub pObject: u64,
pub pInputSurface: u64,
pub SourceRect: RECT,
pub DestinationRect: RECT,
pub InputFormat: u32,
pub FrameFormat: i32,
pub ColorSpace: u32,
pub StreamNumber: u32,
pub OutputIndex: u32,
pub InputFrameOrField: u32,
pub PastFrames: u32,
pub FutureFrames: u32,
}import "golang.org/x/sys/windows"
type RECT struct {
left int32
top int32
right int32
bottom int32
}
type DXVAHDETW_VIDEOPROCESSBLTHD_STREAM struct {
pObject uint64
pInputSurface uint64
SourceRect RECT
DestinationRect RECT
InputFormat uint32
FrameFormat int32
ColorSpace uint32
StreamNumber uint32
OutputIndex uint32
InputFrameOrField uint32
PastFrames uint32
FutureFrames uint32
}type
RECT = record
left: Integer;
top: Integer;
right: Integer;
bottom: Integer;
end;
DXVAHDETW_VIDEOPROCESSBLTHD_STREAM = record
pObject: UInt64;
pInputSurface: UInt64;
SourceRect: RECT;
DestinationRect: RECT;
InputFormat: DWORD;
FrameFormat: Integer;
ColorSpace: DWORD;
StreamNumber: DWORD;
OutputIndex: DWORD;
InputFrameOrField: DWORD;
PastFrames: DWORD;
FutureFrames: DWORD;
end;const RECT = extern struct {
left: i32,
top: i32,
right: i32,
bottom: i32,
};
const DXVAHDETW_VIDEOPROCESSBLTHD_STREAM = extern struct {
pObject: u64,
pInputSurface: u64,
SourceRect: RECT,
DestinationRect: RECT,
InputFormat: u32,
FrameFormat: i32,
ColorSpace: u32,
StreamNumber: u32,
OutputIndex: u32,
InputFrameOrField: u32,
PastFrames: u32,
FutureFrames: u32,
};type
RECT {.bycopy.} = object
left: int32
top: int32
right: int32
bottom: int32
DXVAHDETW_VIDEOPROCESSBLTHD_STREAM {.bycopy.} = object
pObject: uint64
pInputSurface: uint64
SourceRect: RECT
DestinationRect: RECT
InputFormat: uint32
FrameFormat: int32
ColorSpace: uint32
StreamNumber: uint32
OutputIndex: uint32
InputFrameOrField: uint32
PastFrames: uint32
FutureFrames: uint32struct RECT
{
int left;
int top;
int right;
int bottom;
}
struct DXVAHDETW_VIDEOPROCESSBLTHD_STREAM
{
ulong pObject;
ulong pInputSurface;
RECT SourceRect;
RECT DestinationRect;
uint InputFormat;
int FrameFormat;
uint ColorSpace;
uint StreamNumber;
uint OutputIndex;
uint InputFrameOrField;
uint PastFrames;
uint FutureFrames;
}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_STREAM サイズ: 80 バイト(x64)
dim st, 20 ; 4byte整数×20(構造体サイズ 80 / 4 切り上げ)
; pObject : ULONGLONG (+0, 8byte) qpoke st,0,値 / qpeek(st,0) ※IronHSPのみ。3.7/3.8は lpoke st,0,下位 : lpoke st,4,上位
; pInputSurface : ULONGLONG (+8, 8byte) qpoke st,8,値 / qpeek(st,8) ※IronHSPのみ。3.7/3.8は lpoke st,8,下位 : lpoke st,12,上位
; SourceRect : RECT (+16, 16byte) varptr(st)+16 を基点に操作(16byte:入れ子/配列)
; DestinationRect : RECT (+32, 16byte) varptr(st)+32 を基点に操作(16byte:入れ子/配列)
; InputFormat : D3DFORMAT (+48, 4byte) st.12 = 値 / 値 = st.12 (lpoke/lpeek も可)
; FrameFormat : DXVAHD_FRAME_FORMAT (+52, 4byte) st.13 = 値 / 値 = st.13 (lpoke/lpeek も可)
; ColorSpace : DWORD (+56, 4byte) st.14 = 値 / 値 = st.14 (lpoke/lpeek も可)
; StreamNumber : DWORD (+60, 4byte) st.15 = 値 / 値 = st.15 (lpoke/lpeek も可)
; OutputIndex : DWORD (+64, 4byte) st.16 = 値 / 値 = st.16 (lpoke/lpeek も可)
; InputFrameOrField : DWORD (+68, 4byte) st.17 = 値 / 値 = st.17 (lpoke/lpeek も可)
; PastFrames : DWORD (+72, 4byte) st.18 = 値 / 値 = st.18 (lpoke/lpeek も可)
; FutureFrames : DWORD (+76, 4byte) st.19 = 値 / 値 = st.19 (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_STREAM
#field int64 pObject
#field int64 pInputSurface
#field RECT SourceRect
#field RECT DestinationRect
#field int InputFormat
#field int FrameFormat
#field int ColorSpace
#field int StreamNumber
#field int OutputIndex
#field int InputFrameOrField
#field int PastFrames
#field int FutureFrames
#endstruct
stdim st, DXVAHDETW_VIDEOPROCESSBLTHD_STREAM ; NSTRUCT 変数を確保
st->pObject = 100
mes "pObject=" + st->pObject