os/mm/mmswadaptation/videorenderer/inc/videoframebuffer.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/mm/mmswadaptation/videorenderer/inc/videoframebuffer.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,82 @@
     1.4 +// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +//
    1.18 +
    1.19 +
    1.20 +#ifndef VIDEOFRAMEBUFFER_H
    1.21 +#define VIDEOFRAMEBUFFER_H
    1.22 +
    1.23 +#include <e32def.h>
    1.24 +#include <mmf/devvideo/devvideobase.h> // for TUncompressedVideoFormat
    1.25 +
    1.26 +/** 
    1.27 +TVideoFrameBuffer represents a buffer for a single decoded video picture. The 
    1.28 +buffer must be contained within a chunk that can be shared across processes.
    1.29 +
    1.30 +The frame buffer class is used both for video renderer data flow and with the 
    1.31 +MMMFVideoClientBufferSupport extension.
    1.32 +
    1.33 +@publishedPartner
    1.34 +@released
    1.35 +*/
    1.36 +class TVideoFrameBuffer
    1.37 +	{
    1.38 +public:
    1.39 +	IMPORT_C TVideoFrameBuffer(const TUncompressedVideoFormat& aFormat, 
    1.40 +								TInt aStride, 
    1.41 +								TInt aBufferId, 
    1.42 +								const RChunk& aChunk, 
    1.43 +								TInt aOffsetInChunk);
    1.44 +
    1.45 +	IMPORT_C TUncompressedVideoFormat Format() const;
    1.46 +	IMPORT_C TUint Stride() const;
    1.47 +	IMPORT_C TInt BufferId() const;
    1.48 +	IMPORT_C const RChunk& Chunk() const;
    1.49 +	IMPORT_C TUint8* Buffer() const;
    1.50 +
    1.51 +	/** Status used by video renderer
    1.52 +	@internalComponent
    1.53 +	*/
    1.54 +	enum TBufferStatus
    1.55 +		{
    1.56 +		EAvailable,
    1.57 +		EUsedByClient,
    1.58 +		EWaiting,
    1.59 +		ESubmitted
    1.60 +		};
    1.61 +	
    1.62 +	TBufferStatus BufferStatus() const;
    1.63 +	void SetBufferStatus(TBufferStatus aStatus);
    1.64 +	TDblQueLink& DblQueLink();
    1.65 +	void SetPresentationTime(const TTime& aTime);
    1.66 +	TTime PresentationTime() const;
    1.67 +
    1.68 +public: 
    1.69 +	/** Offset for link list
    1.70 +	@internalComponent
    1.71 +	*/
    1.72 +	static const TInt iOffset;
    1.73 +
    1.74 +private:
    1.75 +	TUncompressedVideoFormat iFormat;
    1.76 +	TInt iStride;
    1.77 +	TInt iBufferId;
    1.78 +	RChunk iChunk;
    1.79 +	TInt iOffsetInChunk;
    1.80 +	TDblQueLink iDblQueLink;
    1.81 +	TBufferStatus iStatus;
    1.82 +	TTime iPresentationTime;
    1.83 +	};
    1.84 +
    1.85 +#endif // VIDEOFRAMEBUFFER_H