IC Imaging Control C++

MemBuffer

MemBuffer

A MemBuffer represents a single buffer in a MemBufferCollection (organized as a ring buffer).

It is possible to lock a buffer, so that the buffer cannot be overwritten by the grabber. If the grabber tries to overwrite a locked buffer, it sets the WasLockedFlag and tries to write to the next buffer. If all buffers are locked, the grabber does not copy any frames and waits until an unlocked buffer is available.

Information

Header File: tisudshl
Namespace: DShowLib

Inheritance

IFrame
MemBuffer

Methods

Method Description
MemBuffer

Constructs a new MemBuffer by copying all data of the specified buffer.

forceUnlock

This method sets the lock count to 0. This unlocks the MemBuffer completely.

getBitmapInfoHeader

This method returns a pointer to a BitmapInfoHeader structure that describes the image data contained in this buffer.

getBitsPerPixel

Returns the number of bits that represent a single pixel.

getBufferSize

Returns the size of the MemBuffer in bytes.

getCollection

This method returns a reference to the MemBufferCollection that contains this buffer.

getCollectionPos

Returns the index of this buffer in the containing MemBufferCollection.

getColorformat

Returns the color format of this buffer.

getFrameType

returns an object that describes the pixel depth, pixel organization and the extent of the image data stored in the buffer.

getSize

Returns the width and height of the image data stored in this buffer.

getWasLockedFlag

Returns true, if the buffer was locked when the grabber tried to write data to it.

isLocked

This method returns true, if the buffer is locked.

lock

This method increments the lock count of this buffer by 1, so that the grabber cannot overwrite the data in this buffer.

save

Writes the buffer to disk as a .BMP file.

unlock

This method decrements the lock count by 1.

Type Definitions

Type Description
tBmInfHPtr

A pointer to a BITMAPINFOHEADER structure.

<< Classes

Get in touch with us


About The Imaging Source

Established in 1990, The Imaging Source is one of the leading manufacturers of industrial cameras, frame grabbers and video converters for production automation, quality assurance, logistics, medicine, science and security.

Our comprehensive range of cameras with USB 3.1, USB 3.0, USB 2.0, GigE interfaces and other innovative machine vision products are renowned for their high quality and ability to meet the performance requirements of demanding applications.

Automated Imaging Association ISO 9001:2015 certified

Contact us