MHistogramBuffer Class Reference

class MHistogramBuffer

This class is used to pass histogram data between the camera device and a client that implements MCameraObserver2.

The buffer may contain multiple histograms.

The class allows the client to access the data as a descriptor to a kernel chunk.

use MHistogramV2Buffer

Member Functions Documentation

ChunkL()

RChunk &ChunkL()[pure virtual]

use RChunk& MHistogramV2Buffer::ChunkL()

Returns a handle to the chunk that contains the histogram data. The RChunk is exposed so that it can potentially be shared between multiple processes.
Note:

The descriptor pointer returned by DataL() is effectively derived from this RChunk.

leave
KErrNotSupported if the chunk is not available.

ChunkOffsetL(TUint)

TInt ChunkOffsetL(TUintaIndex)[pure virtual]

use TInt MHistogramV2Buffer::ChunkOffsetL()

Returns the offset in the chunk (returned by ChunkL()) that contains the data for the histogram at a specified index within the histogram buffer.

leave
KErrArgument if aIndex is not between 0 and (NumOfHistograms() - 1).

Parameters

TUint aIndexThe index of the required histogram in the buffer. This must be between 0 and (NumOfHistograms() - 1).

DataL(TUint)

TDesC8 *DataL(TUintaIndex)[pure virtual]

use TDesC8* MHistogramV2Buffer::DataL()

Allows access to a given histogram in the histogram buffer via a descriptor.

leave
KErrArgument if aIndex is not between 0 and (NumOfHistograms() - 1).

Parameters

TUint aIndexThe index of the required histogram in the buffer. This must be between 0 and (NumOfHistograms() - 1).

ElementSizeL(TUint)

TInt ElementSizeL(TUintaIndex)[pure virtual]

use TInt MHistogramV2Buffer::ElementSize()

Returns the number of bits per histogram element value used to store the histogram data at a specified index within the histogram buffer.

The number of bits per histogram element will be decided by the ECam implementation and it may vary for each histogram within the histogram buffer.

NumOfElementsL()
leave
KErrArgument if aIndex is not between 0 and (NumOfHistograms() - 1).

Parameters

TUint aIndexThe index of the required histogram in the buffer. This must be between 0 and (NumOfHistograms() - 1).

HandleL(TUint)

TUint HandleL(TUintaIndex)[pure virtual]

Only one histogram is available per buffer in MHistogramV2Buffer

Returns the handle of a particular histogram stored in the buffer.

leave
KErrArgument if aIndex is not between 0 and (NumOfHistograms() - 1).

Parameters

TUint aIndexThe index of the required histogram in the buffer. This must be between 0 and (NumOfHistograms() - 1).

ImageNumberL(TUint)

TInt ImageNumberL(TUintaIndex)[pure virtual]

Only one histogram is available per buffer in MHistogramV2Buffer

Returns the image number or frame index to which the histogram stored at the specified index within the buffer relates.

leave
KErrArgument if aIndex is not between 0 and (NumOfHistograms() - 1).

Parameters

TUint aIndexThe index of the required histogram in the buffer. This must be between 0 and (NumOfHistograms() - 1).

NumOfElementsL(TUint)

TInt NumOfElementsL(TUintaIndex)[pure virtual]

use TInt MHistogramV2Buffer::NumOfElements()

Returns the number of elements in the histogram at a specified index within the histogram buffer.

This value can be used along with the element size obtained by calling ElementSizeL(), to calculate the exact size of histogram data ( element-size x number-of-elements = histogram-size ).

leave
KErrArgument if aIndex is not between 0 and (NumOfHistograms() - 1).

Parameters

TUint aIndexThe index of the required histogram in the buffer. This must be between 0 and (NumOfHistograms() - 1).

NumOfHistograms()

TInt NumOfHistograms()[pure virtual]

Only one histogram is available per buffer in MHistogramV2Buffer

Returns the number of histograms contained within the buffer.

This value will not depend upon the number of images for which histograms are requested by the client, but on the number of histograms generated by the ECam implementation. In the case where the driving mode (bracket mode, video mode, etc.) returns more than one image or frame the ECam implementation may not generate histograms for every valid image or frame. This can happen, for example, if there are no changes in the histogram data or if there are performance problems.

Release()

voidRelease()[pure virtual]

use void MHistogramV2Buffer::Release()

Releases the buffer. Once the client has processed the histogram data it should use this method to signal to the camera that the buffer can be deleted or re-used.

TypeL(TUint)

CCamera::CCameraHistogram::THistogramType TypeL(TUintaIndex)[pure virtual]

use CCamera::CCameraV2Histogram::THistogramType MHistogramV2Buffer::Type()

Returns the type of histogram data that is available at the specified index within the histogram buffer.

leave
KErrArgument if aIndex is not between 0 and (NumOfHistograms() - 1).

Parameters

TUint aIndexThe index of the required histogram in the buffer. This must be between 0 and (NumOfHistograms() - 1).