#define CLSID_FilterGraph "{E436EBB3-524F-11CE-9F53-0020AF0BA770}"
#define IID_IGraphBuilder "{56A868A9-0AD4-11CE-B03A-0020AF0BA770}"
#usecom IGraphBuilder IID_IGraphBuilder CLSID_FilterGraph
#comfunc AddFilter 3 comobj,wstr
#comfunc EnumFilters 5 var
#comfunc AddSourceFilter 14 wstr,wstr,var
#define CLSID_CaptureGraphBuilder2 "{BF87B6E1-8C27-11D0-B3F0-00AA003761C5}"
#define IID_ICaptureGraphBuilder2 "{93E5A4E0-2D50-11D2-ABFA-00A0C9C6E38D}"
#usecom ICaptureGraphBuilder2 IID_ICaptureGraphBuilder2 CLSID_CaptureGraphBuilder2
#comfunc SetFiltergraph 3 comobj
#comfunc RenderStream1 7 nullptr,nullptr,comobj,nullptr,comobj
#comfunc RenderStream2 7 nullptr,var,comobj,nullptr,comobj
#comfunc RenderStream3 7 nullptr,var,comobj,nullptr,nullptr
;-------------------------------------------------------------------------------
;#define CLSID_ "{70E102B0-5556-11CE-97C0-00AA0055595A}";VideoRenderer
#define CLSID_ "{B87BEB7B-8D29-423F-AE4D-6582C10175AC}";VideoMixingRenderer7
;#define CLSID_ "{51B4ABF3-748F-4E3B-A276-C828330E926A}";VideoMixingRenderer9
;#define CLSID_ "{FA10746C-9B63-4B6C-BC49-FC300EA5F256}";EnhancedVideoRenderer
;-------------------------------------------------------------------------------
#usecom IBaseFilter "{56A86895-0AD4-11CE-B03A-0020AF0BA770}" CLSID_
#comfunc GetClassID 3 var
#usecom IEnumFilters "{56A86893-0AD4-11CE-B03A-0020AF0BA770}"
#comfunc EnumFilters_Next 3 int,var,var
#usecom IVideoWindow "{56A868B4-0AD4-11CE-B03A-0020AF0BA770}"
#comfunc put_FullScreenMode 36 int
#usecom IMediaControl "{56A868B1-0AD4-11CE-B03A-0020AF0BA770}"
#comfunc Play 7
#module
#defcfunc ClassID var p1
ID=strf("{%08X-%04X-%04X-",lpeek(p1),wpeek(p1,4),wpeek(p1,6))
ID+strf("%02X%02X-%02X%02X",peek(p1,8),peek(p1,9),peek(p1,10),peek(p1,11))
ID+strf("%02X%02X%02X%02X}",peek(p1,12),peek(p1,13),peek(p1,14),peek(p1,15))
return ID
#global
dialog "wmv",16
if stat=0 : end
newcom cFG,IGraphBuilder
newcom cSF
AddSourceFilter cFG,refstr,getpath(refstr,8),cSF
newcom cCGB2,ICaptureGraphBuilder2
SetFiltergraph cCGB2,cFG
newcom cVR,IBaseFilter
AddFilter cFG,cVR,"Video Renderer"
i=$73646976,$00100000,$AA000080,$719B3800
RenderStream1 cCGB2,cSF,cVR
if stat : RenderStream2 cCGB2,i,cSF,cVR
i=$73647561
RenderStream3 cCGB2,i,cSF
newcom cEF
EnumFilters cFG,cEF
dimtype cBF,6,10
EnumFilters_Next cEF,10,cBF,i
repeat i
GetClassID cBF(cnt),i
mes ClassID(i)
loop
;put_FullScreenMode cFG,-1
Play cFG
stop