CCamera::CCameraVideoCaptureControl Class Reference

class CCamera::CCameraVideoCaptureControl : public CBase

CCamera Video Capture Control class exposes an API for controlling operations related to video capture. This gives priority to the low latency aspect by postponing the post processing activity involved with current video captured data(while stopping the video capture) in order to capture/prepare for next still image.

Note:

This class is not intended for sub-classing and used to standardise existing varieties of implementations.

If the class methods leave, any reference argument is not guaranteed to be valid.

Clients must implement an MCaptureVideoObserver in order to use this CCameraVideoCaptureControl API. MCameraObserver2::VideoBufferReady will not be used with this class.

Inherits from

  • CCamera::CCameraVideoCaptureControl
Public Member Functions
~CCameraVideoCaptureControl()
IMPORT_C CCamera::CCameraV2Histogram *CreateHistogramHandleL()
IMPORT_C voidGetDisabledSettingsL(RArray< TUid > &)
IMPORT_C voidGetEmbeddedStillCaptureSupportInfoL(TInt &)
IMPORT_C voidGetFadingEffectStateL(TFadingEffectState &)
IMPORT_C voidGetPixelAspectsSupportedL(TUint &, CCamera::TFormat, const TSize &)
IMPORT_C voidGetPrepareVideoParametersL(TPrepareVideoParameters &)
IMPORT_C voidGetRangeAffectedSettingsL(RArray< TUid > &)
IMPORT_C CCamera::CCameraSnapshot *GetSnapshotHandleL(TInt)
IMPORT_C CCamera::CCameraImageProcessing *GetTransformationHandleL()
IMPORT_C voidGetValueAffectedSettingsL(RArray< TUid > &)
IMPORT_C voidGetVideoCaptureStateL(TVideoCaptureState &)
IMPORT_C voidGetVideoCaptureSupportInfoL(TInt &)
IMPORT_C voidGetVideoFormatsSupportedL(TUint &, const TSize &)
IMPORT_C CCameraVideoCaptureControl *NewL(CCamera &, MCaptureVideoObserver &)
IMPORT_C voidPauseVideoCapture()
IMPORT_C voidPrepareVideoCapture(const TPrepareVideoParameters &)
IMPORT_C voidReleaseVideoResource()
IMPORT_C voidResumeVideoCaptureL()
IMPORT_C voidSetFadingEffectState(TFadingEffectState)
IMPORT_C voidStartVideoCaptureL()
IMPORT_C voidStopVideoCapture()
Private Member Functions
CCameraVideoCaptureControl(CCamera &)
voidConstructL(MCaptureVideoObserver &)
voidGetConversionCoefficientL(TYuvCoefficients &)
voidGetSupportedConversionCoefficientsL(TUint &)
voidSetConversionCoefficient(TYuvCoefficients)
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
Public Member Enumerations
enumTEmbeddedStillCaptureTypes { EEmbeddedStillCaptureNotSupported = 0x00, EEmbeddedStillCaptureSupported = 0x01 }
enumTFadingEffectState { EFadingEffectEnabled, EFadingEffectDisabled }
enumTVideoCaptureState { EVideoCapturePrepared, EVideoCaptureActive, EVideoCapturePaused, EVideoCaptureInActive }
enumTVideoCaptureType { EVideoCaptureNotSupported = 0x00, EClientVideoCapture = 0x01, EDirectVideoCapture = 0x02 }
Private Attributes
MCameraVideoCaptureControl *iImpl
CCamera &iOwner

Constructor & Destructor Documentation

CCameraVideoCaptureControl(CCamera &)

CCameraVideoCaptureControl(CCamera &aOwner)[private]

Parameters

CCamera & aOwnera reference to a CCamera object.

~CCameraVideoCaptureControl()

IMPORT_C~CCameraVideoCaptureControl()

Destructor

Note:

The child objects created out of this video capture control class object shall be delete beforehand. Various child objects are snapshot, image processing and histograms.

Member Functions Documentation

ConstructL(MCaptureVideoObserver &)

voidConstructL(MCaptureVideoObserver &aCaptureVideoObserver)[private]

CCameraVideoCaptureControl second phase constructor.

Function used to initialise internal state of the object. Uses reference to the camera to retrieve Camera Video Capture Control interface pointer.

leave
KErrNoMemory Out of memory.

Parameters

MCaptureVideoObserver & aCaptureVideoObserverReference to the capture video observer.

