ホーム › Media.DirectShow.Tv › SBE2_STREAM_DESC
SBE2_STREAM_DESC
構造体サイズ=各フィールドのバイト数(x64/x86 で異なる場合は x64/x86 と併記)。x64/x86 列=フィールドのバイトオフセット(HSPで dupptr / lpoke / wpoke 等に使用)。
フィールド
| フィールド | 型 | サイズ | x64 | x86 | 説明 |
|---|---|---|---|---|---|
| Version | DWORD | 4 | +0 | +0 | ストリームのバージョン番号です。現在、次の値が定義されています。 SBE2_STREAM_DESC_VERSION |
| StreamId | DWORD | 4 | +4 | +4 | ストリームの識別子です。 |
| Default | DWORD | 4 | +8 | +8 | 現在のメディア タイプにおいて、そのストリームが既定かどうかを指定します。値が 0 以外の場合、そのストリームは既定です。値が 0 の場合、そのストリームは既定ではありません。 |
| Reserved | DWORD | 4 | +12 | +12 | 予約済みです。 |
公式ドキュメント
ストリーム バッファー エンジンによって生成されるストリームを記述します。
出典・ライセンス: 上記「公式ドキュメント」の内容は Microsoft の Win32 API ドキュメント(MicrosoftDocs/sdk-api)を日本語に翻訳・改変したものです。© Microsoft Corporation. CC BY 4.0 で提供。
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
Microsoft 公式リファレンス: 英語 (en-us) · 日本語 (ja-jp) · 原文ソース (GitHub)
各言語での定義
#include <windows.h>
// SBE2_STREAM_DESC (x64 16 / x86 16 バイト)
typedef struct SBE2_STREAM_DESC {
DWORD Version;
DWORD StreamId;
DWORD Default;
DWORD Reserved;
} SBE2_STREAM_DESC;using System;
using System.Runtime.InteropServices;
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
public struct SBE2_STREAM_DESC
{
public uint Version;
public uint StreamId;
public uint Default;
public uint Reserved;
}Imports System.Runtime.InteropServices
<StructLayout(LayoutKind.Sequential, CharSet:=CharSet.Unicode)>
Public Structure SBE2_STREAM_DESC
Public Version As UInteger
Public StreamId As UInteger
Public Default As UInteger
Public Reserved As UInteger
End Structureimport ctypes
from ctypes import wintypes
class SBE2_STREAM_DESC(ctypes.Structure):
_fields_ = [
("Version", wintypes.DWORD),
("StreamId", wintypes.DWORD),
("Default", wintypes.DWORD),
("Reserved", wintypes.DWORD),
]#[repr(C)]
pub struct SBE2_STREAM_DESC {
pub Version: u32,
pub StreamId: u32,
pub Default: u32,
pub Reserved: u32,
}import "golang.org/x/sys/windows"
type SBE2_STREAM_DESC struct {
Version uint32
StreamId uint32
Default uint32
Reserved uint32
}type
SBE2_STREAM_DESC = record
Version: DWORD;
StreamId: DWORD;
Default: DWORD;
Reserved: DWORD;
end;const SBE2_STREAM_DESC = extern struct {
Version: u32,
StreamId: u32,
Default: u32,
Reserved: u32,
};type
SBE2_STREAM_DESC {.bycopy.} = object
Version: uint32
StreamId: uint32
Default: uint32
Reserved: uint32struct SBE2_STREAM_DESC
{
uint Version;
uint StreamId;
uint Default;
uint Reserved;
}HSP用 定義
HSP3.7/3.8 は構造体機能が無いため4byte整数配列(dim)+peek/poke で操作(32/64bitでサイズ・位置が異なる場合はタブで分割)。IronHSP は NSTRUCT(#defstruct/stdim/->)で32/64bit共通。
; HSP3.7/3.8 は構造体機能が無いため、4byte整数の配列変数で操作します。(x64 レイアウト)
; SBE2_STREAM_DESC サイズ: 16 バイト(x64)
dim st, 4 ; 4byte整数×4(構造体サイズ 16 / 4 切り上げ)
; Version : DWORD (+0, 4byte) st.0 = 値 / 値 = st.0 (lpoke/lpeek も可)
; StreamId : DWORD (+4, 4byte) st.1 = 値 / 値 = st.1 (lpoke/lpeek も可)
; Default : DWORD (+8, 4byte) st.2 = 値 / 値 = st.2 (lpoke/lpeek も可)
; Reserved : DWORD (+12, 4byte) st.3 = 値 / 値 = st.3 (lpoke/lpeek も可)
; ※4byte境界の整数は添字 st.N(N=オフセット/4)で読み書き可。それ以外は peek/poke 系を使用。; IronHSP は NSTRUCT(構造体)をサポート。32bit/64bit どちらでも同じコードで動作します。
#defstruct global SBE2_STREAM_DESC
#field int Version
#field int StreamId
#field int Default
#field int Reserved
#endstruct
stdim st, SBE2_STREAM_DESC ; NSTRUCT 変数を確保
st->Version = 100
mes "Version=" + st->Version