Пример #1
0
        public AudioTrack MakeClone()
        {
            Stream streamClone = new MemoryStream();

            SourceStream.CopyTo(streamClone);

            return(new AudioTrack()
            {
                Url = Url,
                SourceStream = streamClone,
                FFmpegProcess = null,
                TrackInfo = TrackInfo
            });
        }
Пример #2
0
            public override void SaveTo(Stream stream, MediaFile mediaFile)
            {
                if (stream.CanSeek)
                {
                    stream.SetLength(0);
                }

                SourceStream.CopyTo(stream);

                if (stream.CanSeek)
                {
                    stream.Position = 0;
                }

                mediaFile.Size = (int)stream.Length;
            }