bool Open(DirectShow.Binding.IGraph graph, Uri.Locator name)
 {
     return(graph.Open(new Filters.Net.SourcePlus(name, new Filters.Demultiplexer.MpegPush(new Filters.Decoder.All(new DirectShow.Binding.Filters.SampleGrabber.All())
     {
         Output = -1
     })
     {
         WaitForOutput = new TimeSpan(0, 0, 0, 1), Latency = this.Latency
     })
     {
         Timeout = this.Timeout
     }) ||
            graph.Open(new Filters.Net.RtspSource(name, new Filters.Decoder.SD.Avc(new DirectShow.Binding.Filters.SampleGrabber.All()))));
 }
Example #2
0
        bool Open(DirectShow.Binding.IGraph graph, Uri.Locator name)
        {
            bool   result   = false;
            string filename = name.Query["video"];

            name.Query.Remove("video");
            if (result = filename.NotEmpty())
            {
                result = graph.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))))));
            }
            return(result);
        }
        bool Open(DirectShow.Binding.IGraph graph, Uri.Locator name)
        {
            bool result = graph.Open(new Filters.Net.RTPSource(name, new DirectShow.Binding.Filters.Decoder.Mpeg2(new DirectShow.Binding.Filters.Dmo.ColorConverter(new DirectShow.Binding.Filters.SampleGrabber.All()
            {
                FuzzyMatch = true
            })))
            {
                Output = 0
            });

            graph.Save("file:///./test.grf");
            return(result);
        }
Example #4
0
        bool Open(DirectShow.Binding.IGraph graph, Uri.Locator name)
        {
            bool   result   = false;
            string filename = name.Query["video"];

            name.Query.Remove("video");
            if (result = filename.NotEmpty())
            {
                result = graph.Open(
                    new Filters.Net.SourcePlus(name, new DirectShow.Binding.Filters.Utils.InfinitePinTee(
                                                   new DirectShow.Binding.Filters.Abstract[] { new Filters.Demultiplexer.MpegPush(new Filters.Decoder.SD.All(new DirectShow.Binding.Filters.SampleGrabber.All())
                    {
                        Output = -1
                    })
                                                                                               {
                                                                                                   WaitForOutput = new TimeSpan(0, 0, 0, 1)
                                                                                               } },
                                                   new DirectShow.Binding.Filters.Abstract[] { new Filters.File.Sink(filename) }
                                                   )));
            }
            return(result);
        }