Ejemplo n.º 1
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);
 }
Ejemplo n.º 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.NativeMethods.AVISaveOptions(IntPtr.Zero, Avi.ICMF_CHOOSE_KEYFRAME | Avi.ICMF_CHOOSE_DATARATE, 1, ref streamPointer, ref opts);
            Avi.NativeMethods.AVISaveOptionsFree(1, ref opts);

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