internal static bool AddSection(SiehFernInfoEPGSection newSection) { if (sections == null) { sections = new Collection <SiehFernInfoEPGSection>(); } foreach (SiehFernInfoEPGSection oldSection in sections) { if (oldSection.SequenceNumber == newSection.SequenceNumber) { return(false); } if (oldSection.SequenceNumber > newSection.SequenceNumber) { sections.Insert(sections.IndexOf(oldSection), newSection); return(true); } } sections.Add(newSection); return(true); }
private void processEPGSections(Collection <Mpeg2Section> sections) { foreach (Mpeg2Section section in sections) { try { Mpeg2ExtendedHeader mpeg2Header = new Mpeg2ExtendedHeader(); mpeg2Header.Process(section.Data); if (mpeg2Header.Current) { if (mpeg2Header.TableIDExtension == 0x702) { SiehFernInfoEPGSection epgSection = new SiehFernInfoEPGSection(); epgSection.Process(section.Data, mpeg2Header); epgSection.LogMessage(); bool added = SiehFernInfoEPGSection.AddSection(epgSection); if (added) { if (RunParameters.Instance.DebugIDs.Contains("SIEHFERNEPGBLOCKS")) { Logger.Instance.Dump("Siehfern Info Block Type 0x" + mpeg2Header.TableIDExtension.ToString("X"), section.Data, section.Data.Length); } } } } } catch (ArgumentOutOfRangeException e) { Logger.Instance.Write("<e> Error processing SiehFern Info EPG section: " + e.Message); } } }
private void processEPGSections(Collection<Mpeg2Section> sections) { foreach (Mpeg2Section section in sections) { try { Mpeg2ExtendedHeader mpeg2Header = new Mpeg2ExtendedHeader(); mpeg2Header.Process(section.Data); if (mpeg2Header.Current) { if (mpeg2Header.TableIDExtension == 0x702) { SiehFernInfoEPGSection epgSection = new SiehFernInfoEPGSection(); epgSection.Process(section.Data, mpeg2Header); epgSection.LogMessage(); bool added = SiehFernInfoEPGSection.AddSection(epgSection); if (added) { if (RunParameters.Instance.DebugIDs.Contains("SIEHFERNEPGBLOCKS")) Logger.Instance.Dump("Siehfern Info Block Type 0x" + mpeg2Header.TableIDExtension.ToString("X"), section.Data, section.Data.Length); } } } } catch (ArgumentOutOfRangeException e) { Logger.Instance.Write("<e> Error processing SiehFern Info EPG section: " + e.Message); } } }
internal static bool AddSection(SiehFernInfoEPGSection newSection) { if (sections == null) sections = new Collection<SiehFernInfoEPGSection>(); foreach (SiehFernInfoEPGSection oldSection in sections) { if (oldSection.SequenceNumber == newSection.SequenceNumber) return (false); if (oldSection.SequenceNumber > newSection.SequenceNumber) { sections.Insert(sections.IndexOf(oldSection), newSection); return (true); } } sections.Add(newSection); return (true); }