/// <summary>
        /// Creates a
        /// <see cref="CpMediaContainer"/>
        /// object, given a metadata instantiation
        /// block.
        /// </summary>
        /// <param name="info">
        /// The metadata to use when instantiating the media.
        /// </param>
        /// <returns>a new media container</returns>
        public static CpMediaContainer CreateContainer(MediaBuilder.container info)
        {
            CpMediaContainer newObj = new CpMediaContainer();

            MediaBuilder.SetObjectProperties(newObj, info);
            return(newObj);
        }
        /// <summary>
        /// Creates a
        /// <see cref="CpMediaItem"/>
        /// object, given a metadata instantiation
        /// block.
        /// </summary>
        /// <param name="info">
        /// The metadata to use when instantiating the media.
        /// </param>
        /// <returns>a new media item</returns>
        public static CpMediaItem CreateItem(MediaBuilder.item info)
        {
            CpMediaItem newObj = new CpMediaItem();

            MediaBuilder.SetObjectProperties(newObj, info);
            return(newObj);
        }
        /// <summary>
        /// Creates a
        /// <see cref="DvMediaItem"/>
        /// object, given a metadata instantiation
        /// block.
        /// </summary>
        /// <param name="info">
        /// The metadata to use when instantiating the media.
        /// </param>
        /// <returns>a new media item</returns>
        public static DvMediaItem CreateItem(MediaBuilder.item info)
        {
            DvMediaItem newObj = new DvMediaItem();

            MediaBuilder.SetObjectProperties(newObj, info);
            newObj.TrackMetadataChanges = true;
            return(newObj);
        }
        /// <summary>
        /// Creates a
        /// <see cref="DvMediaContainer"/>
        /// object, given a metadata instantiation
        /// block.
        /// </summary>
        /// <param name="info">
        /// The metadata to use when instantiating the media.
        /// </param>
        /// <returns>a new media container</returns>
        public static DvMediaContainer CreateContainer(MediaBuilder.container info)
        {
            DvMediaContainer newObj = new DvMediaContainer();

            MediaBuilder.SetObjectProperties(newObj, info);
            newObj.TrackMetadataChanges = true;
            return(newObj);
        }
        /// <summary>
        /// Used by
        /// <see cref="CpMediaBuilder"/>
        /// to instantiate a root container.
        /// </summary>
        /// <param name="info">metadata information for the container</param>
        /// <returns>the new root container</returns>
        internal static CpRootContainer CreateRoot(MediaBuilder.container info)
        {
            info.ID        = "0";
            info.IdIsValid = true;
            CpRootContainer root = new CpRootContainer();

            MediaBuilder.SetObjectProperties(root, info);
            return(root);
        }
        /// <summary>
        /// Used by
        /// <see cref="MediaServerDevice"/>
        /// to instantiate a root container.
        /// </summary>
        /// <param name="info">metadata information for the container</param>
        /// <returns>the new root container</returns>
        internal static DvRootContainer CreateRoot(MediaBuilder.container info)
        {
            info.ID        = "0";
            info.IdIsValid = true;
            DvRootContainer root = new DvRootContainer();

            MediaBuilder.SetObjectProperties(root, info);
            root.TrackMetadataChanges = true;
            return(root);
        }