os/mm/mdfdevvideoextensions/nga_mdf_postprocessor_shai/src/NGAPostProcNotifier.cpp
author sl@SLION-WIN7.fritz.box
Fri, 15 Jun 2012 03:10:57 +0200
changeset 0 bde4ae8d615e
permissions -rw-r--r--
First public contribution.
     1 /*
     2 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     8 *
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    11 *
    12 * Contributors:
    13 *
    14 * Description:  
    15 *
    16 */
    17  
    18 
    19 #include "NGAPostProcNotifier.h"
    20 #include "NGAPostProcSessionManager.h"
    21 #include "MdfRDebug.h"
    22 
    23 CNGAPostProcNotifier::CNGAPostProcNotifier( CNGAPostProcSessionManager& aParent )
    24 :CActive(CActive::EPriorityStandard),iParent(aParent)
    25 {
    26 	CActiveScheduler::Add(this);
    27 }
    28 
    29 CNGAPostProcNotifier::~CNGAPostProcNotifier()
    30 {
    31 	Cancel();
    32 }
    33 
    34 CNGAPostProcNotifier* CNGAPostProcNotifier::NewL( CNGAPostProcSessionManager& aParent )
    35 {
    36 	CNGAPostProcNotifier* self = new (ELeave)CNGAPostProcNotifier(aParent);
    37 	CleanupStack::PushL( self );
    38 	self->ConstructL();
    39 	CleanupStack::Pop( self );
    40 	return self;
    41 }
    42 
    43 void CNGAPostProcNotifier::ConstructL()
    44 {
    45 	// No Impl
    46 }
    47 
    48 void CNGAPostProcNotifier::SetBufferId(TInt aBufId)
    49 {
    50 	iBufferId = aBufId;
    51 }
    52 
    53 void CNGAPostProcNotifier::Activate()
    54 {
    55 	PP_DEBUG(_L("CNGAPostProcNotifier:Activate ++"));
    56 	if(!IsActive())
    57 	{
    58 		PP_DEBUG(_L("CNGAPostProcNotifier:Activate SetActive"));
    59 		SetActive();
    60 	}
    61 	PP_DEBUG(_L("CNGAPostProcNotifier:Activate --"));
    62 }
    63 
    64 void CNGAPostProcNotifier::RunL()
    65 {
    66 	PP_DEBUG(_L("CNGAPostProcNotifier:RunL ++"));
    67 	//KErrCancel should never get invoked Since cancellation handled syncronously under AO's
    68 	//DoCancel.
    69 	iParent.HandleBufferRelease(iBufferId, iStatus.Int());
    70 
    71 	PP_DEBUG(_L("CNGAPostProcNotifier:RunL --"));
    72 }
    73 
    74 void CNGAPostProcNotifier::DoCancel()
    75 {
    76     iParent.CancelUpdate();
    77 }
    78 
    79 TInt CNGAPostProcNotifier::RunError( TInt /*aError*/ )
    80 {
    81 	PP_DEBUG(_L("CNGAPostProcNotifier[%x]:CNGAPostProcNotifier::RunError "), this);
    82 	return KErrNone;
    83 }