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