os/mm/mmlibs/mmfw/inc/mmf/server/mmfvideoframebuffer.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.
sl@0
     1
// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     2
// All rights reserved.
sl@0
     3
// This component and the accompanying materials are made available
sl@0
     4
// under the terms of "Eclipse Public License v1.0"
sl@0
     5
// which accompanies this distribution, and is available
sl@0
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     7
//
sl@0
     8
// Initial Contributors:
sl@0
     9
// Nokia Corporation - initial contribution.
sl@0
    10
//
sl@0
    11
// Contributors:
sl@0
    12
//
sl@0
    13
// Description:
sl@0
    14
// include\mmf\server\mmfvideoframebuffer.h
sl@0
    15
// 
sl@0
    16
//
sl@0
    17
sl@0
    18
sl@0
    19
#ifndef __MMF_SERVER_VIDEOFRAMEBUFFER_H__
sl@0
    20
#define __MMF_SERVER_VIDEOFRAMEBUFFER_H__
sl@0
    21
sl@0
    22
#include <e32base.h>
sl@0
    23
#include <fbs.h>
sl@0
    24
#include <mmf/server/mmfbuffer.h>
sl@0
    25
sl@0
    26
sl@0
    27
/**
sl@0
    28
@publishedAll
sl@0
    29
@deprecated
sl@0
    30
sl@0
    31
Class to store a frame of video data using an EPOC bitmap (RGB data).
sl@0
    32
*/
sl@0
    33
class CMMFBitmapFrameBuffer : public CMMFBuffer
sl@0
    34
	{
sl@0
    35
public:
sl@0
    36
	IMPORT_C ~CMMFBitmapFrameBuffer();
sl@0
    37
	IMPORT_C static CMMFBitmapFrameBuffer* NewL(const TSize& aSize,TDisplayMode aDisplayMode);
sl@0
    38
	IMPORT_C static CMMFBitmapFrameBuffer* NewL(TInt aBitmapHandle);
sl@0
    39
	inline TUint BufferSize() const;
sl@0
    40
	inline CFbsBitmap* Data();
sl@0
    41
private:
sl@0
    42
	CMMFBitmapFrameBuffer() : CMMFBuffer(KUidMmfBitmapFrameBuffer) {};
sl@0
    43
	void ConstructL();
sl@0
    44
private:
sl@0
    45
	CFbsBitmap* iFrame;
sl@0
    46
	};
sl@0
    47
sl@0
    48
/**
sl@0
    49
Dummy implementation. Not applicable to bitmap frame data.
sl@0
    50
sl@0
    51
@return Always zero for bitmap frames
sl@0
    52
*/
sl@0
    53
inline TUint CMMFBitmapFrameBuffer::BufferSize() const
sl@0
    54
	{
sl@0
    55
	return 0; //Not applicable to bitmap
sl@0
    56
	}
sl@0
    57
sl@0
    58
/**
sl@0
    59
Retrieves the frame data.
sl@0
    60
sl@0
    61
@return A pointer to a bitmap containing the frame data.
sl@0
    62
*/
sl@0
    63
inline CFbsBitmap* CMMFBitmapFrameBuffer::Data()
sl@0
    64
	{
sl@0
    65
	if (iFrame) return iFrame;
sl@0
    66
	else return NULL;
sl@0
    67
	}
sl@0
    68
sl@0
    69
sl@0
    70
/**
sl@0
    71
@publishedAll
sl@0
    72
@deprecated
sl@0
    73
sl@0
    74
Class to store a frame of video data using YUV data instead of an EPOC bitmap.
sl@0
    75
*/
sl@0
    76
class CMMFYUVBuffer : public CMMFBuffer
sl@0
    77
	{
sl@0
    78
public:
sl@0
    79
	IMPORT_C static CMMFYUVBuffer* NewL();
sl@0
    80
	IMPORT_C ~CMMFYUVBuffer();
sl@0
    81
	inline TUint BufferSize() const;
sl@0
    82
private:
sl@0
    83
	CMMFYUVBuffer() : CMMFBuffer(KUidMmfYUVBuffer) {};
sl@0
    84
	void ConstructL();
sl@0
    85
public:
sl@0
    86
	/** The buffer to hold the YUV data */
sl@0
    87
	HBufC8* iYUVBuffer;
sl@0
    88
	/** The size of a pixel */
sl@0
    89
	TSize iPixelSize;
sl@0
    90
private:
sl@0
    91
	};
sl@0
    92
sl@0
    93
/**
sl@0
    94
Returns the buffer size.
sl@0
    95
sl@0
    96
@return The buffer size.
sl@0
    97
*/
sl@0
    98
inline TUint CMMFYUVBuffer::BufferSize() const
sl@0
    99
	{
sl@0
   100
	return iYUVBuffer->Size();
sl@0
   101
	}
sl@0
   102
sl@0
   103
#endif