Beispiel #1
0
        /// <summary>
        /// The background thread entry point
        /// this is where the graph is created and run from
        /// </summary>
        /// <param name="arg"></param>
        private void StartAsync(object arg)
        {
            try
            {
                Trace("Starting ...");
                _url = arg.ToString();
                Trace(_url);

                Trace("Checking Status");
                CheckSystemStatus();

                Trace("Create Sample Grabber Callback");
                _capGrabber = new SampleGrabberCallback();

                Trace("Building Graph");
                _graph = (IGraphBuilder) new FilterGraph();


                BuildGraph(Graph, _url);

                InitializeSampleGrabber();

                //debug
                rot = new DsROTEntry(Graph);

                Trace("Running Graph");
                int hr = MediaControl.Run();
                CheckHr(hr, "Can't run the graph");
                RunGraph();
            }
            catch (Exception ex)
            {
                ExceptionHelper.HandleException(ex);
                Trace("ERROR: Creating Graph");
            }
        }
Beispiel #2
0
        /// <summary>
        /// The background thread entry point
        /// this is where the graph is created and run from
        /// </summary>
        /// <param name="arg"></param>
        private void StartAsync(object arg)
        {
            try
            {
                Trace("Starting ...");
                _url = arg.ToString();
                Trace(_url);

                Trace("Checking Status");
                CheckSystemStatus();

                Trace("Create Sample Grabber Callback");
                _capGrabber = new SampleGrabberCallback();

                Trace("Building Graph");
                _graph = (IGraphBuilder)new FilterGraph();

                
                BuildGraph(Graph, _url);

                InitializeSampleGrabber();

                //debug
                rot = new DsROTEntry(Graph);

                Trace("Running Graph");
                int hr = MediaControl.Run();
                CheckHr(hr, "Can't run the graph");
                RunGraph();
            }
            catch (Exception ex)
            {
                ExceptionHelper.HandleException(ex);
                Trace("ERROR: Creating Graph");
            }
        }