mmplugins/cameraplugins/source/webcamera/ecamwebcameravfactive.cpp
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
#include "ecamwebcameravfactive.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
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
//
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
// CWebCameraVfActive
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
CWebCameraVfActive* CWebCameraVfActive::NewL(MWebCameraVfActiveCallBack* aOwner, RWebcameraDevice& aDriver)
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
	{
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
	CWebCameraVfActive* self = new(ELeave) CWebCameraVfActive(aOwner, aDriver);
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
	CleanupStack::PushL(self);
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
	self->ConstructL();
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
	CleanupStack::Pop(self);
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
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
	return self;
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
	}
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
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
CWebCameraVfActive::CWebCameraVfActive(MWebCameraVfActiveCallBack* aOwner, RWebcameraDevice& aDriver)
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
				   :CActive(CActive::EPriorityStandard),
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
				    iOwner(aOwner),
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
				    iDriver(aDriver),
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
				    iVfBufPtr(NULL, 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
    39
	{
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
	CActiveScheduler::Add(this);
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
	}
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
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
CWebCameraVfActive::~CWebCameraVfActive()
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
	delete iVfBitmap;
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
	delete iDSA;
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
	delete iVfBuf;
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
	}
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
void CWebCameraVfActive::ConstructL()
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
	{
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
	}
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
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
* RunL.
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
*/
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
void CWebCameraVfActive::RunL()
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
	TInt wError = iStatus.Int();
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
    60
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
    61
	if (iViewFinderActive)
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
    62
		{
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
    63
		//The whole view finder start repeats screen update and the data acquisition.
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
    64
		UpdateViewL();
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
    65
		Start();
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
    66
		}
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
    67
	}
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
    68
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
    69
void CWebCameraVfActive::DoCancel()
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
    70
	{
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
    71
	iDriver.StopViewFinder();
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
    72
	}
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
    73
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
    74
	/** 
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
    75
	*/
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
    76
TInt CWebCameraVfActive::InitViewFinder()
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
    77
	{
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
    78
	return iDriver.InitViewFinder();
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
    79
	}
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
    80
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
    81
/** 
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
    82
Starts transfer of view finder data to the given portion of the screen using
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
    83
direct screen access.
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
    84
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
    85
The aScreenRect parameter is in screen co-ordinates and may be modified if,
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
    86
eg, the camera requires the destination to have a certain byte alignment, etc.
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
    87
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
    88
@param  aWs 
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
    89
        Window server session.
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
    90
@param  aScreenDevice 
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
    91
        Screen device.
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
    92
@param  aWindow 
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
    93
        Displayable window.
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
    94
@param  aScreenRect 
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
    95
        Portion of the screen to which view finder data is to be
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
    96
        transferred. This is in screen co-ordinates and may be modified if, for example,
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
    97
        the camera requires the destination to have a certain byte alignment.
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
    98
@leave  KErrGeneral Init error.
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
    99
*/
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
   100
void CWebCameraVfActive::StartViewFinderDirectL(RWsSession& aWs, CWsScreenDevice& aScreenDevice, RWindowBase& aWindow, TRect& aScreenRect, TRect& aClipRect, TUint8* aChunkBase, TInt& aChunkSize)
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
   101
	{
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
   102
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
   103
	iScreenRect = aScreenRect;
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
   104
	iClipRect = aClipRect;
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
   105
	iChuckBase = aChunkBase;
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
   106
	
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
   107
	// create buffer for view finder data
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
   108
	iVfBuf = HBufC8::NewL(KMaxBufSize);
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
   109
	
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
   110
	// create DirectScreenAccess
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
   111
	delete iDSA;
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
   112
	iDSA = NULL;
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
   113
	iViewFinderActive = EFalse;
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
   114
	iDSA = CDirectScreenAccess::NewL(aWs, aScreenDevice, aWindow, *this);
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
   115
	iDSA->StartL();
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
   116
	iViewFinderActive = ETrue;
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
   117
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
   118
	iDSA->Gc()->SetOrigin();
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
   119
	if (!iClipRect.IsEmpty())
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
   120
		{
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
   121
		iDSA->Gc()->SetClippingRect(iClipRect);
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
   122
		}
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
   123
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
   124
	// init camera device.
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
   125
	if (InitViewFinder() != KErrNone)
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
   126
		{
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
   127
		//TODO The error value is examined.
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
   128
		User::Leave(KErrGeneral);
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
   129
		}
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
   130
	delete iVfBitmap;
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
   131
	iVfBitmap = NULL;
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
   132
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
   133
	CFbsBitmap* image = new (ELeave) 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
   134
	CleanupStack::PushL(image);
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
   135
	User::LeaveIfError(image->Create(TSize(KVfWidth, KVfHeight), EColor16M));
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
   136
	CleanupStack::Pop(image);
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
   137
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
   138
	iVfBitmap = image;
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
   139
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
   140
	// start view finder
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
   141
	// The division transfer is going to support in the next version. 
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
   142
	Start();
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
   143
	}
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
   144
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
   145
