CSharpRTMP.Core.MediaFormats.MP4Document.ParseDocument C# (CSharp) Метод

ParseDocument() защищенный Метод

protected ParseDocument ( ) : bool
Результат bool
        protected override bool ParseDocument()
        {
            if (!MediaFile.SeekBegin())
            {
                FATAL("Unable to seek to the beginning of file");
                return false;
            }
            while (MediaFile.DataStream.CanRead)
            {
                if (MediaFile.Position == MediaFile.DataStream.Length)
                {
                    return true;
                }
                var atom = ReadAtom(null);
                if (atom == null)
                {
                    FATAL("Unable to read atom");
                    return false;
                }
                if (!atom.IsIgnored)
                {
                    switch (atom.Type)
                    {
                        case FTYP:
                            _atomFTYP = (AtomFTYP) atom;
                            break;
                        case MOOV:
                            _atomMOOV = (AtomMOOV) atom;
                            break;
                        case MOOF:
                            _moof.Add((AtomMOOF)atom);
                            break;

                        default:
                            return false;
                    }
                }
                _topAtoms.Add(atom);
            }
            return true;
        }