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

KS_DATARANGE_H264_VIDEO

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

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

フィールド

フィールドサイズx64x86説明
DataRangeKSDATAFORMAT64+0+0基底となるKSDATAFORMATデータ範囲記述子である。
bFixedSizeSamplesBOOL4+64+64サンプルサイズが固定かを示すブール値である。
bTemporalCompressionBOOL4+68+68時間圧縮(フレーム間圧縮)を行うかを示すブール値である。
StreamDescriptionFlagsDWORD4+72+72ストリーム記述に関するフラグの集合である。
MemoryAllocationFlagsDWORD4+76+76メモリ割り当てに関するフラグの集合である。
ConfigCapsKS_VIDEO_STREAM_CONFIG_CAPS128+80+80ストリーム構成能力を示すKS_VIDEO_STREAM_CONFIG_CAPSである。
VideoInfoHeaderKS_H264VIDEOINFO84+208+208H.264映像フォーマットを記述するKS_H264VIDEOINFOである。

各言語での定義

#include <windows.h>

// KSDATAFORMAT  (x64 64 / x86 64 バイト)
typedef struct KSDATAFORMAT {
    _Anonymous_e__Struct Anonymous;
    LONGLONG Alignment;
} KSDATAFORMAT;

// SIZE  (x64 8 / x86 8 バイト)
typedef struct SIZE {
    INT cx;
    INT cy;
} SIZE;

// KS_VIDEO_STREAM_CONFIG_CAPS  (x64 128 / x86 128 バイト)
typedef struct KS_VIDEO_STREAM_CONFIG_CAPS {
    GUID guid;
    DWORD VideoStandard;
    SIZE InputSize;
    SIZE MinCroppingSize;
    SIZE MaxCroppingSize;
    INT CropGranularityX;
    INT CropGranularityY;
    INT CropAlignX;
    INT CropAlignY;
    SIZE MinOutputSize;
    SIZE MaxOutputSize;
    INT OutputGranularityX;
    INT OutputGranularityY;
    INT StretchTapsX;
    INT StretchTapsY;
    INT ShrinkTapsX;
    INT ShrinkTapsY;
    LONGLONG MinFrameInterval;
    LONGLONG MaxFrameInterval;
    INT MinBitsPerSecond;
    INT MaxBitsPerSecond;
} KS_VIDEO_STREAM_CONFIG_CAPS;

// KS_H264VIDEOINFO  (x64 84 / x86 84 バイト)
typedef struct KS_H264VIDEOINFO {
    WORD wWidth;
    WORD wHeight;
    WORD wSARwidth;
    WORD wSARheight;
    WORD wProfile;
    BYTE bLevelIDC;
    WORD wConstrainedToolset;
    DWORD bmSupportedUsages;
    WORD bmCapabilities;
    DWORD bmSVCCapabilities;
    DWORD bmMVCCapabilities;
    DWORD dwFrameInterval;
    BYTE bMaxCodecConfigDelay;
    BYTE bmSupportedSliceModes;
    BYTE bmSupportedSyncFrameTypes;
    BYTE bResolutionScaling;
    BYTE bSimulcastSupport;
    BYTE bmSupportedRateControlModes;
    WORD wMaxMBperSecOneResolutionNoScalability;
    WORD wMaxMBperSecTwoResolutionsNoScalability;
    WORD wMaxMBperSecThreeResolutionsNoScalability;
    WORD wMaxMBperSecFourResolutionsNoScalability;
    WORD wMaxMBperSecOneResolutionTemporalScalability;
    WORD wMaxMBperSecTwoResolutionsTemporalScalablility;
    WORD wMaxMBperSecThreeResolutionsTemporalScalability;
    WORD wMaxMBperSecFourResolutionsTemporalScalability;
    WORD wMaxMBperSecOneResolutionTemporalQualityScalability;
    WORD wMaxMBperSecTwoResolutionsTemporalQualityScalability;
    WORD wMaxMBperSecThreeResolutionsTemporalQualityScalablity;
    WORD wMaxMBperSecFourResolutionsTemporalQualityScalability;
    WORD wMaxMBperSecOneResolutionTemporalSpatialScalability;
    WORD wMaxMBperSecTwoResolutionsTemporalSpatialScalability;
    WORD wMaxMBperSecThreeResolutionsTemporalSpatialScalablity;
    WORD wMaxMBperSecFourResolutionsTemporalSpatialScalability;
    WORD wMaxMBperSecOneResolutionFullScalability;
    WORD wMaxMBperSecTwoResolutionsFullScalability;
    WORD wMaxMBperSecThreeResolutionsFullScalability;
    WORD wMaxMBperSecFourResolutionsFullScalability;
} KS_H264VIDEOINFO;

