I'm receiving the following as an argument in a callback function in C++.
byte const* Buffer()
The Buffer is a pointer to a buffer containing video frame. How can I save that to a file?
Thanks
I'm receiving the following as an argument in a callback function in C++.
byte const* Buffer()
The Buffer is a pointer to a buffer containing video frame. How can I save that to a file?
Thanks
The pointer shows that C solution will be more appropriate:
FILE * videoFile;
byte buffer*; //you already received it
int buffer_len; // you receive that too
videoFile = fopen ( "myvideo.mp4" , "wb" );
fwrite (buffer , 1 , buffer_len , videoFile);
fclose (videoFile);