|
1 // Copyright (c) 2002-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 "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // include\mmf\server\mmfvideoframebuffer.h |
|
15 // |
|
16 // |
|
17 |
|
18 |
|
19 #ifndef __MMF_SERVER_VIDEOFRAMEBUFFER_H__ |
|
20 #define __MMF_SERVER_VIDEOFRAMEBUFFER_H__ |
|
21 |
|
22 #include <e32base.h> |
|
23 #include <fbs.h> |
|
24 #include <mmf/server/mmfbuffer.h> |
|
25 |
|
26 |
|
27 /** |
|
28 @publishedAll |
|
29 @deprecated |
|
30 |
|
31 Class to store a frame of video data using an EPOC bitmap (RGB data). |
|
32 */ |
|
33 class CMMFBitmapFrameBuffer : public CMMFBuffer |
|
34 { |
|
35 public: |
|
36 IMPORT_C ~CMMFBitmapFrameBuffer(); |
|
37 IMPORT_C static CMMFBitmapFrameBuffer* NewL(const TSize& aSize,TDisplayMode aDisplayMode); |
|
38 IMPORT_C static CMMFBitmapFrameBuffer* NewL(TInt aBitmapHandle); |
|
39 inline TUint BufferSize() const; |
|
40 inline CFbsBitmap* Data(); |
|
41 private: |
|
42 CMMFBitmapFrameBuffer() : CMMFBuffer(KUidMmfBitmapFrameBuffer) {}; |
|
43 void ConstructL(); |
|
44 private: |
|
45 CFbsBitmap* iFrame; |
|
46 }; |
|
47 |
|
48 /** |
|
49 Dummy implementation. Not applicable to bitmap frame data. |
|
50 |
|
51 @return Always zero for bitmap frames |
|
52 */ |
|
53 inline TUint CMMFBitmapFrameBuffer::BufferSize() const |
|
54 { |
|
55 return 0; //Not applicable to bitmap |
|
56 } |
|
57 |
|
58 /** |
|
59 Retrieves the frame data. |
|
60 |
|
61 @return A pointer to a bitmap containing the frame data. |
|
62 */ |
|
63 inline CFbsBitmap* CMMFBitmapFrameBuffer::Data() |
|
64 { |
|
65 if (iFrame) return iFrame; |
|
66 else return NULL; |
|
67 } |
|
68 |
|
69 |
|
70 /** |
|
71 @publishedAll |
|
72 @deprecated |
|
73 |
|
74 Class to store a frame of video data using YUV data instead of an EPOC bitmap. |
|
75 */ |
|
76 class CMMFYUVBuffer : public CMMFBuffer |
|
77 { |
|
78 public: |
|
79 IMPORT_C static CMMFYUVBuffer* NewL(); |
|
80 IMPORT_C ~CMMFYUVBuffer(); |
|
81 inline TUint BufferSize() const; |
|
82 private: |
|
83 CMMFYUVBuffer() : CMMFBuffer(KUidMmfYUVBuffer) {}; |
|
84 void ConstructL(); |
|
85 public: |
|
86 /** The buffer to hold the YUV data */ |
|
87 HBufC8* iYUVBuffer; |
|
88 /** The size of a pixel */ |
|
89 TSize iPixelSize; |
|
90 private: |
|
91 }; |
|
92 |
|
93 /** |
|
94 Returns the buffer size. |
|
95 |
|
96 @return The buffer size. |
|
97 */ |
|
98 inline TUint CMMFYUVBuffer::BufferSize() const |
|
99 { |
|
100 return iYUVBuffer->Size(); |
|
101 } |
|
102 |
|
103 #endif |