Beispiel #1
0
        MediaTrackGroup CreateMediaTrackGroup(XElement src, string password = null)
        {
            MediaTrackGroup rz = new MediaTrackGroup(this, MediaTypes.Video, 0);

            rz.ApplyConfiguration(src, password);
            return(rz);
        }
Beispiel #2
0
        /// <summary>
        /// Adds the new track group.
        /// </summary>
        /// <returns></returns>
        public MediaTrackGroup AddNewTrackGroup(IEnumerable <IMediaTrack> source = null)
        {
            MediaTrackGroup rz = this.CreateNewGroup(source);

            this.RegisterContentSource(rz);
            this.Tracks.Add(rz);
            return(rz);
        }
Beispiel #3
0
        ///// <summary>
        ///// Creates the new track.
        ///// </summary>
        ///// <param name="mediaType">Type of the media.</param>
        ///// <returns></returns>
        ///// <exception cref="System.ApplicationException"></exception>
        //IMediaTrack CreateNewTrack(MediaTypes mediaType) {
        //    switch (mediaType) {
        //        case MediaTypes.Video: return new VideoTrack(this, this.GetNextTrackId());
        //        case MediaTypes.Audio: return new AudioTrack(this, this.GetNextTrackId());
        //        case MediaTypes.Image: return new ImageTrack(this, this.GetNextTrackId());
        //        default: throw new ApplicationException(string.Format("Media type '{0}' not supported", mediaType));
        //    }
        //}

        /// <summary>
        /// Creates the new group.
        /// </summary>
        /// <returns></returns>
        MediaTrackGroup CreateNewGroup(IEnumerable <IMediaTrack> source = null)
        {
            MediaTrackGroup rz = new MediaTrackGroup(this, MediaTypes.Video, this.GetNextTrackId());

            if (source != null)
            {
                rz.Tracks.AddItems(source);
            }
            return(rz);
        }