class CCamera::CCameraSnapshot : public CBase |
This class allows the client to request snapshot data in a specified image format for both still images and video.
Snapshot object may be created out of new classes: CCameraImageCapture and CCameraVideoCaptureControl. The client selects snapshot parameters calling PrepareSnapshotL(const TSnapshotParameters& aSnapshotParameters). It can then enable and disable the snapshot generation by calling EnableSnapshotL() and DisableSnapshotL(). The client application using this API shall provide MCaptureImageObserver and MCaptureVideoObserver interface. Callbacks available are MCaptureImageObserver:: ClientSnapshotForImageReady and MCaptureVideoObserver::ClientSnapshotReady.
Snapshots are supposed to be displayed on a particular viewfinder. So, while destruction, client shall destroy snapshot first. In general, child objects shall be destroyed before the parent objects.
Following is valid for older clients who created snapshots using NewL method:- The client selects snapshot parameters calling PrepareSnapshotL(). It can then start and stop receiving notifications from the ECam implementation by calling StartSnapshot() and StopSnapshot(). The client application using this API should provide MCameraObserver2 interface to be signalled, with event KUidECamEventCameraSnapshot, when snapshot data is available to be retrieved from the ECam implementation. The client can then retrieve the snapshot data from the ECam implementation calling SnapshotDataL().
This class provides a standardised client interface for the camera snapshot. Classes cannot be derived from it.
If the class methods leave, the output type parameter value is not guaranteed to be valid.
Public Member Functions | |
---|---|
~CCameraSnapshot() | |
IMPORT_C CCamera::CCameraV2Histogram * | CreateHistogramHandleL() |
IMPORT_C void | DisableSnapshotL() |
IMPORT_C void | EnableSnapshotL() |
IMPORT_C void | GetSnapshotParametersL(TSnapshotParameters &) |
IMPORT_C void | GetSnapshotStatusL(TSnapshotState &) |
IMPORT_C TBool | IsSnapshotActive() |
IMPORT_C CCameraSnapshot * | NewL(CCamera &) |
IMPORT_C void | PrepareSnapshotL(CCamera::TFormat, const TPoint &, const TSize &, const TRgb &, TBool) |
IMPORT_C void | PrepareSnapshotL(CCamera::TFormat, const TSize &, TBool) |
IMPORT_C void | PrepareSnapshotL(const TSnapshotParameters &) |
IMPORT_C void | SelectSnapshotVideoFramesL(TSnapshotVideoFrames) |
IMPORT_C void | SetBgColorL(const TRgb &) |
IMPORT_C void | SetPositionL(const TPoint &) |
IMPORT_C void | SetSnapshotParametersL(const TSnapshotParameters &) |
IMPORT_C MCameraBuffer & | SnapshotDataL(RArray< TInt > &) |
IMPORT_C void | StartSnapshot() |
IMPORT_C void | StopSnapshot() |
IMPORT_C TUint32 | SupportedFormats() |
Private Member Functions | |
---|---|
CCameraSnapshot(CCamera &) | |
void | ConstructL() |
void | ConstructL(const MImplementationFactory &, TInt) |
IMPORT_C CCameraSnapshot * | CreateL(CCamera &, MImplementationFactory &, TInt) |
Public Member Enumerations | |
---|---|
enum | TSnapshotState { ESnapshotNotCreated, ESnapshotInactive, ESnapshotActive, ESnapshotDisabled } |
enum | TSnapshotVideoFrames { ESnapshotVideoFirstFrame, ESnapshotVideoLastFrame, ESnapshotVideoFirstAndLastFrame, ESnapshotVideoEveryFrame } |
Private Attributes | |
---|---|
MCameraSnapshot * | iImpl |
MCameraSnapshot2 * | iImpl2 |
CCamera & | iOwner |
void | ConstructL | ( | const MImplementationFactory & | aImplFactory, |
TInt | aClientViewFinderId | |||
) | [private] |
const MImplementationFactory & aImplFactory | |
TInt aClientViewFinderId |
IMPORT_C CCameraSnapshot * | CreateL | ( | CCamera & | aCamera, |
MImplementationFactory & | aImplFactory, | |||
TInt | aClientViewFinderId | |||
) | [private, static] |
IMPORT_C void | GetSnapshotParametersL | ( | TSnapshotParameters & | aSnapshotParameters | ) |
TSnapshotParameters & aSnapshotParameters |
IMPORT_C void | GetSnapshotStatusL | ( | TSnapshotState & | aSnapshotState | ) | const |
TSnapshotState & aSnapshotState |
IMPORT_C CCameraSnapshot * | NewL | ( | CCamera & | aCamera | ) | [static] |
CCamera & aCamera |
IMPORT_C void | PrepareSnapshotL | ( | CCamera::TFormat | aFormat, |
const TPoint & | aPosition, | |||
const TSize & | aSize, | |||
const TRgb & | aBgColor, | |||
TBool | aMaintainAspectRatio | |||
) |
CCamera::TFormat aFormat | |
const TPoint & aPosition | |
const TSize & aSize | |
const TRgb & aBgColor | |
TBool aMaintainAspectRatio |
IMPORT_C void | PrepareSnapshotL | ( | CCamera::TFormat | aFormat, |
const TSize & | aSize, | |||
TBool | aMaintainAspectRatio | |||
) |
CCamera::TFormat aFormat | |
const TSize & aSize | |
TBool aMaintainAspectRatio |
IMPORT_C void | PrepareSnapshotL | ( | const TSnapshotParameters & | aSnapshotParameters | ) |
const TSnapshotParameters & aSnapshotParameters |
IMPORT_C void | SelectSnapshotVideoFramesL | ( | TSnapshotVideoFrames | aSnapshotVideoFrames | ) |
TSnapshotVideoFrames aSnapshotVideoFrames |
IMPORT_C void | SetBgColorL | ( | const TRgb & | aBgColor | ) |
const TRgb & aBgColor |
IMPORT_C void | SetPositionL | ( | const TPoint & | aPosition | ) |
const TPoint & aPosition |
IMPORT_C void | SetSnapshotParametersL | ( | const TSnapshotParameters & | aSnapshotParameters | ) |
const TSnapshotParameters & aSnapshotParameters |
IMPORT_C MCameraBuffer & | SnapshotDataL | ( | RArray< TInt > & | aFrameIndexOrder | ) |
Describes the state of snapshot. The enumeration list may be extended in future.
ESnapshotNotCreated |
Snapshot has not been prepared. |
ESnapshotInactive |
Snapshot has been prepared but not yet enabled. |
ESnapshotActive |
Snapshot has been prepared and enabled but not yet disabled. |
ESnapshotDisabled |
Snapshot has been disabled. |
Specifies the video frames to be used in order to create snapshots fo video. The enumeration list may be extended in future.
ESnapshotVideoFirstFrame |
Snapshot for video created from first video frame. Used by default. |
ESnapshotVideoLastFrame |
Snapshot for video created from last video frame. |
ESnapshotVideoFirstAndLastFrame |
Snapshot for video created from first and last video frame. |
ESnapshotVideoEveryFrame |
Snapshot for video created from every video frame. |