protected override DirectShow.Binding.IGraph Open(Uri.Locator name) { DirectShow.Binding.IGraph result = null; if (name.Scheme == "directshow+capture" && name.Scheme.Tail.NotNull() && name.Authority.NotNull() && name.Query["video"].NotEmpty()) { name = name.Copy(); name.Scheme = name.Scheme.Tail; DirectShow.Binding.Graph temporary = new DirectShow.Binding.Graph(); bool built = temporary.Open(new DirectShow.Binding.Filters.Capture.All(name.Authority, new DirectShow.Binding.Filters.SampleGrabber.Yuyv(new DirectShow.Binding.Filters.NullRenderer()) { FuzzyMatch = this.Fuzzy })); if (built) { temporary.Play(); System.Threading.Thread.Sleep(500); } temporary.Close(); temporary = null; result = new DirectShow.Binding.Graph(this.Application); if (this.Open(result, name)) result.Play(); else { result.Close(); result = null; } } return result; }
protected override DirectShow.Binding.IGraph Open(Uri.Locator name) { DirectShow.Binding.IGraph result = null; if (name.Scheme == "directshow+capture" && name.Scheme.Tail.NotNull() && name.Authority.NotNull() && name.Query["video"].NotEmpty()) { name = name.Copy(); name.Scheme = name.Scheme.Tail; DirectShow.Binding.Graph temporary = new DirectShow.Binding.Graph(); bool built = temporary.Open(new DirectShow.Binding.Filters.Capture.All(name.Authority, new DirectShow.Binding.Filters.SampleGrabber.Yuyv(new DirectShow.Binding.Filters.NullRenderer()) { FuzzyMatch = this.Fuzzy })); if (built) { temporary.Play(); System.Threading.Thread.Sleep(500); } temporary.Close(); temporary = null; result = new DirectShow.Binding.Graph(this.Application); if (this.Open(result, name)) { result.Play(); } else { result.Close(); result = null; } } return(result); }
protected override DirectShow.Binding.IGraph Open(Uri.Locator locator) { DirectShow.Binding.IGraph result = null; if (locator.Scheme == "directshow+capture" && locator.Authority.NotNull()) { result = new DirectShow.Binding.Graph(); bool built = result.Open(new DirectShow.Binding.Filters.Capture.All(locator.Authority, new DirectShow.Binding.Filters.SampleGrabber.Yuyv(new DirectShow.Binding.Filters.NullRenderer()) { FuzzyMatch = this.Fuzzy })); if (built) result.Play(); else { result.Close(); result = null; } } return result; }
protected override DirectShow.Binding.IGraph Open(Uri.Locator name) { Graph.Live result = null; if (name.Scheme == "directshow+capture" && name.Authority.NotNull() && name.Query.NotNull() && name.Query["video"].NotNull()) { DirectShow.Binding.Graph temporary = new DirectShow.Binding.Graph(); bool built = temporary.Open(new DirectShow.Binding.Filters.Capture.All(name.Authority, new DirectShow.Binding.Filters.SampleGrabber.Yuyv(new DirectShow.Binding.Filters.NullRenderer()) { FuzzyMatch = this.Fuzzy })); if (built) { temporary.Play(); System.Threading.Thread.Sleep(500); } temporary.Close(); temporary = null; string filename = name.Query["video"]; result = new Graph.Live(); result.Recorder = new DirectShow.Binding.Graph(); if (result.Recorder.Open(new DirectShow.Binding.Filters.Capture.All(name.Authority, new DirectShow.Binding.Filters.SampleGrabber.Yuyv(new Filters.Encoder.Mpeg(new Filters.Multiplexer.Mpeg(new Filters.IO.Dump(filename))))))) { result.Recorder.Play(); System.Threading.Thread.Sleep(2000); built = result.Open(new Filters.IO.Reader(filename, new Filters.Demultiplexer.Mpeg(new Filters.Decoder.Mpeg(new DirectShow.Binding.Filters.SampleGrabber.All())))); if (built) { System.Threading.Thread.Sleep(1000); result.Play(); } else { result.Close(); result = null; } } else { result.Close(); result = null; } } return(result as DirectShow.Binding.IGraph); }
protected override DirectShow.Binding.IGraph Open(Uri.Locator name) { Graph.Live result = null; if (name.Scheme == "directshow+capture" && name.Authority.NotNull() && name.Query.NotNull() && name.Query["video"].NotNull()) { DirectShow.Binding.Graph temporary = new DirectShow.Binding.Graph(); bool built = temporary.Open(new DirectShow.Binding.Filters.Capture.All(name.Authority, new DirectShow.Binding.Filters.SampleGrabber.Yuyv(new DirectShow.Binding.Filters.NullRenderer()) { FuzzyMatch = this.Fuzzy })); if (built) { temporary.Play(); System.Threading.Thread.Sleep(500); } temporary.Close(); temporary = null; string filename = name.Query["video"]; result = new Graph.Live(); result.Recorder = new DirectShow.Binding.Graph(); if (result.Recorder.Open(new DirectShow.Binding.Filters.Capture.All(name.Authority, new DirectShow.Binding.Filters.SampleGrabber.Yuyv(new Filters.Encoder.Mpeg(new Filters.Multiplexer.Mpeg(new Filters.IO.Dump(filename))))))) { result.Recorder.Play(); System.Threading.Thread.Sleep(2000); built = result.Open(new Filters.IO.Reader(filename, new Filters.Demultiplexer.Mpeg(new Filters.Decoder.Mpeg(new DirectShow.Binding.Filters.SampleGrabber.All())))); if (built) { System.Threading.Thread.Sleep(1000); result.Play(); } else { result.Close(); result = null; } } else { result.Close(); result = null; } } return result as DirectShow.Binding.IGraph; }
protected override DirectShow.Binding.IGraph Open(Uri.Locator locator) { DirectShow.Binding.IGraph result = null; if (locator.Scheme == "directshow+capture" && locator.Authority.NotNull()) { result = new DirectShow.Binding.Graph(); bool built = result.Open(new DirectShow.Binding.Filters.Capture.All(locator.Authority, new DirectShow.Binding.Filters.SampleGrabber.Yuyv(new DirectShow.Binding.Filters.NullRenderer()) { FuzzyMatch = this.Fuzzy })); if (built) { result.Play(); } else { result.Close(); result = null; } } return(result); }