os/mm/mmswadaptation/videorenderer/inc/videoframebuffer.h
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     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".
     7 //
     8 // Initial Contributors:
     9 // Nokia Corporation - initial contribution.
    10 //
    11 // Contributors:
    12 //
    13 // Description:
    14 //
    15 
    16 
    17 #ifndef VIDEOFRAMEBUFFER_H
    18 #define VIDEOFRAMEBUFFER_H
    19 
    20 #include <e32def.h>
    21 #include <mmf/devvideo/devvideobase.h> // for TUncompressedVideoFormat
    22 
    23 /** 
    24 TVideoFrameBuffer represents a buffer for a single decoded video picture. The 
    25 buffer must be contained within a chunk that can be shared across processes.
    26 
    27 The frame buffer class is used both for video renderer data flow and with the 
    28 MMMFVideoClientBufferSupport extension.
    29 
    30 @publishedPartner
    31 @released
    32 */
    33 class TVideoFrameBuffer
    34 	{
    35 public:
    36 	IMPORT_C TVideoFrameBuffer(const TUncompressedVideoFormat& aFormat, 
    37 								TInt aStride, 
    38 								TInt aBufferId, 
    39 								const RChunk& aChunk, 
    40 								TInt aOffsetInChunk);
    41 
    42 	IMPORT_C TUncompressedVideoFormat Format() const;
    43 	IMPORT_C TUint Stride() const;
    44 	IMPORT_C TInt BufferId() const;
    45 	IMPORT_C const RChunk& Chunk() const;
    46 	IMPORT_C TUint8* Buffer() const;
    47 
    48 	/** Status used by video renderer
    49 	@internalComponent
    50 	*/
    51 	enum TBufferStatus
    52 		{
    53 		EAvailable,
    54 		EUsedByClient,
    55 		EWaiting,
    56 		ESubmitted
    57 		};
    58 	
    59 	TBufferStatus BufferStatus() const;
    60 	void SetBufferStatus(TBufferStatus aStatus);
    61 	TDblQueLink& DblQueLink();
    62 	void SetPresentationTime(const TTime& aTime);
    63 	TTime PresentationTime() const;
    64 
    65 public: 
    66 	/** Offset for link list
    67 	@internalComponent
    68 	*/
    69 	static const TInt iOffset;
    70 
    71 private:
    72 	TUncompressedVideoFormat iFormat;
    73 	TInt iStride;
    74 	TInt iBufferId;
    75 	RChunk iChunk;
    76 	TInt iOffsetInChunk;
    77 	TDblQueLink iDblQueLink;
    78 	TBufferStatus iStatus;
    79 	TTime iPresentationTime;
    80 	};
    81 
    82 #endif // VIDEOFRAMEBUFFER_H