Beispiel #1
0
        /// <summary>
        /// Copy data directly to writer
        /// </summary>
        /// <param name="writer">Writer that is opened for writing</param>
        public virtual async Task CopyToAsync(MediaWriter <Frame> writer)
        {
            if (!writer.OpenedForWriting)
            {
                throw new InvalidOperationException("Writer is not opened for writing!");
            }

            await DataStream.CopyToAsync(writer.InputDataStream);
        }
Beispiel #2
0
        /// <summary>
        /// Copy data directly to writer
        /// </summary>
        /// <param name="writer">Writer that is opened for writing</param>
        public virtual async Task CopyToAsync(MediaWriter <Frame> writer)
        {
            if (DataStream == null)
            {
                throw new InvalidOperationException("Reader is not opened for reading! Have you called Load()?");
            }
            if (!writer.OpenedForWriting)
            {
                throw new InvalidOperationException("Writer is not opened for writing!");
            }

            await DataStream.CopyToAsync(writer.InputDataStream);
        }