PDA

View Full Version : Allocating the memory buffers



Kay
March 23, 2004, 16:11:30
Stefan,

Let's say that the video format that I'm using is 720x480, RGB24. Therefore, the size of the buffer should be 1036800 bytes (720 * 480 * 3).

I would like to take care of allocating the memory buffers myself, but to set the size of the buffer to a multiple of the disk volume sector size. This allows me to optimize the storage of the frames to disk.

For example, if I'm using a disk sector size of 4096 bytes, then I would want each frame buffer to be a multiple of 4096 in size, or 1040384.

Can I use
newMemoryBufferCollection

Kay
March 23, 2004, 16:14:17
Oops,

I hit the 'tab' key and my last entry got posted before it was finished.

Here is all the data:

Let's say that the video format that I'm using is 720x480, RGB24. Therefore, the size of the buffer should be 1036800 bytes (720 * 480 * 3).

I would like to take care of allocating the memory buffers myself, but to set the size of the buffer to a multiple of the disk volume sector size. This allows me to optimize the storage of the frames to disk.

For example, if I'm using a disk sector size of 4096 bytes, then I would want each frame buffer to be a multiple of 4096 in size, or 1040384.

Can I use 'newMemoryBufferCollection(1040384, pBuffers, 4)

In other words, will the buffers be okay, even though their size do not correspond to 720x480x3.

Thanks,

Peter

Stefan Geissler
March 24, 2004, 08:04:33
Peter,

yes, i think so. The memory buffer only saves the frame data as sequence of bytes.