camerauis/cameraxui/cxengine/src/dummyengine/cxedummycamera.cpp
changeset 42 feebad15db8c
parent 19 d9aefe59d544
child 64 8ab66fc302e6
equal deleted inserted replaced
41:67457b2ffb33 42:feebad15db8c
     1 /*
     1 /*
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
     2 * Copyright (c) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    41         TSize(1280,960),
    41         TSize(1280,960),
    42         TSize(1024,768),
    42         TSize(1024,768),
    43         TSize(640,480)
    43         TSize(640,480)
    44         };
    44         };
    45     static const int IMAGE_CAPTURE_SIZE_COUNT = sizeof(IMAGE_CAPTURE_SIZES)/sizeof(TSize);
    45     static const int IMAGE_CAPTURE_SIZE_COUNT = sizeof(IMAGE_CAPTURE_SIZES)/sizeof(TSize);
       
    46 
       
    47     _LIT( PANICDUMMYCAMERA, "DummyCamera" );
    46 }
    48 }
    47 
    49 
    48 
    50 
    49 CxeDummyCamera* CxeDummyCamera::NewL(MCameraObserver2& aObserver,TInt aCameraIndex,TInt aPriority, TInt aCameraVersion)
    51 CxeDummyCamera* CxeDummyCamera::NewL(MCameraObserver2& aObserver,TInt aCameraIndex,TInt aPriority, TInt aCameraVersion)
    50 {
    52 {
    76     delete iImageProcessing;
    78     delete iImageProcessing;
    77     }
    79     }
    78 
    80 
    79 void CxeDummyCamera::doCommand( TCxeDummyCommand aCmd )
    81 void CxeDummyCamera::doCommand( TCxeDummyCommand aCmd )
    80 {
    82 {
    81     iCommandBuf.Insert( aCmd, 0 );
    83     TInt status = iCommandBuf.Insert( aCmd, 0 );
       
    84     if ( status != KErrNone )
       
    85         {
       
    86         User::Panic(PANICDUMMYCAMERA, 1);
       
    87         }
    82     if ( !iCommandTimer->IsActive() )
    88     if ( !iCommandTimer->IsActive() )
    83         {
    89         {
    84         iCommandTimer->Start(100, 100, TCallBack(CxeDummyCamera::callBack, this));
    90         iCommandTimer->Start(100, 100, TCallBack(CxeDummyCamera::callBack, this));
    85         }
    91         }
    86 }
    92 }