// KS_DATARANGE_H264_VIDEO  (x64 296 / x86 296 バイト)
typedef struct KS_DATARANGE_H264_VIDEO {
    KSDATAFORMAT DataRange;
    BOOL bFixedSizeSamples;
    BOOL bTemporalCompression;
    DWORD StreamDescriptionFlags;
    DWORD MemoryAllocationFlags;
    KS_VIDEO_STREAM_CONFIG_CAPS ConfigCaps;
    KS_H264VIDEOINFO VideoInfoHeader;
} KS_DATARANGE_H264_VIDEO;
using System;
using System.Runtime.InteropServices;

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct KSDATAFORMAT
{
    public _Anonymous_e__Struct Anonymous;
    public long Alignment;
}

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct SIZE
{
    public int cx;
    public int cy;
}

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct KS_VIDEO_STREAM_CONFIG_CAPS
{
    public Guid guid;
    public uint VideoStandard;
    public SIZE InputSize;
    public SIZE MinCroppingSize;
    public SIZE MaxCroppingSize;
    public int CropGranularityX;
    public int CropGranularityY;
    public int CropAlignX;
    public int CropAlignY;
    public SIZE MinOutputSize;
    public SIZE MaxOutputSize;
    public int OutputGranularityX;
    public int OutputGranularityY;
    public int StretchTapsX;
    public int StretchTapsY;
    public int ShrinkTapsX;
    public int ShrinkTapsY;
    public long MinFrameInterval;
    public long MaxFrameInterval;
    public int MinBitsPerSecond;
    public int MaxBitsPerSecond;
}

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct KS_H264VIDEOINFO
{
    public ushort wWidth;
    public ushort wHeight;
    public ushort wSARwidth;
    public ushort wSARheight;
    public ushort wProfile;
    public byte bLevelIDC;
    public ushort wConstrainedToolset;
    public uint bmSupportedUsages;
    public ushort bmCapabilities;
    public uint bmSVCCapabilities;
    public uint bmMVCCapabilities;
    public uint dwFrameInterval;
    public byte bMaxCodecConfigDelay;
    public byte bmSupportedSliceModes;
    public byte bmSupportedSyncFrameTypes;
    public byte bResolutionScaling;
    public byte bSimulcastSupport;
    public byte bmSupportedRateControlModes;
    public ushort wMaxMBperSecOneResolutionNoScalability;
    public ushort wMaxMBperSecTwoResolutionsNoScalability;
    public ushort wMaxMBperSecThreeResolutionsNoScalability;
    public ushort wMaxMBperSecFourResolutionsNoScalability;
    public ushort wMaxMBperSecOneResolutionTemporalScalability;
    public ushort wMaxMBperSecTwoResolutionsTemporalScalablility;
    public ushort wMaxMBperSecThreeResolutionsTemporalScalability;
    public ushort wMaxMBperSecFourResolutionsTemporalScalability;
    public ushort wMaxMBperSecOneResolutionTemporalQualityScalability;
    public ushort wMaxMBperSecTwoResolutionsTemporalQualityScalability;
    public ushort wMaxMBperSecThreeResolutionsTemporalQualityScalablity;
    public ushort wMaxMBperSecFourResolutionsTemporalQualityScalability;
    public ushort wMaxMBperSecOneResolutionTemporalSpatialScalability;
    public ushort wMaxMBperSecTwoResolutionsTemporalSpatialScalability;
    public ushort wMaxMBperSecThreeResolutionsTemporalSpatialScalablity;
    public ushort wMaxMBperSecFourResolutionsTemporalSpatialScalability;
    public ushort wMaxMBperSecOneResolutionFullScalability;
    public ushort wMaxMBperSecTwoResolutionsFullScalability;
    public ushort wMaxMBperSecThreeResolutionsFullScalability;
    public ushort wMaxMBperSecFourResolutionsFullScalability;
}

