Exemplo n.º 1
0
 public ScapCapture(bool RecordMic, int NumberofThreads, int FramesPerSecond, ScapVideoFormats VideoFormat, ScapImageFormats ImageFormat, int Xcoord, int Ycoord, int CaptureWidth, int CaptureHeight, string CaptureDirectory, string ImageFilename, string VideoFilename, int Runtime)
 {
     IsSoundEnabled  = RecordMic;
     IsMultiThreaded = true;
     Sw           = new Stopwatch();
     Compressor   = LZ4CompressorFactory.CreateNew();
     Decompressor = LZ4DecompressorFactory.CreateNew();
     Imgext       = "";
     Vidext       = "";
     if (!Directory.Exists(CaptureDirectory))
     {
         Directory.CreateDirectory(CaptureDirectory);
         Dir = CaptureDirectory + "\\";
     }
     else
     {
         Dir = CaptureDirectory + "\\";
     }
     Imgname            = ImageFilename;
     Vidname            = VideoFilename;
     Vidform            = VideoFormat;
     Imgform            = ImageFormat;
     NumThreads         = 1;
     X                  = Xcoord;
     Y                  = Ycoord;
     W                  = CaptureWidth;
     H                  = CaptureHeight;
     Rtime              = Runtime;
     Frames             = 0;
     Capture            = 0;
     FPS                = FramesPerSecond;
     FBegin             = 0;
     FEnd               = -1;
     Length             = 0;
     DecompProgress     = 0;
     EncodeProgress     = 0;
     CompressedDataList = new List <Databank>();
     MainDataLists      = new List <Databank> [NumThreads];
     CompressorBools    = new bool[NumThreads];
     for (int c = 0; c < NumThreads; c++)
     {
         MainDataLists[c]          = new List <Databank>();
         MainDataLists[c].Capacity = 25;
         CompressorBools[c]        = false;
     }
     IsInitialized   = true;
     IsDecompressed  = false;
     IsEncoded       = false;
     IsMultiThreaded = false;
     HasCaptured     = false;
 }
Exemplo n.º 2
0
 public ScapCapture(bool RecordMic, int NumberofThreads, int FramesPerSecond, ScapVideoFormats VideoFormat, ScapImageFormats ImageFormat, int Xcoord, int Ycoord, int CaptureWidth, int CaptureHeight)
 {
     IsSoundEnabled  = RecordMic;
     IsMultiThreaded = true;
     Sw                 = new Stopwatch();
     Compressor         = LZ4CompressorFactory.CreateNew();
     Decompressor       = LZ4DecompressorFactory.CreateNew();
     Imgext             = ".bmp";
     Vidext             = ".avi";
     Dir                = Directory.GetCurrentDirectory() + "\\";
     Imgname            = "";
     Vidname            = "Vid";
     Vidform            = VideoFormat;
     Imgform            = ImageFormat;
     NumThreads         = NumberofThreads;
     X                  = Xcoord;
     Y                  = Ycoord;
     W                  = CaptureWidth;
     H                  = CaptureHeight;
     Rtime              = -1;
     Frames             = 0;
     Capture            = 0;
     FPS                = FramesPerSecond;
     FBegin             = 0;
     FEnd               = -1;
     Length             = 0;
     DecompProgress     = 0;
     EncodeProgress     = 0;
     CompressedDataList = new List <Databank>();
     MainDataLists      = new List <Databank> [NumThreads];
     CompressorBools    = new bool[NumThreads];
     for (int c = 0; c < NumThreads; c++)
     {
         MainDataLists[c]          = new List <Databank>();
         MainDataLists[c].Capacity = 25;
         CompressorBools[c]        = false;
     }
     IsInitialized   = true;
     IsDecompressed  = false;
     IsEncoded       = false;
     IsMultiThreaded = false;
     HasCaptured     = false;
 }
Exemplo n.º 3
0
 public ScapCapture(bool RecordMic, int NumberofThreads)
 {
     IsSoundEnabled  = RecordMic;
     IsMultiThreaded = true;
     Sw                 = new Stopwatch();
     Compressor         = LZ4CompressorFactory.CreateNew();
     Decompressor       = LZ4DecompressorFactory.CreateNew();
     Imgext             = ".bmp";
     Vidext             = ".avi";
     Dir                = Directory.GetCurrentDirectory() + "\\";
     Imgname            = "";
     Vidname            = "Vid";
     Vidform            = ScapVideoFormats.Default;
     Imgform            = ScapImageFormats.Bmp;
     NumThreads         = NumberofThreads;
     X                  = 0;
     Y                  = 0;
     W                  = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width;
     H                  = System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height;
     Rtime              = -1;
     Frames             = 0;
     Capture            = 0;
     FPS                = 50;
     FBegin             = 0;
     FEnd               = -1;
     Length             = 0;
     DecompProgress     = 0;
     EncodeProgress     = 0;
     CompressedDataList = new List <Databank>();
     MainDataLists      = new List <Databank> [NumThreads];
     CompressorBools    = new bool[NumThreads];
     for (int c = 0; c < NumThreads; c++)
     {
         MainDataLists[c]          = new List <Databank>();
         MainDataLists[c].Capacity = 25;
         CompressorBools[c]        = false;
     }
     IsInitialized   = true;
     IsDecompressed  = false;
     IsEncoded       = false;
     IsMultiThreaded = false;
     HasCaptured     = false;
 }