public VideoBuffer(int width, int height, PixFrmt pixFrmt, int stride) { this.memoryMappedFileName = Guid.NewGuid().ToString(); this.width = width; this.height = height; this.pixelFormat = pixFrmt; this.stride = stride; }
public VideoBuffer(int width, int height, PixFrmt pixFrmt) { this.memoryMappedFileName = Guid.NewGuid().ToString(); this.width = width; this.height = height; this.pixelFormat = pixFrmt; this.stride = ((width * pixelFormat.bitsPerPixel + 7) / 8 + 15) & ~15; }