media foundationのタグがつけられたコード一覧

HSP 【HSP3】Media Foundationを使用しての動画再生(修正)

#define IID_IMFPMediaPlayer "{A714590A-58AF-430a-85BF-44F5EC838D85}"
#usecom IMFPMediaPlayer IID_IMFPMediaPlayer "{}"
#comfunc IMFPMediaPlayer_Play 3
#comfunc IMFPMediaPlayer_Pause 4
#comfunc IMFPMediaPlayer_Stop 5
#comfunc IMFPMediaPlayer_FrameStep 6
#comfunc IMFPMediaPlayer_SetRate 10 float
#comfunc IMFPMediaPlayer_Shutdown 38
newcom iMFPlayer,IMFPMediaPlayer
#uselib "Mfplay"
#func MFPCreateMediaPlayer "MFPCreateMediaPlayer" wstr,int,int,int,int,var
#uselib "Mfplat"
#func MFStartup "MFStartup" int,int
#func MFShutdown "MFShutdown"
#define MFSTARTUP_NOSOCKET 0x1
#define MFSTARTUP_LITE (MFSTARTUP_NOSOCKET)
#define MFSTARTUP_FULL 0

	screen 0,800,800
	title "Media Foundation (1.3倍速再生サンプル)"
	LOADED=0
	onexit *lEnd
	objsize 100,24
	pos ginfo_winx-500,0
	button gosub "Load",*lFileLoad
	pos ginfo_winx-400,0
	button gosub "Play",*lPlay
	pos ginfo_winx-300,0
	button gosub "Pause",*lPause
	pos ginfo_winx-200,0
	button gosub "Stop",*lStop
	pos ginfo_winx-100,0
	button gosub "Step",*lStep
	gosub *lFileLoad
	stop
*lFileLoad
	dialog "mp4;*.avi;*.mpg;*.mpeg",16
	if stat=0{
		if LOADED{
			return
		}else{
			stop
		}
	}
	file=refstr
	gosub *lLoad
	IMFPMediaPlayer_SetRate iMFPlayer,1.3	;1.3倍速再生
	return
*lLoad
	if LOADED{
		gosub *lRelease
	}
	MFStartup
	MFPCreateMediaPlayer file, 1,0,0,hwnd,iMFPlayer
	;                         ↑0にすると自動再生しない
	LOADED=1
	return
*lRelease
	gosub *lStop
	IMFPMediaPlayer_Shutdown iMFPlayer
	MFShutdown
	return
*lPlay
	if LOADED : IMFPMediaPlayer_Play iMFPlayer
	return
*lPause
	if LOADED : IMFPMediaPlayer_Pause iMFPlayer
	return
*lStop
	if LOADED : IMFPMediaPlayer_Stop iMFPlayer
	return
*lStep
	if LOADED : IMFPMediaPlayer_FrameStep iMFPlayer
	return
*lEnd
	if LOADED{
		gosub *lRelease
	}
	mes "MFShutdown:"+stat
	end

よく投稿されているコード

タグ

最近投稿されたコード