Esempio n. 1
0
        public bool UpdateMFHDSequence(int SequenceNumber)
        {
            bool   result = false;
            Mp4Box box    = FindChildBox("mfhd");

            if (box != null)
            {
                Mp4BoxMFHD mfhdbox = box as Mp4BoxMFHD;
                if (mfhdbox != null)
                {
                    return(mfhdbox.UpdateSequenceNumber(SequenceNumber));
                }
            }
            return(result);
        }
Esempio n. 2
0
        static public Mp4BoxMFHD CreateMFHDBox(int SequenceNumber)
        {
            int        Flag    = 0;
            byte       version = 0x00;
            Mp4BoxMFHD box     = new Mp4BoxMFHD();

            if (box != null)
            {
                box.Length = 8 + 4 + 4;
                box.Type   = "mfhd";
                byte[] Buffer = new byte[box.Length - 8];
                if (Buffer != null)
                {
                    WriteMp4BoxByte(Buffer, 0, version);
                    WriteMp4BoxInt24(Buffer, 1, Flag);
                    WriteMp4BoxInt32(Buffer, 4, SequenceNumber);
                    box.Data = Buffer;
                    return(box);
                }
            }
            return(null);
        }