Original Symbian headers
Selected EUSER, Window Server, networking, graphics and device declarations
Loading...
Searching...
No Matches
MCameraBuffer Class Referenceabstract

Class used for passing camera picture data between camera and client in the V2 observer. More...

#include <ecam.h>

Public Member Functions

virtual TInt NumFrames ()=0
 Returns the number of frames of image data contained within the buffer.
 
virtual TDesC8 * DataL (TInt aFrameIndex)=0
 Returns a pointer to a descriptor containing a frame of camera data.
 
virtual CFbsBitmap & BitmapL (TInt aFrameIndex)=0
 Returns a reference to a FBS bitmap containing a frame of image data.
 
virtual RChunk & ChunkL ()=0
 Returns a handle for the chunk that contains the camera data.
 
virtual TInt ChunkOffsetL (TInt aFrameIndex)=0
 Returns the offset into the chunk that contains the frame specified by aFrameIndex.
 
virtual TInt FrameSize (TInt aFrameIndex)=0
 Returns the size of the data in bytes that comprises the frame specified by aIndex.
 
virtual void Release ()=0
 Releases the buffer.
 

Public Attributes

TInt iIndexOfFirstFrameInBuffer
 Sequential frame number of the first frame in the buffer, counting from when CCamera::StartVideoCapture() was called and including frames dropped due to lack of buffers.
 
TTimeIntervalMicroSeconds iElapsedTime
 Time elapsed from when CCamera::StartVideoCapture() was called until the first frame in the buffer was captured.
 

Detailed Description

Class used for passing camera picture data between camera and client in the V2 observer.

Used for viewfinder, image capture and video capture.

The class offers APIs for the client to access the data as a descriptor, a bitmap or a handle to a kernel chunk. Depending on the format previously requested by the client, one or more of the API choices may be inappropriate e.g. an image will not be avaiable as a bitmap in the FBS unless the client has specifically requested it.

The buffer may contain multiple frames.

API status
Published to all clients. Released API.

Definition at line 323 of file ecam.h.

Member Function Documentation

◆ BitmapL()

virtual CFbsBitmap & MCameraBuffer::BitmapL ( TInt  aFrameIndex)
pure virtual

Returns a reference to a FBS bitmap containing a frame of image data.

Parameters
aFrameIndexThe index of the required frame. For a still image this should be 0.

Leave condition: KErrArgument if aIndex is out of range and Leave condition: KErrNotSupported if the picture data is not a FBS bitmap.

Returns
A reference to a FBS bitmap containing a frame of picture data.

◆ ChunkL()

virtual RChunk & MCameraBuffer::ChunkL ( )
pure virtual

Returns a handle for the chunk that contains the camera data.

The RChunk is exposed so that it can potentially be shared between multiple processes. The ptr returned by DataL(aFrameIndex) is effectively derived from this RChunk (where both are supported simulataneously). The equivalent ptr would be: TPtrC8* ptr; ptr.Set(ChunkL().Base() + ChunkOffset(aFrameIndex), FrameSize(aFrameIndex));

Leave condition: KErrNotSupported if the chunk is not available.

Returns
A reference to a handle to the chunk that contains the buffer of picture data.

◆ ChunkOffsetL()

virtual TInt MCameraBuffer::ChunkOffsetL ( TInt  aFrameIndex)
pure virtual

Returns the offset into the chunk that contains the frame specified by aFrameIndex.

The client would add this offset to the ptr returned by ChunkL().Base() to get the address of the start of the frame data.

Parameters
aIndexThe index of the required frame. For a still image this should be 0.

Leave condition: KErrNotSupported if the chunk is not available Leave condition: KErrArgument if aIndex is out of range.

Returns
The offset into the chunk for the start of the frame.

◆ DataL()

virtual TDesC8 * MCameraBuffer::DataL ( TInt  aFrameIndex)
pure virtual

Returns a pointer to a descriptor containing a frame of camera data.

The format will have been previously specified by a CCamera class method.

Parameters
aFrameIndexThe index of the required frame. For a still image this should be 0.

Leave condition: KErrArgument if aIndex is out of range and Leave condition: KErrNotSupported if the camera data is actually bitmaps in the FBS.

Returns
A pointer to a descriptor containing a frame of image data.

◆ FrameSize()

virtual TInt MCameraBuffer::FrameSize ( TInt  aFrameIndex)
pure virtual

Returns the size of the data in bytes that comprises the frame specified by aIndex.

Parameters
aFrameIndexThe index of the required frame. For a still image this should be 0.

Leave condition: KErrArgument if aIndex is out of range.

Returns
Returns the size of the data in bytes that comprises the frame.

◆ NumFrames()

virtual TInt MCameraBuffer::NumFrames ( )
pure virtual

Returns the number of frames of image data contained within the buffer.

This would be 1 for a image capture, and match the requested count for video capture. For other methods in this class that take a aFrameIndex param, 0 <= aFrameIndex < NumFrames()

Returns
The number of frames of image data in the buffer.

◆ Release()

virtual void MCameraBuffer::Release ( )
pure virtual

Releases the buffer.

Once the client has processed the picture data it should use this method to signal to CCamera that the buffer can be re-used.

Member Data Documentation

◆ iElapsedTime

TTimeIntervalMicroSeconds MCameraBuffer::iElapsedTime

Time elapsed from when CCamera::StartVideoCapture() was called until the first frame in the buffer was captured.

Always zero for still images.

Definition at line 424 of file ecam.h.

◆ iIndexOfFirstFrameInBuffer

TInt MCameraBuffer::iIndexOfFirstFrameInBuffer

Sequential frame number of the first frame in the buffer, counting from when CCamera::StartVideoCapture() was called and including frames dropped due to lack of buffers.

Always zero for still images. May also be used by client viewfinders.

Definition at line 418 of file ecam.h.


The documentation for this class was generated from the following file: