kernel/eka/include/d32camerasc.h
changeset 31 56f325a607ea
parent 0 a41df078684a
child 258 880ff05ad710
equal deleted inserted replaced
15:4122176ea935 31:56f325a607ea
   274 	};
   274 	};
   275 
   275 
   276 /**
   276 /**
   277 Defines a list of settings that are changable often (dynamically) within a single use of the device.
   277 Defines a list of settings that are changable often (dynamically) within a single use of the device.
   278 */
   278 */
   279 enum TDevCamDynamicAttributes
   279 enum TDevCamDynamicAttribute
   280 	{
   280 	{
   281 	ECamAttributeBrightness,
   281 	ECamAttributeBrightness,
   282 	ECamAttributeContrast,
   282 	ECamAttributeContrast,
   283 	ECamAttributeColorEffect,
   283 	ECamAttributeColorEffect,
   284 	ECamAttributeMax
   284 	ECamAttributeMax
   285 	};
   285 	};
   286 
   286 
   287 /**
   287 /**
   288 Holds the range and interval (rate of change) values for a dynamic capability.
   288 Holds the range and interval (rate of change) values for a dynamic capability.
   289 An array of these would be indexed by TDevCamDynamicAttributes
   289 An array of these would be indexed by TDevCamDynamicAttribute
   290 */
   290 */
   291 struct TDynamicRange
   291 struct TDynamicRange
   292 	{
   292 	{
   293 	TUint iMin;
   293 	TUint iMin;
   294 	TUint iMax;
   294 	TUint iMax;
       
   295 	TUint iDefault;
   295 	};
   296 	};
   296 
   297 
   297 /**
   298 /**
   298 The main camera capabilities class. This is used to get the capabilities of a specific camera
   299 The main camera capabilities class. This is used to get the capabilities of a specific camera
   299 device once a channel to it has been opened.
   300 device once a channel to it has been opened.
   327 	TUint iNumVideoPixelFormats;
   328 	TUint iNumVideoPixelFormats;
   328 	/** Number of pixel formats supported in view finder capture mode.
   329 	/** Number of pixel formats supported in view finder capture mode.
   329 	Will be set to 0 if image capture is not supported. */
   330 	Will be set to 0 if image capture is not supported. */
   330 	TUint iNumViewFinderPixelFormats;
   331 	TUint iNumViewFinderPixelFormats;
   331 	
   332 	
   332 	/** An array specifying the range in values for settings as defined by TDevCamDynamicAttributes.
   333 	/** An array specifying the range in values for settings as defined by TDevCamDynamicAttribute.
   333 		Indices for settings are in the order defined in TDevCamDynamicAttributes.
   334 		Indices for settings are in the order defined in TDevCamDynamicAttribute.
   334 		If the setting is not supported then the entry is still present for performance reasons,
   335 		If the setting is not supported then the entry is still present for performance reasons,
   335 		i.e. indexing over searching.
   336 		i.e. indexing over searching.
   336 		@see TDevCamDynamicAttributes
   337 		@see TDevCamDynamicAttribute
   337 		@see TDynamicRange
   338 		@see TDynamicRange
   338 	*/
   339 	*/
   339 	TDynamicRange iDynamicRange[ECamAttributeMax];
   340 	TDynamicRange iDynamicRange[ECamAttributeMax];
   340 	
   341 	
   341 	/** A variable length array specifying the pixel formats supported by the sensor.
   342 	/** A variable length array specifying the pixel formats supported by the sensor.
   428 		EControlReleaseBuffer,
   429 		EControlReleaseBuffer,
   429 		EControlNotifyNewImageSpecificCancel,
   430 		EControlNotifyNewImageSpecificCancel,
   430 		EControlBufferIdToOffset,
   431 		EControlBufferIdToOffset,
   431 		EControlCapsSize,
   432 		EControlCapsSize,
   432 		EControlFrameSizeCaps,
   433 		EControlFrameSizeCaps,
   433 		EControlSetDynamicAttribute
   434 		EControlSetDynamicAttribute,
       
   435 		EControlGetDynamicAttribute
   434 		};
   436 		};
   435 
   437 
   436 public:
   438 public:
   437 	/**
   439 	/**
   438 	Get the version number of camera driver interface.
   440 	Get the version number of camera driver interface.
   650 	*/
   652 	*/
   651 	inline TInt FrameSizeCaps(TDevCamCaptureMode aCaptureMode, TUidPixelFormat aUidPixelFormat, TDes8& aFrameSizeCapsBuf);
   653 	inline TInt FrameSizeCaps(TDevCamCaptureMode aCaptureMode, TUidPixelFormat aUidPixelFormat, TDes8& aFrameSizeCapsBuf);
   652 	
   654 	
   653 
   655 
   654 	/**
   656 	/**
   655 	Allows changing of the dynamic settings as specified in TDevCamDynamicAttributes.
   657 	Allows changing of the dynamic settings as specified in TDevCamDynamicAttribute.
   656 	Checks locally the validity of the arguments passed so as to increase performance by not
   658 	Checks locally the validity of the arguments passed so as to increase performance by not
   657 	forcing a context switch.
   659 	forcing a context switch.
   658 	Check the allowable range of the settings via the TCameraCapsV02::iDynamicRange member.
   660 	Check the allowable range of the settings via the TCameraCapsV02::iDynamicRange member.
   659 
   661 
   660 	@param aAttribute An enum identifying the dynamic attribute to change.
   662 	@param aAttribute An enum identifying the dynamic attribute to change.
   661 	@param aValue The attributes value within a valid range.
   663 	@param aValue The attributes value within a valid range.
   662 	@return KErrNone if successful, KErrNotSupported if not supported, 
   664 	@return KErrNone if successful, KErrNotSupported if not supported, 
   663 			KErrArgument if aValue out of range, KErrBadName is aAttribute not valid setting.
   665 			KErrArgument if aValue is out of range.
   664 			Otherwise, one of the system wide error codes.
   666 			Otherwise, one of the system wide error codes.
   665 	@see TDevCamDynamicAttributes
   667 	@see TDevCamDynamicAttribute
   666 	@see TCameraCapsV02
   668 	@see TCameraCapsV02
   667 	*/
   669 	*/
   668 	inline TInt SetDynamicAttribute(TDevCamDynamicAttributes aAttribute, TUint aValue);
   670 	TInt SetDynamicAttribute(TDevCamDynamicAttribute aAttribute, TUint aValue);
       
   671 
       
   672 	/**
       
   673 	Queries the driver for a dynamic setting's value.
       
   674 	This function does not force a context switch by reading the values from a cache.
       
   675 	
       
   676 	@param aAttribute An enum identifying the dynamic attribute to query.
       
   677 	@param aValue A reference to a variable that will be set to the queried attribute's value.
       
   678 	@return KErrNone if successful, KErrNotFound if aAttribute is not supported by the driver.
       
   679 		Otherwise, one of the system-wide error codes.
       
   680 
       
   681 	@see TDevCamDynamicAttribute
       
   682 	@see TCameraCapsV02
       
   683 	*/
       
   684 	TInt GetDynamicAttribute(TDevCamDynamicAttribute aAttribute, TUint& aValue);
       
   685 
       
   686 protected:
       
   687 	TInt CheckAttributeSupported(TDevCamDynamicAttribute aAttribute);
       
   688 
   669 
   689 
   670 private:
   690 private:
   671 
       
   672 	/** 
   691 	/** 
   673 	Capability of Sensor. 
   692 	Capability of Sensor. 
   674 	Kept here for performance issues, i.e. to avoid context switches.
   693 	Kept here for performance issues, i.e. to avoid context switches.
   675 	*/
   694 	*/
   676 	TCameraCapsV02 *iCameraCaps;
   695 	TCameraCapsV02 *iCameraCaps;