ホーム › Media.MediaFoundation › DXVACompBufferInfo
DXVACompBufferInfo
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| NumCompBuffers | DWORD | 4 | +0 | +0 | 作成するこの型のサーフェスの数。 |
| WidthToCreate | DWORD | 4 | +4 | +4 | サーフェスの幅 (ピクセル単位)。 |
| HeightToCreate | DWORD | 4 | +8 | +8 | サーフェスの高さ (ピクセル単位)。 |
| BytesToAllocate | DWORD | 4 | +12 | +12 | サーフェスのサイズ (バイト単位)。 |
| Usage | DWORD | 4 | +16 | +16 | 1 つ以上の D3DUSAGE 定数のビット単位の OR。 |
| Pool | D3DPOOL | 4 | +20 | +20 | サーフェスを作成するメモリプール。D3DPOOL 値として指定します。 |
| Format | D3DFORMAT | 4 | +24 | +24 | ピクセル形式。D3DFORMAT 値として指定します。 |
公式ドキュメント
DirectX Video Acceleration (DXVA) 用の圧縮サーフェスに対する要件を指定します。
この情報を取得するには、IDirect3DVideoDevice9::GetDXVACompressedBufferInfo を呼び出します。各 DXVACompBufferInfo 構造体は、特定の DXVA サーフェス型に対する要件を示します。サーフェス型は、pBufferInfo パラメーターに渡される配列のインデックスによって暗黙的に定義されます。
解説(Remarks)
圧縮サーフェスを作成するには、IDirect3DVideoDevice9::CreateSurface を呼び出します。
出典・ライセンス: 上記「公式ドキュメント」の内容は Microsoft の Win32 API ドキュメント(MicrosoftDocs/sdk-api)を日本語に翻訳・改変したものです。© Microsoft Corporation. CC BY 4.0 で提供。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
各言語での定義
#include <windows.h>
// DXVACompBufferInfo (x64 28 / x86 28 バイト)
typedef struct DXVACompBufferInfo {
DWORD NumCompBuffers;
DWORD WidthToCreate;
DWORD HeightToCreate;
DWORD BytesToAllocate;
DWORD Usage;
D3DPOOL Pool;
D3DFORMAT Format;
} DXVACompBufferInfo;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DXVACompBufferInfo
{
public uint NumCompBuffers;
public uint WidthToCreate;
public uint HeightToCreate;
public uint BytesToAllocate;
public uint Usage;
public int Pool;
public uint Format;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DXVACompBufferInfo
Public NumCompBuffers As UInteger
Public WidthToCreate As UInteger
Public HeightToCreate As UInteger
Public BytesToAllocate As UInteger
Public Usage As UInteger
Public Pool As Integer
Public Format As UInteger
End Structureimport ctypes
from ctypes import wintypes
class DXVACompBufferInfo(ctypes.Structure):
_fields_ = [
("NumCompBuffers", wintypes.DWORD),
("WidthToCreate", wintypes.DWORD),
("HeightToCreate", wintypes.DWORD),
("BytesToAllocate", wintypes.DWORD),
("Usage", wintypes.DWORD),
("Pool", ctypes.c_int),
("Format", wintypes.DWORD),
]#[repr(C)]
pub struct DXVACompBufferInfo {
pub NumCompBuffers: u32,
pub WidthToCreate: u32,
pub HeightToCreate: u32,
pub BytesToAllocate: u32,
pub Usage: u32,
pub Pool: i32,
pub Format: u32,
}import "golang.org/x/sys/windows"
type DXVACompBufferInfo struct {
NumCompBuffers uint32
WidthToCreate uint32
HeightToCreate uint32
BytesToAllocate uint32
Usage uint32
Pool int32
Format uint32
}type
DXVACompBufferInfo = record
NumCompBuffers: DWORD;
WidthToCreate: DWORD;
HeightToCreate: DWORD;
BytesToAllocate: DWORD;
Usage: DWORD;
Pool: Integer;
Format: DWORD;
end;const DXVACompBufferInfo = extern struct {
NumCompBuffers: u32,
WidthToCreate: u32,
HeightToCreate: u32,
BytesToAllocate: u32,
Usage: u32,
Pool: i32,
Format: u32,
};type
DXVACompBufferInfo {.bycopy.} = object
NumCompBuffers: uint32
WidthToCreate: uint32
HeightToCreate: uint32
BytesToAllocate: uint32
Usage: uint32
Pool: int32
Format: uint32struct DXVACompBufferInfo
{
uint NumCompBuffers;
uint WidthToCreate;
uint HeightToCreate;
uint BytesToAllocate;
uint Usage;
int Pool;
uint Format;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DXVACompBufferInfo サイズ: 28 バイト(x64)
dim st, 7 ; 4byte整数×7(構造体サイズ 28 / 4 切り上げ)
; NumCompBuffers : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; WidthToCreate : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; HeightToCreate : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; BytesToAllocate : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; Usage : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; Pool : D3DPOOL (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; Format : D3DFORMAT (+24, 4byte) st.6 = 値 / 値 = st.6 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global DXVACompBufferInfo
#field int NumCompBuffers
#field int WidthToCreate
#field int HeightToCreate
#field int BytesToAllocate
#field int Usage
#field int Pool
#field int Format
#endstruct
stdim st, DXVACompBufferInfo ; NSTRUCT 変数を確保
st->NumCompBuffers = 100
mes "NumCompBuffers=" + st->NumCompBuffers