ホーム › Media.DirectShow › STREAM_ID_MAP
STREAM_ID_MAP
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| stream_id | DWORD | 4 | +0 | +0 | MPEG2ストリームの識別子を示す。 |
| dwMediaSampleContent | DWORD | 4 | +4 | +4 | メディアサンプルの内容種別を示す。 |
| ulSubstreamFilterValue | DWORD | 4 | +8 | +8 | サブストリームのフィルター値を示す。 |
| iDataOffset | INT | 4 | +12 | +12 | データ開始位置のオフセットをバイト単位で示す。 |
各言語での定義
#include <windows.h>
// STREAM_ID_MAP (x64 16 / x86 16 バイト)
typedef struct STREAM_ID_MAP {
DWORD stream_id;
DWORD dwMediaSampleContent;
DWORD ulSubstreamFilterValue;
INT iDataOffset;
} STREAM_ID_MAP;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct STREAM_ID_MAP
{
public uint stream_id;
public uint dwMediaSampleContent;
public uint ulSubstreamFilterValue;
public int iDataOffset;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure STREAM_ID_MAP
Public stream_id As UInteger
Public dwMediaSampleContent As UInteger
Public ulSubstreamFilterValue As UInteger
Public iDataOffset As Integer
End Structureimport ctypes
from ctypes import wintypes
class STREAM_ID_MAP(ctypes.Structure):
_fields_ = [
("stream_id", wintypes.DWORD),
("dwMediaSampleContent", wintypes.DWORD),
("ulSubstreamFilterValue", wintypes.DWORD),
("iDataOffset", ctypes.c_int),
]#[repr(C)]
pub struct STREAM_ID_MAP {
pub stream_id: u32,
pub dwMediaSampleContent: u32,
pub ulSubstreamFilterValue: u32,
pub iDataOffset: i32,
}import "golang.org/x/sys/windows"
type STREAM_ID_MAP struct {
stream_id uint32
dwMediaSampleContent uint32
ulSubstreamFilterValue uint32
iDataOffset int32
}type
STREAM_ID_MAP = record
stream_id: DWORD;
dwMediaSampleContent: DWORD;
ulSubstreamFilterValue: DWORD;
iDataOffset: Integer;
end;const STREAM_ID_MAP = extern struct {
stream_id: u32,
dwMediaSampleContent: u32,
ulSubstreamFilterValue: u32,
iDataOffset: i32,
};type
STREAM_ID_MAP {.bycopy.} = object
stream_id: uint32
dwMediaSampleContent: uint32
ulSubstreamFilterValue: uint32
iDataOffset: int32struct STREAM_ID_MAP
{
uint stream_id;
uint dwMediaSampleContent;
uint ulSubstreamFilterValue;
int iDataOffset;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; STREAM_ID_MAP サイズ: 16 バイト(x64)
dim st, 4 ; 4byte整数×4(構造体サイズ 16 / 4 切り上げ)
; stream_id : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; dwMediaSampleContent : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; ulSubstreamFilterValue : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; iDataOffset : INT (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global STREAM_ID_MAP
#field int stream_id
#field int dwMediaSampleContent
#field int ulSubstreamFilterValue
#field int iDataOffset
#endstruct
stdim st, STREAM_ID_MAP ; NSTRUCT 変数を確保
st->stream_id = 100
mes "stream_id=" + st->stream_id