# HG changeset patch # User hgs # Date 1278675462 -3600 # Node ID 9707f1c07383f262e3b3024481d6fa634802ec80 # Parent eb1e5d7cc6885d1c404af98b0a162171d425d71b 2010wk25_06 diff -r eb1e5d7cc688 -r 9707f1c07383 audio/ARM_CMMF_codecs/FrameTable/Data/Create_FrameTable_STUB_SIS.bat --- a/audio/ARM_CMMF_codecs/FrameTable/Data/Create_FrameTable_STUB_SIS.bat Fri Jul 09 12:23:13 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,38 +0,0 @@ -@echo off - -rem - -rem Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). - -rem All rights reserved. - -rem This component and the accompanying materials are made available - -rem under the terms of "Eclipse Public License v1.0" - -rem which accompanies this distribution, and is available - -rem at the URL "http://www.eclipse.org/legal/epl-v10.html". - -rem - -rem Initial Contributors: - -rem Nokia Corporation - initial contribution. - -rem - -rem Contributors: - -rem - -rem Description: STUB to test FrameTable. - -rem - -@echo on - - - -makesis -s FrameTable_Stub.pkg FrameTable_Stub.sis - diff -r eb1e5d7cc688 -r 9707f1c07383 audio/ARM_CMMF_codecs/FrameTable/Data/FrameTable_Stub.SIS Binary file audio/ARM_CMMF_codecs/FrameTable/Data/FrameTable_Stub.SIS has changed diff -r eb1e5d7cc688 -r 9707f1c07383 audio/ARM_CMMF_codecs/FrameTable/Data/FrameTable_Stub.pkg --- a/audio/ARM_CMMF_codecs/FrameTable/Data/FrameTable_Stub.pkg Fri Jul 09 12:23:13 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,66 +0,0 @@ -; - -; Copyright (c) 2009 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: STUB to test FrameTable Implementation. - -; - -;Language - -&en - - - -;Header - -# {"Frame Table"}, (0x10207BC0), 1, 0, 0, TYPE=SA, RU - - - -;Dependency header - - - -;Localised Vendor name - -%{"Nokia"} - - - -;Unique Vendor name - -:"Nokia" - - - -;Optional logofile - - - -;Files to install - - - diff -r eb1e5d7cc688 -r 9707f1c07383 audio/ARM_CMMF_codecs/FrameTable/Group/FrameTable.mmp --- a/audio/ARM_CMMF_codecs/FrameTable/Group/FrameTable.mmp Fri Jul 09 12:23:13 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,74 +0,0 @@ -/* - -* Copyright (c) 2007 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: Project file for . - -* - -*/ - - - - - -#include - - - -TARGET FrameTable.dll - -TARGETTYPE DLL - -UID 0x1000008D 0x10207B9C - - - -CAPABILITY CAP_GENERAL_DLL - -VENDORID VID_DEFAULT - - - -SOURCEPATH ../Src - -SOURCE FrameTable.cpp - - - -USERINCLUDE ../Inc - - - -OS_LAYER_SYSTEMINCLUDE - -SYSTEMINCLUDE /epoc32/include/mmf/common - -SYSTEMINCLUDE /epoc32/include/mmf/server - - - -LIBRARY euser.lib - diff -r eb1e5d7cc688 -r 9707f1c07383 audio/ARM_CMMF_codecs/FrameTable/Group/bld.inf --- a/audio/ARM_CMMF_codecs/FrameTable/Group/bld.inf Fri Jul 09 12:23:13 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,76 +0,0 @@ -/* - -* Copyright (c) 2007 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: Build file for building the frame table library - -* - -*/ - - - - - -#include - - - -PRJ_PLATFORMS - -DEFAULT - -WINSCW ARMV5 ARM9E - - - -PRJ_EXPORTS - -../Data/FrameTable_Stub.SIS /epoc32/data/z/system/install/FrameTable_Stub.SIS - -../rom/FrameTable.iby CORE_OS_LAYER_IBY_EXPORT_PATH(FrameTable.iby) - - - -PRJ_MMPFILES - -FrameTable.mmp - - - -PRJ_TESTMMPFILES - - - -PRJ_TESTEXPORTS - - - -//////////////////////////////////////////////////////////////////////////////// - -// END OF FILE // - -//////////////////////////////////////////////////////////////////////////////// - diff -r eb1e5d7cc688 -r 9707f1c07383 audio/ARM_CMMF_codecs/FrameTable/Inc/DebugMacros.h --- a/audio/ARM_CMMF_codecs/FrameTable/Inc/DebugMacros.h Fri Jul 09 12:23:13 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,80 +0,0 @@ -/* - -* Copyright (c) 2007 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: Debug Macros used by AdvancedAudioController - -* - -*/ - - - -#ifndef __DEBUGMACROS_H__ - -#define __DEBUGMACROS_H__ - - - -// MACROS - -#ifdef _DEBUG - -#define DP0(string) RDebug::Print(string) - -#define DP1(string,arg1) RDebug::Print(string,arg1) - -#define DP2(string,arg1,arg2) RDebug::Print(string,arg1,arg2) - -#define DP3(string,arg1,arg2,arg3) RDebug::Print(string,arg1,arg2,arg3) - -#define DP4(string,arg1,arg2,arg3,arg4) RDebug::Print(string,arg1,arg2,arg3,arg4) - -#define DP5(string,arg1,arg2,arg3,arg4,arg5) RDebug::Print(string,arg1,arg2,arg3,arg4,arg5) - -#define DP6(string,arg1,arg2,arg3,arg4,arg5,arg6) RDebug::Print(string,arg1,arg2,arg3,arg4,arg5,arg6) - -#else - -#define DP0(string) - -#define DP1(string,arg1) - -#define DP2(string,arg1,arg2) - -#define DP3(string,arg1,arg2,arg3) - -#define DP4(string,arg1,arg2,arg3,arg4) - -#define DP5(string,arg1,arg2,arg3,arg4,arg5) - -#define DP6(string,arg1,arg2,arg3,arg4,arg5,arg6) - -#endif - - - -#endif //__DEBUGMACROS_H__ - diff -r eb1e5d7cc688 -r 9707f1c07383 audio/ARM_CMMF_codecs/FrameTable/Src/FrameTable.cpp --- a/audio/ARM_CMMF_codecs/FrameTable/Src/FrameTable.cpp Fri Jul 09 12:23:13 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,1404 +0,0 @@ -/* - -* Copyright (c) 2007 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: Class definition for the frame table functions. - - * - -*/ - - - - - -// INCLUDES - -#include "FrameTable.h" - -#include "DebugMacros.h" - -#include - - - -// CONSTANTS - -const TInt KBuffersToKeep = 3; - -const TInt KLowResPeriodMs = 1000; // approximate interval for entries stored in low res table is 1 sec - - - -// ============================ MEMBER FUNCTIONS =============================== - - - -// ----------------------------------------------------------------------------- - -// CFrameTable::CFrameTable - -// C++ default constructor can NOT contain any code, that - -// might leave. - -// ----------------------------------------------------------------------------- - -// - -CFrameTable::CFrameTable() - - { - - } - - - -// ----------------------------------------------------------------------------- - -// CFrameTable::ConstructL - -// Symbian 2nd phase constructor can leave. - -// ----------------------------------------------------------------------------- - -// - -void CFrameTable::ConstructL() - - { - - DP0(_L("CFrameTable::ConstructL")); - - SetSourceReference(0,0); - - } - - - -// ----------------------------------------------------------------------------- - -// CFrameTable::NewL - -// Two-phased constructor. - -// ----------------------------------------------------------------------------- - -// - -EXPORT_C CFrameTable* CFrameTable::NewL() - - { - - DP0(_L("CFrameTable::NewL")); - - - - CFrameTable* self = new(ELeave) CFrameTable; - - CleanupStack::PushL(self); - - self->ConstructL(); - - CleanupStack::Pop(self); - - return self; - - } - - - -// ----------------------------------------------------------------------------- - -// CFrameTable::~CFrameTable - -// ----------------------------------------------------------------------------- - -// - -EXPORT_C CFrameTable::~CFrameTable() - - { - - DP0(_L("CFrameTable::~CFrameTable")); - - iFrameTable.Close(); - - iLowResFrameTable.Close(); - - } - - - -// ----------------------------------------------------------------------------- - -// CFrameTable::InitFrameTable - -// ----------------------------------------------------------------------------- - -// - -EXPORT_C TInt CFrameTable::InitFrameTable(TInt aSampleRate, TInt aSamplesPerFrame) - - { // this is only intended to be used at the very beginning of play since it clears the table - - DP2(_L("CFrameTable::InitFrameTable aSampleRate[%d], aSamplesPerFrame[%d]"), aSampleRate, aSamplesPerFrame); - - TInt status = KErrNone; - - ResetTable(); - - iSampleRate = aSampleRate; - - iSamplesPerFrame = aSamplesPerFrame; - - - - if ((iSampleRate> 0) && (iSamplesPerFrame> 0)) - - { - - iMsecPerFrame = (iSamplesPerFrame*1000)/iSampleRate; - - iFramesPerLowResInterval = ((iSampleRate*KLowResPeriodMs/1000) / iSamplesPerFrame); - - iLowResIntervalMs = (iSamplesPerFrame*1000*iFramesPerLowResInterval)/iSampleRate; - - } - - else - - { - - status = KErrArgument; - - } - - - - return status; - - } - - - -// 0 1 2 3 4 - -// ----------------------------------------------------------------------------- - -// CFrameTable::SubmitTableEntry - -// ----------------------------------------------------------------------------- - -// - -// The table will always have contiguous frames in it. - -EXPORT_C TInt CFrameTable::SubmitTableEntry(TUint aPos) - - { - - DP2(_L("CFrameTable::SubmitTableEntry aPos[%u], event pos[%u]"), aPos, iPosEventMs); - - TInt status = KErrNone; - - TBufRefPosEntry lastEntry; - - lastEntry.iPos = 0; - - TBufRefPosEntry bufRefPos; - - TUint frameNum; - - - - TUint pos = aPos+iOffset; // pos = absolute position (not including any header) - - - - if (aPos> 0) - - { - - iCurrentFrameCount++; // not a total frame count, but count from last reference set - - DP1(_L("CFrameTable::SubmitTableEntry iCurrentFrameCount[%u]"), iCurrentFrameCount); - - } - - - - TUint numEntries = iFrameTable.Count(); // this table will stay short - seeking backward resets it - - - - if (numEntries == 0) - - { // table gets reset if seeking in source - - bufRefPos.iPos = pos; - - bufRefPos.iFrameNum = iFrameNum; // first frame num is 0 so calculations for time 0 would point to frame 0 - - status = iFrameTable.Append(bufRefPos); - - ASSERT(status == KErrNone); - - numEntries = 1; - - DP2(_L("CFrameTable::SubmitTableEntry init pos[%u] framenum[%u]"), pos, iFrameNum); - - } - - else - - { - - lastEntry = iFrameTable[numEntries-1]; - - - - if (pos> lastEntry.iPos) - - { - - frameNum = lastEntry.iFrameNum + 1; - - bufRefPos.iPos = pos; - - bufRefPos.iFrameNum = frameNum; - - - - DP3 (_L ("CFrameTable::SubmitTableEntry, new entry iPos[%u], iFrameNum[%u], cnt[%u]"), bufRefPos.iPos, bufRefPos.iFrameNum, numEntries+1); - - - - status = iFrameTable.Append(bufRefPos); - - ASSERT(status == KErrNone); - - if (iOkToShrink) - - { - - DP0(_L("CFrameTable::SubmitTableEntry removing an entry ")); - - iFrameTable.Remove(0); - - } - - } - - else - - { - - status = KErrArgument; - - } - - } - - - - if (status == KErrNone) - - { - - SubmitLowResTableEntry(bufRefPos); // do this before events are detected below - - - - // total average bitrate - not instantaneous bitrate - used for duration calculation - - if (pos> iLastBytePos) - - { // don't recalculate if we rewind - - iLastBytePos = pos; // pos is absolute position - relative to the start of actual data content (not file start - no metadata) as set by the user. User maintains metadata offsets. - - TUint totalTimeMs = bufRefPos.iFrameNum*iMsecPerFrame; // total time in the table - - DP1(_L("CFrameTable::SubmitTableEntry totalTimeMs[%u]"), totalTimeMs); - - if (totalTimeMs> 0) - - { - - // cast calculation to TIn64 or it could lose precision - - TUint64 p = pos; - - p = p*8*1000; - - TUint64 t = totalTimeMs; - - iAvgBitrate = p/t; - - } - - } - - } - - - - // need to convert current position to time - - TInt currentTimeMs = iCurrentFrameCount*iMsecPerFrame + iTimeRefMs; // current time position being played - - DP3(_L("CFrameTable::SubmitTableEntry current calculated time ms[%u] iCurrentFrameCount[%u] timeref[%u]"), currentTimeMs, iCurrentFrameCount, iTimeRefMs); - - if (iPosEventMs> 0) - - { // used for seeking - - if (currentTimeMs >= iPosEventMs) - - { - - iPosEventMs = 0; - - DP0(_L("CFrameTable::SubmitTableEntry handle event pos reached")); - - iEventPos = pos; - - iObserver->HandleFrameTableEvent(EPosReached); - - } - - } - - - - if (iPlayWindowEndPosEventMs> 0) - - { - - if (currentTimeMs >= iPlayWindowEndPosEventMs) - - { - - iPlayWindowEndPosEventMs = 0; - - DP0(_L("CFrameTable::SubmitTableEntry handle event play window end pos reached")); - - iObserver->HandleFrameTableEvent(EPlayWindowEndPosReached); - - } - - } - - - - if (iIntervalEvent> 0) - - { - - if (iIntervalRef == 0) - - { - - iIntervalRef = currentTimeMs; - - } - - - - if ((currentTimeMs - iIntervalRef) >= iIntervalEvent) - - { - - iIntervalRef = currentTimeMs; - - iObserver->HandleFrameTableEvent(EDecodeInterval); - - } - - } - - - - DP1 (_L ("CFrameTable::SubmitTableEntry, avgBitRate[%u]"), iAvgBitrate); - - return status; - - } - - - -TInt CFrameTable::SubmitLowResTableEntry(TBufRefPosEntry& aEntry) - - { - - TInt status = KErrNone; - - TBufRefPosEntry lastEntry; - - - - TUint numEntries = iLowResFrameTable.Count(); - - if (numEntries == 0) - - { - - status = iLowResFrameTable.Append(aEntry); - - ASSERT(status == KErrNone); - - return status; - - } - - - - lastEntry = iLowResFrameTable[numEntries-1]; - - - - ASSERT(aEntry.iFrameNum <= lastEntry.iFrameNum + iFramesPerLowResInterval); - - // note that 0 position table entries can be submitted to the table before it is initialized. - - // If this happens, iFramesPerLowResInterval would still be 0 and the same entry might be appended again - - // so we have a check to make sure that doesn't happen. - - if ((aEntry.iFrameNum == lastEntry.iFrameNum + iFramesPerLowResInterval) && - - (iFramesPerLowResInterval != 0)) - - { - - DP3 (_L ("CFrameTable::SubmitLowResTableEntry, new entry aEntry.iFrameNum[%u], lastEntry.iFrameNum[%u], iFramesPerLowResInterval[%u]"), aEntry.iFrameNum, lastEntry.iFrameNum, iFramesPerLowResInterval); - - DP3 (_L ("CFrameTable::SubmitLowResTableEntry, new entry iPos[%u], iFrameNum[%u], cnt[%u]"), aEntry.iPos, aEntry.iFrameNum, numEntries+1); - - - - status = iLowResFrameTable.Append(aEntry); - - ASSERT(status == KErrNone); - - } - - else - - { - - status = KErrArgument; - - } - - - - return status; - - } - - - -// ----------------------------------------------------------------------------- - -// CFrameTable::FindFramePosFromTime - -// ----------------------------------------------------------------------------- - -// - -/* - - Looks in the table for the frame position associated with the given time. - - It will return the position and also the time for that frame. - - If not found, an error will be returned, and the time and position will be - - the closest available in the table. - - */ - -EXPORT_C TInt CFrameTable::FindFramePosFromTime(TUint& aTimeMs, TUint& aPos) - - { - - DP2(_L("CFrameTable::FindFramePosFromTime time[%u], pos[%u]"), aTimeMs, aPos); - - TInt stat = KErrNone; - - // TUint in msec can represent 1193 hours - - TInt tableIndex; - - - - // special case for time = 0 - - if (aTimeMs == 0) - - { - - aPos = 0; - - DP0(_L("CFrameTable::FindFramePosFromTime time=0 pos=0")); - - return KErrNone; - - } - - - - TUint countlr = iLowResFrameTable.Count(); - - if ((countlr == 0) || (iMsecPerFrame == 0)) - - { - - DP2(_L("CFrameTable::FindFramePosFromTime not ready countlr[%u] iMsecPerFrame[%u]"), countlr, iMsecPerFrame); - - return KErrNotReady; - - } - - TUint frame = aTimeMs/iMsecPerFrame; // calc frame number - - DP1(_L("CFrameTable::FindFramePosFromTime looking for frame[%u]"), frame); - - - - // check hi-res table first - - TUint count = iFrameTable.Count(); - - if (count == 0) - - { - - stat = KErrNotFound; // use low-res table - - } - - else - - { - - TUint frame0 = iFrameTable[0].iFrameNum; // first frame available (table can shrink) - - DP1(_L("CFrameTable::FindFramePosFromTime frame0[%u]"), frame0); - - if (frame >= frame0) // frame might be in table - - - - { - - tableIndex = frame - frame0; // calc index into table - - DP1(_L("CFrameTable::FindFramePosFromTime tableIndex[%u]"), tableIndex); - - if (tableIndex >= count) - - { - - stat = KErrNotFound; // use low-res table - - DP0(_L("CFrameTable::FindFramePosFromTime not found in hi-res")); - - } - - else - - { - - aPos = iFrameTable[tableIndex].iPos; - - iFrameNum = iFrameTable[tableIndex].iFrameNum; // iFrameNum provides frame num after hi-res table is reset - - aTimeMs = iFrameNum * iMsecPerFrame; - - DP4(_L("CFrameTable::FindFramePosFromTime aTimeMs[%u] iFrameNum[%u] iSamplesPerFrame[%u] iSampleRate[%u]"), - - aTimeMs,iFrameNum,iSamplesPerFrame,iSampleRate); - - } - - } - - else - - { - - stat = KErrNotFound; // use low-res table - - } - - } - - if (stat == KErrNotFound) - - { // check low-res table - - DP0(_L("CFrameTable::FindFramePosFromTime looking in low-res table")); - - if (iFramesPerLowResInterval> 0) - - { // first frame is always 0 in low res table - don't need to subtract frame[0] - - tableIndex = frame/iFramesPerLowResInterval; // calc index into table - - DP3(_L("CFrameTable::FindFramePosFromTime tableIndex[%d] frame[%u] iFramesPerLowResInterval[%u]"), - - tableIndex,frame,iFramesPerLowResInterval); - - if (tableIndex < countlr) - - { - - aPos = iLowResFrameTable[tableIndex].iPos; - - iFrameNum = iLowResFrameTable[tableIndex].iFrameNum; // iFrameNum provides frame num after hi-res table is reset - - aTimeMs = iFrameNum * iMsecPerFrame; - - stat = KErrNone; - - } - - } - - } - - - - if (stat == KErrNotFound) - - { // use last in low-res table - - aPos = iLowResFrameTable[countlr-1].iPos; - - iFrameNum = iLowResFrameTable[countlr-1].iFrameNum; // iFrameNum provides frame num after hi-res table is reset - - aTimeMs = iFrameNum * iMsecPerFrame; - - } - - DP4(_L("CFrameTable::FindFramePosFromTime time[%u], pos[%u], stat[%d] iFrameNum sync[%u]"), aTimeMs, aPos, stat, iFrameNum); - - return stat; - - } - - - -EXPORT_C TInt CFrameTable::FindFrameTimeFromPos(TUint& aTimeMs, TUint& aPos) - - { - - DP1(_L("CFrameTable::FindFrameTimeFromPos pos[%u]"), aPos); - - TInt stat = KErrNotFound; - - // TBufRefPosEntry temp; // used for array search - - // temp.iFrameNum = 0; - - // temp.iPos = aPos; - - - - // stat = iFrameTable.SpecificFindInUnsignedKeyOrder(temp, EArrayFindMode_First); - - TUint count = iFrameTable.Count(); - - for (TUint i=0; i= aPos) - - { - - stat = i; - - DP4(_L("CFrameTable::FindFrameTimeFromPos hi-res first[%u] last[%u] count[%u] stat[%d]"), - - iFrameTable[0].iPos, iFrameTable[count-1].iPos, count, stat); - - break; - - } - - } - -#ifdef _DEBUG - - if(count == 0) - - { - - DP0(_L("CFrameTable::FindFrameTimeFromPos hi-res Frame Table: Empty")); - - } - -#endif - - - - if (stat == KErrNotFound) - - { - - // stat = iLowResFrameTable.SpecificFindInUnsignedKeyOrder(temp, EArrayFindMode_First); - - count = iLowResFrameTable.Count(); - - for (TUint i=0; i= aPos) - - { - - stat = i; - - DP4(_L("CFrameTable::FindFrameTimeFromPos lo-res first[%u] last[%u] count[%u] stat[%d]"), - - iLowResFrameTable[0].iPos, iLowResFrameTable[count-1].iPos, count, stat); - - break; - - } - - } - -#ifdef _DEBUG - - if(count == 0) - - { - - DP0(_L("CFrameTable::FindFrameTimeFromPos lo-res Frame Table: Empty")); - - } - -#endif - - - - if (stat != KErrNotFound) - - { - - aPos = iLowResFrameTable[stat].iPos; - - aTimeMs = iLowResFrameTable[stat].iFrameNum * iMsecPerFrame; - - iFrameNum = iLowResFrameTable[stat].iFrameNum; // iFrameNum provides frame num after hi-res table is reset - - DP3(_L("CFrameTable::FindFrameTimeFromPos lo-res iFrameNum[%u] indx[%d] iFrameNum sync[%u]"), iLowResFrameTable[stat].iFrameNum, stat, iFrameNum); - - } - - } - - else - - { - - aPos = iFrameTable[stat].iPos; - - aTimeMs = iFrameTable[stat].iFrameNum * iMsecPerFrame; - - iFrameNum = iFrameTable[stat].iFrameNum; // iFrameNum provides frame num after hi-res table is reset - - DP3(_L("CFrameTable::FindFrameTimeFromPos hi-res iFrameNum[%u] indx[%d] iFrameNum sync[%u]"), iFrameTable[stat].iFrameNum, stat, iFrameNum); - - } - - - - DP3(_L("CFrameTable::FindFrameTimeFromPos time[%u] pos[%u] indxstat[%d]"), aTimeMs, aPos, stat); - - if (stat> 0) - - { - - stat = KErrNone; - - } - - return stat; - - } - - - -// ----------------------------------------------------------------------------- - -// CFrameTable::LastFramePos - -// ----------------------------------------------------------------------------- - -// - -EXPORT_C TInt CFrameTable::LastFramePos(TUint& aPos) - - { - - TInt stat = KErrNotFound; - - TInt stat1 = KErrNotFound; - - TInt stat2 = KErrNotFound; - - TUint count; - - TInt pos1 = 0; - - TInt pos2 = 0; - - - - count = iFrameTable.Count(); - - DP1(_L("CFrameTable::LastFramePos count[%u]"), count); - - if (count> 0) - - { - - pos1 = iFrameTable[count-1].iPos; - - stat1 = KErrNone; - - DP1(_L("CFrameTable::LastFramePos last pos in hi-res[%d]"), pos1); - - } - - - - count = iLowResFrameTable.Count(); - - DP1(_L("CFrameTable::LastFramePos lr count[%u]"), count); - - if (count> 0) - - { - - pos2 = iLowResFrameTable[count-1].iPos; - - stat2 = KErrNone; - - DP1(_L("CFrameTable::LastFramePos last pos in low-res[%d]"), pos2); - - } - - - - if ((stat1 == KErrNone) && (stat2 == KErrNone)) - - { - - aPos = Max(pos1, pos2); - - stat = KErrNone; - - } - - else if (stat1 == KErrNone) - - { - - aPos = pos1; - - stat = KErrNone; - - } - - else if (stat2 == KErrNone) - - { - - aPos = pos2; - - stat = KErrNone; - - } - - DP1(_L("CFrameTable::LastFramePos aPos[%d]"), aPos); - - - - return stat; - - } - - - -// ----------------------------------------------------------------------------- - -// CFrameTable::LastFrameTime - -// ----------------------------------------------------------------------------- - -// - -EXPORT_C TInt CFrameTable::LastFrameTime(TUint& aTimeMs) - - { - - DP0(_L("CFrameTable::LastFrameTime")); - - TInt stat = KErrNotFound; - - TInt stat1 = KErrNotFound; - - TInt stat2 = KErrNotFound; - - TUint count; - - TUint frameNum = 0; - - TInt frameNum1 = 0; - - TInt frameNum2 = 0; - - - - count = iFrameTable.Count(); - - if (count> 0) - - { - - frameNum1 = iFrameTable[count-1].iFrameNum; - - stat1 = KErrNone; - - } - - - - count = iLowResFrameTable.Count(); - - if (count> 0) - - { - - frameNum2 = iLowResFrameTable[count-1].iFrameNum; - - stat2 = KErrNone; - - } - - - - if ((stat1 == KErrNone) && (stat2 == KErrNone)) - - { - - frameNum = Max(frameNum1, frameNum2); - - stat = KErrNone; - - } - - else if (stat1 == KErrNone) - - { - - frameNum = frameNum1; - - stat = KErrNone; - - } - - else if (stat2 == KErrNone) - - { - - frameNum = frameNum2; - - stat = KErrNone; - - } - - - - aTimeMs = frameNum * iMsecPerFrame; - - DP2(_L("CFrameTable::LastFrameTime time[%u] frame[%u]"),aTimeMs,frameNum); - - - - return stat; - - } - - - -// ----------------------------------------------------------------------------- - -// CFrameTable::ResetTable - -// ----------------------------------------------------------------------------- - -// - -EXPORT_C void CFrameTable::ResetTable() - - { - - DP0(_L("CFrameTable::ResetTable")); - - - - iFrameTable.Reset(); - - iBufCnt = 0; - - iOkToShrink = EFalse; - - } - - - -// ----------------------------------------------------------------------------- - -// CFrameTable::ShrinkTable - -// ----------------------------------------------------------------------------- - -// - -EXPORT_C void CFrameTable::ShrinkTable() - - { // gets called from controller decoder when switching to next buffer - - DP0(_L("CFrameTable::ShrinkTable")); - - if (iBufCnt < KBuffersToKeep) - - { - - iBufCnt++; - - } - - else - - { - - iOkToShrink = ETrue; - - DP0(_L("CFrameTable::ShrinkTable ok to shrink")); - - } - - } - - - -EXPORT_C TInt CFrameTable::SetSourceReference(TUint aTimeMs, TUint aPos) - - { // if position is unknown it should always be set to 0 as the reference offset and time will be used instead - - // This is used to set the offset which is added to future frame positions submitted - - // This frame table can get reset when seeking and needs to know where it is in the source - - DP2(_L("CFrameTable::SetOffset, aTimeMs[%u], aPos[%u]"), aTimeMs, aPos); - - TInt stat = KErrNone; - - iTimeRefMs = aTimeMs; - - iCurrentFrameCount = 0; - - iIntervalRef = 0; - - iOffset = aPos; - - if (aTimeMs == 0) - - { - - iFrameNum = 0; - - } - - if (iFrameTable.Count() == 0) - - { // this is to make sure the table has at least one entry in case playback looks for a position in the buffers after seeking - - SubmitTableEntry(0); - - // iCurrentFrameCount--; // since this is not a decoded frame - - } - - return stat; - - } - - - -// ----------------------------------------------------------------------------- - -// CFrameTable::RegisterForEvent - -// ----------------------------------------------------------------------------- - -// - -EXPORT_C TInt CFrameTable::RegisterForEvent(TFrameTableEvent aEvent, - - MFrameTableEventObserver* aObserver, - - TUint aParam) - - { - - DP2(_L("CFrameTable::RegisterForEvent event[%d] param[%u]"), aEvent, aParam); - - - - TInt status = KErrNone; - - iObserver = aObserver; - - - - switch (aEvent) - - { - - case EPosReached: - - iPosEventMs = aParam; - - break; - - - - case EPlayWindowEndPosReached: - - iPlayWindowEndPosEventMs = aParam; - - break; - - - - case EDecodeInterval: - - - - if (aParam> 0) // msec - - - - { - - iIntervalRef = 0; - - iIntervalEvent = aParam; - - } - - else - - return KErrArgument; - - - - break; - - - - default: - - status = KErrUnknown; - - break; - - } - - - - return status; - - } - - - -// ----------------------------------------------------------------------------- - -// CFrameTable::UnRegisterForEvent - -// ----------------------------------------------------------------------------- - -// - -EXPORT_C TInt CFrameTable::UnRegisterForEvent(TFrameTableEvent aEvent, MFrameTableEventObserver* /*aObserver*/) - - { - - DP1(_L("CFrameTable::UnRegisterForEvent event[%d]"), aEvent); - - - - TInt status = KErrNone; - - - - switch (aEvent) - - { - - case EPosReached: - - iPosEventMs = 0; - - break; - - - - case EPlayWindowEndPosReached: - - iPlayWindowEndPosEventMs = 0; - - break; - - - - case EDecodeInterval: - - iIntervalEvent = 0; - - break; - - - - default: - - status = KErrUnknown; - - break; - - } - - - - return status; - - } - - - -// ----------------------------------------------------------------------------- - -// CFrameTable::Bitrate - -// ----------------------------------------------------------------------------- - -// - -EXPORT_C TInt CFrameTable::Bitrate() - - { - - return iAvgBitrate; - - } - - - -// ========================== OTHER EXPORTED FUNCTIONS ========================= - - - -// ----------------------------------------------------------------------------- - -// CFrameTable::CalcFrameFromTimeMs - -// ----------------------------------------------------------------------------- - -// - -TUint CFrameTable::CalcFrameFromTimeMs(TUint aTimeMs) - - { // TUint in msec can represent 1193 hours - - TUint frame = 0; - - - - if (iMsecPerFrame > 0) - - { - - frame = aTimeMs/iMsecPerFrame; - - } - - - - return frame; - - } - - - -EXPORT_C TInt CFrameTable::IsSeeking(TBool& aIsSeeking) - - { - - aIsSeeking = (iPosEventMs> 0); - - return KErrNone; - - } - - - -EXPORT_C TInt CFrameTable::GetLastPosEvent(TUint& aPos) - - { - - aPos = iEventPos; - - return KErrNone; - - } - - - -// End of File - - - diff -r eb1e5d7cc688 -r 9707f1c07383 audio/ARM_CMMF_codecs/FrameTable/bwins/FrameTableu.def --- a/audio/ARM_CMMF_codecs/FrameTable/bwins/FrameTableu.def Fri Jul 09 12:23:13 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,18 +0,0 @@ -EXPORTS - ??1CFrameTable@@UAE@XZ @ 1 NONAME ; CFrameTable::~CFrameTable(void) - ?Bitrate@CFrameTable@@QAEHXZ @ 2 NONAME ; int CFrameTable::Bitrate(void) - ?FindFramePosFromTime@CFrameTable@@QAEHAAI0@Z @ 3 NONAME ; int CFrameTable::FindFramePosFromTime(unsigned int &, unsigned int &) - ?FindFrameTimeFromPos@CFrameTable@@QAEHAAI0@Z @ 4 NONAME ; int CFrameTable::FindFrameTimeFromPos(unsigned int &, unsigned int &) - ?GetLastPosEvent@CFrameTable@@QAEHAAI@Z @ 5 NONAME ; int CFrameTable::GetLastPosEvent(unsigned int &) - ?InitFrameTable@CFrameTable@@QAEHHH@Z @ 6 NONAME ; int CFrameTable::InitFrameTable(int, int) - ?IsSeeking@CFrameTable@@QAEHAAH@Z @ 7 NONAME ; int CFrameTable::IsSeeking(int &) - ?LastFramePos@CFrameTable@@QAEHAAI@Z @ 8 NONAME ; int CFrameTable::LastFramePos(unsigned int &) - ?LastFrameTime@CFrameTable@@QAEHAAI@Z @ 9 NONAME ; int CFrameTable::LastFrameTime(unsigned int &) - ?NewL@CFrameTable@@SAPAV1@XZ @ 10 NONAME ; class CFrameTable * CFrameTable::NewL(void) - ?RegisterForEvent@CFrameTable@@QAEHW4TFrameTableEvent@1@PAVMFrameTableEventObserver@@I@Z @ 11 NONAME ; int CFrameTable::RegisterForEvent(enum CFrameTable::TFrameTableEvent, class MFrameTableEventObserver *, unsigned int) - ?ResetTable@CFrameTable@@QAEXXZ @ 12 NONAME ; void CFrameTable::ResetTable(void) - ?SetSourceReference@CFrameTable@@QAEHII@Z @ 13 NONAME ; int CFrameTable::SetSourceReference(unsigned int, unsigned int) - ?ShrinkTable@CFrameTable@@QAEXXZ @ 14 NONAME ; void CFrameTable::ShrinkTable(void) - ?SubmitTableEntry@CFrameTable@@QAEHI@Z @ 15 NONAME ; int CFrameTable::SubmitTableEntry(unsigned int) - ?UnRegisterForEvent@CFrameTable@@QAEHW4TFrameTableEvent@1@PAVMFrameTableEventObserver@@@Z @ 16 NONAME ; int CFrameTable::UnRegisterForEvent(enum CFrameTable::TFrameTableEvent, class MFrameTableEventObserver *) - diff -r eb1e5d7cc688 -r 9707f1c07383 audio/ARM_CMMF_codecs/FrameTable/eabi/FrameTableu.def --- a/audio/ARM_CMMF_codecs/FrameTable/eabi/FrameTableu.def Fri Jul 09 12:23:13 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,22 +0,0 @@ -EXPORTS - _ZN11CFrameTable10ResetTableEv @ 1 NONAME - _ZN11CFrameTable11ShrinkTableEv @ 2 NONAME - _ZN11CFrameTable12LastFramePosERj @ 3 NONAME - _ZN11CFrameTable13LastFrameTimeERj @ 4 NONAME - _ZN11CFrameTable14InitFrameTableEii @ 5 NONAME - _ZN11CFrameTable15GetLastPosEventERj @ 6 NONAME - _ZN11CFrameTable16RegisterForEventENS_16TFrameTableEventEP24MFrameTableEventObserverj @ 7 NONAME - _ZN11CFrameTable16SubmitTableEntryEj @ 8 NONAME - _ZN11CFrameTable18SetSourceReferenceEjj @ 9 NONAME - _ZN11CFrameTable18UnRegisterForEventENS_16TFrameTableEventEP24MFrameTableEventObserver @ 10 NONAME - _ZN11CFrameTable20FindFramePosFromTimeERjS0_ @ 11 NONAME - _ZN11CFrameTable20FindFrameTimeFromPosERjS0_ @ 12 NONAME - _ZN11CFrameTable4NewLEv @ 13 NONAME - _ZN11CFrameTable7BitrateEv @ 14 NONAME - _ZN11CFrameTable9IsSeekingERi @ 15 NONAME - _ZN11CFrameTableD0Ev @ 16 NONAME - _ZN11CFrameTableD1Ev @ 17 NONAME - _ZN11CFrameTableD2Ev @ 18 NONAME - _ZTI11CFrameTable @ 19 NONAME ; ## - _ZTV11CFrameTable @ 20 NONAME ; ## - diff -r eb1e5d7cc688 -r 9707f1c07383 audio/ARM_CMMF_codecs/FrameTable/rom/FrameTable.iby --- a/audio/ARM_CMMF_codecs/FrameTable/rom/FrameTable.iby Fri Jul 09 12:23:13 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,58 +0,0 @@ -/* - -* Copyright (c) 2007 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: IBY file for FrameTable - -* - -*/ - - - -#ifndef FRAMETABLE_IBY - -#define FRAMETABLE_IBY - - - - - - - -file=ABI_DIR\BUILD_DIR\FrameTable.dll SHARED_LIB_DIR\FrameTable.dll - - - -// FrameTable STUB - -data=ZSYSTEM\install\FrameTable_Stub.SIS System\Install\FrameTable_Stub.SIS - - - -#endif - - - diff -r eb1e5d7cc688 -r 9707f1c07383 audio/ARM_CMMF_codecs/group/bld.inf --- a/audio/ARM_CMMF_codecs/group/bld.inf Fri Jul 09 12:23:13 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,52 +0,0 @@ -/* - -* Copyright (c) 2006 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: Project specification for Audio Plugin projects - -* - -*/ - - - - - -PRJ_PLATFORMS - -DEFAULT - - - -PRJ_EXPORTS - - - -PRJ_MMPFILES - -#include "../FrameTable/Group/bld.inf" - - - diff -r eb1e5d7cc688 -r 9707f1c07383 audio/group/bld.inf --- a/audio/group/bld.inf Fri Jul 09 12:23:13 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,56 +0,0 @@ -/* - -* Copyright (c) 2006 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: Project Specification for Audio Plugin projects. - -* - -*/ - - - - - -PRJ_PLATFORMS - -DEFAULT - - - -PRJ_EXPORTS - - - -PRJ_MMPFILES - -#include "../ARM_CMMF_codecs/group/bld.inf" - - - -// End of File - - - diff -r eb1e5d7cc688 -r 9707f1c07383 build.config.xml --- a/build.config.xml Fri Jul 09 12:23:13 2010 +0100 +++ b/build.config.xml Fri Jul 09 12:37:42 2010 +0100 @@ -13,35 +13,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -87,19 +59,7 @@ - - - - - - - - - - - - - + @@ -133,35 +93,8 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + diff -r eb1e5d7cc688 -r 9707f1c07383 group/bld.inf --- a/group/bld.inf Fri Jul 09 12:23:13 2010 +0100 +++ b/group/bld.inf Fri Jul 09 12:37:42 2010 +0100 @@ -29,8 +29,7 @@ #include "../mm_pub/group/bld.inf" #include "../devsoundextensions/group/bld.inf" #include "../mdfdevvideoextensions/group/bld.inf" -#include "../audio/group/bld.inf" -#include "../video/group/bld.inf" + // End of File diff -r eb1e5d7cc688 -r 9707f1c07383 layers.sysdef.xml --- a/layers.sysdef.xml Fri Jul 09 12:23:13 2010 +0100 +++ b/layers.sysdef.xml Fri Jul 09 12:37:42 2010 +0100 @@ -14,47 +14,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -88,35 +48,8 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + diff -r eb1e5d7cc688 -r 9707f1c07383 mf_developer_build.config.xml --- a/mf_developer_build.config.xml Fri Jul 09 12:23:13 2010 +0100 +++ b/mf_developer_build.config.xml Fri Jul 09 12:37:42 2010 +0100 @@ -16,34 +16,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff -r eb1e5d7cc688 -r 9707f1c07383 mm_pub/drm_audio_player_api/tsrc/data/mmc/drm/test3gp.dcf diff -r eb1e5d7cc688 -r 9707f1c07383 mm_pub/drm_audio_player_api/tsrc/data/mmc/drm/testmp3.dcf diff -r eb1e5d7cc688 -r 9707f1c07383 package_definition.xml --- a/package_definition.xml Fri Jul 09 12:23:13 2010 +0100 +++ b/package_definition.xml Fri Jul 09 12:37:42 2010 +0100 @@ -1,14 +1,7 @@ - - - - - - - - + diff -r eb1e5d7cc688 -r 9707f1c07383 video/ARM_MDF_Decoders/Utilities/BufferProcessor/BWINS/BufferProcessor.def --- a/video/ARM_MDF_Decoders/Utilities/BufferProcessor/BWINS/BufferProcessor.def Fri Jul 09 12:23:13 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,3 +0,0 @@ -EXPORTS - ?NewL@CBaseEngine@@SAPAV1@PAVMProcessEngineObserver@@PAVMBaseCodec@@HH@Z @ 1 NONAME ; class CBaseEngine * CBaseEngine::NewL(class MProcessEngineObserver *, class MBaseCodec *, int, int) - diff -r eb1e5d7cc688 -r 9707f1c07383 video/ARM_MDF_Decoders/Utilities/BufferProcessor/EABI/BufferProcessor.def --- a/video/ARM_MDF_Decoders/Utilities/BufferProcessor/EABI/BufferProcessor.def Fri Jul 09 12:23:13 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,7 +0,0 @@ -EXPORTS - _ZN11CBaseEngine4NewLEP22MProcessEngineObserverP10MBaseCodecii @ 1 NONAME - _ZTI18CBaseProcessEngine @ 2 NONAME ; ## - _ZTI25CBaseEngineImplementation @ 3 NONAME ; ## - _ZTV18CBaseProcessEngine @ 4 NONAME ; ## - _ZTV25CBaseEngineImplementation @ 5 NONAME ; ## - diff -r eb1e5d7cc688 -r 9707f1c07383 video/ARM_MDF_Decoders/Utilities/BufferProcessor/group/BufferProcessor.mmp --- a/video/ARM_MDF_Decoders/Utilities/BufferProcessor/group/BufferProcessor.mmp Fri Jul 09 12:23:13 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,48 +0,0 @@ -/* -* Copyright (c) 2007 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: -* -*/ - -#include -TARGET ArmBufferProcessor.dll -TARGETTYPE DLL - -UID 0x1000008D 0x102749FF - -CAPABILITY CAP_GENERAL_DLL -VENDORID VID_DEFAULT - -DEFFILE BufferProcessor.def -NOSTRICTDEF - - -SOURCEPATH ../src -SOURCE BaseEngineImplementation.cpp -SOURCE BaseProcessEngine.cpp - - -USERINCLUDE ../../../../../Inc -USERINCLUDE ../inc - -OS_LAYER_SYSTEMINCLUDE -SYSTEMINCLUDE /epoc32/include/mmf/devvideo - -LIBRARY EUser.lib - - -//----------------------------------------------------------------------------- -// End of File -//----------------------------------------------------------------------------- - diff -r eb1e5d7cc688 -r 9707f1c07383 video/ARM_MDF_Decoders/Utilities/BufferProcessor/group/bld.inf --- a/video/ARM_MDF_Decoders/Utilities/BufferProcessor/group/bld.inf Fri Jul 09 12:23:13 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +0,0 @@ -// BLD.INF -/* -* Copyright (c) 2007 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: -* -*/ - -PRJ_MMPFILES -BufferProcessor.mmp - -//----------------------------------------------------------------------------- -// End of BLD.INF -//----------------------------------------------------------------------------- \ No newline at end of file diff -r eb1e5d7cc688 -r 9707f1c07383 video/ARM_MDF_Decoders/Utilities/BufferProcessor/inc/BaseEngine.h --- a/video/ARM_MDF_Decoders/Utilities/BufferProcessor/inc/BaseEngine.h Fri Jul 09 12:23:13 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,82 +0,0 @@ -/* -* Copyright (c) 2007 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: -* -*/ - -#ifndef __PROCESS_ENGINE_H -#define __PROCESS_ENGINE_H - -#include - -class MBaseCodec; - -class MProcessEngineObserver - { - public: - - // Callback to indicate the input buffer is consumed - virtual TInt InputBufferConsumed ( TAny* aInp, TInt aError ) =0; - - // Callback to indicate output buffer is ready - virtual TInt OutputBufferReady ( TAny* aOup, TInt aError ) = 0; - - // Callback to handle the error from RunL - virtual void HandleError ( TInt aError ) = 0; - - }; - -class CBaseEngine: public CBase - { - public: - IMPORT_C static CBaseEngine* NewL ( MProcessEngineObserver* aObserver, - MBaseCodec* aCodec, - TBool aInPlaceProcessing, - TInt aPriority = CActive::EPriorityStandard); - virtual ~CBaseEngine () - { - } - public: - // to add the input buffer to the Q - virtual TInt AddInput ( TAny* ) = 0; - - // to add the output buffer to the Q - virtual TInt AddOutput ( TAny* ) = 0; - - // starts the processing; - virtual TInt Start () = 0; - - // stops the processing - virtual TInt Stop () = 0; - - // Reset all the buffers. - virtual TInt Reset() =0; - - // Returns the number of input buffers in process engine - virtual TInt NumInputBuffers () = 0; - - // Returns the number of output buffers in process engine - virtual TInt NumOutputBuffers () = 0; - - // Set the clock source and minimum time taken for PP - virtual TInt SetSyncOptions(TAny* aClockSource,TInt aProcessingTime = 0) = 0; - // fetches the OutputBuffer from the process Engine OutputQ - virtual TAny* FetchOutputBuffer()=0; - - // fetches the InputBuffer from the process Engine INputQ - virtual TAny* FetchInputBuffer()=0; - - }; - -#endif //__PROCESS_ENGINE_H \ No newline at end of file diff -r eb1e5d7cc688 -r 9707f1c07383 video/ARM_MDF_Decoders/Utilities/BufferProcessor/inc/BaseEngineImplementation.h --- a/video/ARM_MDF_Decoders/Utilities/BufferProcessor/inc/BaseEngineImplementation.h Fri Jul 09 12:23:13 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,79 +0,0 @@ -/* -* Copyright (c) 2007 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: -* -*/ - -#ifndef __BASEENGINEIMPLEMENTATION_H -#define __BASEENGINEIMPLEMENTATION_H - -#include -#include "BaseEngine.h" - -//Forward declarations -class MProcessEngineObserver; -class CBaseProcessEngine; - -class CBaseEngineImplementation : public CBaseEngine - { - public: - static CBaseEngineImplementation* NewL ( MProcessEngineObserver* aObserver, - MBaseCodec* aCodec, - TBool aInPlaceProcessing, - TInt aPriority =CActive::EPriorityStandard); - - ~CBaseEngineImplementation (); - private: - void ConstructL ( MProcessEngineObserver* aObserver, - MBaseCodec* aCodec, - TBool aInPlaceProcessing, - TInt aPriority); - - CBaseEngineImplementation (); - - private:// from BaseEngine - // to add the input buffer to the Q - TInt AddInput (TAny*); - - // to add the output buffer to the Q - TInt AddOutput (TAny*); - - // starts the processing; - TInt Start (); - - // stops the processing - TInt Stop (); - - // Reset all the buffers. - TInt Reset(); - // fetches the OutputBuffer from the process Engine OutPut Queue - TAny* FetchOutputBuffer(); - - // fetches the InputBuffer from the process Engine InPut Queue - TAny* FetchInputBuffer(); - - // Returns the number of input buffers in process engine - virtual TInt NumInputBuffers (); - - // Returns the number of output buffers in process engine - virtual TInt NumOutputBuffers (); - - // Set the synchronize options - virtual TInt SetSyncOptions(TAny *, TInt aProcessingTime = 0); - - private: // data - CBaseProcessEngine* iEngineHandle; - }; - -#endif //__BASEENGINEIMPLEMENTATION_H \ No newline at end of file diff -r eb1e5d7cc688 -r 9707f1c07383 video/ARM_MDF_Decoders/Utilities/BufferProcessor/inc/BaseProcessEngine.h --- a/video/ARM_MDF_Decoders/Utilities/BufferProcessor/inc/BaseProcessEngine.h Fri Jul 09 12:23:13 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,126 +0,0 @@ -/* -* Copyright (c) 2007 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: -* -*/ - -#ifndef _CBASEPROCENGINE_H_ -#define _CBASEPROCENGINE_H_ - -#include -#include "codec.h" -#include "BaseEngine.h" - -// Forward Declarations -class TVideoPicture; -class MMMFClockSource; - -class CBaseProcessEngine : public CActive - { - public: - enum TState { - ENil = 0, - EStart, - EStop - }; - - public: // constructor and destructor - // - static CBaseProcessEngine* NewL ( MProcessEngineObserver* aObserver, - MBaseCodec* aCodec, - TBool aInPlaceProcessing, - TInt aPriority = EPriorityStandard); - // Destructor - virtual ~CBaseProcessEngine (); - - private: // constructor - - // default constructor - void ConstructL ( MProcessEngineObserver* aObserver, - MBaseCodec* aCodec, - TBool aInPlaceProcessing ); - // - CBaseProcessEngine(TInt aPriority = EPriorityStandard); - - - public: // API's - // To start the engine - TInt Start (); - - // To stop the engine - TInt Stop (); - - //Add the input buffer to the free input queue - TInt AddInput( TAny* aBuffer ); - - //Add the output buffer to the free output queue - TInt AddOutput( TAny* aBuffer ); - - // To check whether the engine is ready for processing - TBool IsReadyForProcessing (); - - // Reset all the buffers. - TInt Reset(); - - // fetches the OutputBuffer from the process Engine OutPut Queue - TAny* FetchOutputBuffer(); - - // fetches the InputBufer from the process Engine InPut Queue - TAny* FetchInputBuffer(); - - - // Returns the number of input buffers in process engine - virtual TInt NumInputBuffers (); - - // Returns the number of output buffers in process engine - virtual TInt NumOutputBuffers (); - - // Set the synchronize options - virtual TInt SetSyncOptions(TAny* aClockSource,TInt aProcessingTime = 0); - - private: // from CActive - void DoCancel (); - - void RunL (); - - TInt RunError ( TInt aError ); - - // other functions - void IssueRequest (); - // to get the input - TAny* GetInput (); - // To get the output - TAny* GetOutput (); - /** - * Function to decide if processing should be done or not - * - * @return : TInt: KErrNone - */ - TBool CanProcess(TVideoPicture *aPicture); - - private: // data - RArray iInputArray; - RArray iOutputArray; - MBaseCodec* iCodec; - MProcessEngineObserver* iObserver; - TAny* iInput; - TAny* iOutput; - TState iState; - TInt iPrevResult; - TBool iInPlaceProcessing; - MMMFClockSource* iClockSource; - TInt iTimeTakenForProcessing; - - }; -#endif //_CBASEPROCENGINE_H_ \ No newline at end of file diff -r eb1e5d7cc688 -r 9707f1c07383 video/ARM_MDF_Decoders/Utilities/BufferProcessor/inc/RDebug.h --- a/video/ARM_MDF_Decoders/Utilities/BufferProcessor/inc/RDebug.h Fri Jul 09 12:23:13 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,38 +0,0 @@ -/* -* Copyright (c) 2007 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: -* -*/ - -#ifndef __RDEBUG_H__ -#define __RDEBUG_H__ - -#include - -#ifdef _DEBUG - - #define RDP(s) //RDebug::Print(s) - #define RDP1(s,x) RDebug::Print(s,x) - #define RDP2(s,x,y) //RDebug::Print(s,x,y) - #define RDP3(s) RDebug::Print(s) -#else - - #define RDP(s) - #define RDP1(s,x) - #define RDP2(s,x,y) - #define RDP3(s) - -#endif // _DEBUG - -#endif // __RDEBUG_H__ diff -r eb1e5d7cc688 -r 9707f1c07383 video/ARM_MDF_Decoders/Utilities/BufferProcessor/inc/codec.h --- a/video/ARM_MDF_Decoders/Utilities/BufferProcessor/inc/codec.h Fri Jul 09 12:23:13 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,45 +0,0 @@ -/* -* Copyright (c) 2007 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: -* -*/ - -#ifndef __CODEC_H -#define __CODEC_H - -#include - -class MBaseCodec - { - public: - enum TCodecState { - EInputConsumed, - EOutputConsumed, - EConsumed, - ENotConsumed, - EBadOutputBuffer, - EBadInputBuffer - }; - public:// Virtual functions - // For initializing the codec - virtual void InitializeL () = 0; - //For processing the required and returns one of the TCodecState - virtual TInt DoProcessL ( TAny *aInpBuf, TAny* aOutBuf = NULL ) = 0; - //For deinitializing the codec - virtual void DeInitialize () = 0; - // Reset the codec - virtual void Reset () = 0; - }; - -#endif //__CODEC_H \ No newline at end of file diff -r eb1e5d7cc688 -r 9707f1c07383 video/ARM_MDF_Decoders/Utilities/BufferProcessor/src/BaseEngineImplementation.cpp --- a/video/ARM_MDF_Decoders/Utilities/BufferProcessor/src/BaseEngineImplementation.cpp Fri Jul 09 12:23:13 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,287 +0,0 @@ -/* -* Copyright (c) 2007 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: -* -*/ - -#include "BaseEngine.h" -#include "BaseEngineImplementation.h" -#include "BaseProcessEngine.h" - -/* -****************************************************************************** -Name : BaseEngine::NewL -Description : 2phase construtor -Parameter : aObserver - engine observer - aCodec - codec object - aInPlaceProcessing - -Return Value : constructed object -****************************************************************************** -*/ -EXPORT_C CBaseEngine* CBaseEngine::NewL ( MProcessEngineObserver* aObserver, - MBaseCodec* aCodec, - TBool aInPlaceProcessing, - TInt aPriority) - { - return CBaseEngineImplementation::NewL ( aObserver, aCodec, aInPlaceProcessing, aPriority ); - } -/* -****************************************************************************** -Name : CBaseEngineImplementation::NewL -Description : 2phase construtor -Parameter : aObserver - engine observer - aCodec - codec object - aInPlaceProcessing - -Return Value : constructed object -****************************************************************************** -*/ -CBaseEngineImplementation* CBaseEngineImplementation::NewL ( MProcessEngineObserver* aObserver, - MBaseCodec* aCodec, - TBool aInPlaceProcessing, - TInt aPriority) - { - CBaseEngineImplementation* uSelf = new (ELeave) CBaseEngineImplementation; - CleanupStack::PushL ( uSelf ); - uSelf->ConstructL ( aObserver, aCodec, aInPlaceProcessing, aPriority ); - CleanupStack::Pop (); //uSelf - return uSelf; - } - -/* -****************************************************************************** -Name : CBaseEngineImplementation::CBaseEngineImplementation -Description : 1st phase constructor -Parameter : None -Return Value : None -****************************************************************************** -*/ -CBaseEngineImplementation::CBaseEngineImplementation (): - iEngineHandle ( NULL ) - { - } - -/* -****************************************************************************** -Name : CBaseEngineImplementation::~CBaseEngineImplementation -Description : Destructor -Parameter : None -Return Value : None -****************************************************************************** -*/ -CBaseEngineImplementation::~CBaseEngineImplementation () - { - if ( iEngineHandle ) - { - delete iEngineHandle; - iEngineHandle = 0; - } - } - -/* -****************************************************************************** -Name : CBaseEngineImplementation::ConstructL -Description : 2nd phase construtor -Parameter : aObserver - engine observer - aCodec - codec object - aInPlaceProcessing - -Return Value : None -****************************************************************************** -*/ -void CBaseEngineImplementation::ConstructL ( MProcessEngineObserver* aObserver, - MBaseCodec* aCodec, - TBool aInPlaceProcessing, - TInt aPriority) - { - iEngineHandle = CBaseProcessEngine::NewL ( aObserver, aCodec, aInPlaceProcessing, aPriority ); - } - -/* -****************************************************************************** -Name : CBaseEngineImplementation::AddInput -Description : Adds the input -Parameter : aInput - input -Return Value : returns the error ( KErrNone if there is no error ) -****************************************************************************** -*/ -TInt CBaseEngineImplementation::AddInput ( TAny* aInput ) - { - if ( !iEngineHandle ) - { - return KErrNotReady; - } - return iEngineHandle->AddInput ( aInput ); - } - -/* -****************************************************************************** -Name : CBaseEngineImplementation::AddOutput -Description : Adds the output -Parameter : aOutput - output buffer -Return Value : returns the error ( KErrNone if there is no error ) -****************************************************************************** -*/ -TInt CBaseEngineImplementation::AddOutput ( TAny* aOutput ) - { - if ( !iEngineHandle ) - { - return KErrNotReady; - } - return iEngineHandle->AddOutput ( aOutput ); - } - -/* -****************************************************************************** -Name : CBaseEngineImplementation::Start -Description : Starts the engine -Parameter : None -Return Value : returns the error ( KErrNone if there is no error ) -****************************************************************************** -*/ -TInt CBaseEngineImplementation::Start () - { - if ( !iEngineHandle ) - { - return KErrNotReady; - } - return iEngineHandle->Start (); - } - -/* -****************************************************************************** -Name : CBaseEngineImplementation::Stop -Description : Stops the engine -Parameter : None -Return Value : returns the error ( KErrNone if there is no error ) -****************************************************************************** -*/ -TInt CBaseEngineImplementation::Stop () - { - if ( !iEngineHandle ) - { - return KErrNotReady; - } - return iEngineHandle->Stop (); - } - - - -/* -****************************************************************************** -Name : CBaseEngineImplementation::Reset -Description : Reset all the buffers. -Parameter : None -Return Value : returns the error ( KErrNone if there is no error ) -****************************************************************************** -*/ -TInt CBaseEngineImplementation::Reset() - { - if ( !iEngineHandle ) - { - return KErrNotReady; - } - return iEngineHandle->Reset (); - } - -/* -****************************************************************************** -Name : NumInputBuffers -Description : Returns the number of input buffers in process engine -Parameter : -Return Value : -****************************************************************************** -*/ -TInt CBaseEngineImplementation::NumInputBuffers () - { - if ( !iEngineHandle ) - { - return 0; - } - return iEngineHandle->NumInputBuffers (); - } - -/* -****************************************************************************** -Name : NumOutputBuffers -Description : Returns the number of output buffers in process engine -Parameter : -Return Value : -****************************************************************************** -*/ -TInt CBaseEngineImplementation::NumOutputBuffers () - { - if ( !iEngineHandle ) - { - return 0; - } - return iEngineHandle->NumOutputBuffers (); - } - - - -/* -****************************************************************************** -Name : SetSyncOptions -Description : Set the synchronization options -Parameter : aClockSource - clock sourec to use for syncronization - aTimeTakenForProcessing - Time taken for Processing -Return Value : -****************************************************************************** -*/ -TInt CBaseEngineImplementation::SetSyncOptions(TAny *aClockSource, TInt aTimeTakenForProcessing) - { - if ( !iEngineHandle ) - { - return 0; - } - return iEngineHandle->SetSyncOptions(aClockSource, aTimeTakenForProcessing); - } - -/* -****************************************************************************** -Name : FetchOutputBuffers -Description : fetches the OutputBuffer from the process Engine OutPut Queue -Parameter : None -Return Value : output buffer -****************************************************************************** -*/ -TAny* CBaseEngineImplementation::FetchOutputBuffer() - { - if ( !iEngineHandle ) - { - return 0; - } - - return iEngineHandle->FetchOutputBuffer(); - } - - -/* -****************************************************************************** -Name : FetchInputBuffer -Description : fetches the inputBuffer from the process Engine inPut Queue -Parameter : None -Return Value : inputBuffer -****************************************************************************** -*/ -TAny* CBaseEngineImplementation::FetchInputBuffer() - { - if ( !iEngineHandle ) - { - return 0; - } - - return iEngineHandle->FetchInputBuffer(); - } - - \ No newline at end of file diff -r eb1e5d7cc688 -r 9707f1c07383 video/ARM_MDF_Decoders/Utilities/BufferProcessor/src/BaseProcessEngine.cpp --- a/video/ARM_MDF_Decoders/Utilities/BufferProcessor/src/BaseProcessEngine.cpp Fri Jul 09 12:23:13 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,550 +0,0 @@ -/* -* Copyright (c) 2007 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: -* -*/ - -#include -#include "BaseProcessEngine.h" -#include "RDebug.h" - -/* -****************************************************************************** -Name : CBaseProcessEngine::CBaseProcessEngine -Description : 1st phase construction -Parameter : None -Return Value : None -****************************************************************************** -*/ -CBaseProcessEngine::CBaseProcessEngine (TInt aPriority) : - CActive ( aPriority ), - iCodec ( NULL ), - iObserver ( NULL ), - iInput ( NULL ), - iOutput ( NULL ), - iState ( ENil ), - iPrevResult ( MBaseCodec::EConsumed ), - iInPlaceProcessing ( EFalse ), - iClockSource(NULL), - iTimeTakenForProcessing(0) - { - } - -/* -****************************************************************************** -Name : CBaseProcessEngine::NewL -Description : 2phase construtor -Parameter : aObserver - engine observer - aCodec - codec object - aInPlaceProcessing - -Return Value : constructed object -****************************************************************************** -*/ -CBaseProcessEngine* CBaseProcessEngine::NewL ( MProcessEngineObserver* aObserver, - MBaseCodec* aCodec, - TBool aInPlaceProcessing, - TInt aPriority) - { - CBaseProcessEngine* uSelf = new (ELeave) CBaseProcessEngine (aPriority); - CleanupStack::PushL ( uSelf ); - uSelf->ConstructL ( aObserver, aCodec, aInPlaceProcessing ); - CleanupStack::Pop ();//uSelf - return uSelf; - } - -/* -****************************************************************************** -Name : CBaseProcessEngine::~CBaseProcessEngine -Description : Destructor -Parameter : None -Return Value : None -****************************************************************************** -*/ -CBaseProcessEngine::~CBaseProcessEngine () - { - Stop (); - iCodec->DeInitialize (); - iInputArray.Close (); - iOutputArray.Close (); - } - -/* -****************************************************************************** -Name : CBaseProcessEngine::ConstructL -Description : 2nd phase construtor -Parameter : aObserver - engine observer - aCodec - codec object - aInPlaceProcessing - -Return Value : None -****************************************************************************** -*/ -void CBaseProcessEngine::ConstructL ( MProcessEngineObserver* aObserver, - MBaseCodec* aCodec, - TBool aInPlaceProcessing ) - { - // add to the scheduler - CActiveScheduler::Add ( this ); - - //Set the observer - iObserver = aObserver; - - // Set the codec - iCodec = aCodec; - - //Set the inplace processing - iInPlaceProcessing = aInPlaceProcessing; - - // initialize the codec - iCodec->InitializeL (); - return; - } - -/* -****************************************************************************** -Name : CBaseProcessEngine::IssueRequest -Description : To issue the request -Parameter : None -Return Value : None -****************************************************************************** -*/ -void CBaseProcessEngine::IssueRequest () - { - if( iState != EStart ) - return; - - if ( IsActive () ) - { - return; - } - TRequestStatus* uStatus = &iStatus; - User::RequestComplete ( uStatus, KErrNone ); - SetActive (); - } - -/* -****************************************************************************** -Name : CBaseProcessEngine::Start -Description : Starts the engine -Parameter : None -Return Value : returns the error ( KErrNone if there is no error ) -****************************************************************************** -*/ -TInt CBaseProcessEngine::Start () - { - iState = EStart; - IssueRequest (); - return KErrNone; - } - - - - -/* -****************************************************************************** -Name : CBaseProcessEngine::Stop -Description : Stops the engine -Parameter : None -Return Value : returns the error ( KErrNone if there is no error ) -****************************************************************************** -*/ -TInt CBaseProcessEngine::Stop () - { - iState = EStop; - Cancel (); - return KErrNone; - } - -/* -****************************************************************************** -Name : CBaseProcessEngine::DoCancel -Description : Function from CActive which will be called for canceling the object -Parameter : None -Return Value : None -****************************************************************************** -*/ -void CBaseProcessEngine::DoCancel () - { - } - -/* -****************************************************************************** -Name : CBaseProcessEngine::RunL -Description : -Parameter : None -Return Value : None -****************************************************************************** -*/ -void CBaseProcessEngine::RunL () - { - RDP3(_L("CBaseProcessEngine::RunL ++")); - if ( !IsReadyForProcessing () ) - { - RDP3(_L("CBaseProcessEngine::RunL !IsReadyForProcessing () --")); - return; - } - - if (iInPlaceProcessing) - { - //Skip Logic Goes Here - // Check whether this can be postprocessed or skipped if the clock source is set - if(iClockSource && (!CanProcess((TVideoPicture*)iInput))) - { - iObserver->InputBufferConsumed (FetchInputBuffer(), KErrUnderflow); - } - else - { - iPrevResult = iCodec->DoProcessL (iInput); - switch ( iPrevResult ) - { - case MBaseCodec::EConsumed: - case MBaseCodec::EInputConsumed: - iObserver->InputBufferConsumed (FetchInputBuffer(), KErrNone); - break; - - case MBaseCodec::ENotConsumed: - case MBaseCodec::EOutputConsumed: - default: - break; - } - } - } - else - { - //Skip Logic Goes Here - // Check whether this can be postprocessed or skipped if the clock source is set - if(iClockSource && (!CanProcess((TVideoPicture*)iInput))) - { - iObserver->InputBufferConsumed (FetchInputBuffer(), KErrUnderflow); - } - else - { - RDP3(_L("CBaseProcessEngine::DoProcessL ++")); - iPrevResult = iCodec->DoProcessL ( iInput, iOutput ); - RDP3(_L("CBaseProcessEngine::DoProcessL --")); - - switch ( iPrevResult ) - { - case MBaseCodec::EConsumed: - RDP3(_L("InputBufferConsumed ++")); - iObserver->InputBufferConsumed ( FetchInputBuffer(), KErrNone ); - RDP3(_L("InputBufferConsumed --")); - RDP3(_L("OutputBufferReady ++")); - iObserver->OutputBufferReady ( FetchOutputBuffer(), KErrNone ); - RDP3(_L("OutputBufferReady --")); - break; - case MBaseCodec::EInputConsumed: - iObserver->InputBufferConsumed ( FetchInputBuffer(), KErrNone ); - break; - case MBaseCodec::EOutputConsumed: - iObserver->OutputBufferReady ( FetchOutputBuffer(), KErrNone ); - break; - case MBaseCodec::ENotConsumed: - break; - case MBaseCodec::EBadOutputBuffer: - iObserver->OutputBufferReady ( FetchOutputBuffer(), KErrCorrupt); - break; - case MBaseCodec::EBadInputBuffer: - break; - default: - break; - } - } - } - - IssueRequest (); - RDP3(_L("CBaseProcessEngine::RunL --")); - } - -/* -****************************************************************************** -Name : CBaseProcessEngine::RunError -Description : Handles when RunL() Leaves -Parameter : None -Return Value : None -****************************************************************************** -*/ -TInt CBaseProcessEngine::RunError ( TInt aError ) - { - iObserver->HandleError ( aError ); - return KErrNone; - } - - -/* -****************************************************************************** -Name : CBaseProcessEngine::GetInput -Description : To get the input -Parameter : None -Return Value : Input buffer -****************************************************************************** -*/ -TAny* CBaseProcessEngine::GetInput () - { - if ( !iInputArray.Count () ) - { - return NULL; - } - TAny* uBuffer = iInputArray[0]; - iInputArray.Remove ( 0 ); - return uBuffer; - } - - -/* -****************************************************************************** -Name : CBaseProcessEngine::GetOutput -Description : To get the output -Parameter : None -Return Value : Output object -****************************************************************************** -*/ -TAny* CBaseProcessEngine::GetOutput () - { - RDP3(_L("CBaseProcessEngine::GetOutput--->")); - if ( !iOutputArray.Count () ) - { - return NULL; - } - TAny* uBuffer = iOutputArray[0]; - iOutputArray.Remove ( 0 ); - RDP1(_L("CBaseProcessEngine::GetOutput<--- %d"),uBuffer); - return uBuffer; - } - -/* -****************************************************************************** -Name : CBaseProcessEngine::AddInput -Description : Adds the input -Parameter : aInput - input -Return Value : returns the error ( KErrNone if there is no error ) -****************************************************************************** -*/ -TInt CBaseProcessEngine::AddInput ( TAny* aInput ) - { - RDP3(_L("CBaseProcessEngine::AddInput")); - if ( !aInput ) - { - return KErrArgument; - } - if ( iInput == NULL ) - { - iInput = aInput; - if ( iState == EStart ) - { - IssueRequest (); - } - return KErrNone; - } - return iInputArray.Append ( aInput ); - } - -/* -****************************************************************************** -Name : CBaseProcessEngine::AddOutput -Description : Adds the output -Parameter : aOutput - output buffer -Return Value : returns the error ( KErrNone if there is no error ) -****************************************************************************** -*/ -TInt CBaseProcessEngine::AddOutput ( TAny* aOutput ) - { - RDP1(_L("CBaseProcessEngine::AddOutput--> %d"),aOutput); - if ( !aOutput ) - { - return KErrArgument; - } - if ( iOutput == NULL) - { - iOutput = aOutput; - RDP1(_L("CBaseProcessEngine::AddOutput %d"),iOutput); - if ( iState == EStart ) - { - IssueRequest (); - } - return KErrNone; - } - return iOutputArray.Append ( aOutput ); - } - - -/* -****************************************************************************** -Name : CBaseProcessEngine::IsReadyForProcessing -Description : Checks for processing -Parameter : None -Return Value : None -****************************************************************************** -*/ -TBool CBaseProcessEngine::IsReadyForProcessing () - { - - if (iInPlaceProcessing) - { - return (iInput != NULL) ? ETrue : EFalse; - } - return ((iInput != NULL) && (iOutput != NULL)) ? ETrue : EFalse; - - } - - - -/* -****************************************************************************** -Name : CBaseProcessEngine::Reset -Description : Flush Output buffers -Parameter : None -Return Value : returns the error ( KErrNone if there is no error ) -****************************************************************************** -*/ - - -TInt CBaseProcessEngine::Reset() - { - iCodec->Reset (); - - if(!iInput) - iInput = GetInput (); - - while (iInput) - iObserver->InputBufferConsumed (FetchInputBuffer(), KErrCancel); - - if(!iOutput) - iOutput = GetOutput (); - - while (iOutput) - iObserver->OutputBufferReady (FetchOutputBuffer(), KErrCancel); - - - // reset the input array - iInputArray.Reset (); - // reset the output array - iOutputArray.Reset (); - - return KErrNone; - } - -/* -****************************************************************************** -Name : NumInputBuffers -Description : Returns the number of input buffers in process engine -Parameter : -Return Value : -****************************************************************************** -*/ -TInt CBaseProcessEngine::NumInputBuffers () - { - RDP3(_L("CBaseProcessEngine::NumInputBuffers--> ")); - TInt lCount = 0; - if (iInput) - { - lCount = 1; - } - RDP3(_L("CBaseProcessEngine::NumInputBuffers<-- ")); - return (iInputArray.Count() + lCount); - } - -/* -****************************************************************************** -Name : NumOutputBuffers -Description : Returns the number of output buffers in process engine -Parameter : -Return Value : -****************************************************************************** -*/ -TInt CBaseProcessEngine::NumOutputBuffers () - { - TInt lCount = 0; - if (iOutput) - { - lCount = 1; - } - return (iOutputArray.Count() + lCount); - } - -/* -****************************************************************************** -Name : SetSyncOptions -Description : Set the clock source and the minimum time take for processinf -Parameter : -Return Value : -****************************************************************************** -*/ -TInt CBaseProcessEngine::SetSyncOptions(TAny* aClockSource,TInt aTimeTakenForProcessing) - { - iClockSource = (MMMFClockSource*)aClockSource; - iTimeTakenForProcessing = aTimeTakenForProcessing; - return KErrNone; - } - - -/* -********************************************************************************* -Name : CanProcess -Description : Function to determine whether processing should be done or skipped - for the current i/p buffer. -Parameters : aPicture - The picture to be postprocessed. -Return Value : Boolean indicating whether postprocessing has to be done or not -********************************************************************************* -*/ - -TBool CBaseProcessEngine::CanProcess(TVideoPicture *aPicture) - { - - TTimeIntervalMicroSeconds lTimeDifference = 0; - - lTimeDifference = TTimeIntervalMicroSeconds( - (aPicture->iTimestamp.Int64() - - iClockSource->Time().Int64())); - if(lTimeDifference.Int64() >= iTimeTakenForProcessing) - { - return ETrue; - } - - return EFalse; - } -/* -********************************************************************************* -Name : FetchOutputBuffer -Description : fetches the OutputBuffer from the process Engine OutPut Queue -Parameters : None -Return Value : Output Picture -********************************************************************************* -*/ -TAny* CBaseProcessEngine::FetchOutputBuffer() - { - RDP3(_L("CBaseProcessEngine::FetchOutputBuffer--->")); - TAny* lTempOutput=NULL; - lTempOutput=iOutput; - iOutput=GetOutput(); - RDP1(_L("CBaseProcessEngine::FetchOutputBuffer address<--- %d "),lTempOutput); - return lTempOutput; - } - -/* -********************************************************************************* -Name : FetchInputBuffer -Description : fetches the InputBuffer from the process Engine InPut Queue -Parameters : None -Return Value : Input Picture -********************************************************************************* -*/ -TAny* CBaseProcessEngine::FetchInputBuffer() - { - RDP3(_L("CBaseProcessEngine::FetchInputBuffer--->")); - TAny* iTempInput=NULL; - iTempInput=iInput; - iInput=GetInput(); - RDP1(_L("CBaseProcessEngine::FetchInputBuffer address<--- %d "),iTempInput); - return iTempInput; - } diff -r eb1e5d7cc688 -r 9707f1c07383 video/ARM_MDF_Decoders/Utilities/StateMachine/BWINS/StateMachine.def --- a/video/ARM_MDF_Decoders/Utilities/StateMachine/BWINS/StateMachine.def Fri Jul 09 12:23:13 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ -EXPORTS - ?IsInitialized@CStateMachine@@QAEHXZ @ 1 NONAME ; int CStateMachine::IsInitialized(void) - ?IsInputEndPending@CStateMachine@@QAEHXZ @ 2 NONAME ; int CStateMachine::IsInputEndPending(void) - ?IsPaused@CStateMachine@@QAEHXZ @ 3 NONAME ; int CStateMachine::IsPaused(void) - ?IsPlaying@CStateMachine@@QAEHXZ @ 4 NONAME ; int CStateMachine::IsPlaying(void) - ?IsStarted@CStateMachine@@QAEHXZ @ 5 NONAME ; int CStateMachine::IsStarted(void) - ?IsStopped@CStateMachine@@QAEHXZ @ 6 NONAME ; int CStateMachine::IsStopped(void) - ?IsTransitionValid@CStateMachine@@QAEHW4TCommand@1@@Z @ 7 NONAME ; int CStateMachine::IsTransitionValid(enum CStateMachine::TCommand) - ?NewL@CStateMachine@@SAPAV1@XZ @ 8 NONAME ; class CStateMachine * CStateMachine::NewL(void) - ?Reset@CStateMachine@@QAEXXZ @ 9 NONAME ; void CStateMachine::Reset(void) - ?Transit@CStateMachine@@QAEHW4TCommand@1@@Z @ 10 NONAME ; int CStateMachine::Transit(enum CStateMachine::TCommand) - ?IfIsStateInInitailize@CStateMachine@@QAEHXZ @ 11 NONAME ; int CStateMachine::IfIsStateInInitailize(void) - diff -r eb1e5d7cc688 -r 9707f1c07383 video/ARM_MDF_Decoders/Utilities/StateMachine/EABI/StateMachine.def --- a/video/ARM_MDF_Decoders/Utilities/StateMachine/EABI/StateMachine.def Fri Jul 09 12:23:13 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,13 +0,0 @@ -EXPORTS - _ZN13CStateMachine13IsInitializedEv @ 1 NONAME - _ZN13CStateMachine17IsInputEndPendingEv @ 2 NONAME - _ZN13CStateMachine17IsTransitionValidENS_8TCommandE @ 3 NONAME - _ZN13CStateMachine21IfIsStateInInitailizeEv @ 4 NONAME - _ZN13CStateMachine4NewLEv @ 5 NONAME - _ZN13CStateMachine5ResetEv @ 6 NONAME - _ZN13CStateMachine7TransitENS_8TCommandE @ 7 NONAME - _ZN13CStateMachine8IsPausedEv @ 8 NONAME - _ZN13CStateMachine9IsPlayingEv @ 9 NONAME - _ZN13CStateMachine9IsStartedEv @ 10 NONAME - _ZN13CStateMachine9IsStoppedEv @ 11 NONAME - diff -r eb1e5d7cc688 -r 9707f1c07383 video/ARM_MDF_Decoders/Utilities/StateMachine/group/StateMachine.mmp --- a/video/ARM_MDF_Decoders/Utilities/StateMachine/group/StateMachine.mmp Fri Jul 09 12:23:13 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,46 +0,0 @@ -/* -* Copyright (c) 2007 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: -* -*/ - -#include - -TARGET ArmStateMachine.dll -TARGETTYPE DLL - -UID 0x1000008D 0x102749FE - -CAPABILITY CAP_GENERAL_DLL -VENDORID VID_DEFAULT - -DEFFILE StateMachine.def -NOSTRICTDEF - - -SOURCEPATH ../src -SOURCE StateMachine.cpp - -USERINCLUDE ../../../../../Inc -USERINCLUDE ../inc - -OS_LAYER_SYSTEMINCLUDE - -LIBRARY EUser.lib - - -//----------------------------------------------------------------------------- -// End of File -//----------------------------------------------------------------------------- - diff -r eb1e5d7cc688 -r 9707f1c07383 video/ARM_MDF_Decoders/Utilities/StateMachine/group/bld.inf --- a/video/ARM_MDF_Decoders/Utilities/StateMachine/group/bld.inf Fri Jul 09 12:23:13 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,24 +0,0 @@ -// BLD.INF -/* -* Copyright (c) 2007 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: -* -*/ - -PRJ_MMPFILES -StateMachine.mmp - -//----------------------------------------------------------------------------- -// End of BLD.INF -//----------------------------------------------------------------------------- \ No newline at end of file diff -r eb1e5d7cc688 -r 9707f1c07383 video/ARM_MDF_Decoders/Utilities/StateMachine/inc/Statemachine.h --- a/video/ARM_MDF_Decoders/Utilities/StateMachine/inc/Statemachine.h Fri Jul 09 12:23:13 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,170 +0,0 @@ -/* -* Copyright (c) 2007 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: -* -*/ - -#ifndef __STATEMACHINE_H__ -#define __STATEMACHINE_H__ - -#include - -// Constants -const TUint KNumOfStates = 10; -const TUint KNumOfCommands = 7; - -class CStateMachine: public CBase -{ -public: - /** - * All the states of the state machine. - */ - enum TState - { - EUnInitialized = 0, - EInitialized, - EStart, - EPause, - EStop, - EInitializedInStopping, - EStopping, - EPauseInStopping, - EStopInInputEnd, - EInvalidState - }; - /** - * Commands that are given to state machine - */ - enum TCommand - { - EInitializeCommand = 0 , - EStartCommand, - EPauseCommand, - EResumeCommand, - EInputEndCommand, - EStopCommand - }; - -private: - /** - *Symbian 2nd phase constructor - *@return "None" - */ - void ConstructL(); - - /** - *Default Constructor - */ - CStateMachine(); - - -public: - /** - *Constructor. State will be in EUnInitialized - * - *@param "None" - *@leave "None" - *@return "None" - */ - IMPORT_C static CStateMachine* NewL(); - - /** - *Checks whether transition to new state is possible or not - * - *@param "aCommand" "Command for the transition" - *@leave "None" - *@return "Return ETrue if transition is valid, else EFalse - */ - IMPORT_C TBool IsTransitionValid (TCommand aCommand); - - /** - *Transits to new state. If transition cann't be done, object will - *remain in the previous state. - * - *@param "aCommand" "Command for the transition" - *@return "Return KErrNone if transition happens else error. - */ - IMPORT_C TInt Transit (TCommand aCommand); - - /** - *Tells whether the state is initialized or not. Here initilized means - *if the state is in any state other than EUnInitialized - * - *@param "None" - *@return "Return ETrue, if state is initialized else EFalse. - */ - IMPORT_C TBool IsInitialized (void); - - /** - *Tells whether the state is in any one of the input ending states i.e - * EInitializedInStopping, - EStopping, - EPauseInStopping, - EStopInInputEnd - * - * - *@param "None" - *@return "Return ETrue, if state is in any of the input end state else EFalse. - */ - IMPORT_C TBool IsInputEndPending (void); - - /** - *Tells whether state is in EStart state - * - *@param "None" - *@return "Return ETrue if state is EStart, elase EFalse - */ - IMPORT_C TBool IsStarted (void); - - /** - *Tells whether stae is in EPause state - * - *@param "None" - *@return "Return ETrue if state is EPause, elase EFalse - */ - IMPORT_C TBool IsPaused (void); - - /** - *Tells whether stae is in EStop state - * - *@param "None" - *@return "Return ETrue if state is EStop, elase EFalse - */ - IMPORT_C TBool IsStopped (void); - - IMPORT_C TBool IsPlaying (void); - - /** - *Resets the state machine to EUnInitialized state - * - *@param "None" - *@return "None" - */ - IMPORT_C void Reset(void); - - /** - * Returns whether the current state is in initailize or not - * - *@return "ETrue if current state is in Initailize" - */ - IMPORT_C TBool IfIsStateInInitailize(void); - -private: - //Stores the state of the state machine - TState iState; - TState iStateChanges[KNumOfStates][KNumOfCommands]; -}; - -#endif // __STATEMACHINE_H__ - diff -r eb1e5d7cc688 -r 9707f1c07383 video/ARM_MDF_Decoders/Utilities/StateMachine/src/Statemachine.cpp --- a/video/ARM_MDF_Decoders/Utilities/StateMachine/src/Statemachine.cpp Fri Jul 09 12:23:13 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,343 +0,0 @@ -/* -* Copyright (c) 2007 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: -* -*/ - -#include "Statemachine.h" - - - -/* -******************************************************************************* -* Name : CStateMachine -* Description : Constructor. -* Parameters : None -* Return Value : None -* Assumptions : None -* Known Issues : None -****************************************************************************** -*/ -CStateMachine::CStateMachine():iState(EUnInitialized) - { - // Initailization - for(TInt i = 0; i < KNumOfStates; i++) - for(TInt j = 0; j < KNumOfCommands; j++) - iStateChanges [i][j] = EInvalidState; - - // set the valid transition states in the table - - // valid state changes from Uninitailize - iStateChanges [EUnInitialized][EInitializeCommand] = EInitialized; - - // valid state changes from Initailize - iStateChanges [EInitialized][EStartCommand] = EStart; - iStateChanges [EInitialized][EPauseCommand] = EPause; - iStateChanges [EInitialized][EResumeCommand] = EStart; - iStateChanges [EInitialized][EInputEndCommand] = EInitializedInStopping; - iStateChanges [EInitialized][EStopCommand] = EStop; - - // valid state changes from Start - iStateChanges [EStart][EStartCommand] = EStart; - iStateChanges [EStart][EPauseCommand] = EPause; - iStateChanges [EStart][EInputEndCommand] = EStopping; - iStateChanges [EStart][EStopCommand] = EStop; - - // valid State changes from pause - iStateChanges [EPause][EPauseCommand] = EPause; - iStateChanges [EPause][EResumeCommand] = EStart; - iStateChanges [EPause][EInputEndCommand] = EPauseInStopping; - iStateChanges [EPause][EStopCommand] = EStop; - - // valid state changes from Stop - iStateChanges [EStop][EStartCommand] = EStart; - iStateChanges [EStop][EInputEndCommand] = EStopInInputEnd; - iStateChanges [EStop][EStopCommand] = EStop; - - // valid state changes from InitailizeInStopping - iStateChanges [EInitializedInStopping][EStartCommand] = EStopping; - - // valid State Changes from EStopping - iStateChanges [EStopping][EPauseCommand] = EPauseInStopping; - iStateChanges [EStopping][EStopCommand] = EStop; - - // valid state changes from PauseInStopping - iStateChanges [EPauseInStopping][EResumeCommand] = EStopping; - iStateChanges [EPauseInStopping][EStopCommand] = EStop; - - // valid state changes frm StopInInputEnd - iStateChanges [EStopInInputEnd][EStartCommand] = EStopping; - iStateChanges [EStopInInputEnd][EStopCommand] = EStop; - } - -/* -******************************************************************************* -* Name : NewL -* Description : Constructor -* Parameters : None -* Return Value : None -* Assumptions : None -* Known Issues : None -****************************************************************************** -*/ -EXPORT_C CStateMachine* CStateMachine::NewL() -{ - CStateMachine* self = new (ELeave) CStateMachine(); - CleanupStack::PushL(self); - self->ConstructL(); - CleanupStack::Pop(); - return(self); -} - -/* -******************************************************************************* -* Name : ConstructL -* Description : Symbian 2nd Phase Constrcutor. -* Known Issues : None -****************************************************************************** -*/ -void CStateMachine::ConstructL() - { - } - -/* -******************************************************************************* -* Name : CStateMachine::IsTransitionValid -* Description : Checks whether transition to new state is possible or not -* Parameters : "aCommand" "Command for the transition" -* Return Value : Return ETrue if transition is valid, else EFalse -* Assumptions : None -* Known Issues : None -****************************************************************************** -*/ -EXPORT_C TBool CStateMachine::IsTransitionValid (TCommand aCommand) -{ - - if(iStateChanges[iState][aCommand] != EInvalidState) - { - return(ETrue); - } - else - { - return(EFalse); - } -} - -/* -******************************************************************************* -* Name : CStateMachine::Transit -* Description : Transits to new state. If transition cann't be done, object will - remain in the previous state. -* Parameters : "aCommand" "Command for the transition" -* Return Value : Return KErrNone if transition happens else error -* Assumptions : None -* Known Issues : None -****************************************************************************** -*/ -EXPORT_C TInt CStateMachine::Transit (TCommand aCommand) -{ - if (!IsTransitionValid (aCommand)) - { - return KErrGeneral; - } - iState = iStateChanges[iState][aCommand]; - return KErrNone; -} - -/* -******************************************************************************* -* Name : CStateMachine::IsInitialized -* Description : Tells whether the state is initialized or not. Here -* initilized means if the state is in any state other than -* EUnInitialized -* Parameters : None -* Return Value : Return ETrue, if state is initialized else EFalse -* Assumptions : None -* Known Issues : None -****************************************************************************** -*/ -EXPORT_C TBool CStateMachine::IsInitialized (void) -{ - if (iState != EUnInitialized) - { - return ETrue; - } - else - { - return EFalse; - } -} - -/* -******************************************************************************* -* Name : CStateMachine::IsInputEndPending -* Description : Tells whether the state is in any one of the input ending -* states i.e -* EInitializedInStopping, -* EStopping, -* EPauseInStopping, -* EStopInInputEnd -* Parameters : None -* Return Value : Return ETrue, if state is in any of the input end state else -* EFalse -* Assumptions : None -* Known Issues : None -****************************************************************************** -*/ -EXPORT_C TBool CStateMachine::IsInputEndPending (void) -{ - if (iState == EInitializedInStopping || - iState == EStopping || - iState == EPauseInStopping || - iState == EStopInInputEnd) - { - return ETrue; - } - else - { - return EFalse; - } -} - - -/* -******************************************************************************* -* Name : CStateMachine::IsStarted -* Description : Tells whether state is in EStart state -* Parameters : None -* Return Value : Return ETrue if state is EStart, elase EFalse -* Assumptions : None -* Known Issues : None -****************************************************************************** -*/ -EXPORT_C TBool CStateMachine::IsStarted (void) -{ - if (iState == EStart) - { - return ETrue; - } - else - { - return EFalse; - } -} - -/* -******************************************************************************* -* Name : CStateMachine::IsPlaying -* Description : Tells whether state is in EStart|EStopping|EPause|PauseInStopping -* Parameters : None -* Return Value : Return ETrue if state is in EStart|EStopping|EPause|PauseInStopping - , elase EFalse -* Assumptions : None -* Known Issues : None -****************************************************************************** -*/ -EXPORT_C TBool CStateMachine::IsPlaying (void) -{ - //if (iState == EStart || iState == EStopping || iState == EPause || - // iState == EPauseInStopping) - if (iState == EStart || iState == EStopping) - { - return ETrue; - } - else - { - return EFalse; - } -} - - -/* -******************************************************************************* -* Name : CStateMachine::IsPaused -* Description : Tells whether stae is in EPause state -* Parameters : None -* Return Value : Return ETrue if state is EPause, elase EFalse -* Assumptions : None -* Known Issues : None -****************************************************************************** -*/ -EXPORT_C TBool CStateMachine::IsPaused (void) -{ - if ((iState == EPause) || (iState == EPauseInStopping)) - { - return ETrue; - } - else - { - return EFalse; - } -} - - -/* -******************************************************************************* -* Name : CStateMachine::IsStopped -* Description : Tells whether stae is in EStop state -* Parameters : None -* Return Value : Return ETrue if state is EStop, elase EFalse -* Assumptions : None -* Known Issues : None -****************************************************************************** -*/ -EXPORT_C TBool CStateMachine::IsStopped (void) -{ - if (iState == EStop) - { - return ETrue; - } - else - { - return EFalse; - } -} - -/* -******************************************************************************* -* Name : CStateMachine::IfIsStateInInitailize -* Description : Tells whether stae is in EInitailize or not -* Parameters : None -* Return Value : Return ETrue if state is EInitailize, else EFalse -* Assumptions : None -* Known Issues : None -****************************************************************************** -*/ -EXPORT_C TBool CStateMachine::IfIsStateInInitailize(void) -{ - if (iState == EInitialized) - { - return ETrue; - } - else - { - return EFalse; - } -} -/* -******************************************************************************* -* Name : Reset -* Description : Resets the state machine to EUnInitialized state. -* Parameters : None -* Return Value : None -* Assumptions : None -* Known Issues : None -****************************************************************************** -*/ -EXPORT_C void CStateMachine::Reset(void) -{ - iState = EUnInitialized; -} - - diff -r eb1e5d7cc688 -r 9707f1c07383 video/ARM_MDF_Decoders/Utilities/group/bld.inf --- a/video/ARM_MDF_Decoders/Utilities/group/bld.inf Fri Jul 09 12:23:13 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,33 +0,0 @@ -// BLD.INF -/* -* Copyright (c) 2007 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: -* -*/ - -PRJ_PLATFORMS -WINSCW ARMV5 - - -PRJ_MMPFILES - -// Buffer Processor related -#include "../BufferProcessor/group/bld.inf" - -// State Machine related -#include "../StateMachine/group/bld.inf" - -//----------------------------------------------------------------------------- -// End of BLD.INF -//----------------------------------------------------------------------------- diff -r eb1e5d7cc688 -r 9707f1c07383 video/group/bld.inf --- a/video/group/bld.inf Fri Jul 09 12:23:13 2010 +0100 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,56 +0,0 @@ -/* - -* Copyright (c) 2006 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: Project Specification for video project. - -* - -*/ - - - - - -PRJ_PLATFORMS - -DEFAULT - - - -PRJ_EXPORTS - - - -PRJ_MMPFILES - - - - - -// End of File - - -