Ejemplo n.º 1
0
        /// <summary>
        /// Process an MPEG2 section from the program map table.
        /// </summary>
        /// <param name="byteData">The MPEG2 section.</param>
        /// <returns>A ProgramMapSection instance.</returns>
        public static ProgramMapSection ProcessProgramMapTable(byte[] byteData)
        {
            Mpeg2ExtendedHeader mpeg2Header = new Mpeg2ExtendedHeader();

            try
            {
                mpeg2Header.Process(byteData);

                if (mpeg2Header.Current)
                {
                    ProgramMapSection programMapSection = new ProgramMapSection();
                    programMapSection.Process(byteData, mpeg2Header);
                    return(programMapSection);
                }
            }
            catch (ArgumentOutOfRangeException e)
            {
                Logger.Instance.Write("<e> Error processing Program Map Section message: " + e.Message);
            }

            return(null);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Process an MPEG2 section from the program map table.
        /// </summary>
        /// <param name="byteData">The MPEG2 section.</param>
        /// <returns>A ProgramMapSection instance.</returns>
        public static ProgramMapSection ProcessProgramMapTable(byte[] byteData)
        {
            Mpeg2ExtendedHeader mpeg2Header = new Mpeg2ExtendedHeader();

            try
            {
                mpeg2Header.Process(byteData);

                if (mpeg2Header.Current)
                {
                    ProgramMapSection programMapSection = new ProgramMapSection();
                    programMapSection.Process(byteData, mpeg2Header);
                    return (programMapSection);
                }
            }
            catch (ArgumentOutOfRangeException e)
            {
                Logger.Instance.Write("<e> Error processing Program Map Section message: " + e.Message);
            }

            return (null);
        }