Example #1
0
        /// <summary>
        /// Returns whether the given <paramref name="chunkName"/> is a top-level chunk type.
        /// Top-level chunks are only allowed in the root. For example, the Movie chunk.
        /// </summary>
        /// <param name="chunkName">the chunk name</param>
        /// <returns>true if it is a top-level chunk type, false otherwise</returns>
        public static bool IsTopLevel(this Mpeg4HeaderName chunkName)
        {
            ICollection <Mpeg4HeaderName> suitableParents = chunkName.GetSuitableParents();

            return(suitableParents.Count == 1 && suitableParents.Contains(Mpeg4HeaderName.Root));
        }