Win32 API 日本語リファレンス
ホームMedia.MediaFoundation › DXVA_VideoPropertyRange

DXVA_VideoPropertyRange

構造体
サイズx64: 16 バイト / x86: 16 バイト

サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。

フィールド

フィールドサイズx64x86説明
MinValueFLOAT4+0+0プロパティが取り得る最小値を示す。
MaxValueFLOAT4+4+4プロパティが取り得る最大値を示す。
DefaultValueFLOAT4+8+8プロパティの既定値を示す。
StepSizeFLOAT4+12+12プロパティ値を変更する際の刻み幅を示す。

各言語での定義

#include <windows.h>

// DXVA_VideoPropertyRange  (x64 16 / x86 16 バイト)
typedef struct DXVA_VideoPropertyRange {
    FLOAT MinValue;
    FLOAT MaxValue;
    FLOAT DefaultValue;
    FLOAT StepSize;
} DXVA_VideoPropertyRange;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct DXVA_VideoPropertyRange
{
    public float MinValue;
    public float MaxValue;
    public float DefaultValue;
    public float StepSize;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure DXVA_VideoPropertyRange
    Public MinValue As Single
    Public MaxValue As Single
    Public DefaultValue As Single
    Public StepSize As Single
End Structure
import ctypes
from ctypes import wintypes

class DXVA_VideoPropertyRange(ctypes.Structure):
    _fields_ = [
        ("MinValue", ctypes.c_float),
        ("MaxValue", ctypes.c_float),
        ("DefaultValue", ctypes.c_float),
        ("StepSize", ctypes.c_float),
    ]
#[repr(C)]
pub struct DXVA_VideoPropertyRange {
    pub MinValue: f32,
    pub MaxValue: f32,
    pub DefaultValue: f32,
    pub StepSize: f32,
}
import "golang.org/x/sys/windows"

type DXVA_VideoPropertyRange struct {
	MinValue float32
	MaxValue float32
	DefaultValue float32
	StepSize float32
}
type
  DXVA_VideoPropertyRange = record
    MinValue: Single;
    MaxValue: Single;
    DefaultValue: Single;
    StepSize: Single;
  end;
const DXVA_VideoPropertyRange = extern struct {
    MinValue: f32,
    MaxValue: f32,
    DefaultValue: f32,
    StepSize: f32,
};
type
  DXVA_VideoPropertyRange {.bycopy.} = object
    MinValue: float32
    MaxValue: float32
    DefaultValue: float32
    StepSize: float32
struct DXVA_VideoPropertyRange
{
    float MinValue;
    float MaxValue;
    float DefaultValue;
    float StepSize;
}

HSP用 定義

HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; DXVA_VideoPropertyRange サイズ: 16 バイト(x64)
dim st, 4    ; 4byte整数×4(構造体サイズ 16 / 4 切り上げ)
; MinValue : FLOAT (+0, 4byte)  st.0 = 値  /  値 = st.0   (lpoke/lpeek も可)
; MaxValue : FLOAT (+4, 4byte)  st.1 = 値  /  値 = st.1   (lpoke/lpeek も可)
; DefaultValue : FLOAT (+8, 4byte)  st.2 = 値  /  値 = st.2   (lpoke/lpeek も可)
; StepSize : FLOAT (+12, 4byte)  st.3 = 値  /  値 = st.3   (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global DXVA_VideoPropertyRange
    #field float MinValue
    #field float MaxValue
    #field float DefaultValue
    #field float StepSize
#endstruct

stdim st, DXVA_VideoPropertyRange        ; NSTRUCT 変数を確保
st->MinValue = 100
mes "MinValue=" + st->MinValue