View Single Post
Old 11th March 2003, 08:32   #11  |  Link
sh0dan
Retired AviSynth Dev ;)
 
sh0dan's Avatar
 
Join Date: Nov 2001
Location: Dark Side of the Moon
Posts: 3,480
Sorry - a but quick there - env was missing:
Code:
public:
	SimpleSample(PClip _child, IScriptEnvironment* env);

	PVideoFrame __stdcall GetFrame(int n, IScriptEnvironment* env);
};


SimpleSample::SimpleSample(PClip _child, IScriptEnvironment* env) : GenericVideoFilter(_child) {
	if (vi.IsPlanar()) // is input not planar
		env->ThrowError("SimpleSample: input to filter must be in YUY2 or RGB");
}
and
Code:
AVSValue __cdecl Create_SimpleSample(AVSValue args, void* user_data, IScriptEnvironment* env) {
    return new SimpleSample(args[0].AsClip(),env);
}
You know when it is a contructor, because it is called the same as the class you are modifying, and it does return any values (not even void).
__________________
Regards, sh0dan // VoxPod
sh0dan is offline   Reply With Quote