CodeTV.GraphBuilderBDATimeShifting.BuildSinkGraph C# (CSharp) Method

BuildSinkGraph() private method

private BuildSinkGraph ( ITuningSpace tuningSpace ) : void
tuningSpace ITuningSpace
return void
        private void BuildSinkGraph(ITuningSpace tuningSpace)
        {
            this.graphBuilder = (IFilterGraph2)new FilterGraph();
            this.rot = new DsROTEntry(this.graphBuilder);

            this.epg = new EPG(this.hostingControl);

            this.cookiesSink = this.hostingControl.SubscribeEvents(this as VideoControl.IVideoEventHandler, this.graphBuilder as IMediaEventEx);

            AddNetworkProviderFilter(this.objTuningSpace);
            AddMPEG2DemuxFilter();
            AddMpeg2VideoStreamAnalyzerFilter();
            CreateMPEG2DemuxPins();

            AddAndConnectBDABoardFilters();
            if (this.tuner == null && this.capture == null)
                throw new ApplicationException("No BDA devices found!");

            if (this.H264DecoderDevice != null || !isH264ElecardSpecialMode)
            {
                //+++ This order is to avoid a bug from the DirectShow
                AddAndConnectSectionsAndTablesFilterToGraph();

                IMpeg2Data mpeg2Data = this.bdaSecTab as IMpeg2Data;
                ISectionList ppSectionList;
                int hr2 = mpeg2Data.GetTable(0, 0, null, 0, out ppSectionList);

                AddAndConnectTIFToGraph();
                //---
            }

            ConfigureTimeShiftingRegistry();

            AddStreamBufferSinkFilter();
            ConnectStreamBufferSinkFilter();

            this.epg.RegisterEvent(TransportInformationFilter as IConnectionPointContainer);
        }