CreateHistogramHandleL()

IMPORT_C CCamera::CCameraV2Histogram *CreateHistogramHandleL()const

Retrieve pointer to histogram API in order to use it specifically for the video capture.

leave
May leave with any error code.
Note:

Different types of histogram may be used for video capture. Every time this method will be called on the CCameraVideoCaptureControl class object, a new type of histogram will be created.

GetConversionCoefficientL(TYuvCoefficients &)

voidGetConversionCoefficientL(TYuvCoefficients &aConversionCoefficients)const [private]

Retrieves the currently used YUV conversion coefficients.

leave
May leave with any error code.

Parameters

TYuvCoefficients & aConversionCoefficientsCurrently used TYuvCoefficients

GetDisabledSettingsL(RArray< TUid > &)

IMPORT_C voidGetDisabledSettingsL(RArray< TUid > &aDisabledSettings)const

Retrieves the camera settings whose value got affected once the desired video settings (frame rate/frame size) are in place. This method may be called by the client after receiving the notification KUidECamEventVideoCaptureControlSettingsDisabled.

Parameters

RArray< TUid > & aDisabledSettingsRetrieves the list of disabled settings

GetEmbeddedStillCaptureSupportInfoL(TInt &)

IMPORT_C voidGetEmbeddedStillCaptureSupportInfoL(TInt &aSupportedEmbeddedStillCaptureTypes)const

Informs whether or not the 'embedded still capture' feature is supported. Allowing still image capture in between on-going video capture is referred to as embedded still capture.

leave
May leave with any error code.

Parameters

TInt & aSupportedEmbeddedStillCaptureTypesRetrieves the supported embedded still capture. The TInt is retrieved as a bit field of supported TEmbeddedStillCaptureTypes.

GetFadingEffectStateL(TFadingEffectState &)

IMPORT_C voidGetFadingEffectStateL(TFadingEffectState &aFadingEffectState)const

Retrieves the fading effect state for video capture.

leave
May leave with any error code.

Parameters

TFadingEffectState & aFadingEffectStateRetrieves the current fading effect state for video capture.

GetPixelAspectsSupportedL(TUint &, CCamera::TFormat, const TSize &)

IMPORT_C voidGetPixelAspectsSupportedL(TUint &aPixelAspectsSupported,
CCamera::TFormataVideoFormat,
const TSize &aSize
)const

Retrieves the supported pixel aspect ratio for a given resolution in case of video.

leave
May leave with any error code.

Parameters

TUint & aPixelAspectsSupportedA bit field which retrieves the supported pixel aspect ratio for a given resolution. Pixel aspect ratio have been defined as CCamera::CCameraAdvancedSettings::TPixelAspectRatio
CCamera::TFormat aVideoFormatThe video format for which the supported pixel aspect ratio have to be retrieved.
const TSize & aSizeThe resolution (or size) for which the supported pixel aspect ratio have to be retrieved.

GetPrepareVideoParametersL(TPrepareVideoParameters &)

IMPORT_C voidGetPrepareVideoParametersL(TPrepareVideoParameters &aPrepareVideoParameters)const

Parameters

TPrepareVideoParameters & aPrepareVideoParameters

GetRangeAffectedSettingsL(RArray< TUid > &)

IMPORT_C voidGetRangeAffectedSettingsL(RArray< TUid > &aRangeAffectedSettings)const

Retrieves the camera settings whose range got affected once the desired video settings (frame rate/frame size) are in place. This method may be called by the client after receiving the notification KUidECamEventVideoCaptureControlSettingsRangeChanged.

Parameters

RArray< TUid > & aRangeAffectedSettingsRetrieves the list of range affected settings

GetSnapshotHandleL(TInt)

IMPORT_C CCamera::CCameraSnapshot *GetSnapshotHandleL(TIntaClientViewFinderId)const

Retrieve pointer to snapshot API in order to use it specifically for the video capture.

leave
May leave with any error code.

Parameters

TInt aClientViewFinderIdThe client viewfinder on which this client snapshot will be displayed.

GetSupportedConversionCoefficientsL(TUint &)

voidGetSupportedConversionCoefficientsL(TUint &aSupportedConversionCoefficients)const [private]

Retrieves the supported YUV conversion coefficient in case of video.

leave
May leave with any error code.

Parameters

