public override void decode(MP4InputStream inStream)
        {
            base.decode(inStream);

            int len = (version == 1) ? 8 : 4;

            creationTime     = inStream.readBytes(len);
            modificationTime = inStream.readBytes(len);
            timeScale        = inStream.readBytes(4);
            duration         = BoxUtils.detectUndetermined(inStream.readBytes(len));

            rate   = inStream.readFixedPoint(16, 16);
            volume = inStream.readFixedPoint(8, 8);

            inStream.skipBytes(10); //reserved

            for (int i = 0; i < 9; i++)
            {
                if (i < 6)
                {
                    matrix[i] = inStream.readFixedPoint(16, 16);
                }
                else
                {
                    matrix[i] = inStream.readFixedPoint(2, 30);
                }
            }

            inStream.skipBytes(24); //reserved

            nextTrackID = inStream.readBytes(4);
        }
Esempio n. 2
0
        public override void decode(MP4InputStream inStream)
        {
            base.decode(inStream);

            inStream.skipBytes(2); //pre-defined: 0
            inStream.skipBytes(2); //reserved
            // 3x32 pre_defined
            inStream.skipBytes(4); //pre-defined: 0
            inStream.skipBytes(4); //pre-defined: 0
            inStream.skipBytes(4); //pre-defined: 0

            width  = (int)inStream.readBytes(2);
            height = (int)inStream.readBytes(2);
            horizontalResolution = inStream.readFixedPoint(16, 16);
            verticalResolution   = inStream.readFixedPoint(16, 16);
            inStream.skipBytes(4); //reserved
            frameCount = (int)inStream.readBytes(2);

            int len = inStream.read();

            compressorName = inStream.readString(len);
            inStream.skipBytes(31 - len);

            depth = (int)inStream.readBytes(2);
            inStream.skipBytes(2); //pre-defined: -1

            readChildren(inStream);
        }
Esempio n. 3
0
        public override void decode(MP4InputStream inStream)
        {
            base.decode(inStream);

            balance = inStream.readFixedPoint(8, 8);
            inStream.skipBytes(2); //reserved
        }
        public override void decode(MP4InputStream inStream)
        {
            base.decode(inStream);

            enabled   = (flags & 1) == 1;
            inMovie   = (flags & 2) == 2;
            inPreview = (flags & 4) == 4;

            int len = (version == 1) ? 8 : 4;

            creationTime     = inStream.readBytes(len);
            modificationTime = inStream.readBytes(len);
            trackID          = (int)inStream.readBytes(4);
            inStream.skipBytes(4); //reserved
            duration = BoxUtils.detectUndetermined(inStream.readBytes(len));

            inStream.skipBytes(8); //reserved

            layer          = (int)inStream.readBytes(2);
            alternateGroup = (int)inStream.readBytes(2);
            volume         = inStream.readFixedPoint(8, 8);

            inStream.skipBytes(2); //reserved

            for (int i = 0; i < 9; i++)
            {
                if (i < 6)
                {
                    matrix[i] = inStream.readFixedPoint(16, 16);
                }
                else
                {
                    matrix[i] = inStream.readFixedPoint(2, 30);
                }
            }

            width  = inStream.readFixedPoint(16, 16);
            height = inStream.readFixedPoint(16, 16);
        }
        public override void decode(MP4InputStream inStream)
        {
            base.decode(inStream);

            int entryCount = (int)inStream.readBytes(4);
            int len        = (version == 1) ? 8 : 4;

            segmentDuration = new long[entryCount];
            mediaTime       = new long[entryCount];
            mediaRate       = new double[entryCount];

            for (int i = 0; i < entryCount; i++)
            {
                segmentDuration[i] = inStream.readBytes(len);
                mediaTime[i]       = inStream.readBytes(len);

                //int(16) mediaRate_integer;
                //int(16) media_rate_fraction = 0;
                mediaRate[i] = inStream.readFixedPoint(16, 16);
            }
        }