AnimatGuiCtrls.Video.Avi.EditStreamPaste C# (CSharp) Method

EditStreamPaste() private method

private EditStreamPaste ( IntPtr pStream, Int32 &plPos, Int32 &plLength, IntPtr pstream, Int32 lStart, Int32 lLength ) : int
pStream System.IntPtr
plPos System.Int32
plLength System.Int32
pstream System.IntPtr
lStart System.Int32
lLength System.Int32
return int
        public static extern int EditStreamPaste(
            IntPtr pStream,
            ref Int32 plPos,
            ref Int32 plLength,
            IntPtr pstream,
            Int32 lStart,
            Int32 lLength
            );

Usage Example

        /// <summary>Paste a number of frames from another video stream into this stream</summary>
        /// <param name="sourceStream">Pointer to the unmanaged stream to copy from</param>
        /// <param name="copyPosition">Index of the first frame to copy</param>
        /// <param name="pastePosition">Where to paste the copied frames</param>
        /// <param name="length">Count of frames to paste</param>
        public void Paste(IntPtr sourceStream, int copyPosition, int pastePosition, int length)
        {
            int pastedLength = 0;
            int result       = Avi.EditStreamPaste(editableStream, ref pastePosition, ref pastedLength, sourceStream, copyPosition, length);

            if (result != 0)
            {
                throw new Exception("Exception in Paste: " + result.ToString());
            }

            countFrames += pastedLength;
        }