public FLVScreenEncoder(FLVEncoderParams par) { //save the parameters this.par = par; //set the previous frame to null (ie make sure it's blank and clear memory) this.previousFrame = null; //initialize enough data for the buffer buffer = new byte[(int)(par.VideoWidth * par.VideoHeight * 3 * 1.001 + 700)]; //create the memory stream memoryStream = new MemoryStream(buffer); //create a block data buffer for image blocks destBlockBuffer = new byte[(int)((32 * 32 * 4) * 1.001 + 300)]; //required (for safety) //create the src block data buffer srcBlockBuffer = new byte[(int)((32 * 32 * 4) * 1.001 + 300)]; //required (for safety) }
public ScreenCaptureControl() { InitializeComponent(); par = new FLVEncoderParams(); }