Example #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);
        }
Example #2
0
        /// <summary>
        /// Copy data directly to writer
        /// </summary>
        /// <param name="writer">Writer that is opened for writing</param>
        public virtual void CopyTo(MediaWriter <Frame> writer)
        {
            if (!writer.OpenedForWriting)
            {
                throw new InvalidOperationException("Writer is not opened for writing!");
            }

            DataStream.CopyTo(writer.InputDataStream);
        }
Example #3
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);
        }