Update contrib.
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 // source\mmf\server\baseclasses\mmfvideoframebuffer.cpp
18 #include "mmfvideoframebuffer.h"
22 Factory function to create objects of type CMMFYUVBuffer used
23 to store a frame using YUV data. Allocates and constructs a YUV frame buffer.
25 @return A pointer to a fully constructed CMMFYUVBuffer.
27 EXPORT_C CMMFYUVBuffer* CMMFYUVBuffer::NewL()
29 CMMFYUVBuffer* self = new(ELeave) CMMFYUVBuffer;
30 CleanupStack::PushL(self);
32 CleanupStack::Pop(); // self
37 void CMMFYUVBuffer::ConstructL()
44 EXPORT_C CMMFYUVBuffer::~CMMFYUVBuffer()
52 EXPORT_C CMMFBitmapFrameBuffer::~CMMFBitmapFrameBuffer()
54 if (iFrame) iFrame->Reset(); //release bitmap handle
59 Factory function to create objects of type CMMFBitmapFrameBuffer used
60 to store a frame an EPOC bitmap.
61 Allocates and constructs a bitmap frame buffer with the specified size
65 The bitmap frame buffer size.
69 @return A pointer to a fully constructed CMMFBitmapFrameBuffer.
71 EXPORT_C CMMFBitmapFrameBuffer* CMMFBitmapFrameBuffer::NewL(const TSize& aSize,TDisplayMode aDisplayMode)
73 CMMFBitmapFrameBuffer* self = new(ELeave) CMMFBitmapFrameBuffer;
74 CleanupStack::PushL(self);
76 User::LeaveIfError(self->iFrame->Create(aSize,aDisplayMode));
77 CleanupStack::Pop(); // self
82 Factory function to create objects of type CMMFBitmapFrameBuffer used
83 to store a frame using an EPOC bitmap.
86 The handle to the bitmap from which to make a copy.
88 @return A pointer to a fully constructed CMMFBitmapFrameBuffer.
90 EXPORT_C CMMFBitmapFrameBuffer* CMMFBitmapFrameBuffer::NewL(TInt aBitmapHandle)
92 CMMFBitmapFrameBuffer* self = new(ELeave) CMMFBitmapFrameBuffer;
93 CleanupStack::PushL(self);
95 User::LeaveIfError(self->iFrame->Duplicate(aBitmapHandle));
96 CleanupStack::Pop(); // self
100 void CMMFBitmapFrameBuffer::ConstructL()
102 iFrame = new(ELeave)CFbsBitmap;