epoc32/include/mmf/server/mmfvideoframebuffer.h
branchSymbian2
changeset 2 2fe1408b6811
child 4 837f303aceeb
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/epoc32/include/mmf/server/mmfvideoframebuffer.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -0,0 +1,103 @@
     1.4 +// Copyright (c) 2002-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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.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 +// include\mmf\server\mmfvideoframebuffer.h
    1.18 +// 
    1.19 +//
    1.20 +
    1.21 +
    1.22 +#ifndef __MMF_SERVER_VIDEOFRAMEBUFFER_H__
    1.23 +#define __MMF_SERVER_VIDEOFRAMEBUFFER_H__
    1.24 +
    1.25 +#include <e32base.h>
    1.26 +#include <fbs.h>
    1.27 +#include <mmf/server/mmfbuffer.h>
    1.28 +
    1.29 +
    1.30 +/**
    1.31 +@publishedAll
    1.32 +@deprecated
    1.33 +
    1.34 +Class to store a frame of video data using an EPOC bitmap (RGB data).
    1.35 +*/
    1.36 +class CMMFBitmapFrameBuffer : public CMMFBuffer
    1.37 +	{
    1.38 +public:
    1.39 +	IMPORT_C ~CMMFBitmapFrameBuffer();
    1.40 +	IMPORT_C static CMMFBitmapFrameBuffer* NewL(const TSize& aSize,TDisplayMode aDisplayMode);
    1.41 +	IMPORT_C static CMMFBitmapFrameBuffer* NewL(TInt aBitmapHandle);
    1.42 +	inline TUint BufferSize() const;
    1.43 +	inline CFbsBitmap* Data();
    1.44 +private:
    1.45 +	CMMFBitmapFrameBuffer() : CMMFBuffer(KUidMmfBitmapFrameBuffer) {};
    1.46 +	void ConstructL();
    1.47 +private:
    1.48 +	CFbsBitmap* iFrame;
    1.49 +	};
    1.50 +
    1.51 +/**
    1.52 +Dummy implementation. Not applicable to bitmap frame data.
    1.53 +
    1.54 +@return Always zero for bitmap frames
    1.55 +*/
    1.56 +inline TUint CMMFBitmapFrameBuffer::BufferSize() const
    1.57 +	{
    1.58 +	return 0; //Not applicable to bitmap
    1.59 +	}
    1.60 +
    1.61 +/**
    1.62 +Retrieves the frame data.
    1.63 +
    1.64 +@return A pointer to a bitmap containing the frame data.
    1.65 +*/
    1.66 +inline CFbsBitmap* CMMFBitmapFrameBuffer::Data()
    1.67 +	{
    1.68 +	if (iFrame) return iFrame;
    1.69 +	else return NULL;
    1.70 +	}
    1.71 +
    1.72 +
    1.73 +/**
    1.74 +@publishedAll
    1.75 +@deprecated
    1.76 +
    1.77 +Class to store a frame of video data using YUV data instead of an EPOC bitmap.
    1.78 +*/
    1.79 +class CMMFYUVBuffer : public CMMFBuffer
    1.80 +	{
    1.81 +public:
    1.82 +	IMPORT_C static CMMFYUVBuffer* NewL();
    1.83 +	IMPORT_C ~CMMFYUVBuffer();
    1.84 +	inline TUint BufferSize() const;
    1.85 +private:
    1.86 +	CMMFYUVBuffer() : CMMFBuffer(KUidMmfYUVBuffer) {};
    1.87 +	void ConstructL();
    1.88 +public:
    1.89 +	/** The buffer to hold the YUV data */
    1.90 +	HBufC8* iYUVBuffer;
    1.91 +	/** The size of a pixel */
    1.92 +	TSize iPixelSize;
    1.93 +private:
    1.94 +	};
    1.95 +
    1.96 +/**
    1.97 +Returns the buffer size.
    1.98 +
    1.99 +@return The buffer size.
   1.100 +*/
   1.101 +inline TUint CMMFYUVBuffer::BufferSize() const
   1.102 +	{
   1.103 +	return iYUVBuffer->Size();
   1.104 +	}
   1.105 +
   1.106 +#endif