os/mm/mdfdevvideoextensions/nga_mdf_postprocessor_shai/src/NGAPostProcNotifier.cpp
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/mm/mdfdevvideoextensions/nga_mdf_postprocessor_shai/src/NGAPostProcNotifier.cpp Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,83 @@
1.4 +/*
1.5 +* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
1.6 +* All rights reserved.
1.7 +* This component and the accompanying materials are made available
1.8 +* under the terms of "Eclipse Public License v1.0"
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +*
1.12 +* Initial Contributors:
1.13 +* Nokia Corporation - initial contribution.
1.14 +*
1.15 +* Contributors:
1.16 +*
1.17 +* Description:
1.18 +*
1.19 +*/
1.20 +
1.21 +
1.22 +#include "NGAPostProcNotifier.h"
1.23 +#include "NGAPostProcSessionManager.h"
1.24 +#include "MdfRDebug.h"
1.25 +
1.26 +CNGAPostProcNotifier::CNGAPostProcNotifier( CNGAPostProcSessionManager& aParent )
1.27 +:CActive(CActive::EPriorityStandard),iParent(aParent)
1.28 +{
1.29 + CActiveScheduler::Add(this);
1.30 +}
1.31 +
1.32 +CNGAPostProcNotifier::~CNGAPostProcNotifier()
1.33 +{
1.34 + Cancel();
1.35 +}
1.36 +
1.37 +CNGAPostProcNotifier* CNGAPostProcNotifier::NewL( CNGAPostProcSessionManager& aParent )
1.38 +{
1.39 + CNGAPostProcNotifier* self = new (ELeave)CNGAPostProcNotifier(aParent);
1.40 + CleanupStack::PushL( self );
1.41 + self->ConstructL();
1.42 + CleanupStack::Pop( self );
1.43 + return self;
1.44 +}
1.45 +
1.46 +void CNGAPostProcNotifier::ConstructL()
1.47 +{
1.48 + // No Impl
1.49 +}
1.50 +
1.51 +void CNGAPostProcNotifier::SetBufferId(TInt aBufId)
1.52 +{
1.53 + iBufferId = aBufId;
1.54 +}
1.55 +
1.56 +void CNGAPostProcNotifier::Activate()
1.57 +{
1.58 + PP_DEBUG(_L("CNGAPostProcNotifier:Activate ++"));
1.59 + if(!IsActive())
1.60 + {
1.61 + PP_DEBUG(_L("CNGAPostProcNotifier:Activate SetActive"));
1.62 + SetActive();
1.63 + }
1.64 + PP_DEBUG(_L("CNGAPostProcNotifier:Activate --"));
1.65 +}
1.66 +
1.67 +void CNGAPostProcNotifier::RunL()
1.68 +{
1.69 + PP_DEBUG(_L("CNGAPostProcNotifier:RunL ++"));
1.70 + //KErrCancel should never get invoked Since cancellation handled syncronously under AO's
1.71 + //DoCancel.
1.72 + iParent.HandleBufferRelease(iBufferId, iStatus.Int());
1.73 +
1.74 + PP_DEBUG(_L("CNGAPostProcNotifier:RunL --"));
1.75 +}
1.76 +
1.77 +void CNGAPostProcNotifier::DoCancel()
1.78 +{
1.79 + iParent.CancelUpdate();
1.80 +}
1.81 +
1.82 +TInt CNGAPostProcNotifier::RunError( TInt /*aError*/ )
1.83 +{
1.84 + PP_DEBUG(_L("CNGAPostProcNotifier[%x]:CNGAPostProcNotifier::RunError "), this);
1.85 + return KErrNone;
1.86 +}