bool Open(DirectShow.Binding.IGraph graph, string file) { return(graph.Open(new DirectShow.Binding.Filters.File.Source(file, new DirectShow.Binding.Filters.Demultiplexer.AviSplitter(new Filters.Decoder.All(new DirectShow.Binding.Filters.SampleGrabber.All())))) || graph.Open(new DirectShow.Binding.Filters.File.Source(file, new DirectShow.Binding.Filters.Demultiplexer.Mpeg2(new Filters.Decoder.All(new DirectShow.Binding.Filters.SampleGrabber.All())))) || graph.Open(new DirectShow.Binding.Filters.File.Source(file, new Filters.Demultiplexer.Mpeg(new Filters.Decoder.All(new DirectShow.Binding.Filters.SampleGrabber.All())))) || graph.Open(new DirectShow.Binding.Filters.File.Source(file, new Filters.Demultiplexer.Mpeg4(new Filters.Decoder.All(new DirectShow.Binding.Filters.SampleGrabber.All())))) || graph.Open(new DirectShow.Binding.Filters.File.Source(file, new Filters.Decoder.All(new DirectShow.Binding.Filters.SampleGrabber.All())))); }
protected override DirectShow.Binding.IGraph Open(Uri.Locator name) { DirectShow.Binding.IGraph result = null; if (name.Scheme == "directshow+capture" && name.Authority.NotNull() && name.Query["video"].IsEmpty()) { 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(); built = result.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) { result.Play(); System.Threading.Thread.Sleep(500); result.Close(); built = result.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) { 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.Path.NotNull()) { string file = name.PlatformPath; string extension = System.IO.Path.GetExtension(file).ToLower().TrimStart('.'); if (name.Scheme == "file" && file.NotEmpty() && this.SupportedExtensions.Exists(v => v == extension) && System.IO.File.Exists(file)) { result = new Binding.Graph(); if (!this.Open(result, file)) { result.Close(); result = null; } } } return(result); }
bool Open(DirectShow.Binding.IGraph graph, string file) { return(graph.Open(new Filters.IO.Source(file, new Filters.Decoder.Mpeg4(new Filters.Utils.Deinterlace(new DirectShow.Binding.Filters.SampleGrabber.All()))))); // || //graph.Open(new Filters.IO.Source(file, new Filters.Demultiplexer.Mpeg4(new Filters.Decoder.Mpeg4(new DirectShow.Binding.Filters.SampleGrabber.All())))); }
protected abstract bool Open(DirectShow.Binding.IGraph graph, string file);