コード例 #1
0
        /// <summary>Copy the stream into a new file</summary>
        /// <param name="fileName">Name of the new file</param>
        public override void ExportStream(String fileName)
        {
            Avi.AVICOMPRESSOPTIONS_CLASS opts = new Avi.AVICOMPRESSOPTIONS_CLASS {
                fccType  = (uint)Avi.streamtypeVIDEO,
                lpParms  = IntPtr.Zero,
                lpFormat = IntPtr.Zero
            };
            IntPtr streamPointer = StreamPointer;

            Avi.AVISaveOptions(IntPtr.Zero, Avi.ICMF_CHOOSE_KEYFRAME | Avi.ICMF_CHOOSE_DATARATE, 1, ref streamPointer, ref opts);
            Avi.AVISaveOptionsFree(1, ref opts);

            Avi.AVISaveV(fileName, 0, 0, 1, ref aviStream, ref opts);
        }
コード例 #2
0
        public static void MakeFileFromStream(String fileName, AviStream stream)
        {
            IntPtr newFile       = IntPtr.Zero;
            IntPtr streamPointer = stream.StreamPointer;

            Avi.AVICOMPRESSOPTIONS_CLASS opts = new Avi.AVICOMPRESSOPTIONS_CLASS();
            opts.fccType  = (uint)Avi.streamtypeVIDEO;
            opts.lpParms  = IntPtr.Zero;
            opts.lpFormat = IntPtr.Zero;
            Avi.AVISaveOptions(IntPtr.Zero, Avi.ICMF_CHOOSE_KEYFRAME | Avi.ICMF_CHOOSE_DATARATE, 1, ref streamPointer, ref opts);
            Avi.AVISaveOptionsFree(1, ref opts);

            Avi.AVISaveV(fileName, 0, 0, 1, ref streamPointer, ref opts);
        }
コード例 #3
0
ファイル: AudioStream.cs プロジェクト: paradoxfm/ledx2
        /// <summary>Copy the stream into a new file</summary>
        /// <param name="fileName">Name of the new file</param>
        public override void ExportStream(String fileName)
        {
            Avi.AVICOMPRESSOPTIONS_CLASS opts = new Avi.AVICOMPRESSOPTIONS_CLASS {
                fccType           = (UInt32)Avi.mmioStringToFOURCC("auds", 0),
                fccHandler        = (UInt32)Avi.mmioStringToFOURCC("CAUD", 0),
                dwKeyFrameEvery   = 0,
                dwQuality         = 0,
                dwFlags           = 0,
                dwBytesPerSecond  = 0,
                lpFormat          = new IntPtr(0),
                cbFormat          = 0,
                lpParms           = new IntPtr(0),
                cbParms           = 0,
                dwInterleaveEvery = 0
            };

            Avi.AVISaveV(fileName, 0, 0, 1, ref aviStream, ref opts);
        }