ホーム › Media.MediaFoundation › DXVABufferInfo
DXVABufferInfo
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| pCompSurface | void* | 8/4 | +0 | +0 | 圧縮バッファ用サーフェスオブジェクトへのポインタである。 |
| DataOffset | DWORD | 4 | +8 | +4 | サーフェス内で有効データが始まるバイトオフセットである。 |
| DataSize | DWORD | 4 | +12 | +8 | サーフェス内の有効データのバイトサイズである。 |
各言語での定義
#include <windows.h>
// DXVABufferInfo (x64 16 / x86 12 バイト)
typedef struct DXVABufferInfo {
void* pCompSurface;
DWORD DataOffset;
DWORD DataSize;
} DXVABufferInfo;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DXVABufferInfo
{
public IntPtr pCompSurface;
public uint DataOffset;
public uint DataSize;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DXVABufferInfo
Public pCompSurface As IntPtr
Public DataOffset As UInteger
Public DataSize As UInteger
End Structureimport ctypes
from ctypes import wintypes
class DXVABufferInfo(ctypes.Structure):
_fields_ = [
("pCompSurface", ctypes.c_void_p),
("DataOffset", wintypes.DWORD),
("DataSize", wintypes.DWORD),
]#[repr(C)]
pub struct DXVABufferInfo {
pub pCompSurface: *mut core::ffi::c_void,
pub DataOffset: u32,
pub DataSize: u32,
}import "golang.org/x/sys/windows"
type DXVABufferInfo struct {
pCompSurface uintptr
DataOffset uint32
DataSize uint32
}type
DXVABufferInfo = record
pCompSurface: Pointer;
DataOffset: DWORD;
DataSize: DWORD;
end;const DXVABufferInfo = extern struct {
pCompSurface: ?*anyopaque,
DataOffset: u32,
DataSize: u32,
};type
DXVABufferInfo {.bycopy.} = object
pCompSurface: pointer
DataOffset: uint32
DataSize: uint32struct DXVABufferInfo
{
void* pCompSurface;
uint DataOffset;
uint DataSize;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x86 レイアウト)
; DXVABufferInfo サイズ: 12 バイト(x86)
dim st, 3 ; 4byte整数×3(構造体サイズ 12 / 4 切り上げ)
; pCompSurface : void* (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; DataOffset : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; DataSize : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DXVABufferInfo サイズ: 16 バイト(x64)
dim st, 4 ; 4byte整数×4(構造体サイズ 16 / 4 切り上げ)
; pCompSurface : void* (+0, 8byte) qpoke st,0,値 / qpeek(st,0) ※IronHSPのみ。3.7/3.8は lpoke st,0,下位 : lpoke st,4,上位
; DataOffset : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; DataSize : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global DXVABufferInfo
#field intptr pCompSurface
#field int DataOffset
#field int DataSize
#endstruct
stdim st, DXVABufferInfo ; NSTRUCT 変数を確保
st->DataOffset = 100
mes "DataOffset=" + st->DataOffset