|
1 /* |
|
2 * Copyright (c) 2010 ISB. |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of the "Symbian Foundation License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * ISB - Initial contribution |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef ECAMWEBCAMERABUFFER_H |
|
19 #define ECAMWEBCAMERABUFFER_H |
|
20 |
|
21 #include <e32base.h> |
|
22 #include <ecam.h> |
|
23 |
|
24 |
|
25 class CFbsBitmap; |
|
26 class CWebCameraBuffer : public CBase |
|
27 , public MCameraBuffer |
|
28 { |
|
29 public: |
|
30 static CWebCameraBuffer* NewL(const CFbsBitmap& aBitmap, HBufC8* aData); |
|
31 static CWebCameraBuffer* NewLC(const CFbsBitmap& aBitmap, HBufC8* aData); |
|
32 static CWebCameraBuffer* NewL(CFbsBitmap* aBitmap, HBufC8* aData); |
|
33 static CWebCameraBuffer* NewLC(CFbsBitmap* aBitmap, HBufC8* aData); |
|
34 |
|
35 public: |
|
36 virtual TInt NumFrames(); |
|
37 virtual TDesC8* DataL( TInt aFrameIndex ); |
|
38 virtual CFbsBitmap& BitmapL( TInt aFrameIndex ); |
|
39 virtual RChunk& ChunkL(); |
|
40 virtual TInt ChunkOffsetL( TInt aFrameIndex ); |
|
41 virtual TInt FrameSize( TInt aFrameIndex ); |
|
42 virtual void Release(); |
|
43 ~CWebCameraBuffer(); |
|
44 |
|
45 private: |
|
46 void ConstructL(const CFbsBitmap& aBitmap, HBufC8* aData); |
|
47 void ConstructL(CFbsBitmap* aBitmap, HBufC8* aData); |
|
48 CWebCameraBuffer(); |
|
49 |
|
50 private: |
|
51 CFbsBitmap* iBitmap; |
|
52 HBufC8* iImageData; |
|
53 RChunk iChunk; |
|
54 |
|
55 TBool iOwnBitmap; |
|
56 TBool iOwnData; |
|
57 }; |
|
58 |
|
59 #endif // ECAMWEBCAMERABUFFER_H |