/// <summary> /// Parse the descriptor. /// </summary> /// <param name="byteData">The MPEG2 section containing the descriptor.</param> /// <param name="index">Index of the byte in the MPEG2 section following the descriptor length.</param> internal override void Process(byte[] byteData, int index) { lastIndex = index; try { if (Length != 2) { channelInfoEntries = new Collection <EITChannelInfoEntry>(); int length = Length - 2; while (length > 0) { EITChannelInfoEntry channelInfoEntry = new EITChannelInfoEntry(); channelInfoEntry.Process(byteData, lastIndex); channelInfoEntries.Add(channelInfoEntry); lastIndex += channelInfoEntry.Length; length -= channelInfoEntry.Length; } } Validate(); } catch (IndexOutOfRangeException) { throw (new ArgumentOutOfRangeException("The EIT Channel Info Descriptor message is short")); } }
/// <summary> /// Parse the descriptor. /// </summary> /// <param name="byteData">The MPEG2 section containing the descriptor.</param> /// <param name="index">Index of the byte in the MPEG2 section following the descriptor length.</param> internal override void Process(byte[] byteData, int index) { lastIndex = index; try { if (Length != 2) { channelInfoEntries = new Collection<EITChannelInfoEntry>(); int length = Length - 2; while (length > 0) { EITChannelInfoEntry channelInfoEntry = new EITChannelInfoEntry(); channelInfoEntry.Process(byteData, lastIndex); channelInfoEntries.Add(channelInfoEntry); lastIndex += channelInfoEntry.Length; length -= channelInfoEntry.Length; } } Validate(); } catch (IndexOutOfRangeException) { throw (new ArgumentOutOfRangeException("The EIT Channel Info Descriptor message is short")); } }