Beispiel #1
0
        /// <summary>
        /// Parse the profile body.
        /// </summary>
        /// <param name="byteData">The MPEG2 section containing the profile body.</param>
        /// <param name="index">Index of the first byte of the profile body in the MPEG2 section.</param>
        public void Process(byte[] byteData, int index)
        {
            lastIndex = index;

            try
            {
                componentsCount = (int)byteData[lastIndex];;
                lastIndex++;

                dsmServiceLocation = new DSMServiceLocation();
                dsmServiceLocation.Process(byteData, lastIndex);
                lastIndex += dsmServiceLocation.Index;

                if (componentsCount > 1)
                {
                    liteComponents = new Collection <BIOPLiteComponent>();

                    while (liteComponents.Count != componentsCount - 1)
                    {
                        BIOPLiteComponent liteComponent = new BIOPLiteComponent();
                        liteComponent.Process(byteData, lastIndex);
                        liteComponents.Add(liteComponent);

                        lastIndex = liteComponent.Index;
                    }
                }

                Validate();
            }
            catch (IndexOutOfRangeException)
            {
                throw (new ArgumentOutOfRangeException("The BIOP Lite Options Profile Body message is short"));
            }
        }
        /// <summary>
        /// Parse the profile body.
        /// </summary>
        /// <param name="byteData">The MPEG2 section containing the profile body.</param>
        /// <param name="index">Index of the first byte of the profile body in the MPEG2 section.</param>
        public void Process(byte[] byteData, int index)
        {
            lastIndex = index;

            try
            {
                componentsCount = (int)byteData[lastIndex];
                lastIndex++;

                objectLocation = new BIOPObjectLocation();
                objectLocation.Process(byteData, lastIndex);
                lastIndex = objectLocation.Index;

                connectionBinder = new DSMConnBinder();
                connectionBinder.Process(byteData, lastIndex);
                lastIndex = connectionBinder.Index;

                if (componentsCount > 2)
                {
                    liteComponents = new Collection <BIOPLiteComponent>();

                    while (liteComponents.Count != componentsCount - 2)
                    {
                        BIOPLiteComponent liteComponent = new BIOPLiteComponent();
                        liteComponent.Process(byteData, lastIndex);
                        liteComponents.Add(liteComponent);

                        lastIndex = liteComponent.Index;
                    }
                }

                Validate();
            }
            catch (IndexOutOfRangeException)
            {
                throw (new ArgumentOutOfRangeException("The BIOP Profile Body message is short"));
            }
        }
        /// <summary>
        /// Parse the profile body.
        /// </summary>
        /// <param name="byteData">The MPEG2 section containing the profile body.</param>
        /// <param name="index">Index of the first byte of the profile body in the MPEG2 section.</param>
        public void Process(byte[] byteData, int index)
        {
            lastIndex = index;

            try
            {
                componentsCount = (int)byteData[lastIndex]; ;
                lastIndex++;

                dsmServiceLocation = new DSMServiceLocation();
                dsmServiceLocation.Process(byteData, lastIndex);
                lastIndex += dsmServiceLocation.Index;

                if (componentsCount > 1)
                {
                    liteComponents = new Collection<BIOPLiteComponent>();

                    while (liteComponents.Count != componentsCount - 1)
                    {
                        BIOPLiteComponent liteComponent = new BIOPLiteComponent();
                        liteComponent.Process(byteData, lastIndex);
                        liteComponents.Add(liteComponent);

                        lastIndex = liteComponent.Index;
                    }
                }

                Validate();
            }
            catch (IndexOutOfRangeException)
            {
                throw (new ArgumentOutOfRangeException("The BIOP Lite Options Profile Body message is short"));
            }
        }
Beispiel #4
0
        /// <summary>
        /// Parse the profile body.
        /// </summary>
        /// <param name="byteData">The MPEG2 section containing the profile body.</param>
        /// <param name="index">Index of the first byte of the profile body in the MPEG2 section.</param>
        public void Process(byte[] byteData, int index)
        {
            lastIndex = index;

            try
            {
                componentsCount = (int)byteData[lastIndex];
                lastIndex++;

                objectLocation = new BIOPObjectLocation();
                objectLocation.Process(byteData, lastIndex);
                lastIndex = objectLocation.Index;

                connectionBinder = new DSMConnBinder();
                connectionBinder.Process(byteData, lastIndex);
                lastIndex = connectionBinder.Index;

                if (componentsCount > 2)
                {
                    liteComponents = new Collection<BIOPLiteComponent>();

                    while (liteComponents.Count != componentsCount - 2)
                    {
                        BIOPLiteComponent liteComponent = new BIOPLiteComponent();
                        liteComponent.Process(byteData, lastIndex);
                        liteComponents.Add(liteComponent);

                        lastIndex = liteComponent.Index;
                    }
                }

                Validate();
            }
            catch (IndexOutOfRangeException)
            {
                throw (new ArgumentOutOfRangeException("The BIOP Profile Body message is short"));
            }
        }