Exemple #1
0
        private void processSections(Collection <Mpeg2Section> sections)
        {
            foreach (Mpeg2Section section in sections)
            {
                if (RunParameters.Instance.TraceIDs.Contains("BELLTVSECTIONS"))
                {
                    Logger.Instance.Dump("Bell TV Section", section.Data, section.Length);
                }

                try
                {
                    Mpeg2ExtendedHeader mpeg2Header = new Mpeg2ExtendedHeader();
                    mpeg2Header.Process(section.Data);
                    if (mpeg2Header.Current)
                    {
                        if (mpeg2Header.TableID > 0x80 && mpeg2Header.TableID < 0xa5)
                        {
                            BellTVSection bellTVSection = new BellTVSection();
                            bellTVSection.Process(section.Data, mpeg2Header);
                        }
                    }
                }
                catch (ArgumentOutOfRangeException e)
                {
                    Logger.Instance.Write("<e> Bell TV error: " + e.Message);
                }
            }
        }
        private void processSections(Collection<Mpeg2Section> sections)
        {
            foreach (Mpeg2Section section in sections)
            {
                if (RunParameters.Instance.TraceIDs.Contains("BELLTVSECTIONS"))
                    Logger.Instance.Dump("Bell TV Section", section.Data, section.Length);

                try
                {
                    Mpeg2ExtendedHeader mpeg2Header = new Mpeg2ExtendedHeader();
                    mpeg2Header.Process(section.Data);
                    if (mpeg2Header.Current)
                    {
                        if (mpeg2Header.TableID > 0x80 && mpeg2Header.TableID < 0xa5)
                        {
                            BellTVSection bellTVSection = new BellTVSection();
                            bellTVSection.Process(section.Data, mpeg2Header);
                        }
                    }
                }
                catch (ArgumentOutOfRangeException e)
                {
                    Logger.Instance.Write("<e> Bell TV error: " + e.Message);
                }
            }
        }