Update contrib.
1 // Copyright (c) 2007-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.
21 #ifndef BUFFERMANAGER_H
22 #define BUFFERMANAGER_H
27 #include <graphics/surfacemanager.h>
30 class TVideoFrameBuffer;
32 /** Buffer manager for video renderer */
33 NONSHARABLE_CLASS(CRendererBufferManager) : public CBase
36 static CRendererBufferManager* NewL(const RSurfaceManager::TSurfaceInfoV01& aSurfaceInfo, const RArray<TInt>& aBufferOffsets, const RChunk& aChunk, TBool aTimed);
37 ~CRendererBufferManager();
38 TVideoFrameBuffer* NextBuffer();
39 TBool ReleaseBuffer(TVideoFrameBuffer* aBuffer);
40 TBool UpdateBuffer(TVideoFrameBuffer* aBuffer, const TTime& aTime);
41 void BufferAvailable(TInt aBufferId);
42 TVideoFrameBuffer* WaitingBuffer(TBool aRemoveFromList, TBool& aIsLast);
43 void BufferSubmitted(TVideoFrameBuffer* aBuffer);
44 TBool WaitingListIsEmpty();
47 CRendererBufferManager(const RChunk& aChunk, TBool aTimed);
48 void ConstructL(const RSurfaceManager::TSurfaceInfoV01& aSurfaceInfo, const RArray<TInt>& aBufferOffsets);
49 TBool BufferUsedByClient(TVideoFrameBuffer* aBuffer);
56 RPointerArray<TVideoFrameBuffer> iBuffers;
57 TDblQue<TVideoFrameBuffer> iAvailBuffers;
58 TDblQue<TVideoFrameBuffer> iWaitingBuffers; // buffers waiting to be submitted
59 TDblQueIter<TVideoFrameBuffer> iWaitingBuffersIter;
63 #endif // BUFFERMANAGER_H