コード例 #1
0
ファイル: SequenceHeader.cs プロジェクト: billliwawa/net7mma
        public static void readExtension(MemoryStream bb, SequenceHeader sh)
        {
            m_hasExtensions = true;

            BitReader inb     = new BitReader(bb);
            int       extType = inb.readNBit(4);

            switch (extType)
            {
            case Sequence_Extension:
                sh.sequenceExtension = SequenceExtension.read(inb);
                break;

            case Sequence_Scalable_Extension:
                sh.sequenceScalableExtension = SequenceScalableExtension.read(inb);
                break;

            case Sequence_Display_Extension:
                sh.sequenceDisplayExtension = SequenceDisplayExtension.read(inb);
                break;

            default:
                throw new Exception("Unsupported extension: " + extType);
            }
        }
コード例 #2
0
        public static SequenceDisplayExtension read(BitReader inv)
        {
            SequenceDisplayExtension sde = new SequenceDisplayExtension();

            sde.video_format = inv.readNBit(3);
            if (inv.read1Bit() == 1)
            {
                sde.colorDescription = ColorDescription.read(inv);
            }
            sde.display_horizontal_size = inv.readNBit(14);
            inv.read1Bit();
            sde.display_vertical_size = inv.readNBit(14);

            return(sde);
        }
コード例 #3
0
ファイル: SequenceHeader.cs プロジェクト: billliwawa/net7mma
 public void copyExtensions(SequenceHeader sh)
 {
     sequenceExtension         = sh.sequenceExtension;
     sequenceScalableExtension = sh.sequenceScalableExtension;
     sequenceDisplayExtension  = sh.sequenceDisplayExtension;
 }