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 "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 // include\mmf\server\mmfvideoframebuffer.h
19 #ifndef __MMF_SERVER_VIDEOFRAMEBUFFER_H__
20 #define __MMF_SERVER_VIDEOFRAMEBUFFER_H__
24 #include <mmf/server/mmfbuffer.h>
31 Class to store a frame of video data using an EPOC bitmap (RGB data).
33 class CMMFBitmapFrameBuffer : public CMMFBuffer
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();
42 CMMFBitmapFrameBuffer() : CMMFBuffer(KUidMmfBitmapFrameBuffer) {};
49 Dummy implementation. Not applicable to bitmap frame data.
51 @return Always zero for bitmap frames
53 inline TUint CMMFBitmapFrameBuffer::BufferSize() const
55 return 0; //Not applicable to bitmap
59 Retrieves the frame data.
61 @return A pointer to a bitmap containing the frame data.
63 inline CFbsBitmap* CMMFBitmapFrameBuffer::Data()
65 if (iFrame) return iFrame;
74 Class to store a frame of video data using YUV data instead of an EPOC bitmap.
76 class CMMFYUVBuffer : public CMMFBuffer
79 IMPORT_C static CMMFYUVBuffer* NewL();
80 IMPORT_C ~CMMFYUVBuffer();
81 inline TUint BufferSize() const;
83 CMMFYUVBuffer() : CMMFBuffer(KUidMmfYUVBuffer) {};
86 /** The buffer to hold the YUV data */
88 /** The size of a pixel */
94 Returns the buffer size.
96 @return The buffer size.
98 inline TUint CMMFYUVBuffer::BufferSize() const
100 return iYUVBuffer->Size();