public override DirectShowLib.IBaseFilter Create() { DirectShowLib.ISampleGrabber result = new DirectShowLib.SampleGrabber() as DirectShowLib.ISampleGrabber; Exception.GraphError.Check(result.SetMediaType(new DirectShowLib.AMMediaType() { majorType = DirectShowLib.MediaType.Video, formatType = DirectShowLib.FormatType.VideoInfo, subType = this.SubType })); Exception.GraphError.Check(result.SetBufferSamples(true)); Exception.GraphError.Check(result.SetCallback(new Callback(this), 1)); return (this.grabber = result) as DirectShowLib.IBaseFilter; }
public override DirectShowLib.IBaseFilter Create() { DirectShowLib.ISampleGrabber result = new DirectShowLib.SampleGrabber() as DirectShowLib.ISampleGrabber; Exception.GraphError.Check(result.SetMediaType(new DirectShowLib.AMMediaType() { majorType = DirectShowLib.MediaType.Video, formatType = DirectShowLib.FormatType.VideoInfo, subType = this.SubType })); Exception.GraphError.Check(result.SetBufferSamples(true)); Exception.GraphError.Check(result.SetCallback(new Callback(this), 1)); return((this.grabber = result) as DirectShowLib.IBaseFilter); }