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