guestrendering/guestvideodriver/api/src/guestvideodriver.cpp
author Matt Plumtree <matt.plumtree@nokia.com>
Thu, 23 Sep 2010 15:54:53 +0100
branchbug235_bringup_0
changeset 32 b23067389fdf
parent 30 f204b762818d
permissions -rwxr-xr-x
Fixup missed changes from frame (buffer) to surface buffer. Change route to qemu syborg.h and memory model includes.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
     1
// Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
     2
// All rights reserved.
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
     3
// This component and the accompanying materials are made available
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
     4
// under the terms of "Eclipse Public License v1.0"
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
     5
// which accompanies this distribution, and is available
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
     7
//
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
     8
// Initial Contributors:
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
     9
// Nokia Corporation - initial contribution.
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    10
//
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    11
// Contributors:
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    12
//
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    13
// Description:
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    14
// Guest Video Driver Implementation
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    15
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    16
#include <e32cmn.h>
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    17
#include <e32des8.h> 
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    18
#include <e32std.h> 
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    19
#include <e32debug.h> 
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    20
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    21
#include <graphics/guestvideodriver.h>
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    22
#include <graphics/guestvideodriverprotocol.h>
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    23
#include <graphics/guestvideodriverinterfaceconstants.h>
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    24
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    25
#include "remotefunctioncall.h"
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    26
#include "serializedfunctioncall.h"
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    27
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    28
// tracing
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    29
#ifdef _DEBUG
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    30
#include <e32debug.h>
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    31
    #define UTIL_TRACE(fmt, args...) RDebug::Printf(fmt, ##args)
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    32
	#define DRVRPANIC_ASSERT(condition, panic) if (!(condition)) { DriverPanic(panic, #condition, __LINE__); }
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    33
	#define DRVRPANIC_ASSERT_DEBUG(condition, panic) if (!(condition)) { DriverPanic(panic, #condition, __LINE__); }
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    34
#else
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    35
    #define UTIL_TRACE(fmt, args...)
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    36
	#define DRVRPANIC_ASSERT(condition, panic) if (!(condition)) { DriverPanic(panic, NULL, __LINE__); }
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    37
	#define DRVRPANIC_ASSERT_DEBUG(condition, panic)
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    38
#endif
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    39
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    40
//Max supported request size
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    41
const TUint32 KMaxRequestSize( VVI_PARAMETERS_INPUT_MEMORY_SIZE );
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    42
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    43
typedef enum
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    44
	{
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    45
	EDriverPanicSendBufferFailed=1,
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    46
	EDriverPanicInvalidOperationType,
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    47
	EDriverPanicOperationDataTooBig,
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    48
	EDriverPanicDriverAlreadyOpen,
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    49
	EDriverPanicCreateDriverChannelFailed,
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    50
	EDriverPanicCreateThreadLockFailed,
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    51
	EDriverPanicSendBufferFnDoesNotHaveThreadLock,
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    52
	EDriverPanicBufferCommandFnDoesNotHaveThreadLock,
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    53
	EDriverPanicDriverNotOpenForExecuteCommandFn,
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    54
	EDriverPanicRequestStatusErrorInExecuteCommandFn, // 10
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    55
	EDriverPanicBufferWriteFailed,
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    56
	} TDriverPanic;
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    57
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    58
_LIT(KDriverPanicCategory, "Guest VidDrv");
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    59
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    60
void DriverPanic(TDriverPanic aPanicCode, char* aCondition, TInt aLine)
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    61
	{
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    62
	UTIL_TRACE("Guest Video Driver Panic %d for failed Assert (%s), at guestvideodriver.cpp:%d", aPanicCode, aCondition, aLine);
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    63
		
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    64
	User::Panic(KDriverPanicCategory, aPanicCode);
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    65
	}
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    66
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    67
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    68
// ============================ MEMBER FUNCTIONS ===============================
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    69
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    70
// -----------------------------------------------------------------------------
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    71
// RGuestVideoDriver::RGuestVideoDriver
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    72
// -----------------------------------------------------------------------------
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    73
//
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    74
EXPORT_C RGuestVideoDriver::RGuestVideoDriver() : iIsOpen(EFalse), iProcessId(0)
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    75
    {
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    76
    }
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    77
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    78
// -----------------------------------------------------------------------------
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    79
// RGuestVideoDriver::Open
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    80
// -----------------------------------------------------------------------------
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    81
//
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    82
EXPORT_C TInt RGuestVideoDriver::Open()
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    83
    {
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    84
	UTIL_TRACE("RGuestVideoDriver::Open start iProcessId=0x%x, iIsOpen=%d", iProcessId, iIsOpen);
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    85
	DRVRPANIC_ASSERT(iIsOpen == EFalse, EDriverPanicDriverAlreadyOpen);
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    86
	iProcessId = RProcess().Id();
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    87
	TInt error = iThreadLock.CreateLocal(EOwnerProcess);
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    88
	DRVRPANIC_ASSERT_DEBUG( error == KErrNone, EDriverPanicCreateThreadLockFailed);
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    89
	if (!error)
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    90
		{
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    91
		error = DoCreate(
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    92
			GuestVideoDriver::KDeviceName,
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    93
			TVersion( GuestVideoDriver::KMajorVer,
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    94
					  GuestVideoDriver::KMinorVer,
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    95
					  GuestVideoDriver::KBuildVer ),
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    96
			KNullUnit,
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    97
			NULL,
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    98
			NULL);
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
    99
		DRVRPANIC_ASSERT_DEBUG( error == KErrNone, EDriverPanicCreateDriverChannelFailed);
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   100
		if (!error)
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   101
			{
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   102
			iIsOpen = ETrue;
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   103
			}
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   104
		}
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   105
	UTIL_TRACE("RGuestVideoDriver::Open end iProcessId=0x%x, error=%d", iProcessId, error);
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   106
	return error;
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   107
	}
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   108
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   109
// -----------------------------------------------------------------------------
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   110
// RGuestVideoDriver::~RGuestVideoDriver
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   111
// -----------------------------------------------------------------------------
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   112
//
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   113
EXPORT_C RGuestVideoDriver::~RGuestVideoDriver()
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   114
    {
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   115
	UTIL_TRACE("RGuestVideoDriver::~RGuestVideoDriver iProcessId=0x%x", iProcessId);
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   116
	iThreadLock.Close();
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   117
    }
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   118
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   119
// -----------------------------------------------------------------------------
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   120
// RGuestVideoDriver::ExecuteCommand
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   121
// Syncrhonous version with local buffering
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   122
// -----------------------------------------------------------------------------
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   123
//
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   124
EXPORT_C void RGuestVideoDriver::ExecuteCommand(RemoteFunctionCallData& aRequestData)
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   125
	{
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   126
	DRVRPANIC_ASSERT(iIsOpen, EDriverPanicDriverNotOpenForExecuteCommandFn);
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   127
	DRVRPANIC_ASSERT( (RemoteFunctionCallData::EOpRequestWithReply == aRequestData.Header().iOpType) ||
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   128
			(RemoteFunctionCallData::EOpRequest == aRequestData.Header().iOpType),
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   129
			EDriverPanicInvalidOperationType);
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   130
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   131
	//Set thread and process id
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   132
	aRequestData.SetThreadInformation(iProcessId, RThread().Id());
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   133
	TBool sendNow = (RemoteFunctionCallData::EOpRequest != aRequestData.Header().iOpType); 
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   134
	if (!sendNow)
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   135
		{
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   136
		iThreadLock.Wait();
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   137
		while (!BufferCommand(aRequestData))
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   138
			{
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   139
			// Flush any queued commands & retry
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   140
			if (iBuffer.Length())
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   141
				{
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   142
				SendBuffer();
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   143
				}
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   144
			else
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   145
				{ // Too big for buffer
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   146
				sendNow = ETrue;
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   147
				break;
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   148
				}
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   149
			}
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   150
		iThreadLock.Signal();
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   151
		}
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   152
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   153
	if (sendNow)
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   154
		{
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   155
		// Maintain order of operations by flushing queue
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   156
		iThreadLock.Wait();
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   157
		if (iBuffer.Length())
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   158
			{
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   159
			SendBuffer();
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   160
			}
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   161
		iThreadLock.Signal();
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   162
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   163
		TRequestStatus status;
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   164
		TPckg<RemoteFunctionCallData> data(aRequestData);
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   165
		DRVRPANIC_ASSERT(data().SerialisedLength() <= KMaxRequestSize, EDriverPanicOperationDataTooBig);
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   166
		UTIL_TRACE("RGuestVideoDriver::ExecuteCommand direct send, req length=%d", data().SerialisedLength());
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   167
		DoRequest(GuestVideoDriver::ERequestExecuteCommand, status, (TAny*)&data);
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   168
		User::WaitForRequest(status);
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   169
		// status <> 0 if write of reply data failed
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   170
		DRVRPANIC_ASSERT_DEBUG(status.Int() == KErrNone, EDriverPanicRequestStatusErrorInExecuteCommandFn);
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   171
		}
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   172
	}
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   173
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   174
// Flush video Command buffer
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   175
EXPORT_C void RGuestVideoDriver::Flush()
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   176
	{
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   177
	iThreadLock.Wait();
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   178
	if (iIsOpen && iBuffer.Length())
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   179
		{
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   180
		SendBuffer();
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   181
		}
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   182
	iThreadLock.Signal();
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   183
	}
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   184
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   185
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   186
// -----------------------------------------------------------------------------
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   187
// RGuestVideoDriver::BufferCommand
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   188
// -----------------------------------------------------------------------------
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   189
//
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   190
TBool RGuestVideoDriver::BufferCommand( RemoteFunctionCallData& aRequestData )
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   191
	{
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   192
	DRVRPANIC_ASSERT_DEBUG(iThreadLock.IsHeld(), EDriverPanicBufferCommandFnDoesNotHaveThreadLock);
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   193
	TBool result = EFalse;
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   194
	SerializedFunctionCall data( aRequestData );
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   195
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   196
	const TUint32 len = aRequestData.SerialisedLength();
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   197
	const TInt alignmentAdjIndex( RemoteFunctionCallData::AlignIndex( iBuffer.Length(), 4 ) );
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   198
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   199
	if ( (alignmentAdjIndex + len) < iBuffer.MaxLength() )
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   200
		{
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   201
		//There is enough space left on local buffer
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   202
		iBuffer.SetLength( alignmentAdjIndex + len );
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   203
		TPtrC8 serialisedDataPtr = iBuffer.Right( len );
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   204
		TInt wlen = data.WriteToBuffer( const_cast<TUint8*>(serialisedDataPtr.Ptr()), len, 0 );
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   205
		DRVRPANIC_ASSERT(wlen == len, EDriverPanicBufferWriteFailed);
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   206
		result = ETrue;
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   207
		}
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   208
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   209
	UTIL_TRACE("RGuestVideoDriver::BufferCommand length=%d, Req len=%d, result=%d",
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   210
			iBuffer.Length(), len, result);
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   211
	return result;
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   212
	}
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   213
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   214
// -----------------------------------------------------------------------------
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   215
// RGuestVideoDriver::MapToHWAddress
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   216
// -----------------------------------------------------------------------------
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   217
//
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   218
EXPORT_C TInt RGuestVideoDriver::MapToHWAddress( const TInt aChunkHandle, TUint32& aHWAddress )
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   219
    {
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   220
    TPckgBuf<TInt> handle( aChunkHandle );
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   221
    TPckg<TUint32> address( aHWAddress );
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   222
    return DoControl( GuestVideoDriver::ERequestMapAddress, (TAny*)&handle, (TAny*)&address );
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   223
    }
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   224
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   225
// -----------------------------------------------------------------------------
30
f204b762818d Rename use of "frame" buffer to "surface" buffer, to reduce confusion.
Matt Plumtree <matt.plumtree@nokia.com>
parents: 9
diff changeset
   226
