mmplugins/cameraplugins/source/webcamera/ecamwebcamerabuffer.h
author Shimizu Satoshi <s_shimizu@isb.co.jp>
Tue, 19 Oct 2010 11:48:59 +0900
branchRCL_3
changeset 64 92a82bc706f7
parent 9 9ae0fe04e757
permissions -rw-r--r--
Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
64
92a82bc706f7 Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents: 9
diff changeset
     1
/*
92a82bc706f7 Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents: 9
diff changeset
     2
* Copyright (c) 2010 ISB.
92a82bc706f7 Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents: 9
diff changeset
     3
* All rights reserved.
92a82bc706f7 Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents: 9
diff changeset
     4
* This component and the accompanying materials are made available
92a82bc706f7 Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents: 9
diff changeset
     5
* under the terms of the "Symbian Foundation License v1.0"
92a82bc706f7 Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents: 9
diff changeset
     6
* which accompanies this distribution, and is available
92a82bc706f7 Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents: 9
diff changeset
     7
* at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html".
92a82bc706f7 Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents: 9
diff changeset
     8
*
92a82bc706f7 Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents: 9
diff changeset
     9
* Initial Contributors:
92a82bc706f7 Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents: 9
diff changeset
    10
* ISB - Initial contribution
92a82bc706f7 Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents: 9
diff changeset
    11
*
92a82bc706f7 Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents: 9
diff changeset
    12
* Contributors:
92a82bc706f7 Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents: 9
diff changeset
    13
*
92a82bc706f7 Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents: 9
diff changeset
    14
* Description:
92a82bc706f7 Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents: 9
diff changeset
    15
*
92a82bc706f7 Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents: 9
diff changeset
    16
*/
92a82bc706f7 Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents: 9
diff changeset
    17
92a82bc706f7 Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents: 9
diff changeset
    18
#ifndef ECAMWEBCAMERABUFFER_H
92a82bc706f7 Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents: 9
diff changeset
    19
#define ECAMWEBCAMERABUFFER_H
92a82bc706f7 Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents: 9
diff changeset
    20
92a82bc706f7 Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents: 9
diff changeset
    21
#include <e32base.h>
92a82bc706f7 Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents: 9
diff changeset
    22
#include <ecam.h>
92a82bc706f7 Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents: 9
diff changeset
    23
92a82bc706f7 Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents: 9
diff changeset
    24
92a82bc706f7 Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents: 9
diff changeset
    25
class CFbsBitmap;
92a82bc706f7 Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents: 9
diff changeset
    26
class CWebCameraBuffer : public CBase
92a82bc706f7 Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents: 9
diff changeset
    27
					   , public MCameraBuffer
92a82bc706f7 Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents: 9
diff changeset
    28
	{
92a82bc706f7 Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents: 9
diff changeset
    29
public:
92a82bc706f7 Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents: 9
diff changeset
    30
	static CWebCameraBuffer* NewL(const CFbsBitmap& aBitmap, HBufC8* aData);
92a82bc706f7 Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents: 9
diff changeset
    31
	static CWebCameraBuffer* NewLC(const CFbsBitmap& aBitmap, HBufC8* aData);
92a82bc706f7 Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents: 9
diff changeset
    32
	static CWebCameraBuffer* NewL(CFbsBitmap* aBitmap, HBufC8* aData);
92a82bc706f7 Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents: 9
diff changeset
    33
	static CWebCameraBuffer* NewLC(CFbsBitmap* aBitmap, HBufC8* aData);
92a82bc706f7 Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents: 9
diff changeset
    34
92a82bc706f7 Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents: 9
diff changeset
    35
public:
92a82bc706f7 Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents: 9
diff changeset
    36
	virtual TInt NumFrames();
92a82bc706f7 Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents: 9
diff changeset
    37
	virtual TDesC8* DataL( TInt aFrameIndex );
92a82bc706f7 Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents: 9
diff changeset
    38
	virtual CFbsBitmap& BitmapL( TInt aFrameIndex );
92a82bc706f7 Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents: 9
diff changeset
    39
	virtual RChunk& ChunkL();
92a82bc706f7 Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents: 9
diff changeset
    40
	virtual TInt ChunkOffsetL( TInt aFrameIndex );
92a82bc706f7 Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents: 9
diff changeset
    41
	virtual TInt FrameSize( TInt aFrameIndex );
92a82bc706f7 Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents: 9
diff changeset
    42
	virtual void Release();
92a82bc706f7 Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents: 9
diff changeset
    43
    ~CWebCameraBuffer();
92a82bc706f7 Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents: 9
diff changeset
    44
92a82bc706f7 Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents: 9
diff changeset
    45
private:
92a82bc706f7 Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents: 9
diff changeset
    46
	void ConstructL(const CFbsBitmap& aBitmap, HBufC8* aData);
92a82bc706f7 Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents: 9
diff changeset
    47
	void ConstructL(CFbsBitmap* aBitmap, HBufC8* aData);
92a82bc706f7 Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents: 9
diff changeset
    48
    CWebCameraBuffer();
92a82bc706f7 Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents: 9
diff changeset
    49
92a82bc706f7 Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents: 9
diff changeset
    50
private:
92a82bc706f7 Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents: 9
diff changeset
    51
	CFbsBitmap* iBitmap;
92a82bc706f7 Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents: 9
diff changeset
    52
	HBufC8*     iImageData;
92a82bc706f7 Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents: 9
diff changeset
    53
	RChunk      iChunk;
92a82bc706f7 Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents: 9
diff changeset
    54
92a82bc706f7 Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents: 9
diff changeset
    55
	TBool iOwnBitmap;
92a82bc706f7 Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents: 9
diff changeset
    56
	TBool iOwnData;
92a82bc706f7 Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents: 9
diff changeset
    57
	};  
92a82bc706f7 Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents: 9
diff changeset
    58
92a82bc706f7 Obtain an image of Webcamera from QEMU and add the Bitmap change display function.
Shimizu Satoshi <s_shimizu@isb.co.jp>
parents: 9
diff changeset
    59
#endif // ECAMWEBCAMERABUFFER_H