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