diff -r a493a607b5bf -r eabc8c503852 mmserv/voipaudioservices/JitterBufferUtility/src/JitterBuffer.cpp --- a/mmserv/voipaudioservices/JitterBufferUtility/src/JitterBuffer.cpp Fri Sep 03 19:34:12 2010 -0500 +++ b/mmserv/voipaudioservices/JitterBufferUtility/src/JitterBuffer.cpp Tue Sep 21 11:38:43 2010 -0500 @@ -1,20 +1,19 @@ /* -* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). -* All rights reserved. -* This component and the accompanying materials are made available -* under the terms of "Eclipse Public License v1.0" -* which accompanies this distribution, and is available -* at the URL "http://www.eclipse.org/legal/epl-v10.html". -* -* Initial Contributors: -* Nokia Corporation - initial contribution. -* -* Contributors: -* -* Description: JitterBuffer component capable to audioframe buffering. -* -*/ - + * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). + * All rights reserved. + * This component and the accompanying materials are made available + * under the terms of "Eclipse Public License v1.0" + * which accompanies this distribution, and is available + * at the URL "http://www.eclipse.org/legal/epl-v10.html". + * + * Initial Contributors: + * Nokia Corporation - initial contribution. + * + * Contributors: + * + * Description: JitterBuffer component capable to audioframe buffering. + * + */ // INCLUDE FILES #include @@ -25,7 +24,6 @@ #include "JitterBufferImpl.h" #include "JitterBuffer.h" - // ----------------------------------------------------------------------------- // CVoIPJitterBuffer::CVoIPJitterBuffer // C++ default constructor can NOT contain any code, that @@ -47,7 +45,7 @@ // ----------------------------------------------------------------------------- // EXPORT_C CVoIPJitterBuffer* CVoIPJitterBuffer::NewL( - MJitterBufferObserver* aObserver) + MJitterBufferObserver* aObserver) { CVoIPJitterBuffer* self = new (ELeave) CVoIPJitterBuffer(aObserver); CleanupStack::PushL(self); @@ -93,7 +91,7 @@ // ----------------------------------------------------------------------------- // EXPORT_C void CVoIPJitterBuffer::SetupL(const TFourCC aCodec, - const TVoIPJBConfig& aJBConfig) + const TVoIPJBConfig& aJBConfig) { TRACE_PRN_FN_ENT; @@ -107,8 +105,8 @@ if (iJitterBufferImpl) { iJitterBufferImpl->SetupL(aCodec, aJBConfig); - iSampleInterval = - aJBConfig.iSampleInterval * KJBMillisecondsToMicroseconds; + iSampleInterval = aJBConfig.iSampleInterval * + KJBMillisecondsToMicroseconds; // Cannot use with G711 as it asks buffers in uncontrolled manner // TODO: change the logic so that it inspects what happens in long @@ -225,8 +223,6 @@ // EXPORT_C TInt CVoIPJitterBuffer::FillBuffer(CMMFBuffer* aBuffer) { -// TRACE_PRN_FN_ENT; - TInt err = KErrNone; if (iJitterBufferImpl && iJitterBufferImpl->BufferLength()) @@ -252,7 +248,6 @@ iObserver->EventJB(MJitterBufferObserver::EGeneralError, err); } -// TRACE_PRN_FN_EXT; return err; } @@ -267,7 +262,6 @@ // EXPORT_C TInt CVoIPJitterBuffer::EmptyBuffer(CMMFBuffer* aBuffer) { -// TRACE_PRN_FN_ENT; TInt err = KErrNotReady; if (iJitterBufferImpl && (iState == EJBufPlaying)) @@ -277,8 +271,8 @@ return err; } -// TRACE_PRN_N1(_L("JB-> BUF Size: [%d]"), aBuffer->BufferSize()); -// TRACE_PRN_N1(_L("JB-> REQ Size: [%d]"), aBuffer->RequestSize()); + //TRACE_PRN_N1(_L("JB-> BUF Size: [%d]"), aBuffer->BufferSize()); + //TRACE_PRN_N1(_L("JB-> REQ Size: [%d]"), aBuffer->RequestSize()); // Adaptation control will be done based on played frames err = iJitterBufferImpl->AddDataFrame(aBuffer); @@ -287,7 +281,6 @@ iObserver->EventJB(MJitterBufferObserver::EBufferConsumed); TRACE_PRN_IF_ERR(err); -// TRACE_PRN_FN_EXT; return err; } @@ -298,15 +291,11 @@ // void CVoIPJitterBuffer::PlayBuffer() { -// TRACE_PRN_FN_ENT; - // iDataSink has valid data - send for playback iObserver->EventJB(MJitterBufferObserver::EBufferReadyToPlay); // Go to wait state -// TransitionState(EWait); - -// TRACE_PRN_FN_EXT; + //TransitionState(EWait); } // ----------------------------------------------------------------------------- @@ -376,7 +365,7 @@ // ----------------------------------------------------------------------------- // void CVoIPJitterBuffer::TransitionState(TJBTransitionState aTransitionState, - TUint32 aStateChangeDelay) + TUint32 aStateChangeDelay) { TRequestStatus* stat = &iStatus; @@ -408,7 +397,7 @@ if (iTmPreviousEmptyBuffer.Int64()) { TTimeIntervalMicroSeconds difference = - iTmCurrentEmptyBuffer.MicroSecondsFrom(iTmPreviousEmptyBuffer); + iTmCurrentEmptyBuffer.MicroSecondsFrom(iTmPreviousEmptyBuffer); if (difference.Int64() < iEmptyBufferDelayThreshold) { @@ -420,5 +409,4 @@ return emptyBufferDelay; } - // End of File