# HG changeset patch # User Dremov Kirill (Nokia-D-MSW/Tampere) # Date 1278421338 -10800 # Node ID 31d6e1ae5283bf914dd2588ee152a0113d939a76 # Parent 0267baa9dea92e191375cc9f0e178c39d7964235 Revision: 201027 Kit: 2010127 diff -r 0267baa9dea9 -r 31d6e1ae5283 audio/ARM_CMMF_codecs/FrameTable/Data/Create_FrameTable_STUB_SIS.bat --- a/audio/ARM_CMMF_codecs/FrameTable/Data/Create_FrameTable_STUB_SIS.bat Wed Jun 23 19:56:04 2010 +0300 +++ /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 0267baa9dea9 -r 31d6e1ae5283 audio/ARM_CMMF_codecs/FrameTable/Data/FrameTable_Stub.SIS Binary file audio/ARM_CMMF_codecs/FrameTable/Data/FrameTable_Stub.SIS has changed diff -r 0267baa9dea9 -r 31d6e1ae5283 audio/ARM_CMMF_codecs/FrameTable/Data/FrameTable_Stub.pkg --- a/audio/ARM_CMMF_codecs/FrameTable/Data/FrameTable_Stub.pkg Wed Jun 23 19:56:04 2010 +0300 +++ /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 0267baa9dea9 -r 31d6e1ae5283 audio/ARM_CMMF_codecs/FrameTable/Group/FrameTable.mmp --- a/audio/ARM_CMMF_codecs/FrameTable/Group/FrameTable.mmp Wed Jun 23 19:56:04 2010 +0300 +++ /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 0267baa9dea9 -r 31d6e1ae5283 audio/ARM_CMMF_codecs/FrameTable/Group/bld.inf --- a/audio/ARM_CMMF_codecs/FrameTable/Group/bld.inf Wed Jun 23 19:56:04 2010 +0300 +++ /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 0267baa9dea9 -r 31d6e1ae5283 audio/ARM_CMMF_codecs/FrameTable/Inc/DebugMacros.h --- a/audio/ARM_CMMF_codecs/FrameTable/Inc/DebugMacros.h Wed Jun 23 19:56:04 2010 +0300 +++ /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 0267baa9dea9 -r 31d6e1ae5283 audio/ARM_CMMF_codecs/FrameTable/Src/FrameTable.cpp --- a/audio/ARM_CMMF_codecs/FrameTable/Src/FrameTable.cpp Wed Jun 23 19:56:04 2010 +0300 +++ /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 0267baa9dea9 -r 31d6e1ae5283 audio/ARM_CMMF_codecs/FrameTable/bwins/FrameTableu.def --- a/audio/ARM_CMMF_codecs/FrameTable/bwins/FrameTableu.def Wed Jun 23 19:56:04 2010 +0300 +++ /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 0267baa9dea9 -r 31d6e1ae5283 audio/ARM_CMMF_codecs/FrameTable/eabi/FrameTableu.def --- a/audio/ARM_CMMF_codecs/FrameTable/eabi/FrameTableu.def Wed Jun 23 19:56:04 2010 +0300 +++ /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 0267baa9dea9 -r 31d6e1ae5283 audio/ARM_CMMF_codecs/FrameTable/rom/FrameTable.iby --- a/audio/ARM_CMMF_codecs/FrameTable/rom/FrameTable.iby Wed Jun 23 19:56:04 2010 +0300 +++ /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 0267baa9dea9 -r 31d6e1ae5283 audio/ARM_CMMF_codecs/group/bld.inf --- a/audio/ARM_CMMF_codecs/group/bld.inf Wed Jun 23 19:56:04 2010 +0300 +++ /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 0267baa9dea9 -r 31d6e1ae5283 audio/group/bld.inf --- a/audio/group/bld.inf Wed Jun 23 19:56:04 2010 +0300 +++ /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 0267baa9dea9 -r 31d6e1ae5283 build.config.xml --- a/build.config.xml Wed Jun 23 19:56:04 2010 +0300 +++ b/build.config.xml Tue Jul 06 16:02:18 2010 +0300 @@ -1,190 +1,163 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -]> - - - + +]> + + + + + + + + + + + + - + - + - + - - + + - + - - - - - - - + + + + + + + - + - + + - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + \ No newline at end of file diff -r 0267baa9dea9 -r 31d6e1ae5283 eaacplusutil_stub/bwins/eaacplusutil_stubu.def --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/eaacplusutil_stub/bwins/eaacplusutil_stubu.def Tue Jul 06 16:02:18 2010 +0300 @@ -0,0 +1,9 @@ +EXPORTS + ?Config@CEAacPlusUtil@@QAEHAAVTEAacPlusFrameLenConfig@1@@Z @ 1 NONAME ; int CEAacPlusUtil::Config(class CEAacPlusUtil::TEAacPlusFrameLenConfig &) + ??1CEAacPlusUtil@@UAE@XZ @ 2 NONAME ; CEAacPlusUtil::~CEAacPlusUtil(void) + ?GetAacFrameInfo@CEAacPlusUtil@@QAEHPBEAAHAAVTEAacPlusFrameInfo@1@@Z @ 3 NONAME ; int CEAacPlusUtil::GetAacFrameInfo(unsigned char const *, int &, class CEAacPlusUtil::TEAacPlusFrameInfo &) + ?GetAacFrameInfo@CEAacPlusUtil@@QAEHPBEAAHAAVTEAacPlusFrameInfo@1@PAEH@Z @ 4 NONAME ; int CEAacPlusUtil::GetAacFrameInfo(unsigned char const *, int &, class CEAacPlusUtil::TEAacPlusFrameInfo &, unsigned char *, int) + ?NewL@CEAacPlusUtil@@SAPAV1@XZ @ 5 NONAME ; class CEAacPlusUtil * CEAacPlusUtil::NewL(void) + ?GetAacFrameLength@CEAacPlusUtil@@QAEHPBEHAAH@Z @ 6 NONAME ; int CEAacPlusUtil::GetAacFrameLength(unsigned char const *, int, int &) + ?GetAacFormatType@CEAacPlusUtil@@QAEHPBEHAAW4TEAacPlusFormatType@1@@Z @ 7 NONAME ; int CEAacPlusUtil::GetAacFormatType(unsigned char const *, int, enum CEAacPlusUtil::TEAacPlusFormatType &) + diff -r 0267baa9dea9 -r 31d6e1ae5283 eaacplusutil_stub/eabi/eaacplusutil_stubu.def --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/eaacplusutil_stub/eabi/eaacplusutil_stubu.def Tue Jul 06 16:02:18 2010 +0300 @@ -0,0 +1,13 @@ +EXPORTS + _ZTI13CEAacPlusUtil @ 1 NONAME + _ZTV13CEAacPlusUtil @ 2 NONAME + _ZN13CEAacPlusUtil15GetAacFrameInfoEPKhRiRNS_18TEAacPlusFrameInfoE @ 3 NONAME + _ZN13CEAacPlusUtil15GetAacFrameInfoEPKhRiRNS_18TEAacPlusFrameInfoEPhi @ 4 NONAME + _ZN13CEAacPlusUtil16GetAacFormatTypeEPKhiRNS_19TEAacPlusFormatTypeE @ 5 NONAME + _ZN13CEAacPlusUtil17GetAacFrameLengthEPKhiRi @ 6 NONAME + _ZN13CEAacPlusUtil4NewLEv @ 7 NONAME + _ZN13CEAacPlusUtil6ConfigERNS_23TEAacPlusFrameLenConfigE @ 8 NONAME + _ZN13CEAacPlusUtilD0Ev @ 9 NONAME + _ZN13CEAacPlusUtilD1Ev @ 10 NONAME + _ZN13CEAacPlusUtilD2Ev @ 11 NONAME + diff -r 0267baa9dea9 -r 31d6e1ae5283 eaacplusutil_stub/group/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/eaacplusutil_stub/group/bld.inf Tue Jul 06 16:02:18 2010 +0300 @@ -0,0 +1,61 @@ +/* + +* 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. + + * + +*/ + + + +#include + + + +PRJ_PLATFORMS + +WINSCW + + +PRJ_EXPORTS + + +PRJ_MMPFILES +#if defined(WINSCW) +eaacplusutil_stub.mmp +#endif + + + + + +PRJ_TESTMMPFILES + + + +PRJ_TESTEXPORTS + diff -r 0267baa9dea9 -r 31d6e1ae5283 eaacplusutil_stub/group/eaacplusutil_stub.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/eaacplusutil_stub/group/eaacplusutil_stub.mmp Tue Jul 06 16:02:18 2010 +0300 @@ -0,0 +1,59 @@ +/* + +* 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. + + * + +*/ +#include + +TARGET eaacplusutil_stub.dll +TARGETTYPE DLL +UID 0x1000008D 0x2003161D + +CAPABILITY CAP_GENERAL_DLL + +VENDORID VID_DEFAULT + +DEFFILE eaacplusutil_stubu.def +NOSTRICTDEF + +USERINCLUDE ../inc +SOURCEPATH ../src +SOURCE eaacplusutil_stub.cpp + +OS_LAYER_SYSTEMINCLUDE + + +LIBRARY euser.lib + +// Users link against the non-stub name, so that rebuild is not necessary +EXPORTLIBRARY eaacplusutil.lib + +LINKAS eaacplusutil.dll + +// End of file diff -r 0267baa9dea9 -r 31d6e1ae5283 eaacplusutil_stub/inc/mcc_eaacputil_aaccodec.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/eaacplusutil_stub/inc/mcc_eaacputil_aaccodec.h Tue Jul 06 16:02:18 2010 +0300 @@ -0,0 +1,195 @@ +/* + +* 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. + + * + +*/ +/* + +******************************************************************************* + +Product : Decoder Parser Utility + +Module : + +File : + +Description : + +******************************************************************************* + +*/ + + + + + +#ifndef INCLUDE_EAACPLUSUTILITY_H + +#define INCLUDE_EAACPLUSUTILITY_H + + + +#ifdef SYMBIAN_BUILD + +#include + +//#else /* SYMBIAN_BUILD */ + +//#define IMPORT_C + +//#define EXPORT_C + +#endif /* SYMBIAN_BUILD */ + + + +struct BaseAudioDecoder; + +// FORWARD DECLARATIONS + + + +#ifdef __cplusplus + +extern "C" + +{ + +#endif /* __cplusplus */ + + + +#ifndef INCLUDE_COMMON + +typedef signed char int8; + +typedef unsigned char uint8; + +typedef short int int16; + +typedef unsigned short int uint16; + +typedef int int32; + +typedef unsigned int uint32; + + + +#define E_SUCCESS 0 + +#define E_FAILURE (-1) + + + +#endif + + + +typedef struct EAacpAudioFrameInfo + +{ + + int OutFrameSize; + + int NoOfSamples; + + int SamplingFrequency; + + int NoOfChannels; + + int Profile; + + int ObjectType ; + + int OutSamplingFrequency; + + int DownSampledMode; + + int SBR; + + int PS; + + + +} CEAacpAudioFrameInfo ; + + + +IMPORT_C int32 GetFrameInfo (uint8* aHeaderbuffer, + + int32* aHeaderSize, + + CEAacpAudioFrameInfo *FrameInfo, + + int32 format, + + uint8* aDatabuffer, + + int32 aDataLength + + ); + + + +IMPORT_C int32 GetFrameLength(uint8* aBuffer, + + int32 aBufferLength, + + int32 aFormat, + + int32 *aFrameLength, + + //int32 samplingFreq + + CEAacpAudioFrameInfo *FrameInfo + + ); + + + +IMPORT_C int32 GetAdtsHeaderFrameLength(uint8* aBuffer, + + int32 aBufferLength, + + int32 *aFrameLength + + ); + + + +#ifdef __cplusplus + +} + +#endif + + + +#endif /* INCLUDE_AAC_DECODER_H */ + diff -r 0267baa9dea9 -r 31d6e1ae5283 eaacplusutil_stub/src/eaacplusutil_stub.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/eaacplusutil_stub/src/eaacplusutil_stub.cpp Tue Jul 06 16:02:18 2010 +0300 @@ -0,0 +1,245 @@ +/* + +* 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. + + * + +*/ + + + + + + + + +// INCLUDE FILES + +#include +#include +#include "mcc_eaacputil_aaccodec.h" + + + +// ============================ MEMBER FUNCTIONS =============================== + + + +// ----------------------------------------------------------------------------- + +// CEAacPlusUtil::CEAacPlusUtil + +// C++ default constructor can NOT contain any code, that + +// might leave. + +// ----------------------------------------------------------------------------- + +// + +CEAacPlusUtil::CEAacPlusUtil() + + { + + } + + + +// ----------------------------------------------------------------------------- + +// CEAacPlusUtil::ConstructL + +// Symbian 2nd phase constructor can leave. + +// ----------------------------------------------------------------------------- + +// + +void CEAacPlusUtil::ConstructL() + + { + + iInitialized = EFalse; + + iGetFrameLenParam = new(ELeave)CEAacpAudioFrameInfo; + + } + + + +// ----------------------------------------------------------------------------- + +// CEAacPlusUtil::NewL + +// Two-phased constructor. + +// ----------------------------------------------------------------------------- + +// + +EXPORT_C CEAacPlusUtil* CEAacPlusUtil::NewL() + + { + + + CEAacPlusUtil* self = new( ELeave ) CEAacPlusUtil; + + CleanupStack::PushL( self ); + + self->ConstructL(); + + CleanupStack::Pop(self); + + return self; + + } + + + +// Destructor + +EXPORT_C CEAacPlusUtil::~CEAacPlusUtil() + + { + + } + + + +// ----------------------------------------------------------------------------- + +// CEAacPlusUtil::GetAacFormatType + +// Used to get the format type. + +// ----------------------------------------------------------------------------- + +// + + + +EXPORT_C TInt CEAacPlusUtil::GetAacFormatType(const TUint8* aBuf, TInt aBufLen, TEAacPlusFormatType& aFormatType) + + { + + RDebug::Print(_L("CFrameTable::InitFrameTable aBuf[%d], aBufLen[%d], aFormatType[%d]"), aBuf, aBufLen, aFormatType); + return KErrNone; + } + + + +// ----------------------------------------------------------------------------- + +// CEAacPlusUtil::GetAacFrameInfo + +// Used to get the format information. + +// ----------------------------------------------------------------------------- + +// + +EXPORT_C TInt CEAacPlusUtil::GetAacFrameInfo(const TUint8* aHdrBuf, TInt& aHdrLen, TEAacPlusFrameInfo& aFrameInfo) + + { + + RDebug::Print(_L("CFrameTable::InitFrameTable aHdrBuf[%d], aHdrLen[%d], aFrameInfo[%d]"), aHdrBuf, aHdrLen, aFrameInfo); + return KErrNone; + + } + + + + + +// ----------------------------------------------------------------------------- + +// CEAacPlusUtil::GetAacFrameInfo + +// Used to get the format information. + +// ----------------------------------------------------------------------------- + +// + +EXPORT_C TInt CEAacPlusUtil::GetAacFrameInfo (const TUint8* aHdrBuf, TInt& aHdrLen, TEAacPlusFrameInfo& aFrameInfo, + + TUint8* aDataBuf, TInt aDataBufLen) + + { + + RDebug::Print(_L("CFrameTable::InitFrameTable aHdrBuf[%d], aHdrLen[%d], aFrameInfo[%d], aDataBuf[%d], aDataBufLen[%d]"), aHdrBuf, aHdrLen, aFrameInfo, aDataBuf, aDataBufLen); + return KErrNone; + + } + + + +// ----------------------------------------------------------------------------- + +// CEAacPlusUtil::GetAacFrameLength + +// Used to get the size (in bytes) of the frame found at the start of aBuf. + +// ----------------------------------------------------------------------------- + +// + +EXPORT_C TInt CEAacPlusUtil::GetAacFrameLength(const TUint8* aBuf, TInt aBufLen, TInt& aFrameLen) + + { +RDebug::Print(_L("CFrameTable::InitFrameTable aBuf[%d], aBufLen[%d], aFrameLen[%d]"), aBuf, aBufLen, aFrameLen); + return KErrNone; + } + + + +// ----------------------------------------------------------------------------- + +// CEAacPlusUtil::Config + +// Used to initialize the util if FrameInfo is not used to do it. + +// ----------------------------------------------------------------------------- + +// + +EXPORT_C TInt CEAacPlusUtil::Config(TEAacPlusFrameLenConfig& aFrameLenConfig) + + { + + RDebug::Print(_L("CFrameTable::InitFrameTable aFrameLenConfig[%d]"), aFrameLenConfig); + return KErrNone; + } + + + +// ========================== OTHER EXPORTED FUNCTIONS ========================= + + + +// End of File + diff -r 0267baa9dea9 -r 31d6e1ae5283 frametable_stub/group/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/frametable_stub/group/bld.inf Tue Jul 06 16:02:18 2010 +0300 @@ -0,0 +1,34 @@ +/* +* Copyright (c) 2002-2004 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: frametable Stubs - Project build file for frametable +* +*/ + + +PRJ_PLATFORMS +WINSCW + +PRJ_EXPORTS + + + +PRJ_MMPFILES +#if defined(WINSCW) +frametable_stub.mmp +#endif + + + + +// End of File diff -r 0267baa9dea9 -r 31d6e1ae5283 frametable_stub/group/frametable_stub.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/frametable_stub/group/frametable_stub.mmp Tue Jul 06 16:02:18 2010 +0300 @@ -0,0 +1,45 @@ +/* +* Copyright (c) 2005-2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: FrameTable Stubs - Project definition file for project FrameTable_Stub +* +* +*/ + +#include + +TARGET frametable_stub.dll +TARGETTYPE DLL +UID 0x1000008D 0x20031603 + +CAPABILITY CAP_GENERAL_DLL + +VENDORID VID_DEFAULT + +DEFFILE frametable_stubu.def +NOSTRICTDEF + +SOURCEPATH ../src +SOURCE frametable_stub.cpp + +OS_LAYER_SYSTEMINCLUDE + + +LIBRARY euser.lib + +// Users link against the non-stub name, so that rebuild is not necessary +EXPORTLIBRARY frametable.lib + +LINKAS frametable.dll + +// End of file diff -r 0267baa9dea9 -r 31d6e1ae5283 frametable_stub/src/frametable_stub.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/frametable_stub/src/frametable_stub.cpp Tue Jul 06 16:02:18 2010 +0300 @@ -0,0 +1,192 @@ +/* + +* 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. + + * + +*/ + + + + + + +#include +#include + + +CFrameTable::CFrameTable() + + { + + } + +void CFrameTable::ConstructL() + + { + + } + +EXPORT_C CFrameTable* CFrameTable::NewL() + + { + + CFrameTable* self = new(ELeave) CFrameTable; + + return self; + + } + +EXPORT_C CFrameTable::~CFrameTable() + + { + + } + +EXPORT_C TInt CFrameTable::InitFrameTable(TInt aSampleRate, TInt aSamplesPerFrame) + + { + RDebug::Print(_L("CFrameTable::InitFrameTable aSampleRate[%d], aSamplesPerFrame[%d]"), aSampleRate, aSamplesPerFrame); + return KErrNone; + } + +EXPORT_C TInt CFrameTable::SubmitTableEntry(TUint aPos) + + { + RDebug::Print(_L("CFrameTable::InitFrameTable aPos[%d]"), aPos); + return KErrNone; + } + +TInt CFrameTable::SubmitLowResTableEntry(TBufRefPosEntry& aEntry) + + { + RDebug::Print(_L("CFrameTable::InitFrameTable aEntry[%d]"), aEntry); + return KErrNone; + } + +EXPORT_C TInt CFrameTable::FindFramePosFromTime(TUint& aTimeMs, TUint& aPos) + + { + RDebug::Print(_L("CFrameTable::InitFrameTable aTimeMs[%d], aPos[%d]"), aTimeMs, aPos); + return KErrNone; + } + + + +EXPORT_C TInt CFrameTable::FindFrameTimeFromPos(TUint& aTimeMs, TUint& aPos) + + { + RDebug::Print(_L("CFrameTable::InitFrameTable aTimeMs[%d], aPos[%d]"), aTimeMs, aPos); + return KErrNone; + } + +EXPORT_C TInt CFrameTable::LastFramePos(TUint& aPos) + + { + RDebug::Print(_L("CFrameTable::InitFrameTable aPos[%d]"), aPos); + return KErrNone; + } + +EXPORT_C TInt CFrameTable::LastFrameTime(TUint& aTimeMs) + + { + RDebug::Print(_L("CFrameTable::InitFrameTable aTimeMs[%d]"), aTimeMs); + return KErrNone; + } + +EXPORT_C void CFrameTable::ResetTable() + + { + + } + +EXPORT_C void CFrameTable::ShrinkTable() + + { + + } + + + +EXPORT_C TInt CFrameTable::SetSourceReference(TUint aTimeMs, TUint aPos) + + { + RDebug::Print(_L("CFrameTable::InitFrameTable aTimeMs[%d], aPos[%d]"), aTimeMs, aPos); + return KErrNone; + } + + + +EXPORT_C TInt CFrameTable::RegisterForEvent(TFrameTableEvent aEvent, MFrameTableEventObserver* aObserver, TUint aParam) + + { + RDebug::Print(_L("CFrameTable::InitFrameTable aEvent[%d], aObserver[%d], aParam[%d]"), aEvent, aObserver, aParam); + return KErrNone; + } + + +EXPORT_C TInt CFrameTable::UnRegisterForEvent(TFrameTableEvent aEvent, MFrameTableEventObserver* /*aObserver*/) + + { + RDebug::Print(_L("CFrameTable::InitFrameTable aEvent[%d]"), aEvent); + return KErrNone; + } + +EXPORT_C TInt CFrameTable::Bitrate() + + { + return KErrNone; + } + + +TUint CFrameTable::CalcFrameFromTimeMs(TUint aTimeMs) + + { + RDebug::Print(_L("CFrameTable::InitFrameTable aTimeMs[%d]"), aTimeMs); + return KErrNone; + } + + + +EXPORT_C TInt CFrameTable::IsSeeking(TBool& aIsSeeking) + + { + RDebug::Print(_L("CFrameTable::InitFrameTable aIsSeeking[%d]"), aIsSeeking); + return KErrNone; + } + + + +EXPORT_C TInt CFrameTable::GetLastPosEvent(TUint& aPos) + + { + RDebug::Print(_L("CFrameTable::InitFrameTable aPos[%d]"), aPos); + return KErrNone; + } + + + diff -r 0267baa9dea9 -r 31d6e1ae5283 group/bld.inf --- a/group/bld.inf Wed Jun 23 19:56:04 2010 +0300 +++ b/group/bld.inf Tue Jul 06 16:02:18 2010 +0300 @@ -29,8 +29,9 @@ #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" +#include "../frametable_stub/group/bld.inf" +#include "../eaacplusutil_stub/group/bld.inf" + // End of File diff -r 0267baa9dea9 -r 31d6e1ae5283 imagingandcamerafws/imagingfws/GifScaler/group/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/imagingandcamerafws/imagingfws/GifScaler/group/bld.inf Tue Jul 06 16:02:18 2010 +0300 @@ -0,0 +1,40 @@ +// Copyright (c) 2003-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: +// This file basically provides the information required for building the whole of a component +// C & C++ style comments are allowed in this file because it's passed through the C++ preprocessor +// Examples are provided below of the kind of things we're expecting +// Gif scaling API +// +// + +/** + @file +*/ + +PRJ_PLATFORMS +// specify the platforms your component needs to be built for here +// defaults to WINS MARM so you can ignore this if you just build these +DEFAULT + +PRJ_EXPORTS +// specify the source file followed by its destination here +// copy will be used to copy the source file to its destination +../inc/gifscaler.h SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(gifscaler.h) +// ROM buildsupport +../inc/GifScaler.iby /epoc32/rom/include/gifscaler.iby + +PRJ_MMPFILES +../MmpFiles/GifScaler.mmp + + diff -r 0267baa9dea9 -r 31d6e1ae5283 imagingandcamerafws/imagingfws/GifScaler/group/bld_include.inf --- a/imagingandcamerafws/imagingfws/GifScaler/group/bld_include.inf Wed Jun 23 19:56:04 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +0,0 @@ -// Copyright (c) 2003-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: -// This file basically provides the information required for building the whole of a component -// C & C++ style comments are allowed in this file because it's passed through the C++ preprocessor -// Examples are provided below of the kind of things we're expecting -// Gif scaling API -// -// - -/** - @file -*/ - -PRJ_PLATFORMS -// specify the platforms your component needs to be built for here -// defaults to WINS MARM so you can ignore this if you just build these -DEFAULT - -PRJ_EXPORTS -// specify the source file followed by its destination here -// copy will be used to copy the source file to its destination -../inc/gifscaler.h SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(gifscaler.h) -// ROM buildsupport -../inc/GifScaler.iby /epoc32/rom/include/gifscaler.iby - -PRJ_MMPFILES -../MmpFiles/GifScaler.mmp - - diff -r 0267baa9dea9 -r 31d6e1ae5283 imagingandcamerafws/imagingfws/ImageTransform/group/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/imagingandcamerafws/imagingfws/ImageTransform/group/bld.inf Tue Jul 06 16:02:18 2010 +0300 @@ -0,0 +1,44 @@ +// Copyright (c) 2004-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: +// This file basically provides the information required for building the whole of a component +// C & C++ style comments are allowed in this file because it's passed through the C++ preprocessor +// Examples are provided below of the kind of things we're expecting +// +// + +PRJ_PLATFORMS +// specify the platforms your component needs to be built for here +// defaults to WINS MARM so you can ignore this if you just build these +DEFAULT + +PRJ_EXPORTS +// specify the source file followed by its destination here +// copy will be used to copy the source file to its destination +../inc/ImageTransform.h SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(imagetransform.h) +../inc/icl/ImageTransform.hrh /epoc32/include/icl/imagetransform.hrh +../inc/icl/ImageTransformPlugin.h SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(icl/imagetransformplugin.h) +../inc/icl/ImageTransformPanicCodes.h SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(icl/imagetransformpaniccodes.h) +../inc/icl/ImageTransformPluginExt.h SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(icl/imagetransformpluginext.h) +../inc/icl/squeezetransformextension.h SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(icl/squeezetransformextension.h) +../inc/icl/orientationtransformextension.h SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(icl/orientationtransformextension.h) +../inc/icl/overlaytransformextension.h SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(icl/overlaytransformextension.h) + +// ROM buildsupport +../inc/ImageTransform.iby /epoc32/rom/include/imagetransform.iby + +PRJ_MMPFILES +../MmpFiles/ImageTransform.mmp +../MmpFiles/ImageTransformResolver.mmp + + diff -r 0267baa9dea9 -r 31d6e1ae5283 imagingandcamerafws/imagingfws/ImageTransform/group/bld_include.inf --- a/imagingandcamerafws/imagingfws/ImageTransform/group/bld_include.inf Wed Jun 23 19:56:04 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,44 +0,0 @@ -// Copyright (c) 2004-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: -// This file basically provides the information required for building the whole of a component -// C & C++ style comments are allowed in this file because it's passed through the C++ preprocessor -// Examples are provided below of the kind of things we're expecting -// -// - -PRJ_PLATFORMS -// specify the platforms your component needs to be built for here -// defaults to WINS MARM so you can ignore this if you just build these -DEFAULT - -PRJ_EXPORTS -// specify the source file followed by its destination here -// copy will be used to copy the source file to its destination -../inc/ImageTransform.h SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(imagetransform.h) -../inc/icl/ImageTransform.hrh /epoc32/include/icl/imagetransform.hrh -../inc/icl/ImageTransformPlugin.h SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(icl/imagetransformplugin.h) -../inc/icl/ImageTransformPanicCodes.h SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(icl/imagetransformpaniccodes.h) -../inc/icl/ImageTransformPluginExt.h SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(icl/imagetransformpluginext.h) -../inc/icl/squeezetransformextension.h SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(icl/squeezetransformextension.h) -../inc/icl/orientationtransformextension.h SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(icl/orientationtransformextension.h) -../inc/icl/overlaytransformextension.h SYMBIAN_OS_LAYER_PUBLIC_EXPORT_PATH(icl/overlaytransformextension.h) - -// ROM buildsupport -../inc/ImageTransform.iby /epoc32/rom/include/imagetransform.iby - -PRJ_MMPFILES -../MmpFiles/ImageTransform.mmp -../MmpFiles/ImageTransformResolver.mmp - - diff -r 0267baa9dea9 -r 31d6e1ae5283 imagingandcamerafws/imagingfws/group/BLD.INF --- a/imagingandcamerafws/imagingfws/group/BLD.INF Wed Jun 23 19:56:04 2010 +0300 +++ b/imagingandcamerafws/imagingfws/group/BLD.INF Tue Jul 06 16:02:18 2010 +0300 @@ -24,9 +24,9 @@ // Include imagedisplay, imagetransform, imageprocessor, panorama and gifscaler sub-components -#include "../GifScaler/group/bld_include.inf" +#include "../GifScaler/group/bld.inf" #include "../ImageDisplay/group/bld.inf" -#include "../ImageTransform/group/bld_include.inf" +#include "../ImageTransform/group/bld.inf" #include "../ImageProcessor/group/bld.inf" #include "../panorama/group/bld.inf" @@ -135,6 +135,6 @@ PRJ_TESTEXPORTS // BitmapTransforms -#include "../BitmapTransform/group/BLD.inf" +#include "../BitmapTransform/group/bld.inf" // MediaClientImage -#include "../MediaClientImage/Group/BLD.INF" +#include "../MediaClientImage/Group/bld.inf" diff -r 0267baa9dea9 -r 31d6e1ae5283 imagingandcamerafws/imagingfws/inc/ImageConversion.h --- a/imagingandcamerafws/imagingfws/inc/ImageConversion.h Wed Jun 23 19:56:04 2010 +0300 +++ b/imagingandcamerafws/imagingfws/inc/ImageConversion.h Tue Jul 06 16:02:18 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2001-2010 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" @@ -340,7 +340,15 @@ Requests that codec applies the auto rotation when decoding according to the orientation tag in the image Exif header. */ - EOptionAutoRotate = 0x040000 + EOptionAutoRotate = 0x040000, + + /** + @publishedPartner + @prototype + + Requests the Codec to do optimised partial image decoding, whenever partial decoding is needed. + */ + EOptionOptimisedPartialImageDecoding = 0x80000 }; /** diff -r 0267baa9dea9 -r 31d6e1ae5283 imagingandcamerafws/imagingfws/inc/icl/ICL_PropertyUIDS.h --- a/imagingandcamerafws/imagingfws/inc/icl/ICL_PropertyUIDS.h Wed Jun 23 19:56:04 2010 +0300 +++ b/imagingandcamerafws/imagingfws/inc/icl/ICL_PropertyUIDS.h Tue Jul 06 16:02:18 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2006-2010 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" @@ -98,6 +98,12 @@ */ const TUid KUidJPGAutoRotateSupport = {KUidJPGAutoRotateSupportValue}; +/** +Identifier for optimised partial decoding support property. + @see KUidJPGOptimisedPartialDecodingSupportValue +*/ +const TUid KUidJPGOptimisedPartialDecodingSupport = {KUidJPGOptimisedPartialDecodingSupportValue}; + /** Identifier for an ICL Extension. This is used in the opaque_data section of an ICL codec plugin as part of a pair of values "KUidICLExtension " diff -r 0267baa9dea9 -r 31d6e1ae5283 imagingandcamerafws/imagingfws/inc/icl/ICL_PropertyUIDS.hrh --- a/imagingandcamerafws/imagingfws/inc/icl/ICL_PropertyUIDS.hrh Wed Jun 23 19:56:04 2010 +0300 +++ b/imagingandcamerafws/imagingfws/inc/icl/ICL_PropertyUIDS.hrh Tue Jul 06 16:02:18 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 2006-2010 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" @@ -89,6 +89,12 @@ */ #define KUidJPGAutoRotateSupportValue 0x10287049 +/** +Defines the numerical value for KUidJPGOptimisedPartialDecodingSupport. + @see KUidJPGOptimisedPartialDecodingSupport +*/ +#define KUidJPGOptimisedPartialDecodingSupportValue 0x2002BCBD + /** Defines the numerical value for KUidICLExtension. @see KUidICLExtension diff -r 0267baa9dea9 -r 31d6e1ae5283 imagingandcamerafws/imagingfws/src/ImageResolverAPI.cpp --- a/imagingandcamerafws/imagingfws/src/ImageResolverAPI.cpp Wed Jun 23 19:56:04 2010 +0300 +++ b/imagingandcamerafws/imagingfws/src/ImageResolverAPI.cpp Tue Jul 06 16:02:18 2010 +0300 @@ -1,4 +1,4 @@ -// Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies). +// Copyright (c) 1997-2010 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" @@ -554,8 +554,12 @@ if ((aOptions & CImageDecoder::EOptionAutoRotate) != 0) { iOptionsUidsArray.Append(KUidJPGAutoRotateSupport); - iOptions = aOptions; } + if((aOptions & CImageDecoder::EOptionOptimisedPartialImageDecoding) != 0) + { + iOptionsUidsArray.Append(KUidJPGOptimisedPartialDecodingSupport); + } + iOptions = aOptions; } /* diff -r 0267baa9dea9 -r 31d6e1ae5283 imagingandcamerafws/imaginginttest/group/Bld.inf --- a/imagingandcamerafws/imaginginttest/group/Bld.inf Wed Jun 23 19:56:04 2010 +0300 +++ b/imagingandcamerafws/imaginginttest/group/Bld.inf Tue Jul 06 16:02:18 2010 +0300 @@ -26,11 +26,11 @@ #include "../imageencoder/group/bld.inf" #endif -#include "../tsi_icl_btrans_01/group/BLD.INF" -#include "../TSI_ICL_COD/group/Bld.inf" +#include "../tsi_icl_btrans_01/group/bld.inf" +#include "../TSI_ICL_COD/group/bld.inf" #include "../te_tsi_icl_cod_5/group/bld.inf" #include "../te_tsi_icl_pluginsupport_01/group/bld.inf" -#include "../Codecs/Group/BLD.INF" +#include "../Codecs/Group/bld.inf" PRJ_MMPFILES diff -r 0267baa9dea9 -r 31d6e1ae5283 imagingandcamerafws/imagingunittest/group/BLD.INF --- a/imagingandcamerafws/imagingunittest/group/BLD.INF Wed Jun 23 19:56:04 2010 +0300 +++ b/imagingandcamerafws/imagingunittest/group/BLD.INF Tue Jul 06 16:02:18 2010 +0300 @@ -26,19 +26,19 @@ #include "../tsu_icl_frm_01/group/bld.inf" -#include "../tsu_icl_cod_01/group/BLD.INF" +#include "../tsu_icl_cod_01/group/bld.inf" -#include "../tsu_icl_cod_02/group/BLD.INF" +#include "../tsu_icl_cod_02/group/bld.inf" -#include "../TSU_ICL_COD_03/group/BLD.INF" +#include "../TSU_ICL_COD_03/group/bld.inf" -#include "../TSU_ICL_COD_04/group/BLD.INF" +#include "../TSU_ICL_COD_04/group/bld.inf" #include "../tsu_icl_mediasvr/group/bld.inf" #include "../tsu_icl_btrans_01/group/bld.inf" -#include "../TSU_ICL_TMDAVID/group/BLD.INF" +#include "../TSU_ICL_TMDAVID/group/bld.inf" #include "../tsu_icl_imgdisp/group/bld.inf" @@ -48,6 +48,6 @@ #include "../tsu_icl_imageframe/group/bld.inf" -#include "../tsu_icl_pfm_02/group/BLD.INF" +#include "../tsu_icl_pfm_02/group/bld.inf" diff -r 0267baa9dea9 -r 31d6e1ae5283 layers.sysdef.xml --- a/layers.sysdef.xml Wed Jun 23 19:56:04 2010 +0300 +++ b/layers.sysdef.xml Tue Jul 06 16:02:18 2010 +0300 @@ -14,47 +14,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -88,33 +48,12 @@ - - - - - - - - - - - + + + + + - - - - - - - - - - - - - - - - + \ No newline at end of file diff -r 0267baa9dea9 -r 31d6e1ae5283 mdfdevvideoextensions/nga_mdf_postprocessor/inc/NGAPostProcHwDevice.h --- a/mdfdevvideoextensions/nga_mdf_postprocessor/inc/NGAPostProcHwDevice.h Wed Jun 23 19:56:04 2010 +0300 +++ b/mdfdevvideoextensions/nga_mdf_postprocessor/inc/NGAPostProcHwDevice.h Tue Jul 06 16:02:18 2010 +0300 @@ -1092,6 +1092,8 @@ MMmfVideoPropertiesObserver* iVPObserver; RWsSession iWsSession; TSize iPicSize; + TUint iAspectRatioNum; + TUint iAspectRatioDenom; //-- members for Trickplay support -- TInt iStepFrameCount; TInt iPlayRate; diff -r 0267baa9dea9 -r 31d6e1ae5283 mdfdevvideoextensions/nga_mdf_postprocessor/inc/surface_hints.h --- a/mdfdevvideoextensions/nga_mdf_postprocessor/inc/surface_hints.h Wed Jun 23 19:56:04 2010 +0300 +++ b/mdfdevvideoextensions/nga_mdf_postprocessor/inc/surface_hints.h Tue Jul 06 16:02:18 2010 +0300 @@ -12,12 +12,17 @@ * Contributors: * * Description: -* +* Surface Manager API */ #ifndef __SURFACE_HINTS_LOCAL_H__ #define __SURFACE_HINTS_LOCAL_H__ +//- Include Files ---------------------------------------------------------- + +#include + + //- Namespace --------------------------------------------------------------- namespace surfaceHints @@ -25,7 +30,7 @@ //- Constants --------------------------------------------------------------- -/** Hint of surface the content. +/** Hint of the surface content. @see TSurfaceContent for possible values */ const TInt KSurfaceContent = 0x1; @@ -37,17 +42,37 @@ */ const TInt KSurfaceUpdate = 0x2; -/** Hint of the surface content copy protected and can it be +/** Hint whether the surface content is copy protected and can it be shown on external displays. @see TSurfaceProtection for possible values. */ const TInt KSurfaceProtection = 0x3; -/** Hint of the color space of the surface content. - Value is a pointer to TColorspace stucture. - @see TColorspace -*/ -const TInt KSurfaceColorspace = 0x4; + +/** Values used for the KSurfaceContent key */ +enum TSurfaceContent + { + /** No specific use-case */ + EGeneric, + /** Camera viewfinder frames */ + EViewFinder, + /** Images captured by camera */ + EStillImage, + /** Decoded video frames */ + EVideoPlayback, + /** Video frames from video telephony */ + EVideoTelephony, + /** EGL surface */ + EGfx, + /** Main UI surface */ + EUi, + /** Composition target surface */ + ECompositionTarget, + /** Indicates that the surface has to accessible by ARM. + This can be orr'ed with other TSurfaceContent enumerations. */ + EArmAccess = 0x80000000 + }; + /** Values used for the KSurfaceProtection key. The values are bitmasks and can be combined * e.g. EAllowAnalogProtectionRequired | EAllowDigitalProtectionRequired. @@ -95,6 +120,72 @@ EAllowDigitalProtectionRequired = 0x00000800, }; + +class TSurfaceUpdate + { + /** Constructor. + @param aUpdateRate How often the surface content is redrawn per second. + @param aTearingFree When ETrue surface updates should be synchronized + with display refresh rate, otherwise surface can + be updated as fast as possible. + */ + inline TSurfaceUpdate(TUint aUpdateRate, TBool aTearingFree); + + /** Converts a value to TSurfaceUpdate */ + inline TSurfaceUpdate(TInt aValue); + + /** Converts TSurfaceUpdate to a signed integer, so it can be used as + a value for KSurfaceUpdate key. */ + inline operator TInt() const; + + /** Getter for surface update rate. + @return updates per second + */ + inline TUint UpdateRate() const; + + /** Getter for surface update synchronization. + @return ETrue - updates should be synchronized with display refresh rate, + EFalse - surface can be updated as fast as possible. + */ + inline TBool TearingFree() const; + + private: + TUint iValue; + }; + + +//- Forward Declarations ---------------------------------------------------- + + +//- Class Definitions ------------------------------------------------------- + + +//- Inline Functions -------------------------------------------------------- + +TSurfaceUpdate::TSurfaceUpdate(TUint aUpdateRate, TBool aTearingFree) + : iValue( ( aUpdateRate & 0xFFFF ) | ( aTearingFree ? 0x80000000 : 0x0 ) ) + { + } +TSurfaceUpdate::TSurfaceUpdate(TInt aValue) + : iValue( static_cast( aValue ) ) + { + } + +TSurfaceUpdate::operator TInt() const + { + return static_cast( iValue ); + } + +TUint TSurfaceUpdate::UpdateRate() const + { + return ( iValue & 0xFFFF ); + } + +TBool TSurfaceUpdate::TearingFree() const + { + return ( iValue & 0x80000000 ) ? ETrue : EFalse; + } + }; //namespace surfaceHints #endif //__SURFACE_HINTS_LOCAL_H__ diff -r 0267baa9dea9 -r 31d6e1ae5283 mdfdevvideoextensions/nga_mdf_postprocessor/src/NGAPostProcHwDevice.cpp --- a/mdfdevvideoextensions/nga_mdf_postprocessor/src/NGAPostProcHwDevice.cpp Wed Jun 23 19:56:04 2010 +0300 +++ b/mdfdevvideoextensions/nga_mdf_postprocessor/src/NGAPostProcHwDevice.cpp Tue Jul 06 16:02:18 2010 +0300 @@ -107,6 +107,8 @@ iVideoSurfaceObserver(NULL), iVPObserver(NULL), iPicSize(0,0), + iAspectRatioNum(1), + iAspectRatioDenom(1), iStepFrameCount(0), iPlayRate(KDefPlayRate), iKeyFrameMode(EFalse), @@ -180,7 +182,12 @@ if(!iSurfaceId.IsNull()) { PP_DEBUG(_L("CNGAPostProcHwDevice[%x]::UnregisterSurface"), this); - iWsSession.UnregisterSurface(0, iSurfaceId); + TInt numScreens = iWsSession.NumberOfScreens(); + for(TInt i=0;i < numScreens;i++) + { + iWsSession.UnregisterSurface(i, iSurfaceId); + } + iWsSession.Flush(); iSurfaceHandler->DestroySurface(iSurfaceId); } delete iSurfaceHandler; @@ -1414,10 +1421,12 @@ { aCropRect.Intersection( iPicSize); } - aPixelAspectRatio = TVideoAspectRatio(1,1); - PP_DEBUG(_L("CNGAPostProcHwDevice[%x]:MmvssGetSurfaceParametersL()-- \ - cropRectWidth = %d cropRectHeight = %d --"), this, aCropRect.Width(), aCropRect.Height()); - + aPixelAspectRatio = TVideoAspectRatio(iAspectRatioNum,iAspectRatioDenom); + PP_DEBUG(_L("CNGAPostProcHwDevice[%x]:MmvssGetSurfaceParametersL() \ + cropRectWidth = %d cropRectHeight = %d"), this, aCropRect.Width(), aCropRect.Height()); + PP_DEBUG(_L("CNGAPostProcHwDevice[%x]:MmvssGetSurfaceParametersL() \ + PAR Num = %d PAR Denom = %d"), this, aPixelAspectRatio.iNumerator, aPixelAspectRatio.iDenominator); + PP_DEBUG(_L("CNGAPostProcHwDevice[%x]:MmvssGetSurfaceParametersL() --"), this); } void CNGAPostProcHwDevice::MmvssSurfaceRemovedL(const TSurfaceId& aSurfaceId) @@ -1426,10 +1435,20 @@ if(!aSurfaceId.IsNull()) { PP_DEBUG(_L("CNGAPostProcHwDevice[%x]:MmvssSurfaceRemovedL(): UnregisterSurface ID = 0x%x"), this, aSurfaceId ); - iWsSession.UnregisterSurface(0, aSurfaceId); + TInt numScreens = iWsSession.NumberOfScreens(); + for(TInt i=0;i < numScreens;i++) + { + iWsSession.UnregisterSurface(i, aSurfaceId); + } + iWsSession.Flush(); iSurfaceHandler->DestroySurface(aSurfaceId); + if(iSurfaceId == aSurfaceId) + { + iSurfaceCreatedEventPublished = EFalse; + iSurfaceId = TSurfaceId::CreateNullId(); + iChunk.Close(); + } } - PP_DEBUG(_L("CNGAPostProcHwDevice[%x]:MmvssSurfaceRemovedL() --"), this); } @@ -1441,7 +1460,9 @@ PP_DEBUG(_L("CNGAPostProcHwDevice[%x]::MmvpoUpdateVideoProperties PAR \ iAspectRatioNum = %d, iAspectRatioDenom = %d"), this, aYuvFormat.iAspectRatioNum,aYuvFormat.iAspectRatioDenom); - iPicSize = aPictureSize; + iPicSize = aPictureSize; + iAspectRatioNum = aYuvFormat.iAspectRatioNum; + iAspectRatioDenom = aYuvFormat.iAspectRatioDenom; PP_DEBUG(_L("CNGAPostProcHwDevice[%x]::MmvpoUpdateVideoProperties Picture Size \ iWidth = %d, iHeight = %d, iSurfaceCreatedEventPublished = %d"), this, iPicSize.iWidth,iPicSize.iHeight, iSurfaceCreatedEventPublished?1:0); @@ -1523,22 +1544,13 @@ { PP_DEBUG(_L("CNGAPostProcHwDevice[%x]::MmvshcRedrawBufferToSurface ++"), this); - TSize surfaceSize; TUint8* lPtr; TInt offset; - if(iPicSize.iWidth > iPicSize.iHeight) - { - surfaceSize.iWidth = iPicSize.iWidth; - surfaceSize.iHeight = iPicSize.iWidth; - } - else - { - surfaceSize.iWidth = iPicSize.iHeight; - surfaceSize.iHeight = iPicSize.iHeight; - } + + PP_DEBUG(_L("CNGAPostProcHwDevice[%x]::MmvshcRedrawBufferToSurface -- Creating %d x %d surface"), this, iPicSize.iWidth, iPicSize.iHeight); TInt err = KErrNone; - SetSurfaceAttributes(surfaceSize, 1); + SetSurfaceAttributes(iPicSize, 1); err = iSurfaceHandler->CreateSurface(iAttributes, iSurfaceId); if (err != KErrNone) @@ -1548,6 +1560,36 @@ iProxy->MdvppFatalError(this, err); return; } + + err = iSurfaceHandler->SurfaceInfo(iSurfaceId, iInfo); + if (err != KErrNone) + { + PP_DEBUG(_L("CNGAPostProcHwDevice[%x]:MmvshcRedrawBufferToSurface -- failed to get Surface info %d"), + this, err); + iSurfaceHandler->DestroySurface(iSurfaceId); + iSurfaceId = TSurfaceId::CreateNullId(); + iProxy->MdvppFatalError(this, err); + return; + } + + PP_DEBUG(_L("CNGAPostProcHwDevice[%x]:MmvshcRedrawBufferToSurface() \ + surfaceWidth = %d surfaceHeight = %d surfaceStride = %d"), this, iInfo().iSize.iWidth, iInfo().iSize.iHeight, iInfo().iStride); + + TInt redrawBufferSize = aRedrawBuffer.Size(); + TInt surfaceSize = iInfo().iStride * iInfo().iSize.iHeight; + + PP_DEBUG(_L("CNGAPostProcHwDevice[%x]::MmvshcRedrawBufferToSurface RedrawBuffer size= %d Surface size = %d"), this, redrawBufferSize, surfaceSize); + + // Check whether redraw buffer will fit onto the surface. + // If this check fails then we won't raise a fatal error - We just won't create the redraw surface + if (redrawBufferSize > surfaceSize) + { + PP_DEBUG(_L("CNGAPostProcHwDevice[%x]::MmvshcRedrawBufferToSurface Redraw buffer size larger than surface size"), this); + iSurfaceHandler->DestroySurface(iSurfaceId); + iSurfaceId = TSurfaceId::CreateNullId(); + return; + } + err = iSurfaceHandler->MapSurface(iSurfaceId, iChunk); if (err != KErrNone) { @@ -1558,19 +1600,6 @@ iProxy->MdvppFatalError(this, err); return; } - err = iSurfaceHandler->SurfaceInfo(iSurfaceId, iInfo); - if (err != KErrNone) - { - PP_DEBUG(_L("CNGAPostProcHwDevice[%x]:MmvshcRedrawBufferToSurface -- failed to get Surface info %d"), - this, err); - iSurfaceHandler->DestroySurface(iSurfaceId); - iSurfaceId = TSurfaceId::CreateNullId(); - iChunk.Close(); - iProxy->MdvppFatalError(this, err); - return; - } - PP_DEBUG(_L("CNGAPostProcHwDevice[%x]:MmvshcRedrawBufferToSurface() \ - surfaceWidth = %d surfaceHeight = %d --"), this, iInfo().iSize.iWidth, iInfo().iSize.iHeight); if((err = iSurfaceHandler->GetBufferOffset(iSurfaceId, 0, offset)) != KErrNone) { @@ -1581,18 +1610,23 @@ iProxy->MdvppFatalError(this, err); return; } - PP_DEBUG(_L("CNGAPostProcHwDevice[%x]::MmvshcRedrawBufferToSurface offset = %d aRedrawBuffer.Size()= %d --"), this, offset, aRedrawBuffer.Size()); - + + PP_DEBUG(_L("CNGAPostProcHwDevice[%x]::MmvshcRedrawBufferToSurface offset = %d"), this, offset); + lPtr = reinterpret_cast(iChunk.Base() + offset); - memcpy((TAny *)lPtr, (TAny *)aRedrawBuffer.Ptr(), aRedrawBuffer.Size()); + memcpy((TAny *)lPtr, (TAny *)aRedrawBuffer.Ptr(), redrawBufferSize); iRedrawSurfaceInUse = ETrue; + PP_DEBUG(_L("CNGAPostProcHwDevice[%x]::MmvshcRedrawBufferToSurface(): New surface = 0x%x"), this, iSurfaceId); + PP_DEBUG(_L("CNGAPostProcHwDevice[%x]::MmvshcRedrawBufferToSurface error = %d --"), this, err); } TInt CNGAPostProcHwDevice::SetupExternalSurface(const TSurfaceId &aSurfaceID) { + PP_DEBUG(_L("CNGAPostProcHwDevice[%x]:SetupExternalSurface(): aSurfaceID = 0x%x"), this, aSurfaceID ); + TInt err = KErrNone; if(!iSurfaceId.IsNull()) @@ -1607,7 +1641,12 @@ { // We never told the client about the surface, so we must destroy it ourselves PP_DEBUG(_L("CNGAPostProcHwDevice[%x]:SetupExternalSurface - Destroying old surface"), this); - iWsSession.UnregisterSurface(0, iSurfaceId); + TInt numScreens = iWsSession.NumberOfScreens(); + for(TInt i=0;i < numScreens;i++) + { + iWsSession.UnregisterSurface(i, iSurfaceId); + } + iWsSession.Flush(); iSurfaceHandler->DestroySurface(iSurfaceId); } @@ -2060,7 +2099,13 @@ TInt CNGAPostProcHwDevice::RegisterSurface(const TSurfaceId& aSurfaceId) { PP_DEBUG(_L("CNGAPostProcHwDevice[%x]:RegisterSurface(): RegisterSurface ID = 0x%x"), this, aSurfaceId); - return(iWsSession.RegisterSurface(0, aSurfaceId)); + TInt err = KErrNone; + TInt numScreens = iWsSession.NumberOfScreens(); + for(TInt i=0; (i < numScreens && err == KErrNone); i++) + { + err = iWsSession.RegisterSurface(i, aSurfaceId); + } + return(err); } TInt CNGAPostProcHwDevice::IsGceReady() @@ -2291,6 +2336,16 @@ err = iSurfaceHandler->SetSurfaceHint(iSurfaceId,iHint); } PP_DEBUG(_L("CNGAPostProcHwDevice[%x]:AddHints. err = %d --"), this,err); + iHint.iKey.iUid = surfaceHints::KSurfaceContent; + iHint.iValue = surfaceHints::EVideoPlayback; + iHint.iMutable = ETrue; + err = iSurfaceHandler->AddSurfaceHint(iSurfaceId,iHint); + if(err == KErrAlreadyExists) + { + err = KErrNone; + err = iSurfaceHandler->SetSurfaceHint(iSurfaceId,iHint); + } + PP_DEBUG(_L("CNGAPostProcHwDevice[%x]:AddHints. err = %d --"), this,err); return err; } diff -r 0267baa9dea9 -r 31d6e1ae5283 mf_developer_build.config.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mf_developer_build.config.xml Tue Jul 06 16:02:18 2010 +0300 @@ -0,0 +1,73 @@ + + +]> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff -r 0267baa9dea9 -r 31d6e1ae5283 mm_pub/drm_audio_player_api/tsrc/data/mmc/drm/test3gp.dcf diff -r 0267baa9dea9 -r 31d6e1ae5283 mm_pub/drm_audio_player_api/tsrc/data/mmc/drm/testmp3.dcf diff -r 0267baa9dea9 -r 31d6e1ae5283 mmdevicefw/mdfunittest/group/BLD.INF --- a/mmdevicefw/mdfunittest/group/BLD.INF Wed Jun 23 19:56:04 2010 +0300 +++ b/mmdevicefw/mdfunittest/group/BLD.INF Tue Jul 06 16:02:18 2010 +0300 @@ -23,7 +23,7 @@ #include "../codecapi/audio/group/bld.inf" #include "../codecapi/video/group/bld.inf" #include "../codecapi/omx/pcmcodec/group/bld.inf" -#include "../codecapi/PU/pcmcodec/group/BLD.INF" +#include "../codecapi/PU/pcmcodec/group/bld.inf" #include "../codecapi/PU/video/group/bld.inf" #include "../codecapi/codecapi/group/bld.inf" #include "../codecapi/omxvorbis/group/bld.inf" diff -r 0267baa9dea9 -r 31d6e1ae5283 mmtestenv/mmtestagent/group/bld.inf --- a/mmtestenv/mmtestagent/group/bld.inf Wed Jun 23 19:56:04 2010 +0300 +++ b/mmtestenv/mmtestagent/group/bld.inf Tue Jul 06 16:02:18 2010 +0300 @@ -19,8 +19,8 @@ // If CAF_LITE is defined the cut down "lite" version is built // otherwise by default the complete version of CAF is built -PRJ_EXPORTS +PRJ_TESTEXPORTS ../group/multimediatestagent.iby /epoc32/rom/include/multimediatestagent.iby -PRJ_MMPFILES +PRJ_TESTMMPFILES multimediatestagent.mmp diff -r 0267baa9dea9 -r 31d6e1ae5283 mmtestenv/mmtestfw/gceavailable/group/bld.inf --- a/mmtestenv/mmtestfw/gceavailable/group/bld.inf Wed Jun 23 19:56:04 2010 +0300 +++ b/mmtestenv/mmtestfw/gceavailable/group/bld.inf Tue Jul 06 16:02:18 2010 +0300 @@ -13,7 +13,7 @@ // Description: // -PRJ_MMPFILES +PRJ_TESTMMPFILES #ifdef WINS gceavailable_winscw.mmp @@ -21,7 +21,7 @@ gceavailable_eabi.mmp #endif // WINS -PRJ_EXPORTS +PRJ_TESTEXPORTS gceavailable.iby /epoc32/rom/include/gceavailable.iby ../inc/gceavailable.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(gceavailable.h) diff -r 0267baa9dea9 -r 31d6e1ae5283 mmtestenv/mmtestfw/group/BLD.INF --- a/mmtestenv/mmtestfw/group/BLD.INF Wed Jun 23 19:56:04 2010 +0300 +++ b/mmtestenv/mmtestfw/group/BLD.INF Tue Jul 06 16:02:18 2010 +0300 @@ -13,7 +13,7 @@ // Description: // -PRJ_EXPORTS +PRJ_TESTEXPORTS ../include/TestFramework.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(testframework.h) ../include/TestFrameworkIpc.h SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(testframeworkipc.h) ../include/TestFrameworkIpc.inl SYMBIAN_OS_LAYER_PLATFORM_EXPORT_PATH(testframeworkipc.inl) @@ -27,7 +27,7 @@ // Tests that run via recognizer [not required on EKA2] ../recog/data/AutorunTests.cfg c:/mm/autoruntests.cfg -PRJ_MMPFILES +PRJ_TESTMMPFILES // TestFramework files ../MMPFiles/TestFrameworkServer.mmp diff -r 0267baa9dea9 -r 31d6e1ae5283 mmtestenv/mmtesttools/Group/bld.inf --- a/mmtestenv/mmtesttools/Group/bld.inf Wed Jun 23 19:56:04 2010 +0300 +++ b/mmtestenv/mmtesttools/Group/bld.inf Tue Jul 06 16:02:18 2010 +0300 @@ -18,7 +18,7 @@ #endif -PRJ_EXPORTS +PRJ_TESTEXPORTS // .iby files ../Rom/mmfIntTests.iby /epoc32/rom/include/mmfinttests.iby diff -r 0267baa9dea9 -r 31d6e1ae5283 package_definition.xml --- a/package_definition.xml Wed Jun 23 19:56:04 2010 +0300 +++ b/package_definition.xml Tue Jul 06 16:02:18 2010 +0300 @@ -1,14 +1,7 @@ - - - - - - - - + diff -r 0267baa9dea9 -r 31d6e1ae5283 video/ARM_MDF_Decoders/Utilities/BufferProcessor/BWINS/BufferProcessor.def --- a/video/ARM_MDF_Decoders/Utilities/BufferProcessor/BWINS/BufferProcessor.def Wed Jun 23 19:56:04 2010 +0300 +++ /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 0267baa9dea9 -r 31d6e1ae5283 video/ARM_MDF_Decoders/Utilities/BufferProcessor/EABI/BufferProcessor.def --- a/video/ARM_MDF_Decoders/Utilities/BufferProcessor/EABI/BufferProcessor.def Wed Jun 23 19:56:04 2010 +0300 +++ /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 0267baa9dea9 -r 31d6e1ae5283 video/ARM_MDF_Decoders/Utilities/BufferProcessor/group/BufferProcessor.mmp --- a/video/ARM_MDF_Decoders/Utilities/BufferProcessor/group/BufferProcessor.mmp Wed Jun 23 19:56:04 2010 +0300 +++ /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 0267baa9dea9 -r 31d6e1ae5283 video/ARM_MDF_Decoders/Utilities/BufferProcessor/group/bld.inf --- a/video/ARM_MDF_Decoders/Utilities/BufferProcessor/group/bld.inf Wed Jun 23 19:56:04 2010 +0300 +++ /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 0267baa9dea9 -r 31d6e1ae5283 video/ARM_MDF_Decoders/Utilities/BufferProcessor/inc/BaseEngine.h --- a/video/ARM_MDF_Decoders/Utilities/BufferProcessor/inc/BaseEngine.h Wed Jun 23 19:56:04 2010 +0300 +++ /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 0267baa9dea9 -r 31d6e1ae5283 video/ARM_MDF_Decoders/Utilities/BufferProcessor/inc/BaseEngineImplementation.h --- a/video/ARM_MDF_Decoders/Utilities/BufferProcessor/inc/BaseEngineImplementation.h Wed Jun 23 19:56:04 2010 +0300 +++ /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 0267baa9dea9 -r 31d6e1ae5283 video/ARM_MDF_Decoders/Utilities/BufferProcessor/inc/BaseProcessEngine.h --- a/video/ARM_MDF_Decoders/Utilities/BufferProcessor/inc/BaseProcessEngine.h Wed Jun 23 19:56:04 2010 +0300 +++ /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 0267baa9dea9 -r 31d6e1ae5283 video/ARM_MDF_Decoders/Utilities/BufferProcessor/inc/RDebug.h --- a/video/ARM_MDF_Decoders/Utilities/BufferProcessor/inc/RDebug.h Wed Jun 23 19:56:04 2010 +0300 +++ /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 0267baa9dea9 -r 31d6e1ae5283 video/ARM_MDF_Decoders/Utilities/BufferProcessor/inc/codec.h --- a/video/ARM_MDF_Decoders/Utilities/BufferProcessor/inc/codec.h Wed Jun 23 19:56:04 2010 +0300 +++ /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 0267baa9dea9 -r 31d6e1ae5283 video/ARM_MDF_Decoders/Utilities/BufferProcessor/src/BaseEngineImplementation.cpp --- a/video/ARM_MDF_Decoders/Utilities/BufferProcessor/src/BaseEngineImplementation.cpp Wed Jun 23 19:56:04 2010 +0300 +++ /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 0267baa9dea9 -r 31d6e1ae5283 video/ARM_MDF_Decoders/Utilities/BufferProcessor/src/BaseProcessEngine.cpp --- a/video/ARM_MDF_Decoders/Utilities/BufferProcessor/src/BaseProcessEngine.cpp Wed Jun 23 19:56:04 2010 +0300 +++ /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 0267baa9dea9 -r 31d6e1ae5283 video/ARM_MDF_Decoders/Utilities/StateMachine/BWINS/StateMachine.def --- a/video/ARM_MDF_Decoders/Utilities/StateMachine/BWINS/StateMachine.def Wed Jun 23 19:56:04 2010 +0300 +++ /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 0267baa9dea9 -r 31d6e1ae5283 video/ARM_MDF_Decoders/Utilities/StateMachine/EABI/StateMachine.def --- a/video/ARM_MDF_Decoders/Utilities/StateMachine/EABI/StateMachine.def Wed Jun 23 19:56:04 2010 +0300 +++ /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 0267baa9dea9 -r 31d6e1ae5283 video/ARM_MDF_Decoders/Utilities/StateMachine/group/StateMachine.mmp --- a/video/ARM_MDF_Decoders/Utilities/StateMachine/group/StateMachine.mmp Wed Jun 23 19:56:04 2010 +0300 +++ /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 0267baa9dea9 -r 31d6e1ae5283 video/ARM_MDF_Decoders/Utilities/StateMachine/group/bld.inf --- a/video/ARM_MDF_Decoders/Utilities/StateMachine/group/bld.inf Wed Jun 23 19:56:04 2010 +0300 +++ /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 0267baa9dea9 -r 31d6e1ae5283 video/ARM_MDF_Decoders/Utilities/StateMachine/inc/Statemachine.h --- a/video/ARM_MDF_Decoders/Utilities/StateMachine/inc/Statemachine.h Wed Jun 23 19:56:04 2010 +0300 +++ /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 0267baa9dea9 -r 31d6e1ae5283 video/ARM_MDF_Decoders/Utilities/StateMachine/src/Statemachine.cpp --- a/video/ARM_MDF_Decoders/Utilities/StateMachine/src/Statemachine.cpp Wed Jun 23 19:56:04 2010 +0300 +++ /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 0267baa9dea9 -r 31d6e1ae5283 video/ARM_MDF_Decoders/Utilities/group/bld.inf --- a/video/ARM_MDF_Decoders/Utilities/group/bld.inf Wed Jun 23 19:56:04 2010 +0300 +++ /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 0267baa9dea9 -r 31d6e1ae5283 video/group/bld.inf --- a/video/group/bld.inf Wed Jun 23 19:56:04 2010 +0300 +++ /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 - - -