I'm copying a byte buffer in a Directshow
filter into a buffer provided from a C#
program, the buffer contains a bitmap of the current frame and so varies in size depending on video width and height.
I find smaller videos are retrieving the video frame super fast, however larger videos are taking some time. I'm doing what I think is the simplest way (this doesn't mean I'm right that's why I'm asking).
Please can you tell me if this is the fastest way of copying the memory ? Thanks
C++ code:
STDMETHODIMP CSampleGrabber::GetBuffer(byte* pVideoBuffer)
{
int p=0;
while (p< nBufSize) {
pVideoBuffer[p]=pBufferData[p];
p++;
}
}