TUint & aSupportedConversionCoefficientsA bit field which retrieves the supported YUV conversion coefficient. YUV conversion coefficients have been defined as TYuvCoefficients

GetTransformationHandleL()

IMPORT_C CCamera::CCameraImageProcessing *GetTransformationHandleL()const

Retrieve pointer to image processing API in order to use it specifically for the video capture.

leave
May leave with any error code.

GetValueAffectedSettingsL(RArray< TUid > &)

IMPORT_C voidGetValueAffectedSettingsL(RArray< TUid > &aValueAffectedSettings)const

Retrieves the camera settings whose value got affected once the desired video settings (frame rate/frame size) are in place. This method may be called by the client after receiving the notification KUidECamEventVideoCaptureControlSettingsValueChanged.

Parameters

RArray< TUid > & aValueAffectedSettingsRetrieves the list of value affected settings

GetVideoCaptureStateL(TVideoCaptureState &)

IMPORT_C voidGetVideoCaptureStateL(TVideoCaptureState &aVideoCaptureState)const

Retrieves the current video capture state.

leave
May leave with any error code.

Parameters

TVideoCaptureState & aVideoCaptureStateRetrieves the current video capture state.

GetVideoCaptureSupportInfoL(TInt &)

IMPORT_C voidGetVideoCaptureSupportInfoL(TInt &aSupportedVideoCaptureTypes)const
Retrieves the various types of video capture supported.
leave
May leave with any error code.

Parameters

TInt & aSupportedVideoCaptureTypesRetrieves the supported video capture type. The TInt is retrieved as a bit field of supported TVideoCaptureType.

GetVideoFormatsSupportedL(TUint &, const TSize &)

IMPORT_C voidGetVideoFormatsSupportedL(TUint &aVideoFormatsSupported,
const TSize &aSize
)const

Retrieves the supported video formats for a given resolution.

leave
May leave with any error code.

Parameters

TUint & aVideoFormatsSupportedA bit field which retrieves the supported video formats for a given resolution. Formats have been defined as CCamera::TFormat
const TSize & aSizeThe resolution (or size) for which the total number of supported video formats have to be retrieved.

NewL(CCamera &, MCaptureVideoObserver &)

IMPORT_C CCameraVideoCaptureControl *NewL(CCamera &aCamera,
MCaptureVideoObserver &aCaptureVideoObserver
)[static]

Factory function for creating the CCameraVideoCaptureControl object.

leave
KErrNoMemory Out of memory Or any other system-wide error code.
leave
KErrExtensionNotSupported When NewL/NewDuplicateL used instead of New2L/NewDuplicate2L.

Parameters

CCamera & aCameraA reference to a CCamera object providing the settings.
MCaptureVideoObserver & aCaptureVideoObserverReference to the capture video observer.

PauseVideoCapture()

IMPORT_C voidPauseVideoCapture()

Pauses the on-going video capture. MCaptureVideoObserver::VideoBufferReady() callback will not be received by the client until the video capture is resumed.

PrepareVideoCapture(const TPrepareVideoParameters &)

IMPORT_C voidPrepareVideoCapture(const TPrepareVideoParameters &aPrepareVideoParameters)

Asynchronous method to prepare for video capture.

Performs setup and allocation of memory prior to calling StartVideoCapture() to keep the latency of that function to a minimum.

Note:

Event KUidECamEventVideoCaptureControlPrepareComplete is used to notify clients about completing the preparation for video capture.

Next PrepareVideoCapture can be called only after receiving the notification KUidECamEventReadyForNextPrepare.

If some camera settings get affected because of desired video settings such as frame rate/frame size, specific notifications will be sent to the client about camera settings being affected.

Event KUidECamEventVideoCaptureControlSettingsRangeChanged: informs that range of certain camera settings have been changed. Client may call GetRangeAffectedSettingsL(RArray<TUid>& aRangeAffectedSettings) const to get the list of affected camera settings.

Event KUidECamEventVideoCaptureControlSettingsValueChanged: informs that value of certain camera settings have been changed. Client may call GetValueAffectedSettingsL(RArray<TUid>& aValueAffectedSettings) const to get the list of affected camera settings.

Event KUidECamEventVideoCaptureControlSettingsDisabled: informs that certain camera settings have been disabled. Client may call GetDisabledSettingsL(RArray<TUid>& aDisabledSettings) const to get the list of affected camera settings.

