ホーム › Media.MediaFoundation › MFT_INPUT_STREAM_INFO
MFT_INPUT_STREAM_INFO
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| hnsMaxLatency | LONGLONG | 8 | +0 | +0 | 入力から出力までの最大遅延を100ナノ秒単位で示す。 |
| dwFlags | DWORD | 4 | +8 | +8 | 入力ストリームの特性を示すビットフラグ。 |
| cbSize | DWORD | 4 | +12 | +12 | 入力サンプルに必要な最小バッファサイズ(バイト)。 |
| cbMaxLookahead | DWORD | 4 | +16 | +16 | MFTが先読みする最大バイト数。 |
| cbAlignment | DWORD | 4 | +20 | +20 | 入力バッファに必要なメモリアライメント(バイト)。 |
各言語での定義
#include <windows.h>
// MFT_INPUT_STREAM_INFO (x64 24 / x86 24 バイト)
typedef struct MFT_INPUT_STREAM_INFO {
LONGLONG hnsMaxLatency;
DWORD dwFlags;
DWORD cbSize;
DWORD cbMaxLookahead;
DWORD cbAlignment;
} MFT_INPUT_STREAM_INFO;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct MFT_INPUT_STREAM_INFO
{
public long hnsMaxLatency;
public uint dwFlags;
public uint cbSize;
public uint cbMaxLookahead;
public uint cbAlignment;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure MFT_INPUT_STREAM_INFO
Public hnsMaxLatency As Long
Public dwFlags As UInteger
Public cbSize As UInteger
Public cbMaxLookahead As UInteger
Public cbAlignment As UInteger
End Structureimport ctypes
from ctypes import wintypes
class MFT_INPUT_STREAM_INFO(ctypes.Structure):
_fields_ = [
("hnsMaxLatency", ctypes.c_longlong),
("dwFlags", wintypes.DWORD),
("cbSize", wintypes.DWORD),
("cbMaxLookahead", wintypes.DWORD),
("cbAlignment", wintypes.DWORD),
]#[repr(C)]
pub struct MFT_INPUT_STREAM_INFO {
pub hnsMaxLatency: i64,
pub dwFlags: u32,
pub cbSize: u32,
pub cbMaxLookahead: u32,
pub cbAlignment: u32,
}import "golang.org/x/sys/windows"
type MFT_INPUT_STREAM_INFO struct {
hnsMaxLatency int64
dwFlags uint32
cbSize uint32
cbMaxLookahead uint32
cbAlignment uint32
}type
MFT_INPUT_STREAM_INFO = record
hnsMaxLatency: Int64;
dwFlags: DWORD;
cbSize: DWORD;
cbMaxLookahead: DWORD;
cbAlignment: DWORD;
end;const MFT_INPUT_STREAM_INFO = extern struct {
hnsMaxLatency: i64,
dwFlags: u32,
cbSize: u32,
cbMaxLookahead: u32,
cbAlignment: u32,
};type
MFT_INPUT_STREAM_INFO {.bycopy.} = object
hnsMaxLatency: int64
dwFlags: uint32
cbSize: uint32
cbMaxLookahead: uint32
cbAlignment: uint32struct MFT_INPUT_STREAM_INFO
{
long hnsMaxLatency;
uint dwFlags;
uint cbSize;
uint cbMaxLookahead;
uint cbAlignment;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; MFT_INPUT_STREAM_INFO サイズ: 24 バイト(x64)
dim st, 6 ; 4byte整数×6(構造体サイズ 24 / 4 切り上げ)
; hnsMaxLatency : LONGLONG (+0, 8byte) qpoke st,0,値 / qpeek(st,0) ※IronHSPのみ。3.7/3.8は lpoke st,0,下位 : lpoke st,4,上位
; dwFlags : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; cbSize : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; cbMaxLookahead : DWORD (+16, 4byte) st.4 = 値 / 値 = st.4 (lpoke/lpeek も可)
; cbAlignment : DWORD (+20, 4byte) st.5 = 値 / 値 = st.5 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global MFT_INPUT_STREAM_INFO
#field int64 hnsMaxLatency
#field int dwFlags
#field int cbSize
#field int cbMaxLookahead
#field int cbAlignment
#endstruct
stdim st, MFT_INPUT_STREAM_INFO ; NSTRUCT 変数を確保
st->hnsMaxLatency = 100
mes "hnsMaxLatency=" + st->hnsMaxLatency