/// <summary>
        /// Process an MPEG2 section from the Open TV Title table.
        /// </summary>
        /// <param name="byteData">The MPEG2 section.</param>
        public static MediaHighway2CategorySection ProcessMediaHighwayCategoryTable(byte[] byteData)
        {
            Mpeg2BasicHeader mpeg2Header = new Mpeg2BasicHeader();

            try
            {
                mpeg2Header.Process(byteData);

                MediaHighway2CategorySection categorySection = new MediaHighway2CategorySection();
                bool process = categorySection.Process(byteData, mpeg2Header.Index);
                if (process)
                {
                    categorySection.LogMessage();
                    return(categorySection);
                }
                else
                {
                    return(null);
                }
            }
            catch (ArgumentOutOfRangeException e)
            {
                Logger.Instance.Write("<e> Category section parsing failed: " + e.Message);
                return(null);
            }
        }
        private void processCategorySections(Collection <Mpeg2Section> sections)
        {
            foreach (Mpeg2Section section in sections)
            {
                if (RunParameters.Instance.TraceIDs.Contains("DUMPCATEGORYSECTIONS"))
                {
                    Logger.Instance.Dump("Category Section", section.Data, section.Length);
                }

                MediaHighway2CategorySection categorySection = MediaHighway2CategorySection.ProcessMediaHighwayCategoryTable(section.Data);
                if (categorySection != null)
                {
                    if (categorySection.Categories != null)
                    {
                        foreach (MediaHighwayCategoryEntry categoryEntry in categorySection.Categories)
                        {
                            MediaHighwayProgramCategory.AddCategory(categoryEntry.Number, categoryEntry.Description);
                        }
                    }
                }
            }
        }
        /// <summary>
        /// Process an MPEG2 section from the Open TV Title table.
        /// </summary>
        /// <param name="byteData">The MPEG2 section.</param>
        public static MediaHighway2CategorySection ProcessMediaHighwayCategoryTable(byte[] byteData)
        {
            Mpeg2BasicHeader mpeg2Header = new Mpeg2BasicHeader();

            try
            {
                mpeg2Header.Process(byteData);

                MediaHighway2CategorySection categorySection = new MediaHighway2CategorySection();
                bool process = categorySection.Process(byteData, mpeg2Header.Index);
                if (process)
                {
                    categorySection.LogMessage();
                    return (categorySection);
                }
                else
                    return (null);
            }
            catch (ArgumentOutOfRangeException e)
            {
                Logger.Instance.Write("<e> Category section parsing failed: " + e.Message);
                return (null);
            }
        }