ホーム › Media.KernelStreaming › KSCAMERA_EXTENDEDPROP_BACKGROUNDSEGMENTATION_CONFIGCAPS
KSCAMERA_EXTENDEDPROP_BACKGROUNDSEGMENTATION_CONFIGCAPS
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| Resolution | SIZE | 8 | +0 | +0 | 背景セグメンテーション対象の映像解像度を表すSIZE。 |
| MaxFrameRate | _MaxFrameRate_e__Struct | 8 | +8 | +8 | 対応する最大フレームレートを表す無名構造体(分子/分母)。 |
| MaskResolution | SIZE | 8 | +16 | +16 | 出力されるマスクの解像度を表すSIZE。 |
| SubType | GUID | 16 | +24 | +24 | マスクデータのメディアサブタイプを識別するGUID。 |
構造体: _MaxFrameRate_e__Struct x64 8B / x86 8B
| フィールド | 型 | サイズ | x64 | x86 |
|---|---|---|---|---|
| Numerator | INT | 4 | +0 | +0 |
| Denominator | INT | 4 | +4 | +4 |
各言語での定義
#include <windows.h>
// SIZE (x64 8 / x86 8 バイト)
typedef struct SIZE {
INT cx;
INT cy;
} SIZE;
// KSCAMERA_EXTENDEDPROP_BACKGROUNDSEGMENTATION_CONFIGCAPS (x64 40 / x86 40 バイト)
typedef struct KSCAMERA_EXTENDEDPROP_BACKGROUNDSEGMENTATION_CONFIGCAPS {
SIZE Resolution;
_MaxFrameRate_e__Struct MaxFrameRate;
SIZE MaskResolution;
GUID SubType;
} KSCAMERA_EXTENDEDPROP_BACKGROUNDSEGMENTATION_CONFIGCAPS;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct SIZE
{
public int cx;
public int cy;
}
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct KSCAMERA_EXTENDEDPROP_BACKGROUNDSEGMENTATION_CONFIGCAPS
{
public SIZE Resolution;
public _MaxFrameRate_e__Struct MaxFrameRate;
public SIZE MaskResolution;
public Guid SubType;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure SIZE
Public cx As Integer
Public cy As Integer
End Structure
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure KSCAMERA_EXTENDEDPROP_BACKGROUNDSEGMENTATION_CONFIGCAPS
Public Resolution As SIZE
Public MaxFrameRate As _MaxFrameRate_e__Struct
Public MaskResolution As SIZE
Public SubType As Guid
End Structureimport ctypes
from ctypes import wintypes
class SIZE(ctypes.Structure):
_fields_ = [
("cx", ctypes.c_int),
("cy", ctypes.c_int),
]
class KSCAMERA_EXTENDEDPROP_BACKGROUNDSEGMENTATION_CONFIGCAPS(ctypes.Structure):
_fields_ = [
("Resolution", SIZE),
("MaxFrameRate", _MaxFrameRate_e__Struct),
("MaskResolution", SIZE),
("SubType", GUID),
]#[repr(C)]
pub struct SIZE {
pub cx: i32,
pub cy: i32,
}
#[repr(C)]
pub struct KSCAMERA_EXTENDEDPROP_BACKGROUNDSEGMENTATION_CONFIGCAPS {
pub Resolution: SIZE,
pub MaxFrameRate: _MaxFrameRate_e__Struct,
pub MaskResolution: SIZE,
pub SubType: GUID,
}import "golang.org/x/sys/windows"
type SIZE struct {
cx int32
cy int32
}
type KSCAMERA_EXTENDEDPROP_BACKGROUNDSEGMENTATION_CONFIGCAPS struct {
Resolution SIZE
MaxFrameRate _MaxFrameRate_e__Struct
MaskResolution SIZE
SubType windows.GUID
}type
SIZE = record
cx: Integer;
cy: Integer;
end;
KSCAMERA_EXTENDEDPROP_BACKGROUNDSEGMENTATION_CONFIGCAPS = record
Resolution: SIZE;
MaxFrameRate: _MaxFrameRate_e__Struct;
MaskResolution: SIZE;
SubType: TGUID;
end;const SIZE = extern struct {
cx: i32,
cy: i32,
};
const KSCAMERA_EXTENDEDPROP_BACKGROUNDSEGMENTATION_CONFIGCAPS = extern struct {
Resolution: SIZE,
MaxFrameRate: _MaxFrameRate_e__Struct,
MaskResolution: SIZE,
SubType: GUID,
};type
SIZE {.bycopy.} = object
cx: int32
cy: int32
KSCAMERA_EXTENDEDPROP_BACKGROUNDSEGMENTATION_CONFIGCAPS {.bycopy.} = object
Resolution: SIZE
MaxFrameRate: _MaxFrameRate_e__Struct
MaskResolution: SIZE
SubType: GUIDstruct SIZE
{
int cx;
int cy;
}
struct KSCAMERA_EXTENDEDPROP_BACKGROUNDSEGMENTATION_CONFIGCAPS
{
SIZE Resolution;
_MaxFrameRate_e__Struct MaxFrameRate;
SIZE MaskResolution;
GUID SubType;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; KSCAMERA_EXTENDEDPROP_BACKGROUNDSEGMENTATION_CONFIGCAPS サイズ: 40 バイト(x64)
dim st, 10 ; 4byte整数×10(構造体サイズ 40 / 4 切り上げ)
; Resolution : SIZE (+0, 8byte) varptr(st)+0 を基点に操作(8byte:入れ子/配列)
; MaxFrameRate : _MaxFrameRate_e__Struct (+8, 8byte) varptr(st)+8 を基点に操作(8byte:入れ子/配列)
; MaskResolution : SIZE (+16, 8byte) varptr(st)+16 を基点に操作(8byte:入れ子/配列)
; SubType : GUID (+24, 16byte) varptr(st)+24 を基点に操作(16byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global SIZE
#field int cx
#field int cy
#endstruct
#defstruct global GUID, pack=1
#field int Data1
#field short Data2
#field short Data3
#field byte Data4 8
#endstruct
#defstruct global KSCAMERA_EXTENDEDPROP_BACKGROUNDSEGMENTATION_CONFIGCAPS
#field SIZE Resolution
#field _MaxFrameRate_e__Struct MaxFrameRate
#field SIZE MaskResolution
#field GUID SubType
#endstruct
stdim st, KSCAMERA_EXTENDEDPROP_BACKGROUNDSEGMENTATION_CONFIGCAPS ; NSTRUCT 変数を確保