/// <summary>Allocate encoded buffers</summary> static int allocateBuffers(VideoDevice device, int encodedBuffersCount) { int buffersCount = device.allocateEncodedBuffers(encodedBuffersCount); if (buffersCount == encodedBuffersCount) { Logger.logVerbose("eControlCode.REQBUFS completed, created {0} encoded buffers", buffersCount); } else { Logger.logInfo("eControlCode.REQBUFS: asked for {0} encoded buffer, GPU driver created {1} instead", buffersCount, buffersCount); } return(buffersCount); }