sl@0: // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of the License "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // e32test\multimedia\t_camera_display.h sl@0: // sl@0: // sl@0: sl@0: #if !defined(__T_CAMERA_DISPLAY_H__) sl@0: #define __T_CAMERA_DISPLAY_H__ sl@0: sl@0: #include sl@0: #include sl@0: #include sl@0: #include "d_mmcsc.h" sl@0: sl@0: _LIT(KCaptureModeCapsTitle, "Capture modes: "); sl@0: _LIT(KCaptureModeImage, "Image "); sl@0: _LIT(KCaptureModeVideo, "Video "); sl@0: _LIT(KCaptureModeViewFinder, "ViewFinder "); sl@0: sl@0: _LIT(KPixelFormatCapsTitle, "Pixel formats: "); sl@0: _LIT(KPixelFormatConfTitle, "Current pixel format: "); sl@0: _LIT(KPixelFormatUnknown, "Pixel Format Unknown (Other) "); sl@0: _LIT(KPixelFormatRGB_565, "RGB565 "); sl@0: _LIT(KPixelFormatYUV_422Interleaved, "YUV422 Interleaved "); sl@0: _LIT(KPixelFormatSpeedTaggedJPEG, "Speed Tagged JPEG "); sl@0: _LIT(KPixelFormatJPEG, "JPEG "); sl@0: sl@0: class TCamDisplayHandler sl@0: { sl@0: public: sl@0: TCamDisplayHandler(); sl@0: TInt Init(); sl@0: TInt SetConfig(const SDevCamFrameSize& aSize,const SDevCamPixelFormat& aPixelFormat); sl@0: TInt Process(TUint8* aImageBaseAddress); sl@0: private: sl@0: TInt Min(TInt aA, TInt aB); sl@0: TInt ProcessRGB565(TUint8* aImageBaseAddress); sl@0: TInt ProcessYUV422(TUint8* aImageBaseAddress); sl@0: private: sl@0: /** Pixel format of the data to be converted and displayed */ sl@0: SDevCamPixelFormat iPixelFormat; sl@0: /** Address of the top left hand corner of screen memory */ sl@0: TUint8* iVideoAddress; sl@0: /** Width of the frame to be displayed, in pixels */ sl@0: TUint iWidth; sl@0: /** Height of the frame to be displayed, in pixels */ sl@0: TUint iHeight; sl@0: /** Width of the screen, in pixels */ sl@0: TUint iScreenWidth; sl@0: /** Height of the screen, in pixels */ sl@0: TUint iScreenHeight; sl@0: /** Number of bits per pixel */ sl@0: TInt iBitsPerPixel; sl@0: }; sl@0: sl@0: void AppendPixelFormat(TDes& aBuffer, TUidPixelFormat aPixelFormat); sl@0: void PrintCamModes(TCameraCapsV02* aCaps,RTest& aTest); sl@0: void PrintCamConf(TCameraConfigV02& aConf,RTest& aTest); sl@0: void PrintBufferConf(TMmSharedChunkBufConfig& aBufConf,RTest& aTest); sl@0: sl@0: #endif // __T_CAMERA_DISPLAY_H__