ホーム › Media.MediaFoundation › MFCreateMuxStreamAttributes
MFCreateMuxStreamAttributes
関数複数の属性を多重化したストリーム属性を生成する。
シグネチャ
// MFPlat.dll
#include <windows.h>
HRESULT MFCreateMuxStreamAttributes(
IMFCollection* pAttributesToMux,
IMFAttributes** ppMuxAttribs
);パラメーター
| 名前 | 型 | 方向 |
|---|---|---|
| pAttributesToMux | IMFCollection* | in |
| ppMuxAttribs | IMFAttributes** | out |
戻り値の型: HRESULT
各言語での呼び出し定義
// MFPlat.dll
#include <windows.h>
HRESULT MFCreateMuxStreamAttributes(
IMFCollection* pAttributesToMux,
IMFAttributes** ppMuxAttribs
);[DllImport("MFPlat.dll", ExactSpelling = true)]
static extern int MFCreateMuxStreamAttributes(
IntPtr pAttributesToMux, // IMFCollection*
IntPtr ppMuxAttribs // IMFAttributes** out
);<DllImport("MFPlat.dll", ExactSpelling:=True)>
Public Shared Function MFCreateMuxStreamAttributes(
pAttributesToMux As IntPtr, ' IMFCollection*
ppMuxAttribs As IntPtr ' IMFAttributes** out
) As Integer
End Function' pAttributesToMux : IMFCollection*
' ppMuxAttribs : IMFAttributes** out
Declare PtrSafe Function MFCreateMuxStreamAttributes Lib "mfplat" ( _
ByVal pAttributesToMux As LongPtr, _
ByVal ppMuxAttribs As LongPtr) As Long
' VBA7前提(PtrSafe)。32bit Office では LongPtr→Long。Integer=16bit / Long=32bit / LongLong=64bit。import ctypes
from ctypes import wintypes
MFCreateMuxStreamAttributes = ctypes.windll.mfplat.MFCreateMuxStreamAttributes
MFCreateMuxStreamAttributes.restype = ctypes.c_int
MFCreateMuxStreamAttributes.argtypes = [
ctypes.c_void_p, # pAttributesToMux : IMFCollection*
ctypes.c_void_p, # ppMuxAttribs : IMFAttributes** out
]require 'fiddle'
require 'fiddle/import'
lib = Fiddle.dlopen('MFPlat.dll')
MFCreateMuxStreamAttributes = Fiddle::Function.new(
lib['MFCreateMuxStreamAttributes'],
[
Fiddle::TYPE_VOIDP, # pAttributesToMux : IMFCollection*
Fiddle::TYPE_VOIDP, # ppMuxAttribs : IMFAttributes** out
],
Fiddle::TYPE_INT)#[link(name = "mfplat")]
extern "system" {
fn MFCreateMuxStreamAttributes(
pAttributesToMux: *mut core::ffi::c_void, // IMFCollection*
ppMuxAttribs: *mut *mut core::ffi::c_void // IMFAttributes** out
) -> i32;
}
// crates: windows-sys provides ready-made bindings for this API.$sig = @"
[DllImport("MFPlat.dll")]
public static extern int MFCreateMuxStreamAttributes(IntPtr pAttributesToMux, IntPtr ppMuxAttribs);
"@
$api = Add-Type -MemberDefinition $sig -Name 'MFPlat_MFCreateMuxStreamAttributes' -Namespace Win32 -PassThru
# $api::MFCreateMuxStreamAttributes(pAttributesToMux, ppMuxAttribs)#uselib "MFPlat.dll"
#func global MFCreateMuxStreamAttributes "MFCreateMuxStreamAttributes" sptr, sptr
; MFCreateMuxStreamAttributes pAttributesToMux, ppMuxAttribs ; 戻り値は stat
; pAttributesToMux : IMFCollection* -> "sptr"
; ppMuxAttribs : IMFAttributes** out -> "sptr"
; ※HSP3.7は #func のため戻り値はシステム変数 stat に格納されます。#uselib "MFPlat.dll"
#cfunc global MFCreateMuxStreamAttributes "MFCreateMuxStreamAttributes" sptr, sptr
; res = MFCreateMuxStreamAttributes(pAttributesToMux, ppMuxAttribs)
; pAttributesToMux : IMFCollection* -> "sptr"
; ppMuxAttribs : IMFAttributes** out -> "sptr"; HRESULT MFCreateMuxStreamAttributes(IMFCollection* pAttributesToMux, IMFAttributes** ppMuxAttribs)
#uselib "MFPlat.dll"
#cfunc global MFCreateMuxStreamAttributes "MFCreateMuxStreamAttributes" intptr, intptr
; res = MFCreateMuxStreamAttributes(pAttributesToMux, ppMuxAttribs)
; pAttributesToMux : IMFCollection* -> "intptr"
; ppMuxAttribs : IMFAttributes** out -> "intptr"import (
"golang.org/x/sys/windows"
"unsafe"
)
var (
mfplat = windows.NewLazySystemDLL("MFPlat.dll")
procMFCreateMuxStreamAttributes = mfplat.NewProc("MFCreateMuxStreamAttributes")
)
// pAttributesToMux (IMFCollection*), ppMuxAttribs (IMFAttributes** out)
r1, _, err := procMFCreateMuxStreamAttributes.Call(
uintptr(pAttributesToMux),
uintptr(ppMuxAttribs),
)
_ = err // syscall.Errno (valid when the call sets last-error)
_ = r1 // HRESULTfunction MFCreateMuxStreamAttributes(
pAttributesToMux: Pointer; // IMFCollection*
ppMuxAttribs: Pointer // IMFAttributes** out
): Integer; stdcall;
external 'MFPlat.dll' name 'MFCreateMuxStreamAttributes';result := DllCall("MFPlat\MFCreateMuxStreamAttributes"
, "Ptr", pAttributesToMux ; IMFCollection*
, "Ptr", ppMuxAttribs ; IMFAttributes** out
, "Int") ; return: HRESULT●MFCreateMuxStreamAttributes(pAttributesToMux, ppMuxAttribs) = DLL("MFPlat.dll", "int MFCreateMuxStreamAttributes(void*, void*)")
# 呼び出し: MFCreateMuxStreamAttributes(pAttributesToMux, ppMuxAttribs)
# pAttributesToMux : IMFCollection* -> "void*"
# ppMuxAttribs : IMFAttributes** out -> "void*"
# なでしこ1は32bit・ANSI(Shift_JIS)。文字列=char*(ANSI)、ポインタ/ハンドル=void*(4byte)。