[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct KS_DATARANGE_H264_VIDEO
{
    public KSDATAFORMAT DataRange;
    [MarshalAs(UnmanagedType.Bool)] public bool bFixedSizeSamples;
    [MarshalAs(UnmanagedType.Bool)] public bool bTemporalCompression;
    public uint StreamDescriptionFlags;
    public uint MemoryAllocationFlags;
    public KS_VIDEO_STREAM_CONFIG_CAPS ConfigCaps;
    public KS_H264VIDEOINFO VideoInfoHeader;
}
Imports System.Runtime.InteropServices

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure KSDATAFORMAT
    Public Anonymous As _Anonymous_e__Struct
    Public Alignment As Long
End Structure

<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 KS_VIDEO_STREAM_CONFIG_CAPS
    Public guid As Guid
    Public VideoStandard As UInteger
    Public InputSize As SIZE
    Public MinCroppingSize As SIZE
    Public MaxCroppingSize As SIZE
    Public CropGranularityX As Integer
    Public CropGranularityY As Integer
    Public CropAlignX As Integer
    Public CropAlignY As Integer
    Public MinOutputSize As SIZE
    Public MaxOutputSize As SIZE
    Public OutputGranularityX As Integer
    Public OutputGranularityY As Integer
    Public StretchTapsX As Integer
    Public StretchTapsY As Integer
    Public ShrinkTapsX As Integer
    Public ShrinkTapsY As Integer
    Public MinFrameInterval As Long
    Public MaxFrameInterval As Long
    Public MinBitsPerSecond As Integer
    Public MaxBitsPerSecond As Integer
End Structure

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure KS_H264VIDEOINFO
    Public wWidth As UShort
    Public wHeight As UShort
    Public wSARwidth As UShort
    Public wSARheight As UShort
    Public wProfile As UShort
    Public bLevelIDC As Byte
    Public wConstrainedToolset As UShort
    Public bmSupportedUsages As UInteger
    Public bmCapabilities As UShort
    Public bmSVCCapabilities As UInteger
    Public bmMVCCapabilities As UInteger
    Public dwFrameInterval As UInteger
    Public bMaxCodecConfigDelay As Byte
    Public bmSupportedSliceModes As Byte
    Public bmSupportedSyncFrameTypes As Byte
    Public bResolutionScaling As Byte
    Public bSimulcastSupport As Byte
    Public bmSupportedRateControlModes As Byte
    Public wMaxMBperSecOneResolutionNoScalability As UShort
    Public wMaxMBperSecTwoResolutionsNoScalability As UShort
    Public wMaxMBperSecThreeResolutionsNoScalability As UShort
    Public wMaxMBperSecFourResolutionsNoScalability As UShort
    Public wMaxMBperSecOneResolutionTemporalScalability As UShort
    Public wMaxMBperSecTwoResolutionsTemporalScalablility As UShort
    Public wMaxMBperSecThreeResolutionsTemporalScalability As UShort
    Public wMaxMBperSecFourResolutionsTemporalScalability As UShort
    Public wMaxMBperSecOneResolutionTemporalQualityScalability As UShort
    Public wMaxMBperSecTwoResolutionsTemporalQualityScalability As UShort
    Public wMaxMBperSecThreeResolutionsTemporalQualityScalablity As UShort
    Public wMaxMBperSecFourResolutionsTemporalQualityScalability As UShort
    Public wMaxMBperSecOneResolutionTemporalSpatialScalability As UShort
    Public wMaxMBperSecTwoResolutionsTemporalSpatialScalability As UShort
    Public wMaxMBperSecThreeResolutionsTemporalSpatialScalablity As UShort
    Public wMaxMBperSecFourResolutionsTemporalSpatialScalability As UShort
    Public wMaxMBperSecOneResolutionFullScalability As UShort
    Public wMaxMBperSecTwoResolutionsFullScalability As UShort
    Public wMaxMBperSecThreeResolutionsFullScalability As UShort
    Public wMaxMBperSecFourResolutionsFullScalability As UShort
End Structure

<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure KS_DATARANGE_H264_VIDEO
    Public DataRange As KSDATAFORMAT
    <MarshalAs(UnmanagedType.Bool)> Public bFixedSizeSamples As Boolean
    <MarshalAs(UnmanagedType.Bool)> Public bTemporalCompression As Boolean
    Public StreamDescriptionFlags As UInteger
    Public MemoryAllocationFlags As UInteger
    Public ConfigCaps As KS_VIDEO_STREAM_CONFIG_CAPS
    Public VideoInfoHeader As KS_H264VIDEOINFO
End Structure
import ctypes
from ctypes import wintypes

class KSDATAFORMAT(ctypes.Structure):
    _fields_ = [
        ("Anonymous", _Anonymous_e__Struct),
        ("Alignment", ctypes.c_longlong),
    ]

class SIZE(ctypes.Structure):
    _fields_ = [
        ("cx", ctypes.c_int),
        ("cy", ctypes.c_int),
    ]

class KS_VIDEO_STREAM_CONFIG_CAPS(ctypes.Structure):
    _fields_ = [
        ("guid", GUID),
        ("VideoStandard", wintypes.DWORD),
        ("InputSize", SIZE),
        ("MinCroppingSize", SIZE),
        ("MaxCroppingSize", SIZE),
        ("CropGranularityX", ctypes.c_int),
        ("CropGranularityY", ctypes.c_int),
        ("CropAlignX", ctypes.c_int),
        ("CropAlignY", ctypes.c_int),
        ("MinOutputSize", SIZE),
        ("MaxOutputSize", SIZE),
        ("OutputGranularityX", ctypes.c_int),
        ("OutputGranularityY", ctypes.c_int),
        ("StretchTapsX", ctypes.c_int),
        ("StretchTapsY", ctypes.c_int),
        ("ShrinkTapsX", ctypes.c_int),
        ("ShrinkTapsY", ctypes.c_int),
        ("MinFrameInterval", ctypes.c_longlong),
        ("MaxFrameInterval", ctypes.c_longlong),
        ("MinBitsPerSecond", ctypes.c_int),
        ("MaxBitsPerSecond", ctypes.c_int),
    ]

class KS_H264VIDEOINFO(ctypes.Structure):
    _fields_ = [
        ("wWidth", ctypes.c_ushort),
        ("wHeight", ctypes.c_ushort),
        ("wSARwidth", ctypes.c_ushort),
        ("wSARheight", ctypes.c_ushort),
        ("wProfile", ctypes.c_ushort),
        ("bLevelIDC", ctypes.c_ubyte),
        ("wConstrainedToolset", ctypes.c_ushort),
        ("bmSupportedUsages", wintypes.DWORD),
        ("bmCapabilities", ctypes.c_ushort),
        ("bmSVCCapabilities", wintypes.DWORD),
        ("bmMVCCapabilities", wintypes.DWORD),
        ("dwFrameInterval", wintypes.DWORD),
        ("bMaxCodecConfigDelay", ctypes.c_ubyte),
        ("bmSupportedSliceModes", ctypes.c_ubyte),
        ("bmSupportedSyncFrameTypes", ctypes.c_ubyte),
        ("bResolutionScaling", ctypes.c_ubyte),
        ("bSimulcastSupport", ctypes.c_ubyte),
        ("bmSupportedRateControlModes", ctypes.c_ubyte),
        ("wMaxMBperSecOneResolutionNoScalability", ctypes.c_ushort),
        ("wMaxMBperSecTwoResolutionsNoScalability", ctypes.c_ushort),
        ("wMaxMBperSecThreeResolutionsNoScalability", ctypes.c_ushort),
        ("wMaxMBperSecFourResolutionsNoScalability", ctypes.c_ushort),
        ("wMaxMBperSecOneResolutionTemporalScalability", ctypes.c_ushort),
        ("wMaxMBperSecTwoResolutionsTemporalScalablility", ctypes.c_ushort),
        ("wMaxMBperSecThreeResolutionsTemporalScalability", ctypes.c_ushort),
        ("wMaxMBperSecFourResolutionsTemporalScalability", ctypes.c_ushort),
        ("wMaxMBperSecOneResolutionTemporalQualityScalability", ctypes.c_ushort),
        ("wMaxMBperSecTwoResolutionsTemporalQualityScalability", ctypes.c_ushort),
        ("wMaxMBperSecThreeResolutionsTemporalQualityScalablity", ctypes.c_ushort),
        ("wMaxMBperSecFourResolutionsTemporalQualityScalability", ctypes.c_ushort),
        ("wMaxMBperSecOneResolutionTemporalSpatialScalability", ctypes.c_ushort),
        ("wMaxMBperSecTwoResolutionsTemporalSpatialScalability", ctypes.c_ushort),
        ("wMaxMBperSecThreeResolutionsTemporalSpatialScalablity", ctypes.c_ushort),
        ("wMaxMBperSecFourResolutionsTemporalSpatialScalability", ctypes.c_ushort),
        ("wMaxMBperSecOneResolutionFullScalability", ctypes.c_ushort),
        ("wMaxMBperSecTwoResolutionsFullScalability", ctypes.c_ushort),
        ("wMaxMBperSecThreeResolutionsFullScalability", ctypes.c_ushort),
        ("wMaxMBperSecFourResolutionsFullScalability", ctypes.c_ushort),
    ]

class KS_DATARANGE_H264_VIDEO(ctypes.Structure):
    _fields_ = [
        ("DataRange", KSDATAFORMAT),
        ("bFixedSizeSamples", wintypes.BOOL),
        ("bTemporalCompression", wintypes.BOOL),
        ("StreamDescriptionFlags", wintypes.DWORD),
        ("MemoryAllocationFlags", wintypes.DWORD),
        ("ConfigCaps", KS_VIDEO_STREAM_CONFIG_CAPS),
        ("VideoInfoHeader", KS_H264VIDEOINFO),
    ]
#[repr(C)]
pub struct KSDATAFORMAT {
    pub Anonymous: _Anonymous_e__Struct,
    pub Alignment: i64,
}

#[repr(C)]
pub struct SIZE {
    pub cx: i32,
    pub cy: i32,
}

#[repr(C)]
pub struct KS_VIDEO_STREAM_CONFIG_CAPS {
    pub guid: GUID,
    pub VideoStandard: u32,
    pub InputSize: SIZE,
    pub MinCroppingSize: SIZE,
    pub MaxCroppingSize: SIZE,
    pub CropGranularityX: i32,
    pub CropGranularityY: i32,
    pub CropAlignX: i32,
    pub CropAlignY: i32,
    pub MinOutputSize: SIZE,
    pub MaxOutputSize: SIZE,
    pub OutputGranularityX: i32,
    pub OutputGranularityY: i32,
    pub StretchTapsX: i32,
    pub StretchTapsY: i32,
    pub ShrinkTapsX: i32,
    pub ShrinkTapsY: i32,
    pub MinFrameInterval: i64,
    pub MaxFrameInterval: i64,
    pub MinBitsPerSecond: i32,
    pub MaxBitsPerSecond: i32,
}

#[repr(C)]
pub struct KS_H264VIDEOINFO {
    pub wWidth: u16,
    pub wHeight: u16,
    pub wSARwidth: u16,
    pub wSARheight: u16,
    pub wProfile: u16,
    pub bLevelIDC: u8,
    pub wConstrainedToolset: u16,
    pub bmSupportedUsages: u32,
    pub bmCapabilities: u16,
    pub bmSVCCapabilities: u32,
    pub bmMVCCapabilities: u32,
    pub dwFrameInterval: u32,
    pub bMaxCodecConfigDelay: u8,
    pub bmSupportedSliceModes: u8,
    pub bmSupportedSyncFrameTypes: u8,
    pub bResolutionScaling: u8,
    pub bSimulcastSupport: u8,
    pub bmSupportedRateControlModes: u8,
    pub wMaxMBperSecOneResolutionNoScalability: u16,
    pub wMaxMBperSecTwoResolutionsNoScalability: u16,
    pub wMaxMBperSecThreeResolutionsNoScalability: u16,
    pub wMaxMBperSecFourResolutionsNoScalability: u16,
    pub wMaxMBperSecOneResolutionTemporalScalability: u16,
    pub wMaxMBperSecTwoResolutionsTemporalScalablility: u16,
    pub wMaxMBperSecThreeResolutionsTemporalScalability: u16,
    pub wMaxMBperSecFourResolutionsTemporalScalability: u16,
    pub wMaxMBperSecOneResolutionTemporalQualityScalability: u16,
    pub wMaxMBperSecTwoResolutionsTemporalQualityScalability: u16,
    pub wMaxMBperSecThreeResolutionsTemporalQualityScalablity: u16,
    pub wMaxMBperSecFourResolutionsTemporalQualityScalability: u16,
    pub wMaxMBperSecOneResolutionTemporalSpatialScalability: u16,
    pub wMaxMBperSecTwoResolutionsTemporalSpatialScalability: u16,
    pub wMaxMBperSecThreeResolutionsTemporalSpatialScalablity: u16,
    pub wMaxMBperSecFourResolutionsTemporalSpatialScalability: u16,
    pub wMaxMBperSecOneResolutionFullScalability: u16,
    pub wMaxMBperSecTwoResolutionsFullScalability: u16,
    pub wMaxMBperSecThreeResolutionsFullScalability: u16,
    pub wMaxMBperSecFourResolutionsFullScalability: u16,
}

#[repr(C)]
pub struct KS_DATARANGE_H264_VIDEO {
    pub DataRange: KSDATAFORMAT,
    pub bFixedSizeSamples: i32,
    pub bTemporalCompression: i32,
    pub StreamDescriptionFlags: u32,
    pub MemoryAllocationFlags: u32,
    pub ConfigCaps: KS_VIDEO_STREAM_CONFIG_CAPS,
    pub VideoInfoHeader: KS_H264VIDEOINFO,
}
import "golang.org/x/sys/windows"

type KSDATAFORMAT struct {
	Anonymous _Anonymous_e__Struct
	Alignment int64
}

type SIZE struct {
	cx int32
	cy int32
}

type KS_VIDEO_STREAM_CONFIG_CAPS struct {
	guid windows.GUID
	VideoStandard uint32
	InputSize SIZE
	MinCroppingSize SIZE
	MaxCroppingSize SIZE
	CropGranularityX int32
	CropGranularityY int32
	CropAlignX int32
	CropAlignY int32
	MinOutputSize SIZE
	MaxOutputSize SIZE
	OutputGranularityX int32
	OutputGranularityY int32
	StretchTapsX int32
	StretchTapsY int32
	ShrinkTapsX int32
	ShrinkTapsY int32
	MinFrameInterval int64
	MaxFrameInterval int64
	MinBitsPerSecond int32
	MaxBitsPerSecond int32
}

type KS_H264VIDEOINFO struct {
	wWidth uint16
	wHeight uint16
	wSARwidth uint16
	wSARheight uint16
	wProfile uint16
	bLevelIDC byte
	wConstrainedToolset uint16
	bmSupportedUsages uint32
	bmCapabilities uint16
	bmSVCCapabilities uint32
	bmMVCCapabilities uint32
	dwFrameInterval uint32
	bMaxCodecConfigDelay byte
	bmSupportedSliceModes byte
	bmSupportedSyncFrameTypes byte
	bResolutionScaling byte
	bSimulcastSupport byte
	bmSupportedRateControlModes byte
	wMaxMBperSecOneResolutionNoScalability uint16
	wMaxMBperSecTwoResolutionsNoScalability uint16
	wMaxMBperSecThreeResolutionsNoScalability uint16
	wMaxMBperSecFourResolutionsNoScalability uint16
	wMaxMBperSecOneResolutionTemporalScalability uint16
	wMaxMBperSecTwoResolutionsTemporalScalablility uint16
	wMaxMBperSecThreeResolutionsTemporalScalability uint16
	wMaxMBperSecFourResolutionsTemporalScalability uint16
	wMaxMBperSecOneResolutionTemporalQualityScalability uint16
	wMaxMBperSecTwoResolutionsTemporalQualityScalability uint16
	wMaxMBperSecThreeResolutionsTemporalQualityScalablity uint16
	wMaxMBperSecFourResolutionsTemporalQualityScalability uint16
	wMaxMBperSecOneResolutionTemporalSpatialScalability uint16
	wMaxMBperSecTwoResolutionsTemporalSpatialScalability uint16
	wMaxMBperSecThreeResolutionsTemporalSpatialScalablity uint16
	wMaxMBperSecFourResolutionsTemporalSpatialScalability uint16
	wMaxMBperSecOneResolutionFullScalability uint16
	wMaxMBperSecTwoResolutionsFullScalability uint16
	wMaxMBperSecThreeResolutionsFullScalability uint16
	wMaxMBperSecFourResolutionsFullScalability uint16
}

type KS_DATARANGE_H264_VIDEO struct {
	DataRange KSDATAFORMAT
	bFixedSizeSamples int32
	bTemporalCompression int32
	StreamDescriptionFlags uint32
	MemoryAllocationFlags uint32
	ConfigCaps KS_VIDEO_STREAM_CONFIG_CAPS
	VideoInfoHeader KS_H264VIDEOINFO
}
type
  KSDATAFORMAT = record
    Anonymous: _Anonymous_e__Struct;
    Alignment: Int64;
  end;

  SIZE = record
    cx: Integer;
    cy: Integer;
  end;

  KS_VIDEO_STREAM_CONFIG_CAPS = record
    guid: TGUID;
    VideoStandard: DWORD;
    InputSize: SIZE;
    MinCroppingSize: SIZE;
    MaxCroppingSize: SIZE;
    CropGranularityX: Integer;
    CropGranularityY: Integer;
    CropAlignX: Integer;
    CropAlignY: Integer;
    MinOutputSize: SIZE;
    MaxOutputSize: SIZE;
    OutputGranularityX: Integer;
    OutputGranularityY: Integer;
    StretchTapsX: Integer;
    StretchTapsY: Integer;
    ShrinkTapsX: Integer;
    ShrinkTapsY: Integer;
    MinFrameInterval: Int64;
    MaxFrameInterval: Int64;
    MinBitsPerSecond: Integer;
    MaxBitsPerSecond: Integer;
  end;

  KS_H264VIDEOINFO = record
    wWidth: Word;
    wHeight: Word;
    wSARwidth: Word;
    wSARheight: Word;
    wProfile: Word;
    bLevelIDC: Byte;
    wConstrainedToolset: Word;
    bmSupportedUsages: DWORD;
    bmCapabilities: Word;
    bmSVCCapabilities: DWORD;
    bmMVCCapabilities: DWORD;
    dwFrameInterval: DWORD;
    bMaxCodecConfigDelay: Byte;
    bmSupportedSliceModes: Byte;
    bmSupportedSyncFrameTypes: Byte;
    bResolutionScaling: Byte;
    bSimulcastSupport: Byte;
    bmSupportedRateControlModes: Byte;
    wMaxMBperSecOneResolutionNoScalability: Word;
    wMaxMBperSecTwoResolutionsNoScalability: Word;
    wMaxMBperSecThreeResolutionsNoScalability: Word;
    wMaxMBperSecFourResolutionsNoScalability: Word;
    wMaxMBperSecOneResolutionTemporalScalability: Word;
    wMaxMBperSecTwoResolutionsTemporalScalablility: Word;
    wMaxMBperSecThreeResolutionsTemporalScalability: Word;
    wMaxMBperSecFourResolutionsTemporalScalability: Word;
    wMaxMBperSecOneResolutionTemporalQualityScalability: Word;
    wMaxMBperSecTwoResolutionsTemporalQualityScalability: Word;
    wMaxMBperSecThreeResolutionsTemporalQualityScalablity: Word;
    wMaxMBperSecFourResolutionsTemporalQualityScalability: Word;
    wMaxMBperSecOneResolutionTemporalSpatialScalability: Word;
    wMaxMBperSecTwoResolutionsTemporalSpatialScalability: Word;
    wMaxMBperSecThreeResolutionsTemporalSpatialScalablity: Word;
    wMaxMBperSecFourResolutionsTemporalSpatialScalability: Word;
    wMaxMBperSecOneResolutionFullScalability: Word;
    wMaxMBperSecTwoResolutionsFullScalability: Word;
    wMaxMBperSecThreeResolutionsFullScalability: Word;
    wMaxMBperSecFourResolutionsFullScalability: Word;
  end;

  KS_DATARANGE_H264_VIDEO = record
    DataRange: KSDATAFORMAT;
    bFixedSizeSamples: BOOL;
    bTemporalCompression: BOOL;
    StreamDescriptionFlags: DWORD;
    MemoryAllocationFlags: DWORD;
    ConfigCaps: KS_VIDEO_STREAM_CONFIG_CAPS;
    VideoInfoHeader: KS_H264VIDEOINFO;
  end;
const KSDATAFORMAT = extern struct {
    Anonymous: _Anonymous_e__Struct,
    Alignment: i64,
};

const SIZE = extern struct {
    cx: i32,
    cy: i32,
};

const KS_VIDEO_STREAM_CONFIG_CAPS = extern struct {
    guid: GUID,
    VideoStandard: u32,
    InputSize: SIZE,
    MinCroppingSize: SIZE,
    MaxCroppingSize: SIZE,
    CropGranularityX: i32,
    CropGranularityY: i32,
    CropAlignX: i32,
    CropAlignY: i32,
    MinOutputSize: SIZE,
    MaxOutputSize: SIZE,
    OutputGranularityX: i32,
    OutputGranularityY: i32,
    StretchTapsX: i32,
    StretchTapsY: i32,
    ShrinkTapsX: i32,
    ShrinkTapsY: i32,
    MinFrameInterval: i64,
    MaxFrameInterval: i64,
    MinBitsPerSecond: i32,
    MaxBitsPerSecond: i32,
};

const KS_H264VIDEOINFO = extern struct {
    wWidth: u16,
    wHeight: u16,
    wSARwidth: u16,
    wSARheight: u16,
    wProfile: u16,
    bLevelIDC: u8,
    wConstrainedToolset: u16,
    bmSupportedUsages: u32,
    bmCapabilities: u16,
    bmSVCCapabilities: u32,
    bmMVCCapabilities: u32,
    dwFrameInterval: u32,
    bMaxCodecConfigDelay: u8,
    bmSupportedSliceModes: u8,
    bmSupportedSyncFrameTypes: u8,
    bResolutionScaling: u8,
    bSimulcastSupport: u8,
    bmSupportedRateControlModes: u8,
    wMaxMBperSecOneResolutionNoScalability: u16,
    wMaxMBperSecTwoResolutionsNoScalability: u16,
    wMaxMBperSecThreeResolutionsNoScalability: u16,
    wMaxMBperSecFourResolutionsNoScalability: u16,
    wMaxMBperSecOneResolutionTemporalScalability: u16,
    wMaxMBperSecTwoResolutionsTemporalScalablility: u16,
    wMaxMBperSecThreeResolutionsTemporalScalability: u16,
    wMaxMBperSecFourResolutionsTemporalScalability: u16,
    wMaxMBperSecOneResolutionTemporalQualityScalability: u16,
    wMaxMBperSecTwoResolutionsTemporalQualityScalability: u16,
    wMaxMBperSecThreeResolutionsTemporalQualityScalablity: u16,
    wMaxMBperSecFourResolutionsTemporalQualityScalability: u16,
    wMaxMBperSecOneResolutionTemporalSpatialScalability: u16,
    wMaxMBperSecTwoResolutionsTemporalSpatialScalability: u16,
    wMaxMBperSecThreeResolutionsTemporalSpatialScalablity: u16,
    wMaxMBperSecFourResolutionsTemporalSpatialScalability: u16,
    wMaxMBperSecOneResolutionFullScalability: u16,
    wMaxMBperSecTwoResolutionsFullScalability: u16,
    wMaxMBperSecThreeResolutionsFullScalability: u16,
    wMaxMBperSecFourResolutionsFullScalability: u16,
};

const KS_DATARANGE_H264_VIDEO = extern struct {
    DataRange: KSDATAFORMAT,
    bFixedSizeSamples: i32,
    bTemporalCompression: i32,
    StreamDescriptionFlags: u32,
    MemoryAllocationFlags: u32,
    ConfigCaps: KS_VIDEO_STREAM_CONFIG_CAPS,
    VideoInfoHeader: KS_H264VIDEOINFO,
};
type
  KSDATAFORMAT {.bycopy.} = object
    Anonymous: _Anonymous_e__Struct
    Alignment: int64

  SIZE {.bycopy.} = object
    cx: int32
    cy: int32

  KS_VIDEO_STREAM_CONFIG_CAPS {.bycopy.} = object
    guid: GUID
    VideoStandard: uint32
    InputSize: SIZE
    MinCroppingSize: SIZE
    MaxCroppingSize: SIZE
    CropGranularityX: int32
    CropGranularityY: int32
    CropAlignX: int32
    CropAlignY: int32
    MinOutputSize: SIZE
    MaxOutputSize: SIZE
    OutputGranularityX: int32
    OutputGranularityY: int32
    StretchTapsX: int32
    StretchTapsY: int32
    ShrinkTapsX: int32
    ShrinkTapsY: int32
    MinFrameInterval: int64
    MaxFrameInterval: int64
    MinBitsPerSecond: int32
    MaxBitsPerSecond: int32

  KS_H264VIDEOINFO {.bycopy.} = object
    wWidth: uint16
    wHeight: uint16
    wSARwidth: uint16
    wSARheight: uint16
    wProfile: uint16
    bLevelIDC: uint8
    wConstrainedToolset: uint16
    bmSupportedUsages: uint32
    bmCapabilities: uint16
    bmSVCCapabilities: uint32
    bmMVCCapabilities: uint32
    dwFrameInterval: uint32
    bMaxCodecConfigDelay: uint8
    bmSupportedSliceModes: uint8
    bmSupportedSyncFrameTypes: uint8
    bResolutionScaling: uint8
    bSimulcastSupport: uint8
    bmSupportedRateControlModes: uint8
    wMaxMBperSecOneResolutionNoScalability: uint16
    wMaxMBperSecTwoResolutionsNoScalability: uint16
    wMaxMBperSecThreeResolutionsNoScalability: uint16
    wMaxMBperSecFourResolutionsNoScalability: uint16
    wMaxMBperSecOneResolutionTemporalScalability: uint16
    wMaxMBperSecTwoResolutionsTemporalScalablility: uint16
    wMaxMBperSecThreeResolutionsTemporalScalability: uint16
    wMaxMBperSecFourResolutionsTemporalScalability: uint16
    wMaxMBperSecOneResolutionTemporalQualityScalability: uint16
    wMaxMBperSecTwoResolutionsTemporalQualityScalability: uint16
    wMaxMBperSecThreeResolutionsTemporalQualityScalablity: uint16
    wMaxMBperSecFourResolutionsTemporalQualityScalability: uint16
    wMaxMBperSecOneResolutionTemporalSpatialScalability: uint16
    wMaxMBperSecTwoResolutionsTemporalSpatialScalability: uint16
    wMaxMBperSecThreeResolutionsTemporalSpatialScalablity: uint16
    wMaxMBperSecFourResolutionsTemporalSpatialScalability: uint16
    wMaxMBperSecOneResolutionFullScalability: uint16
    wMaxMBperSecTwoResolutionsFullScalability: uint16
    wMaxMBperSecThreeResolutionsFullScalability: uint16
    wMaxMBperSecFourResolutionsFullScalability: uint16

  KS_DATARANGE_H264_VIDEO {.bycopy.} = object
    DataRange: KSDATAFORMAT
    bFixedSizeSamples: int32
    bTemporalCompression: int32
    StreamDescriptionFlags: uint32
    MemoryAllocationFlags: uint32
    ConfigCaps: KS_VIDEO_STREAM_CONFIG_CAPS
    VideoInfoHeader: KS_H264VIDEOINFO
struct KSDATAFORMAT
{
    _Anonymous_e__Struct Anonymous;
    long Alignment;
}

struct SIZE
{
    int cx;
    int cy;
}

struct KS_VIDEO_STREAM_CONFIG_CAPS
{
    GUID guid;
    uint VideoStandard;
    SIZE InputSize;
    SIZE MinCroppingSize;
    SIZE MaxCroppingSize;
    int CropGranularityX;
    int CropGranularityY;
    int CropAlignX;
    int CropAlignY;
    SIZE MinOutputSize;
    SIZE MaxOutputSize;
    int OutputGranularityX;
    int OutputGranularityY;
    int StretchTapsX;
    int StretchTapsY;
    int ShrinkTapsX;
    int ShrinkTapsY;
    long MinFrameInterval;
    long MaxFrameInterval;
    int MinBitsPerSecond;
    int MaxBitsPerSecond;
}

struct KS_H264VIDEOINFO
{
    ushort wWidth;
    ushort wHeight;
    ushort wSARwidth;
    ushort wSARheight;
    ushort wProfile;
    ubyte bLevelIDC;
    ushort wConstrainedToolset;
    uint bmSupportedUsages;
    ushort bmCapabilities;
    uint bmSVCCapabilities;
    uint bmMVCCapabilities;
    uint dwFrameInterval;
    ubyte bMaxCodecConfigDelay;
    ubyte bmSupportedSliceModes;
    ubyte bmSupportedSyncFrameTypes;
    ubyte bResolutionScaling;
    ubyte bSimulcastSupport;
    ubyte bmSupportedRateControlModes;
    ushort wMaxMBperSecOneResolutionNoScalability;
    ushort wMaxMBperSecTwoResolutionsNoScalability;
    ushort wMaxMBperSecThreeResolutionsNoScalability;
    ushort wMaxMBperSecFourResolutionsNoScalability;
    ushort wMaxMBperSecOneResolutionTemporalScalability;
    ushort wMaxMBperSecTwoResolutionsTemporalScalablility;
    ushort wMaxMBperSecThreeResolutionsTemporalScalability;
    ushort wMaxMBperSecFourResolutionsTemporalScalability;
    ushort wMaxMBperSecOneResolutionTemporalQualityScalability;
    ushort wMaxMBperSecTwoResolutionsTemporalQualityScalability;
    ushort wMaxMBperSecThreeResolutionsTemporalQualityScalablity;
    ushort wMaxMBperSecFourResolutionsTemporalQualityScalability;
    ushort wMaxMBperSecOneResolutionTemporalSpatialScalability;
    ushort wMaxMBperSecTwoResolutionsTemporalSpatialScalability;
    ushort wMaxMBperSecThreeResolutionsTemporalSpatialScalablity;
    ushort wMaxMBperSecFourResolutionsTemporalSpatialScalability;
    ushort wMaxMBperSecOneResolutionFullScalability;
    ushort wMaxMBperSecTwoResolutionsFullScalability;
    ushort wMaxMBperSecThreeResolutionsFullScalability;
    ushort wMaxMBperSecFourResolutionsFullScalability;
}

struct KS_DATARANGE_H264_VIDEO
{
    KSDATAFORMAT DataRange;
    int bFixedSizeSamples;
    int bTemporalCompression;
    uint StreamDescriptionFlags;
    uint MemoryAllocationFlags;
    KS_VIDEO_STREAM_CONFIG_CAPS ConfigCaps;
    KS_H264VIDEOINFO VideoInfoHeader;
}

HSP用 定義

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

; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; KS_DATARANGE_H264_VIDEO サイズ: 296 バイト(x64)
dim st, 74    ; 4byte整数×74(構造体サイズ 296 / 4 切り上げ)
; DataRange : KSDATAFORMAT (+0, 64byte)  varptr(st)+0 を基点に操作(64byte:入れ子/配列)
; bFixedSizeSamples : BOOL (+64, 4byte)  st.16 = 値  /  値 = st.16   (lpoke/lpeek も可)
; bTemporalCompression : BOOL (+68, 4byte)  st.17 = 値  /  値 = st.17   (lpoke/lpeek も可)
; StreamDescriptionFlags : DWORD (+72, 4byte)  st.18 = 値  /  値 = st.18   (lpoke/lpeek も可)
; MemoryAllocationFlags : DWORD (+76, 4byte)  st.19 = 値  /  値 = st.19   (lpoke/lpeek も可)
; ConfigCaps : KS_VIDEO_STREAM_CONFIG_CAPS (+80, 128byte)  varptr(st)+80 を基点に操作(128byte:入れ子/配列)
; VideoInfoHeader : KS_H264VIDEOINFO (+208, 84byte)  varptr(st)+208 を基点に操作(84byte:入れ子/配列)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。
; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
; ※GUID・入れ子構造体はデフォルト型でないため、依存する #defstruct を先に定義(下記に同梱)。
#defstruct global GUID, pack=1
    #field int Data1
    #field short Data2
    #field short Data3
    #field byte Data4 8
#endstruct

#defstruct global SIZE
    #field int cx
    #field int cy
#endstruct

#defstruct global KS_VIDEO_STREAM_CONFIG_CAPS
    #field GUID guid
    #field int VideoStandard
    #field SIZE InputSize
    #field SIZE MinCroppingSize
    #field SIZE MaxCroppingSize
    #field int CropGranularityX
    #field int CropGranularityY
    #field int CropAlignX
    #field int CropAlignY
    #field SIZE MinOutputSize
    #field SIZE MaxOutputSize
    #field int OutputGranularityX
    #field int OutputGranularityY
    #field int StretchTapsX
    #field int StretchTapsY
    #field int ShrinkTapsX
    #field int ShrinkTapsY
    #field int64 MinFrameInterval
    #field int64 MaxFrameInterval
    #field int MinBitsPerSecond
    #field int MaxBitsPerSecond
#endstruct

#defstruct global KS_H264VIDEOINFO
    #field short wWidth
    #field short wHeight
    #field short wSARwidth
    #field short wSARheight
    #field short wProfile
    #field byte bLevelIDC
    #field short wConstrainedToolset
    #field int bmSupportedUsages
    #field short bmCapabilities
    #field int bmSVCCapabilities
    #field int bmMVCCapabilities
    #field int dwFrameInterval
    #field byte bMaxCodecConfigDelay
    #field byte bmSupportedSliceModes
    #field byte bmSupportedSyncFrameTypes
    #field byte bResolutionScaling
    #field byte bSimulcastSupport
    #field byte bmSupportedRateControlModes
    #field short wMaxMBperSecOneResolutionNoScalability
    #field short wMaxMBperSecTwoResolutionsNoScalability
    #field short wMaxMBperSecThreeResolutionsNoScalability
    #field short wMaxMBperSecFourResolutionsNoScalability
    #field short wMaxMBperSecOneResolutionTemporalScalability
    #field short wMaxMBperSecTwoResolutionsTemporalScalablility
    #field short wMaxMBperSecThreeResolutionsTemporalScalability
    #field short wMaxMBperSecFourResolutionsTemporalScalability
    #field short wMaxMBperSecOneResolutionTemporalQualityScalability
    #field short wMaxMBperSecTwoResolutionsTemporalQualityScalability
    #field short wMaxMBperSecThreeResolutionsTemporalQualityScalablity
    #field short wMaxMBperSecFourResolutionsTemporalQualityScalability
    #field short wMaxMBperSecOneResolutionTemporalSpatialScalability
    #field short wMaxMBperSecTwoResolutionsTemporalSpatialScalability
    #field short wMaxMBperSecThreeResolutionsTemporalSpatialScalablity
    #field short wMaxMBperSecFourResolutionsTemporalSpatialScalability
    #field short wMaxMBperSecOneResolutionFullScalability
    #field short wMaxMBperSecTwoResolutionsFullScalability
    #field short wMaxMBperSecThreeResolutionsFullScalability
    #field short wMaxMBperSecFourResolutionsFullScalability
#endstruct

#defstruct global KS_DATARANGE_H264_VIDEO
    #field byte DataRange 64
    #field bool bFixedSizeSamples
    #field bool bTemporalCompression
    #field int StreamDescriptionFlags
    #field int MemoryAllocationFlags
    #field KS_VIDEO_STREAM_CONFIG_CAPS ConfigCaps
    #field KS_H264VIDEOINFO VideoInfoHeader
#endstruct

stdim st, KS_DATARANGE_H264_VIDEO        ; NSTRUCT 変数を確保
st->bFixedSizeSamples = 100
mes "bFixedSizeSamples=" + st->bFixedSizeSamples
; ※union フィールドは byte 列で確保(NSTRUCT は union 非対応)。必要に応じ手動でアクセス。