Esempio n. 1
0
        public IDataPacket GetVideoHeaders(IResultNode headerPacket)
        {
            IResultNode pictureNode = GetPictureNode(headerPacket);

            IDataPacket data = null;

            for (IResultNode node = pictureNode.Parent; node != null; node = node.Parent)
            {
                if (node.Name == SequenceHeader.Name)
                {
                    // Check for 'SequenceExtension', required for MPEG2
                    foreach (IResultNode childNode in node.Children)
                    {
                        if (childNode.Name == SequenceExtension.Name)
                        {
                            data = data.Prepend(childNode);
                        }
                    }
                }
                if (node.Length > 0)
                {
                    // Add parent node
                    data = data.Prepend(node);
                }
            }
            return(data);
        }
Esempio n. 2
0
        public IDataPacket GetVideoHeaders(IResultNode resultNode)
        {
            if (!IsSlice(resultNode))
            {
                return(null);
            }

            IDataPacket data = null;

            for (IResultNode node = resultNode.Parent; node != null; node = node.Parent)
            {
                if (node.Length > 0)
                {
                    // Add (prepend) parent node
                    data = data.Prepend(node);
                }
            }
            return(data);
        }