// RGuestVideDriver::GetSurfaceBufferBaseAddress
7
ec0e558822c5 Add dynamic framebuffer support, and associated vghw utils needed. This code does not compile, and needs companion updates in graphics (3899db667a38) and qemu (c7e943dbf70f). Some code looks like syborg-specific so tagged with FAISALMEMON. Need to check with Jani on this. A later submission will declare when the code compiles again.
Faisal Memon <faisal.memon@nokia.com>
parents: 2
diff changeset
   227
// -----------------------------------------------------------------------------
ec0e558822c5 Add dynamic framebuffer support, and associated vghw utils needed. This code does not compile, and needs companion updates in graphics (3899db667a38) and qemu (c7e943dbf70f). Some code looks like syborg-specific so tagged with FAISALMEMON. Need to check with Jani on this. A later submission will declare when the code compiles again.
Faisal Memon <faisal.memon@nokia.com>
parents: 2
diff changeset
   228
//
30
f204b762818d Rename use of "frame" buffer to "surface" buffer, to reduce confusion.
Matt Plumtree <matt.plumtree@nokia.com>
parents: 9
diff changeset
   229
EXPORT_C TInt RGuestVideoDriver::GetSurfaceBufferBaseAddress( TUint32& aSurfaceBufferBaseAddress )
7
ec0e558822c5 Add dynamic framebuffer support, and associated vghw utils needed. This code does not compile, and needs companion updates in graphics (3899db667a38) and qemu (c7e943dbf70f). Some code looks like syborg-specific so tagged with FAISALMEMON. Need to check with Jani on this. A later submission will declare when the code compiles again.
Faisal Memon <faisal.memon@nokia.com>
parents: 2
diff changeset
   230
    {
30
f204b762818d Rename use of "frame" buffer to "surface" buffer, to reduce confusion.
Matt Plumtree <matt.plumtree@nokia.com>
parents: 9
diff changeset
   231
    TPckg<TUint32> address( aSurfaceBufferBaseAddress );
32
b23067389fdf Fixup missed changes from frame (buffer) to surface buffer.
Matt Plumtree <matt.plumtree@nokia.com>
parents: 30
diff changeset
   232
    return DoControl( GuestVideoDriver::ERequestSurfaceBufferBaseAddress, (TAny*)&address );
7
ec0e558822c5 Add dynamic framebuffer support, and associated vghw utils needed. This code does not compile, and needs companion updates in graphics (3899db667a38) and qemu (c7e943dbf70f). Some code looks like syborg-specific so tagged with FAISALMEMON. Need to check with Jani on this. A later submission will declare when the code compiles again.
Faisal Memon <faisal.memon@nokia.com>
parents: 2
diff changeset
   233
    }
