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 // VideoFrameMessage.cpp
18 #include <mmf/common/mmfcontrollerframework.h>
20 #include "MMFVideoFrameMessage.h"
23 Handles decoding the video frame message and providing a reference to the bitmap
24 to modify for the user of the class.
25 Provides a callback to return the message to the client
27 CMMFVideoFrameMessage* CMMFVideoFrameMessage::NewL(TMMFMessage& aMessage)
29 CMMFVideoFrameMessage * self = new (ELeave) CMMFVideoFrameMessage(aMessage);
30 CleanupStack::PushL(self);
32 CleanupStack::Pop(self);
36 CFbsBitmap& CMMFVideoFrameMessage::GetBitmap()
40 void CMMFVideoFrameMessage::FrameReady(TInt aErr)
42 iMessage.Complete(aErr);
45 CMMFVideoFrameMessage::CMMFVideoFrameMessage(TMMFMessage& aMessage)
50 void CMMFVideoFrameMessage::ConstructL()
52 TPckgBuf<TMMFVideoConfig> pckg;
53 iMessage.ReadData1FromClientL(pckg);
54 iFbsSession.Connect();
55 iBitmap = new (ELeave) CFbsBitmap;
56 User::LeaveIfError(iBitmap->Duplicate(pckg().iFrameBitmapServerHandle));
59 CMMFVideoFrameMessage::~CMMFVideoFrameMessage()
62 iFbsSession.Disconnect();