/** 
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
   146
Stops transfer of view finder data to the screen. 
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
   147
*/
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
   148
void CWebCameraVfActive::StopViewFinder()
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
   149
	{
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
   150
	if (!iViewFinderActive)
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
   151
		{
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
   152
		return;
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
   153
		}
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
   154
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
   155
	iViewFinderActive = EFalse;
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
   156
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
   157
	delete iDSA;
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
   158
	iDSA = NULL;
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
   159
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
   160
	delete iVfBuf;
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
   161
	iVfBuf = NULL;
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
   162
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
   163
	//Stop view finder
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
   164
	iDriver.StopViewFinder();
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
   165
	Cancel();
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
   166
	}
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
   167
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
   168
/** 
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
   169
Queries whether the view finder is active.
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
   170
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
   171
@return  ETrue if the view finder is active. EFalse if the view finder is not
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
   172
         active. 
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
   173
*/
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
   174
TBool CWebCameraVfActive::ViewFinderActive()
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
   175
	{
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
   176
	return iViewFinderActive;
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
   177
	}
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
   178
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
   179
/** 
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
   180
Start viewfinder process.
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
   181
*/
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
   182
void CWebCameraVfActive::Start()
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
   183
	{
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
   184
	iDriver.StartViewFinder(iStatus, iChuckRemSize);
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
   185
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
   186
	SetActive();
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
   187
	}
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
   188
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
   189
/** 
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
   190
Draw the image of the view finder on screen.
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
   191
*/
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
   192
void CWebCameraVfActive::UpdateViewL()
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
   193
	{
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
   194
	iVfBufPtr.Set(iVfBuf->Des());
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
   195
	iVfBufPtr.SetLength(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
   196
	iVfBufPtr.Copy(iChuckBase,iChuckRemSize);
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
   197
	BitmapDataSet(iVfBufPtr, *iVfBitmap);
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
   198
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
   199
	// view position setting for test application
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
   200
	iScreenRect.iTl.iY = 50;
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
   201
	iScreenRect.iBr.iY = 169;
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
   202
	// update view
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
   203
	iDSA->Gc()->DrawBitmap(iScreenRect, iVfBitmap);
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
   204
	iDSA->ScreenDevice()->Update();
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
   205
	}
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
   206
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
   207
/**
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
   208
Bitmap data is set in 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
   209
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
   210
@param	aBitmap		[in]	Bitmap data.
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
   211
		aVfBitmap	[out]	After Bitmap data is set in 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
   212
@return	KErrNone.
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
   213
*/
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
   214
TInt CWebCameraVfActive::BitmapDataSet(TDes8& aBitmap, CFbsBitmap& aVfBitmap)
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
   215
	{
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
   216
	TUint32 *wData = aVfBitmap.DataAddress();
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
   217
	Mem::Copy(wData, aBitmap.Ptr(), (KVfHeight * KVfLineBytes));
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
   218
	return KErrNone;
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
   219
	}
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
   220
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
   221
/** 
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
   222
from MAbortDirectScreenAccess
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
   223
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
   224
This function is called by the window server when direct screen access must stop
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
   225
(for example because a dialogue is moved in front of the area where direct screen access is taking place).
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
   226
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
   227
@param  aScreenDevice 
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
   228
		The reason why direct screen access was terminated. 
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
   229
*/
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
   230
void CWebCameraVfActive::AbortNow(RDirectScreenAccess::TTerminationReasons /*aReason*/)
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
   231
	{
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
   232
	}
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
   233
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
   234
/** 
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
   235
from 	from MDirectScreenAccess
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
   236
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
   237
This function is called by the window server as soon as direct screen access can resume.
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
   238
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
   239
@param  aScreenDevice 
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
   240
		Provides the reason why direct screen access was terminated. 
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
   241
*/
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
   242
void CWebCameraVfActive::Restart(RDirectScreenAccess::TTerminationReasons /*aReason*/)
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
   243
	{
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
   244
	}
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
   245