guestrendering/guestvideodriver/ldd/src/virtualvideohwdevice.cpp
branchbug235_bringup_0
changeset 2 e8ccf068ac7f
parent 1 d8d95053303a
child 4 e6f11c873cdf
equal deleted inserted replaced
1:d8d95053303a 2:e8ccf068ac7f
    15  *  information which may not be disclosed to others without the
    15  *  information which may not be disclosed to others without the
    16  *  prior written consent of Nokia.
    16  *  prior written consent of Nokia.
    17  * =============================================================================
    17  * =============================================================================
    18  */
    18  */
    19 
    19 
    20 
       
    21 // INCLUDE FILES
       
    22 #include <kernel/kernel.h>
    20 #include <kernel/kernel.h>
    23 #include <assp.h>
    21 #include <assp.h>
    24 
    22 
    25 #include "virtualvideohwdevice.h"
    23 #include <graphics/guestvideodriverprotocol.h>
    26 #include "virtualvideohwchannel.h"
    24 #include <graphics/virtualvideohwdevice.h>
    27 #include "platsimvideodriverprotocol.h"
    25 #include <graphics/virtualvideohwchannel.h>
    28 #include "platsimvideodrivercommon.h"
    26 #include <graphics/virtualvideohwinterface.h>
    29 #include "virtualvideohwinterface.h"
    27 #include <graphics/virtualvideotracing.h>
    30 #include "devicereqhandler.h"
    28 #include <graphics/guestvideodrivercommon.h>
    31 #include "virtualvideotracing.h"
    29 #include <graphics/devicereqhandler.h>
    32 
    30 
    33 const TInt KPriority = 27; // DfcQue0 has same priority
    31 const TInt KPriority = 27; // DfcQue0 has same priority
    34 
    32 
    35 // a .LDD requires that the first exported function creates the device. By
    33 // a .LDD requires that the first exported function creates the device. By
    36 // returning a concrete DLogicalDevice-derived class, this implements
    34 // returning a concrete DLogicalDevice-derived class, this implements
    48 //
    46 //
    49 DVirtualVideoHwDevice::DVirtualVideoHwDevice()
    47 DVirtualVideoHwDevice::DVirtualVideoHwDevice()
    50     {
    48     {
    51     // No need to set iParseMask as we don't have PDD.
    49     // No need to set iParseMask as we don't have PDD.
    52     // Just set the version.
    50     // Just set the version.
    53     using namespace PlatsimVideoDriver;
    51     using namespace GuestVideoDriver;
    54     iVersion = TVersion( KMajorVer, KMinorVer, KBuildVer );
    52     iVersion = TVersion( KMajorVer, KMinorVer, KBuildVer );
    55     VVHW_TRACE("DVirtualVideoHwDevice::DVirtualVideoHwDevice");
    53     VVHW_TRACE("DVirtualVideoHwDevice::DVirtualVideoHwDevice");
    56     }
    54     }
    57 
    55 
    58 // -----------------------------------------------------------------------------
    56 // -----------------------------------------------------------------------------
    60 // -----------------------------------------------------------------------------
    58 // -----------------------------------------------------------------------------
    61 //
    59 //
    62 TInt DVirtualVideoHwDevice::Install()
    60 TInt DVirtualVideoHwDevice::Install()
    63     {
    61     {
    64     // Our name, used by User::FreeLogicalDevice 
    62     // Our name, used by User::FreeLogicalDevice 
    65     TInt err = SetName( &PlatsimVideoDriver::KDeviceName );
    63     TInt err = SetName( &GuestVideoDriver::KDeviceName );
    66     if ( err != KErrNone )
    64     if ( err != KErrNone )
    67         {
    65         {
    68         VVHW_TRACE("DVirtualVideoHwDevice::Install SetName %d", err);
    66         VVHW_TRACE("DVirtualVideoHwDevice::Install SetName %d", err);
    69         return err;
    67         return err;
    70         }
    68         }
    71 
    69 
    72     // Enter critical section
    70     // Enter critical section
    73     NKern::ThreadEnterCS();
    71     NKern::ThreadEnterCS();
    74     
    72     
    75     err = Kern::DfcQCreate( iDfcQ, KPriority, &PlatsimVideoDriver::KDfcThreadName );
    73     err = Kern::DfcQCreate( iDfcQ, KPriority, &GuestVideoDriver::KDfcThreadName );
    76 
    74 
    77     // Leave critical section
    75     // Leave critical section
    78     NKern::ThreadLeaveCS();
    76     NKern::ThreadLeaveCS();
    79 
    77 
    80     if ( err != KErrNone )
    78     if ( err != KErrNone )