sl@0: // Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: sl@0: sl@0: #ifndef VIDEOFRAMEBUFFER_H sl@0: #define VIDEOFRAMEBUFFER_H sl@0: sl@0: #include sl@0: #include // for TUncompressedVideoFormat sl@0: sl@0: /** sl@0: TVideoFrameBuffer represents a buffer for a single decoded video picture. The sl@0: buffer must be contained within a chunk that can be shared across processes. sl@0: sl@0: The frame buffer class is used both for video renderer data flow and with the sl@0: MMMFVideoClientBufferSupport extension. sl@0: sl@0: @publishedPartner sl@0: @released sl@0: */ sl@0: class TVideoFrameBuffer sl@0: { sl@0: public: sl@0: IMPORT_C TVideoFrameBuffer(const TUncompressedVideoFormat& aFormat, sl@0: TInt aStride, sl@0: TInt aBufferId, sl@0: const RChunk& aChunk, sl@0: TInt aOffsetInChunk); sl@0: sl@0: IMPORT_C TUncompressedVideoFormat Format() const; sl@0: IMPORT_C TUint Stride() const; sl@0: IMPORT_C TInt BufferId() const; sl@0: IMPORT_C const RChunk& Chunk() const; sl@0: IMPORT_C TUint8* Buffer() const; sl@0: sl@0: /** Status used by video renderer sl@0: @internalComponent sl@0: */ sl@0: enum TBufferStatus sl@0: { sl@0: EAvailable, sl@0: EUsedByClient, sl@0: EWaiting, sl@0: ESubmitted sl@0: }; sl@0: sl@0: TBufferStatus BufferStatus() const; sl@0: void SetBufferStatus(TBufferStatus aStatus); sl@0: TDblQueLink& DblQueLink(); sl@0: void SetPresentationTime(const TTime& aTime); sl@0: TTime PresentationTime() const; sl@0: sl@0: public: sl@0: /** Offset for link list sl@0: @internalComponent sl@0: */ sl@0: static const TInt iOffset; sl@0: sl@0: private: sl@0: TUncompressedVideoFormat iFormat; sl@0: TInt iStride; sl@0: TInt iBufferId; sl@0: RChunk iChunk; sl@0: TInt iOffsetInChunk; sl@0: TDblQueLink iDblQueLink; sl@0: TBufferStatus iStatus; sl@0: TTime iPresentationTime; sl@0: }; sl@0: sl@0: #endif // VIDEOFRAMEBUFFER_H