I have an IP camera streaming video into blackbox buffer code that a company provided me. They also provided me example code of how i can take the buffer and convert it to an unsigned char* array. With this array I can create an AVI file and save the video buffer to it and create a video file.
for( unsigned short lLine = 0; lLine < mSizeY -1; lLine++)
{
NumOfLines = lLine;
unsigned char *lCurLine = (unsigned char *)aBuffer + (lLine) * mSizeX * mBPP;
unsigned char *lCurLineInv = temp + (mSizeY - lLine - 1) * mSizeX * mBPP;
::memcpy(lCurLineInv, lCurLine, mSizeX * mBPP );
}
AVIStreamWrite(mAVICompressedStream, mLastSample, 1, temp, mImageSize, AVIIF_KEYFRAME, &lSamplesWritten, &lBytesWritten )
Its a terrible system in so many ways. Including the fact that it's all done in VFW
Currently im doing all of this code in C# and in a C++/CLi DLL. I know how to use Directshow.Net and i was wondering if there is a more elegant way to save this video buffer i have to an avi file or something that i can easily work on in say DirectShow or DirectShow.net?