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 void GetDisabledSettingsL ( RArray < TUid > &)
IMPORT_C void GetEmbeddedStillCaptureSupportInfoL ( TInt &)
IMPORT_C void GetFadingEffectStateL ( TFadingEffectState &)
IMPORT_C void GetPixelAspectsSupportedL ( TUint &, CCamera::TFormat , const TSize &)
IMPORT_C void GetPrepareVideoParametersL ( TPrepareVideoParameters &)
IMPORT_C void GetRangeAffectedSettingsL ( RArray < TUid > &)
IMPORT_C CCamera::CCameraSnapshot * GetSnapshotHandleL ( TInt )
IMPORT_C CCamera::CCameraImageProcessing * GetTransformationHandleL ()
IMPORT_C void GetValueAffectedSettingsL ( RArray < TUid > &)
IMPORT_C void GetVideoCaptureStateL ( TVideoCaptureState &)
IMPORT_C void GetVideoCaptureSupportInfoL ( TInt &)
IMPORT_C void GetVideoFormatsSupportedL ( TUint &, const TSize &)
IMPORT_C CCameraVideoCaptureControl * NewL ( CCamera &, MCaptureVideoObserver &)
IMPORT_C void PauseVideoCapture ()
IMPORT_C void PrepareVideoCapture (const TPrepareVideoParameters &)
IMPORT_C void ReleaseVideoResource ()
IMPORT_C void ResumeVideoCaptureL ()
IMPORT_C void SetFadingEffectState ( TFadingEffectState )
IMPORT_C void StartVideoCaptureL ()
IMPORT_C void StopVideoCapture ()
Private Member Functions
CCameraVideoCaptureControl ( CCamera &)
void ConstructL ( MCaptureVideoObserver &)
void GetConversionCoefficientL ( TYuvCoefficients &)
void GetSupportedConversionCoefficientsL ( TUint &)
void SetConversionCoefficient ( 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
enum TEmbeddedStillCaptureTypes { EEmbeddedStillCaptureNotSupported  = 0x00, EEmbeddedStillCaptureSupported  = 0x01 }
enum TFadingEffectState { EFadingEffectEnabled , EFadingEffectDisabled }
enum TVideoCaptureState { EVideoCapturePrepared , EVideoCaptureActive , EVideoCapturePaused , EVideoCaptureInActive }
enum TVideoCaptureType { EVideoCaptureNotSupported  = 0x00, EClientVideoCapture  = 0x01, EDirectVideoCapture  = 0x02 }
Private Attributes
MCameraVideoCaptureControl * iImpl
CCamera & iOwner

Constructor & Destructor Documentation

CCameraVideoCaptureControl(CCamera &)

CCameraVideoCaptureControl ( CCamera & aOwner ) [private]

Parameters

CCamera & aOwner a 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 &)

void ConstructL ( 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 & aCaptureVideoObserver Reference 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 &)

void GetConversionCoefficientL ( TYuvCoefficients & aConversionCoefficients ) const [private]

Retrieves the currently used YUV conversion coefficients.

leave
May leave with any error code.

Parameters

TYuvCoefficients & aConversionCoefficients Currently used TYuvCoefficients

GetDisabledSettingsL(RArray< TUid > &)

IMPORT_C void GetDisabledSettingsL ( 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 > & aDisabledSettings Retrieves the list of disabled settings

GetEmbeddedStillCaptureSupportInfoL(TInt &)

IMPORT_C void GetEmbeddedStillCaptureSupportInfoL ( 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 & aSupportedEmbeddedStillCaptureTypes Retrieves the supported embedded still capture. The TInt is retrieved as a bit field of supported TEmbeddedStillCaptureTypes.

GetFadingEffectStateL(TFadingEffectState &)

IMPORT_C void GetFadingEffectStateL ( TFadingEffectState & aFadingEffectState ) const

Retrieves the fading effect state for video capture.

leave
May leave with any error code.

Parameters

TFadingEffectState & aFadingEffectState Retrieves the current fading effect state for video capture.

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

IMPORT_C void GetPixelAspectsSupportedL ( TUint & aPixelAspectsSupported,
CCamera::TFormat aVideoFormat,
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 & aPixelAspectsSupported A 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 aVideoFormat The video format for which the supported pixel aspect ratio have to be retrieved.
const TSize & aSize The resolution (or size) for which the supported pixel aspect ratio have to be retrieved.

GetPrepareVideoParametersL(TPrepareVideoParameters &)

IMPORT_C void GetPrepareVideoParametersL ( TPrepareVideoParameters & aPrepareVideoParameters ) const

Parameters

TPrepareVideoParameters & aPrepareVideoParameters

GetRangeAffectedSettingsL(RArray< TUid > &)

IMPORT_C void GetRangeAffectedSettingsL ( 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 > & aRangeAffectedSettings Retrieves the list of range affected settings

GetSnapshotHandleL(TInt)

IMPORT_C CCamera::CCameraSnapshot * GetSnapshotHandleL ( TInt aClientViewFinderId ) 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 aClientViewFinderId The client viewfinder on which this client snapshot will be displayed.

GetSupportedConversionCoefficientsL(TUint &)

void GetSupportedConversionCoefficientsL ( TUint & aSupportedConversionCoefficients ) const [private]

Retrieves the supported YUV conversion coefficient in case of video.

leave
May leave with any error code.

Parameters

TUint & aSupportedConversionCoefficients A 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 void GetValueAffectedSettingsL ( 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 > & aValueAffectedSettings Retrieves the list of value affected settings

GetVideoCaptureStateL(TVideoCaptureState &)

IMPORT_C void GetVideoCaptureStateL ( TVideoCaptureState & aVideoCaptureState ) const

Retrieves the current video capture state.

leave
May leave with any error code.

Parameters

TVideoCaptureState & aVideoCaptureState Retrieves the current video capture state.

GetVideoCaptureSupportInfoL(TInt &)

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

Parameters

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

GetVideoFormatsSupportedL(TUint &, const TSize &)

IMPORT_C void GetVideoFormatsSupportedL ( TUint & aVideoFormatsSupported,
const TSize & aSize
) const

Retrieves the supported video formats for a given resolution.

leave
May leave with any error code.

Parameters

TUint & aVideoFormatsSupported A bit field which retrieves the supported video formats for a given resolution. Formats have been defined as CCamera::TFormat
const TSize & aSize The 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 & aCamera A reference to a CCamera object providing the settings.
MCaptureVideoObserver & aCaptureVideoObserver Reference to the capture video observer.

PauseVideoCapture()

IMPORT_C void PauseVideoCapture ( )

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 void PrepareVideoCapture ( 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 & aPrepareVideoParameters Parameters necessary to prepare for video capture.

ReleaseVideoResource()

IMPORT_C void ReleaseVideoResource ( )

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 void ResumeVideoCaptureL ( )

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)

void SetConversionCoefficient ( TYuvCoefficients aConversionCoefficients ) [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 aConversionCoefficients The desired TYuvCoefficients

SetFadingEffectState(TFadingEffectState)

IMPORT_C void SetFadingEffectState ( TFadingEffectState aFadingEffectState )

Sets the fading effect state for video capture.

Note:

Triggers a KUidECamEventVideoCaptureControlFadingEffect event notification.

Parameters

TFadingEffectState aFadingEffectState The desired fading effect state for video capture.

StartVideoCaptureL()

IMPORT_C void StartVideoCaptureL ( )

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 void StopVideoCapture ( )

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]