ホーム › Media.KernelStreaming › KSCAMERA_MAXVIDEOFPS_FORPHOTORES
KSCAMERA_MAXVIDEOFPS_FORPHOTORES
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| PhotoResWidth | DWORD | 4 | +0 | +0 | 対象とする静止画解像度の幅をピクセル単位で示す。 |
| PhotoResHeight | DWORD | 4 | +4 | +4 | 対象とする静止画解像度の高さをピクセル単位で示す。 |
| PreviewFPSNum | DWORD | 4 | +8 | +8 | プレビューフレームレートの分子。 |
| PreviewFPSDenom | DWORD | 4 | +12 | +12 | プレビューフレームレートの分母。 |
| CaptureFPSNum | DWORD | 4 | +16 | +16 | キャプチャフレームレートの分子。 |
| CaptureFPSDenom | DWORD | 4 | +20 | +20 | キャプチャフレームレートの分母。 |
各言語での定義
#include <windows.h>
// KSCAMERA_MAXVIDEOFPS_FORPHOTORES (x64 24 / x86 24 バイト)
typedef struct KSCAMERA_MAXVIDEOFPS_FORPHOTORES {
DWORD PhotoResWidth;
DWORD PhotoResHeight;
DWORD PreviewFPSNum;
DWORD PreviewFPSDenom;
DWORD CaptureFPSNum;
DWORD CaptureFPSDenom;
} KSCAMERA_MAXVIDEOFPS_FORPHOTORES;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct KSCAMERA_MAXVIDEOFPS_FORPHOTORES
{
public uint PhotoResWidth;
public uint PhotoResHeight;
public uint PreviewFPSNum;
public uint PreviewFPSDenom;
public uint CaptureFPSNum;
public uint CaptureFPSDenom;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure KSCAMERA_MAXVIDEOFPS_FORPHOTORES
Public PhotoResWidth As UInteger
Public PhotoResHeight As UInteger
Public PreviewFPSNum As UInteger
Public PreviewFPSDenom As UInteger
Public CaptureFPSNum As UInteger
Public CaptureFPSDenom As UInteger
End Structureimport ctypes
from ctypes import wintypes
class KSCAMERA_MAXVIDEOFPS_FORPHOTORES(ctypes.Structure):
_fields_ = [
("PhotoResWidth", wintypes.DWORD),
("PhotoResHeight", wintypes.DWORD),
("PreviewFPSNum", wintypes.DWORD),
("PreviewFPSDenom", wintypes.DWORD),
("CaptureFPSNum", wintypes.DWORD),
("CaptureFPSDenom", wintypes.DWORD),
]#[repr(C)]
pub struct KSCAMERA_MAXVIDEOFPS_FORPHOTORES {
pub PhotoResWidth: u32,
pub PhotoResHeight: u32,
pub PreviewFPSNum: u32,
pub PreviewFPSDenom: u32,
pub CaptureFPSNum: u32,
pub CaptureFPSDenom: u32,
}import "golang.org/x/sys/windows"
type KSCAMERA_MAXVIDEOFPS_FORPHOTORES struct {
PhotoResWidth uint32
PhotoResHeight uint32
PreviewFPSNum uint32
PreviewFPSDenom uint32
CaptureFPSNum uint32
CaptureFPSDenom uint32
}type
KSCAMERA_MAXVIDEOFPS_FORPHOTORES = record
PhotoResWidth: DWORD;
PhotoResHeight: DWORD;
PreviewFPSNum: DWORD;
PreviewFPSDenom: DWORD;
CaptureFPSNum: DWORD;
CaptureFPSDenom: DWORD;
end;const KSCAMERA_MAXVIDEOFPS_FORPHOTORES = extern struct {
PhotoResWidth: u32,
PhotoResHeight: u32,
PreviewFPSNum: u32,
PreviewFPSDenom: u32,
CaptureFPSNum: u32,
CaptureFPSDenom: u32,
};type
KSCAMERA_MAXVIDEOFPS_FORPHOTORES {.bycopy.} = object
PhotoResWidth: uint32
PhotoResHeight: uint32
PreviewFPSNum: uint32
PreviewFPSDenom: uint32
CaptureFPSNum: uint32
CaptureFPSDenom: uint32struct KSCAMERA_MAXVIDEOFPS_FORPHOTORES
{
uint PhotoResWidth;
uint PhotoResHeight;
uint PreviewFPSNum;
uint PreviewFPSDenom;
uint CaptureFPSNum;
uint CaptureFPSDenom;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; KSCAMERA_MAXVIDEOFPS_FORPHOTORES サイズ: 24 バイト(x64)
dim st, 6 ; 4byte整数×6(構造体サイズ 24 / 4 切り上げ)
; PhotoResWidth : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; PhotoResHeight : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; PreviewFPSNum : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; PreviewFPSDenom : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; CaptureFPSNum : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; CaptureFPSDenom : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global KSCAMERA_MAXVIDEOFPS_FORPHOTORES
#field int PhotoResWidth
#field int PhotoResHeight
#field int PreviewFPSNum
#field int PreviewFPSDenom
#field int CaptureFPSNum
#field int CaptureFPSDenom
#endstruct
stdim st, KSCAMERA_MAXVIDEOFPS_FORPHOTORES ; NSTRUCT 変数を確保
st->PhotoResWidth = 100
mes "PhotoResWidth=" + st->PhotoResWidth