Update contrib.
1 // Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // e32test\multimedia\t_camera_display.h
18 #if !defined(__T_CAMERA_DISPLAY_H__)
19 #define __T_CAMERA_DISPLAY_H__
22 #include <d32camerasc.h>
23 #include <pixelformats.h>
26 _LIT(KCaptureModeCapsTitle, "Capture modes: ");
27 _LIT(KCaptureModeImage, "Image ");
28 _LIT(KCaptureModeVideo, "Video ");
29 _LIT(KCaptureModeViewFinder, "ViewFinder ");
31 _LIT(KPixelFormatCapsTitle, "Pixel formats: ");
32 _LIT(KPixelFormatConfTitle, "Current pixel format: ");
33 _LIT(KPixelFormatUnknown, "Pixel Format Unknown (Other) ");
34 _LIT(KPixelFormatRGB_565, "RGB565 ");
35 _LIT(KPixelFormatYUV_422Interleaved, "YUV422 Interleaved ");
36 _LIT(KPixelFormatSpeedTaggedJPEG, "Speed Tagged JPEG ");
37 _LIT(KPixelFormatJPEG, "JPEG ");
39 class TCamDisplayHandler
44 TInt SetConfig(const SDevCamFrameSize& aSize,const SDevCamPixelFormat& aPixelFormat);
45 TInt Process(TUint8* aImageBaseAddress);
47 TInt Min(TInt aA, TInt aB);
48 TInt ProcessRGB565(TUint8* aImageBaseAddress);
49 TInt ProcessYUV422(TUint8* aImageBaseAddress);
51 /** Pixel format of the data to be converted and displayed */
52 SDevCamPixelFormat iPixelFormat;
53 /** Address of the top left hand corner of screen memory */
54 TUint8* iVideoAddress;
55 /** Width of the frame to be displayed, in pixels */
57 /** Height of the frame to be displayed, in pixels */
59 /** Width of the screen, in pixels */
61 /** Height of the screen, in pixels */
63 /** Number of bits per pixel */
67 void AppendPixelFormat(TDes& aBuffer, TUidPixelFormat aPixelFormat);
68 void PrintCamModes(TCameraCapsV02* aCaps,RTest& aTest);
69 void PrintCamConf(TCameraConfigV02& aConf,RTest& aTest);
70 void PrintBufferConf(TMmSharedChunkBufConfig& aBufConf,RTest& aTest);
72 #endif // __T_CAMERA_DISPLAY_H__