sample19.hsp

sample\hspdsp\sample19.hsp » Plain Format

// Sample19.hsp 接続中のフィルターのプロパティ表示

#include "hspdsp.as"

	title "接続中のフィルターのプロパティ表示"
	
	dsp_Init
	onexit *ex
	
	dialog "*",16
	if stat=0:end
	fname=refstr

	screen 2,320,66:gsel 2,2
	objsize 300,20
	mes "使用するレンダラーを指定してください。"
	combox f,300,"Default Renderer\nVideo Renderer\nVideo Mixing Renderer 7\nVideo Mixing Renderer 9\nEnhanced Video Renderer\nNo Renderer\nNull Renderer"
	button "OK",*r
	
	stop
	
*r
	gsel 2,-1:gsel 0,0
	
	dsp_open fname,f,hwnd,0,0
	dsp_play hwnd,320,240,320,240

	//多めにバッファーを確保
	sdim list,4096
	//この命令はdsp_playをしてからでないとつかえません。
	dsp_StreamFilterList list
	
	mes "☆ フィルターを選んでね ☆"
	objsize 240,20:combox id,100,list
	objsize 100,20:button "プロパティ",*prop

	// GOM Player っぽく表示
	notesel list:l="*** DIRECTSHOW FILTER LIST ***\n"
	repeat notemax
		noteget tmp,cnt
		l+=""+cnt+". "+tmp+"\n"
	loop
	mes
	mesbox l,320,180,0

	stop

*prop
	notesel list:tmp=""
	noteget tmp,id
	dsp_FilterProp hwnd,tmp
	if stat=-1:dialog "フィルターにプロパティがありません。"
	stop
	
*ex
	dsp_Stop
	dsp_Close	
	dsp_Exit
	end