Grabber::newMemBufferCollection Method [Deprecated]

Creates a new memory buffer collection.
Syntax:
tMemBufferCollectionPtr newMemBufferCollection( DWORD count = 1 ) const;
tMemBufferCollectionPtr newMemBufferCollection( SIZE size,
                                                tColorformatEnum colorformat,
                                                DWORD count = 1 ) const;
tMemBufferCollectionPtr newMemBufferCollection( SIZE size,
                                                tColorformatEnum colorformat,
                                                DWORD buffersize,
                                                BYTE* buffers[],
                                                DWORD count ) const;
tMemBufferCollectionPtr newMemBufferCollection(  DWORD buffersize,
                                                 BYTE* buffers [],
                                                 DWORD count ) const;
Parameter Description
size

Specifies the size of the frames to be stored in the collection.

count

Specifies the number of frames to be stored in the collection. This value should be at least 1

colorformat

Specifies the color format of the frames to be stored in the collection.

buffers

An array of pointers to user allocated buffers.

buffersize

The size of a single user allocated buffer.

Return value:

A pointer to the MemBufferCollection.

Remarks:

This method creates a new MemBufferCollection.

An error will be generated, if count is 0.

Giving just a count value as an argument will create a MemBufferCollection which fits the current settings of the video capture device. It will contain count distinct MemBuffers. The memory required will be allocated by this method.

If you provide a size, colorformat and count parameter to the constructor, a MemBufferCollection which fits these parameters will be created and memory for the buffers will be allocated.

You may also provide buffers to the MemBufferCollection which were previously allocated elsewhere in your application, by passing an array of pointers and information about the size of each buffer to the constructor. This should be handled very carefully as actions on the MemBufferCollection will take place in kernel-mode. Thus providing wrong buffersize information to the constructor will lead almost certainly to a system crash.

Information:

This method is deprecated since version 3.0.
Use the FrameHandlerSink instead of the FrameGrabberSink and create the MemBufferCollection with FrameHandlerSink::create or MemBufferCollection::create.

See also: Grabber, Grabber::setActiveMemBufferCollection, Grabber::getUserMemBufferSize

<< Grabber

This site is part of The Imaging Source Network. Other sites include Company Portal, Image Processing, Astronomy Cameras, Astronomy Cameras Blog, Blog caméras d'astronomie, Astronomy Cameras Competition, TX Text Control, LiveDocx, phpLiveDocx and Forums.