ec0e558822c5 Add dynamic framebuffer support, and associated vghw utils needed. This code does not compile, and needs companion updates in graphics (3899db667a38) and qemu (c7e943dbf70f). Some code looks like syborg-specific so tagged with FAISALMEMON. Need to check with Jani on this. A later submission will declare when the code compiles again.
Faisal Memon <faisal.memon@nokia.com>
parents: 2
diff changeset
   234
ec0e558822c5 Add dynamic framebuffer support, and associated vghw utils needed. This code does not compile, and needs companion updates in graphics (3899db667a38) and qemu (c7e943dbf70f). Some code looks like syborg-specific so tagged with FAISALMEMON. Need to check with Jani on this. A later submission will declare when the code compiles again.
Faisal Memon <faisal.memon@nokia.com>
parents: 2
diff changeset
   235
// -----------------------------------------------------------------------------
2
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   236
// RGuestVideoDriver::EglGetSgHandles
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   237
// -----------------------------------------------------------------------------
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   238
//
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   239
EXPORT_C TInt RGuestVideoDriver::EglGetSgHandles( const TUint64 aId, TUint64 *aSgHandles )
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   240
    {
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   241
    TPckg<TUint64> sgId( aId );
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   242
    TPckg<TUint64> sgHandles( *aSgHandles );
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   243
    return DoControl( GuestVideoDriver::ERequestSgHandles, (TAny*)&sgId, (TAny*)&sgHandles );
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   244
    }
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   245
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   246
// -----------------------------------------------------------------------------
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   247
// RGuestVideoDriver::SendBuffer
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   248
// -----------------------------------------------------------------------------
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   249
//
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   250
void RGuestVideoDriver::SendBuffer()
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   251
    {
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   252
	UTIL_TRACE("RGuestVideoDriver::SendBuffer length=%d", iBuffer.Length());
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   253
	DRVRPANIC_ASSERT_DEBUG(iThreadLock.IsHeld(), EDriverPanicSendBufferFnDoesNotHaveThreadLock);
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   254
    TRequestStatus status;
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   255
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   256
    DoRequest(GuestVideoDriver::ERequestLoadCommands, status, (TAny*)&iBuffer);
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   257
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   258
    User::WaitForRequest( status );
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   259
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   260
    iBuffer.Zero();
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   261
	UTIL_TRACE("RGuestVideoDriver::SendBuffer status=%d", status.Int());
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   262
	// Commands expecting a reply should never come through here, so status should always be KErrNone
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   263
	DRVRPANIC_ASSERT(status.Int() == KErrNone, EDriverPanicSendBufferFailed);
e8ccf068ac7f More progress towards getting the guestvideodriver and dependencies compiling for S3. This check-in does not compile, so don't sync to this changelist. A later changelist will declare when compilation works again.
Faisal Memon <faisal.memon@nokia.com>
parents: 1
diff changeset
   264
    }