CCamera::PrepareVideoCaptureL(TFormat aFormat,TInt aSizeIndex,TInt aRateIndex,TInt aBuffersToUse,TInt aFramesPerBuffer) ReleaseVideoResource()

Parameters

const TPrepareVideoParameters & aPrepareVideoParametersParameters necessary to prepare for video capture.

ReleaseVideoResource()

IMPORT_C voidReleaseVideoResource()

Frees the video resources which were set up as a result of CCameraVideoCaptureControl::PrepareVideoCapture call. If this methid is called while PrepareVideoCapture call is outstanding, then this will be equivalent to cancelling the PrepareVideoCapture call and release any allocated resources.

PrepareVideoCapture(const TPrepareVideoParameters& aPrepareVideoParameters)

ResumeVideoCaptureL()

IMPORT_C voidResumeVideoCaptureL()

Resumes the on-going video capture. MCaptureVideoObserver::VideoBufferReady() callback will again be received by the client.

leave
May leave with any error code.

SetConversionCoefficient(TYuvCoefficients)

voidSetConversionCoefficient(TYuvCoefficientsaConversionCoefficients)[private]

Asynchronous method which sets the desired YUV conversion coefficients.

Note:

Event KUidECamEventVideoCaptureControlConversionCoefficient is used to notify clients about setting of desired YUV conversion coefficients.

Parameters

TYuvCoefficients aConversionCoefficientsThe desired TYuvCoefficients

SetFadingEffectState(TFadingEffectState)

IMPORT_C voidSetFadingEffectState(TFadingEffectStateaFadingEffectState)

Sets the fading effect state for video capture.

Note:

Triggers a KUidECamEventVideoCaptureControlFadingEffect event notification.

Parameters

TFadingEffectState aFadingEffectStateThe desired fading effect state for video capture.

StartVideoCaptureL()

IMPORT_C voidStartVideoCaptureL()

Starts the video capture. This operation gives priority to the low latency aspects.

Video frames are send to client via MCaptureVideoObserver::VideoBufferReady().

leave
May leave with any error code.
Note:

This method is recommended to be used rather than CCamera::StartVideoCaptureL().

StopVideoCapture()

IMPORT_C voidStopVideoCapture()

Stops the video capture. This operation gives priority to the low latency aspects.

Note:

This method is recommended to be used rather than CCamera::StopVideoCapture().

Member Enumerations Documentation

Enum TEmbeddedStillCaptureTypes

Specifies the various embedded still capture support. The enumeration list may be extended in future.

Enumerators

EEmbeddedStillCaptureNotSupported = 0x00

Embedded still capture not supported

EEmbeddedStillCaptureSupported = 0x01

Embedded still capture supported

Enum TFadingEffectState

Specifies the fading effect for video captured frames. The enumeration list may be extended in future.

Enumerators

EFadingEffectEnabled

The fading effect will be visible on video captured frames as well, whenever the viewfinder fading is enabled

EFadingEffectDisabled

The fading effect will not be visible on video captured frames, whenever the viewfinder fading is enabled

Enum TVideoCaptureState

Specifies video capture state. The enumeration list may be extended in future.

Enumerators

EVideoCapturePrepared

Video Capture has been prepared but not yet started

EVideoCaptureActive

Video Capture has been started and is running

EVideoCapturePaused

Video Capture has been started and is paused

EVideoCaptureInActive

Video Capture has been stopped or not yet prepared

Enum TVideoCaptureType

Specifies the various video capture types. The enumeration list may be extended in future.

Enumerators

EVideoCaptureNotSupported = 0x00

Video capture not supported.

EClientVideoCapture = 0x01

Client video capture - Client video capture is a concept under which video buffers will be available to the clients of ECam through the dedicated observer MCaptureVideoObserver::VideoBufferReady(). Video frame formats used under this client video capture can be either compressed video frames or uncompressed video frames which are available through CCamera::TFormat.

EDirectVideoCapture = 0x02

Direct video capture - Direct video capture is a concept under which video buffers will not be available to the clients of ECam through the dedicated observers. Video frames will be used by the ECam adaptation and could be passed internally to other components. Video frame formats used under this direct video capture can be either compressed video frames or uncompressed video frames which are available through CCamera::TFormat.

Member Data Documentation

MCameraVideoCaptureControl * iImpl

MCameraVideoCaptureControl *iImpl[private]

CCamera & iOwner

CCamera &iOwner[private]