# HG changeset patch # User hgs # Date 1283920556 -19800 # Node ID 08469e5bb63e671835a2db98ce0728bc70b29b69 # Parent 5752a19fdefece19c5098873aa6beca08e62b8b6 201036 diff -r 5752a19fdefe -r 08469e5bb63e imagingextensions/imageadaptationextensions/data/ImageAdaptationExtensions_stub.pkg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/imagingextensions/imageadaptationextensions/data/ImageAdaptationExtensions_stub.pkg Wed Sep 08 10:05:56 2010 +0530 @@ -0,0 +1,32 @@ +; +; 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: +; +; Languages +&EN + +; Header +#{"Image Adaptation Extensions"}, (0x10204BF0), 1, 0, 0, TYPE=SA + +; Localised Vendor name +%{"Nokia"} + +; Unique Vendor name +:"Nokia" + +; Files +; ----- + +""-"z:\sys\bin\IclExtJpegApi.dll" + diff -r 5752a19fdefe -r 08469e5bb63e imagingextensions/imageadaptationextensions/data/ImageAdaptationExtensions_stub.sis Binary file imagingextensions/imageadaptationextensions/data/ImageAdaptationExtensions_stub.sis has changed diff -r 5752a19fdefe -r 08469e5bb63e imagingextensions/imageadaptationextensions/data/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/imagingextensions/imageadaptationextensions/data/bld.inf Wed Sep 08 10:05:56 2010 +0530 @@ -0,0 +1,27 @@ +/* +* 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: +* +*/ + + +PRJ_PLATFORMS +DEFAULT + +PRJ_EXPORTS +ImageAdaptationExtensions_stub.sis /epoc32/data/z/system/install/ImageAdaptationExtensions_stub.sis + + +// End of File + diff -r 5752a19fdefe -r 08469e5bb63e imagingextensions/imageadaptationextensions/group/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/imagingextensions/imageadaptationextensions/group/bld.inf Wed Sep 08 10:05:56 2010 +0530 @@ -0,0 +1,31 @@ +/* +* 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: +* +*/ + + +PRJ_PLATFORMS +DEFAULT + +PRJ_EXPORTS +../data/ImageAdaptationExtensions_stub.sis /epoc32/data/z/system/install/ImageAdaptationExtensions_stub.sis + +PRJ_MMPFILES +#include "../iclextjpegapi/group/bld.inf" + + + +// End of File + diff -r 5752a19fdefe -r 08469e5bb63e imagingextensions/imageadaptationextensions/iclextjpegapi/BWINS/IclExtJpegApiU.DEF --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/imagingextensions/imageadaptationextensions/iclextjpegapi/BWINS/IclExtJpegApiU.DEF Wed Sep 08 10:05:56 2010 +0530 @@ -0,0 +1,68 @@ +EXPORTS + ??1CExtJpegDecoder@@UAE@XZ @ 1 NONAME ; CExtJpegDecoder::~CExtJpegDecoder(void) + ??1CExtJpegEncoder@@UAE@XZ @ 2 NONAME ; CExtJpegEncoder::~CExtJpegEncoder(void) + ??1CVisualFrame@@UAE@XZ @ 3 NONAME ; CVisualFrame::~CVisualFrame(void) + ?CapabilitiesL@CExtJpegDecoder@@QAEHXZ @ 4 NONAME ; int CExtJpegDecoder::CapabilitiesL(void) + ?CapabilitiesL@CExtJpegEncoder@@QAEHXZ @ 5 NONAME ; int CExtJpegEncoder::CapabilitiesL(void) + ?ContinueConvertL@CExtJpegDecoder@@QAEXPAVTRequestStatus@@PBVCVisualFrame@@AAHH@Z @ 6 NONAME ; void CExtJpegDecoder::ContinueConvertL(class TRequestStatus *, class CVisualFrame const *, int &, int) + ?ContinueConvertL@CExtJpegEncoder@@QAEXPAVTRequestStatus@@PBVCVisualFrame@@AAH@Z @ 7 NONAME ; void CExtJpegEncoder::ContinueConvertL(class TRequestStatus *, class CVisualFrame const *, int &) + ?ConvertL@CExtJpegDecoder@@QAEXPAVTRequestStatus@@PBVCVisualFrame@@AAHH@Z @ 8 NONAME ; void CExtJpegDecoder::ConvertL(class TRequestStatus *, class CVisualFrame const *, int &, int) + ?ConvertL@CExtJpegEncoder@@QAEXPAVTRequestStatus@@PBVCVisualFrame@@AAHPBVCFrameImageData@@@Z @ 9 NONAME ; void CExtJpegEncoder::ConvertL(class TRequestStatus *, class CVisualFrame const *, int &, class CFrameImageData const *) + ?DataChunkL@CVisualFrame@@QBEABVRChunk@@XZ @ 10 NONAME ; class RChunk const & CVisualFrame::DataChunkL(void) const + ?DataContainer@CVisualFrame@@QBE?AW4TDataContainer@1@XZ @ 11 NONAME ; enum CVisualFrame::TDataContainer CVisualFrame::DataContainer(void) const + ?DataNewL@CExtJpegDecoder@@SAPAV1@AAVRFs@@ABVTDesC8@@1W4TOptions@CImageDecoder@@@Z @ 12 NONAME ; class CExtJpegDecoder * CExtJpegDecoder::DataNewL(class RFs &, class TDesC8 const &, class TDesC8 const &, enum CImageDecoder::TOptions) + ?DataNewL@CExtJpegDecoder@@SAPAV1@AAVRFs@@ABVTDesC8@@W4TOptions@CImageDecoder@@VTUid@@33@Z @ 13 NONAME ; class CExtJpegDecoder * CExtJpegDecoder::DataNewL(class RFs &, class TDesC8 const &, enum CImageDecoder::TOptions, class TUid, class TUid, class TUid) + ?DataNewL@CExtJpegDecoder@@SAPAV1@AAVRFs@@PBVCVisualFrame@@ABVTDesC8@@W4TOptions@CImageDecoder@@@Z @ 14 NONAME ; class CExtJpegDecoder * CExtJpegDecoder::DataNewL(class RFs &, class CVisualFrame const *, class TDesC8 const &, enum CImageDecoder::TOptions) + ?DataNewL@CExtJpegDecoder@@SAPAV1@AAVRFs@@PBVCVisualFrame@@W4TOptions@CImageDecoder@@VTUid@@33@Z @ 15 NONAME ; class CExtJpegDecoder * CExtJpegDecoder::DataNewL(class RFs &, class CVisualFrame const *, enum CImageDecoder::TOptions, class TUid, class TUid, class TUid) + ?DataNewL@CExtJpegDecoder@@SAPAV1@W4TDecoderType@1@AAVRFs@@ABVTDesC8@@W4TOptions@CImageDecoder@@@Z @ 16 NONAME ; class CExtJpegDecoder * CExtJpegDecoder::DataNewL(enum CExtJpegDecoder::TDecoderType, class RFs &, class TDesC8 const &, enum CImageDecoder::TOptions) + ?DataNewL@CExtJpegDecoder@@SAPAV1@W4TDecoderType@1@AAVRFs@@PBVCVisualFrame@@W4TOptions@CImageDecoder@@@Z @ 17 NONAME ; class CExtJpegDecoder * CExtJpegDecoder::DataNewL(enum CExtJpegDecoder::TDecoderType, class RFs &, class CVisualFrame const *, enum CImageDecoder::TOptions) + ?DataNewL@CExtJpegEncoder@@SAPAV1@AAPAVHBufC8@@ABVTDesC8@@W4TOptions@CImageEncoder@@@Z @ 18 NONAME ; class CExtJpegEncoder * CExtJpegEncoder::DataNewL(class HBufC8 * &, class TDesC8 const &, enum CImageEncoder::TOptions) + ?DataNewL@CExtJpegEncoder@@SAPAV1@AAPAVHBufC8@@W4TOptions@CImageEncoder@@VTUid@@22@Z @ 19 NONAME ; class CExtJpegEncoder * CExtJpegEncoder::DataNewL(class HBufC8 * &, enum CImageEncoder::TOptions, class TUid, class TUid, class TUid) + ?DataNewL@CExtJpegEncoder@@SAPAV1@PBVCVisualFrame@@ABVTDesC8@@W4TOptions@CImageEncoder@@@Z @ 20 NONAME ; class CExtJpegEncoder * CExtJpegEncoder::DataNewL(class CVisualFrame const *, class TDesC8 const &, enum CImageEncoder::TOptions) + ?DataNewL@CExtJpegEncoder@@SAPAV1@PBVCVisualFrame@@W4TOptions@CImageEncoder@@VTUid@@22@Z @ 21 NONAME ; class CExtJpegEncoder * CExtJpegEncoder::DataNewL(class CVisualFrame const *, enum CImageEncoder::TOptions, class TUid, class TUid, class TUid) + ?DataNewL@CExtJpegEncoder@@SAPAV1@W4TEncoderType@1@AAPAVHBufC8@@W4TOptions@CImageEncoder@@@Z @ 22 NONAME ; class CExtJpegEncoder * CExtJpegEncoder::DataNewL(enum CExtJpegEncoder::TEncoderType, class HBufC8 * &, enum CImageEncoder::TOptions) + ?DataNewL@CExtJpegEncoder@@SAPAV1@W4TEncoderType@1@PBVCVisualFrame@@W4TOptions@CImageEncoder@@@Z @ 23 NONAME ; class CExtJpegEncoder * CExtJpegEncoder::DataNewL(enum CExtJpegEncoder::TEncoderType, class CVisualFrame const *, enum CImageEncoder::TOptions) + ?DataOffset@CVisualFrame@@QBEHXZ @ 24 NONAME ; int CVisualFrame::DataOffset(void) const + ?DataPtrL@CVisualFrame@@QBE?AVTPtr8@@XZ @ 25 NONAME ; class TPtr8 CVisualFrame::DataPtrL(void) const + ?Dimension@CVisualFrame@@QBE?AVTSize@@XZ @ 26 NONAME ; class TSize CVisualFrame::Dimension(void) const + ?FileNewL@CExtJpegDecoder@@SAPAV1@AAVRFs@@ABVTDesC16@@ABVTDesC8@@W4TOptions@CImageDecoder@@@Z @ 27 NONAME ; class CExtJpegDecoder * CExtJpegDecoder::FileNewL(class RFs &, class TDesC16 const &, class TDesC8 const &, enum CImageDecoder::TOptions) + ?FileNewL@CExtJpegDecoder@@SAPAV1@AAVRFs@@ABVTDesC16@@W4TOptions@CImageDecoder@@VTUid@@33@Z @ 28 NONAME ; class CExtJpegDecoder * CExtJpegDecoder::FileNewL(class RFs &, class TDesC16 const &, enum CImageDecoder::TOptions, class TUid, class TUid, class TUid) + ?FileNewL@CExtJpegDecoder@@SAPAV1@W4TDecoderType@1@AAVRFs@@ABVTDesC16@@W4TOptions@CImageDecoder@@@Z @ 29 NONAME ; class CExtJpegDecoder * CExtJpegDecoder::FileNewL(enum CExtJpegDecoder::TDecoderType, class RFs &, class TDesC16 const &, enum CImageDecoder::TOptions) + ?FileNewL@CExtJpegEncoder@@SAPAV1@AAVRFs@@ABVTDesC16@@ABVTDesC8@@W4TOptions@CImageEncoder@@@Z @ 30 NONAME ; class CExtJpegEncoder * CExtJpegEncoder::FileNewL(class RFs &, class TDesC16 const &, class TDesC8 const &, enum CImageEncoder::TOptions) + ?FileNewL@CExtJpegEncoder@@SAPAV1@AAVRFs@@ABVTDesC16@@W4TOptions@CImageEncoder@@VTUid@@33@Z @ 31 NONAME ; class CExtJpegEncoder * CExtJpegEncoder::FileNewL(class RFs &, class TDesC16 const &, enum CImageEncoder::TOptions, class TUid, class TUid, class TUid) + ?FileNewL@CExtJpegEncoder@@SAPAV1@W4TEncoderType@1@AAVRFs@@ABVTDesC16@@W4TOptions@CImageEncoder@@@Z @ 32 NONAME ; class CExtJpegEncoder * CExtJpegEncoder::FileNewL(enum CExtJpegEncoder::TEncoderType, class RFs &, class TDesC16 const &, enum CImageEncoder::TOptions) + ?FrameFormat@CVisualFrame@@QBEHXZ @ 33 NONAME ; int CVisualFrame::FrameFormat(void) const + ?FrameLayout@CVisualFrame@@QBEABVTFrameLayout@1@XZ @ 34 NONAME ; class CVisualFrame::TFrameLayout const & CVisualFrame::FrameLayout(void) const + ?GetDestinationDataSizeL@CExtJpegEncoder@@QAEHXZ @ 35 NONAME ; int CExtJpegEncoder::GetDestinationDataSizeL(void) + ?MaxSize@CVisualFrame@@QBEHXZ @ 36 NONAME ; int CVisualFrame::MaxSize(void) const + ?NewL@CExtJpegDecoder@@SAPAV1@XZ @ 37 NONAME ; class CExtJpegDecoder * CExtJpegDecoder::NewL(void) + ?NewL@CExtJpegEncoder@@SAPAV1@XZ @ 38 NONAME ; class CExtJpegEncoder * CExtJpegEncoder::NewL(void) + ?NewL@CVisualFrame@@SAPAV1@AAVRChunk@@HHABVTSize@@HABVTFrameLayout@1@@Z @ 39 NONAME ; class CVisualFrame * CVisualFrame::NewL(class RChunk &, int, int, class TSize const &, int, class CVisualFrame::TFrameLayout const &) + ?NewL@CVisualFrame@@SAPAV1@AAVRChunk@@HHHABVTSize@@H@Z @ 40 NONAME ; class CVisualFrame * CVisualFrame::NewL(class RChunk &, int, int, int, class TSize const &, int) + ?NewL@CVisualFrame@@SAPAV1@AAVTDes8@@ABVTSize@@H@Z @ 41 NONAME ; class CVisualFrame * CVisualFrame::NewL(class TDes8 &, class TSize const &, int) + ?NewL@CVisualFrame@@SAPAV1@AAVTDes8@@ABVTSize@@HABVTFrameLayout@1@@Z @ 42 NONAME ; class CVisualFrame * CVisualFrame::NewL(class TDes8 &, class TSize const &, int, class CVisualFrame::TFrameLayout const &) + ?ProvideNewDestDataL@CExtJpegEncoder@@QAEXPBVCVisualFrame@@@Z @ 43 NONAME ; void CExtJpegEncoder::ProvideNewDestDataL(class CVisualFrame const *) + ?SetBitmapOverlayL@CExtJpegEncoder@@QAEXABVCFbsBitmap@@IVTPoint@@@Z @ 44 NONAME ; void CExtJpegEncoder::SetBitmapOverlayL(class CFbsBitmap const &, unsigned int, class TPoint) + ?SetBitmapReplaceL@CExtJpegEncoder@@QAEXABVCFbsBitmap@@VTPoint@@@Z @ 45 NONAME ; void CExtJpegEncoder::SetBitmapReplaceL(class CFbsBitmap const &, class TPoint) + ?SetCroppingL@CExtJpegDecoder@@QAEXVTRect@@@Z @ 46 NONAME ; void CExtJpegDecoder::SetCroppingL(class TRect) + ?SetDctDecodingL@CExtJpegDecoder@@QAEXXZ @ 47 NONAME ; void CExtJpegDecoder::SetDctDecodingL(void) + ?SetDctEncodingL@CExtJpegEncoder@@QAEXXZ @ 48 NONAME ; void CExtJpegEncoder::SetDctEncodingL(void) + ?SetFlippingL@CExtJpegDecoder@@QAEXXZ @ 49 NONAME ; void CExtJpegDecoder::SetFlippingL(void) + ?SetImageReplaceL@CExtJpegEncoder@@QAEXPBVCVisualFrame@@VTPoint@@@Z @ 50 NONAME ; void CExtJpegEncoder::SetImageReplaceL(class CVisualFrame const *, class TPoint) + ?SetLosslessFlippingL@CExtJpegEncoder@@QAEXXZ @ 51 NONAME ; void CExtJpegEncoder::SetLosslessFlippingL(void) + ?SetLosslessMirroringL@CExtJpegEncoder@@QAEXXZ @ 52 NONAME ; void CExtJpegEncoder::SetLosslessMirroringL(void) + ?SetLosslessRotationL@CExtJpegEncoder@@QAEXH@Z @ 53 NONAME ; void CExtJpegEncoder::SetLosslessRotationL(int) + ?SetMirroringL@CExtJpegDecoder@@QAEXXZ @ 54 NONAME ; void CExtJpegDecoder::SetMirroringL(void) + ?SetRotationL@CExtJpegDecoder@@QAEXH@Z @ 55 NONAME ; void CExtJpegDecoder::SetRotationL(int) + ?SetSizeL@CVisualFrame@@QAEXH@Z @ 56 NONAME ; void CVisualFrame::SetSizeL(int) + ?SetStreamingL@CExtJpegDecoder@@QAEXAAVTSize@@@Z @ 57 NONAME ; void CExtJpegDecoder::SetStreamingL(class TSize &) + ?SetStreamingL@CExtJpegEncoder@@QAEXAAVTSize@@PBVCFrameImageData@@@Z @ 58 NONAME ; void CExtJpegEncoder::SetStreamingL(class TSize &, class CFrameImageData const *) + ?Size@CVisualFrame@@QBEHXZ @ 59 NONAME ; int CVisualFrame::Size(void) const + ?SupportedFormatsL@CExtJpegDecoder@@QAEHXZ @ 60 NONAME ; int CExtJpegDecoder::SupportedFormatsL(void) + ?SupportedFormatsL@CExtJpegEncoder@@QAEHXZ @ 61 NONAME ; int CExtJpegEncoder::SupportedFormatsL(void) + ?GetImageFrameL@CVisualFrame@@QAEPAVCImageFrame@@XZ @ 62 NONAME ; class CImageFrame * CVisualFrame::GetImageFrameL(void) + ?NewL@CVisualFrame@@SAPAV1@PBVCImageFrame@@@Z @ 63 NONAME ; class CVisualFrame * CVisualFrame::NewL(class CImageFrame const *) + ?ContinueConvert@CExtJpegDecoder@@UAEXPAVTRequestStatus@@@Z @ 64 NONAME ; void CExtJpegDecoder::ContinueConvert(class TRequestStatus *) + ?Convert@CExtJpegDecoder@@UAEXPAVTRequestStatus@@AAVCFbsBitmap@@1H@Z @ 65 NONAME ; void CExtJpegDecoder::Convert(class TRequestStatus *, class CFbsBitmap &, class CFbsBitmap &, int) + ?Convert@CExtJpegDecoder@@UAEXPAVTRequestStatus@@AAVCFbsBitmap@@H@Z @ 66 NONAME ; void CExtJpegDecoder::Convert(class TRequestStatus *, class CFbsBitmap &, int) + diff -r 5752a19fdefe -r 08469e5bb63e imagingextensions/imageadaptationextensions/iclextjpegapi/EABI/IclExtJpegApiU.DEF --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/imagingextensions/imageadaptationextensions/iclextjpegapi/EABI/IclExtJpegApiU.DEF Wed Sep 08 10:05:56 2010 +0530 @@ -0,0 +1,82 @@ +EXPORTS + _ZN12CVisualFrame14GetImageFrameLEv @ 1 NONAME + _ZN12CVisualFrame4NewLEPK11CImageFrame @ 2 NONAME + _ZN12CVisualFrame4NewLER5TDes8RK5TSizei @ 3 NONAME + _ZN12CVisualFrame4NewLER5TDes8RK5TSizeiRKNS_12TFrameLayoutE @ 4 NONAME + _ZN12CVisualFrame4NewLER6RChunkiiRK5TSizeiRKNS_12TFrameLayoutE @ 5 NONAME + _ZN12CVisualFrame4NewLER6RChunkiiiRK5TSizei @ 6 NONAME + _ZN12CVisualFrame8SetSizeLEi @ 7 NONAME + _ZN12CVisualFrameD0Ev @ 8 NONAME + _ZN12CVisualFrameD1Ev @ 9 NONAME + _ZN12CVisualFrameD2Ev @ 10 NONAME + _ZN15CExtJpegDecoder12SetCroppingLE5TRect @ 11 NONAME + _ZN15CExtJpegDecoder12SetFlippingLEv @ 12 NONAME + _ZN15CExtJpegDecoder12SetRotationLEi @ 13 NONAME + _ZN15CExtJpegDecoder13CapabilitiesLEv @ 14 NONAME + _ZN15CExtJpegDecoder13SetMirroringLEv @ 15 NONAME + _ZN15CExtJpegDecoder13SetStreamingLER5TSize @ 16 NONAME + _ZN15CExtJpegDecoder15SetDctDecodingLEv @ 17 NONAME + _ZN15CExtJpegDecoder16ContinueConvertLEP14TRequestStatusPK12CVisualFrameRii @ 18 NONAME + _ZN15CExtJpegDecoder17SupportedFormatsLEv @ 19 NONAME + _ZN15CExtJpegDecoder4NewLEv @ 20 NONAME + _ZN15CExtJpegDecoder8ConvertLEP14TRequestStatusPK12CVisualFrameRii @ 21 NONAME + _ZN15CExtJpegDecoder8DataNewLENS_12TDecoderTypeER3RFsPK12CVisualFrameN13CImageDecoder8TOptionsE @ 22 NONAME + _ZN15CExtJpegDecoder8DataNewLENS_12TDecoderTypeER3RFsRK6TDesC8N13CImageDecoder8TOptionsE @ 23 NONAME + _ZN15CExtJpegDecoder8DataNewLER3RFsPK12CVisualFrameN13CImageDecoder8TOptionsE4TUidS7_S7_ @ 24 NONAME + _ZN15CExtJpegDecoder8DataNewLER3RFsPK12CVisualFrameRK6TDesC8N13CImageDecoder8TOptionsE @ 25 NONAME + _ZN15CExtJpegDecoder8DataNewLER3RFsRK6TDesC8N13CImageDecoder8TOptionsE4TUidS7_S7_ @ 26 NONAME + _ZN15CExtJpegDecoder8DataNewLER3RFsRK6TDesC8S4_N13CImageDecoder8TOptionsE @ 27 NONAME + _ZN15CExtJpegDecoder8FileNewLENS_12TDecoderTypeER3RFsRK7TDesC16N13CImageDecoder8TOptionsE @ 28 NONAME + _ZN15CExtJpegDecoder8FileNewLER3RFsRK7TDesC16N13CImageDecoder8TOptionsE4TUidS7_S7_ @ 29 NONAME + _ZN15CExtJpegDecoder8FileNewLER3RFsRK7TDesC16RK6TDesC8N13CImageDecoder8TOptionsE @ 30 NONAME + _ZN15CExtJpegDecoderD0Ev @ 31 NONAME + _ZN15CExtJpegDecoderD1Ev @ 32 NONAME + _ZN15CExtJpegDecoderD2Ev @ 33 NONAME + _ZN15CExtJpegEncoder13CapabilitiesLEv @ 34 NONAME + _ZN15CExtJpegEncoder13SetStreamingLER5TSizePK15CFrameImageData @ 35 NONAME + _ZN15CExtJpegEncoder15SetDctEncodingLEv @ 36 NONAME + _ZN15CExtJpegEncoder16ContinueConvertLEP14TRequestStatusPK12CVisualFrameRi @ 37 NONAME + _ZN15CExtJpegEncoder16SetImageReplaceLEPK12CVisualFrame6TPoint @ 38 NONAME + _ZN15CExtJpegEncoder17SetBitmapOverlayLERK10CFbsBitmapj6TPoint @ 39 NONAME + _ZN15CExtJpegEncoder17SetBitmapReplaceLERK10CFbsBitmap6TPoint @ 40 NONAME + _ZN15CExtJpegEncoder17SupportedFormatsLEv @ 41 NONAME + _ZN15CExtJpegEncoder19ProvideNewDestDataLEPK12CVisualFrame @ 42 NONAME + _ZN15CExtJpegEncoder20SetLosslessFlippingLEv @ 43 NONAME + _ZN15CExtJpegEncoder20SetLosslessRotationLEi @ 44 NONAME + _ZN15CExtJpegEncoder21SetLosslessMirroringLEv @ 45 NONAME + _ZN15CExtJpegEncoder23GetDestinationDataSizeLEv @ 46 NONAME + _ZN15CExtJpegEncoder4NewLEv @ 47 NONAME + _ZN15CExtJpegEncoder8ConvertLEP14TRequestStatusPK12CVisualFrameRiPK15CFrameImageData @ 48 NONAME + _ZN15CExtJpegEncoder8DataNewLENS_12TEncoderTypeEPK12CVisualFrameN13CImageEncoder8TOptionsE @ 49 NONAME + _ZN15CExtJpegEncoder8DataNewLENS_12TEncoderTypeERP6HBufC8N13CImageEncoder8TOptionsE @ 50 NONAME + _ZN15CExtJpegEncoder8DataNewLEPK12CVisualFrameN13CImageEncoder8TOptionsE4TUidS5_S5_ @ 51 NONAME + _ZN15CExtJpegEncoder8DataNewLEPK12CVisualFrameRK6TDesC8N13CImageEncoder8TOptionsE @ 52 NONAME + _ZN15CExtJpegEncoder8DataNewLERP6HBufC8N13CImageEncoder8TOptionsE4TUidS5_S5_ @ 53 NONAME + _ZN15CExtJpegEncoder8DataNewLERP6HBufC8RK6TDesC8N13CImageEncoder8TOptionsE @ 54 NONAME + _ZN15CExtJpegEncoder8FileNewLENS_12TEncoderTypeER3RFsRK7TDesC16N13CImageEncoder8TOptionsE @ 55 NONAME + _ZN15CExtJpegEncoder8FileNewLER3RFsRK7TDesC16N13CImageEncoder8TOptionsE4TUidS7_S7_ @ 56 NONAME + _ZN15CExtJpegEncoder8FileNewLER3RFsRK7TDesC16RK6TDesC8N13CImageEncoder8TOptionsE @ 57 NONAME + _ZN15CExtJpegEncoderD0Ev @ 58 NONAME + _ZN15CExtJpegEncoderD1Ev @ 59 NONAME + _ZN15CExtJpegEncoderD2Ev @ 60 NONAME + _ZNK12CVisualFrame10DataChunkLEv @ 61 NONAME + _ZNK12CVisualFrame10DataOffsetEv @ 62 NONAME + _ZNK12CVisualFrame11FrameFormatEv @ 63 NONAME + _ZNK12CVisualFrame11FrameLayoutEv @ 64 NONAME + _ZNK12CVisualFrame13DataContainerEv @ 65 NONAME + _ZNK12CVisualFrame4SizeEv @ 66 NONAME + _ZNK12CVisualFrame7MaxSizeEv @ 67 NONAME + _ZNK12CVisualFrame8DataPtrLEv @ 68 NONAME + _ZNK12CVisualFrame9DimensionEv @ 69 NONAME + _ZTI12CVisualFrame @ 70 NONAME ; ## + _ZTI15CExtJpegDecoder @ 71 NONAME ; ## + _ZTI15CExtJpegEncoder @ 72 NONAME ; ## + _ZTI16CVisualFrameImpl @ 73 NONAME ; ## + _ZTV12CVisualFrame @ 74 NONAME ; ## + _ZTV15CExtJpegDecoder @ 75 NONAME ; ## + _ZTV15CExtJpegEncoder @ 76 NONAME ; ## + _ZTV16CVisualFrameImpl @ 77 NONAME ; ## + _ZN15CExtJpegDecoder15ContinueConvertEP14TRequestStatus @ 78 NONAME + _ZN15CExtJpegDecoder7ConvertEP14TRequestStatusR10CFbsBitmapS3_i @ 79 NONAME + _ZN15CExtJpegDecoder7ConvertEP14TRequestStatusR10CFbsBitmapi @ 80 NONAME + diff -r 5752a19fdefe -r 08469e5bb63e imagingextensions/imageadaptationextensions/iclextjpegapi/extended_icl_jpeg_api.metaxml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/imagingextensions/imageadaptationextensions/iclextjpegapi/extended_icl_jpeg_api.metaxml Wed Sep 08 10:05:56 2010 +0530 @@ -0,0 +1,19 @@ + + + Extended ICL Jpeg API + Nokia specific extension to Symbian's JPEG, which provides certain memory efficient improvements(streaming) enocding/decoding and also some DCT domain based lossless(initial quality upkeeping) operations like overlaying, rotating, mirroring. + + c++ + imagingextensions + + + + + + + + + no + no + + diff -r 5752a19fdefe -r 08469e5bb63e imagingextensions/imageadaptationextensions/iclextjpegapi/group/IclExtJpegApi.mmp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/imagingextensions/imageadaptationextensions/iclextjpegapi/group/IclExtJpegApi.mmp Wed Sep 08 10:05:56 2010 +0530 @@ -0,0 +1,42 @@ +/* +* 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 file for IclExtJpegApi. +* +*/ + +#include +#include + +TARGET IclExtJpegApi.dll +CAPABILITY CAP_GENERAL_DLL +targettype DLL + +UID 0x1000008D 0x10204BF0 +VENDORID VID_DEFAULT + +SOURCEPATH ../src +SOURCE IclExtJpegApi.cpp +SOURCE IclExtJpegApiFrameImplV2.cpp + +USERINCLUDE ../inc +OS_LAYER_SYSTEMINCLUDE +SYSTEMINCLUDE /epoc32/include/ecom +SYSTEMINCLUDE /epoc32/include/icl + +LIBRARY euser.lib +LIBRARY ImageConversion.lib +LIBRARY ecom.lib +LIBRARY Jpegimageframeplugin.lib + +// End of file diff -r 5752a19fdefe -r 08469e5bb63e imagingextensions/imageadaptationextensions/iclextjpegapi/group/bld.inf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/imagingextensions/imageadaptationextensions/iclextjpegapi/group/bld.inf Wed Sep 08 10:05:56 2010 +0530 @@ -0,0 +1,31 @@ +/* +* Copyright (c) 2005-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" +* 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 information file for Extended ICL API. +* +*/ + +#include + +PRJ_PLATFORMS +DEFAULT + +PRJ_EXPORTS +../inc_plat/IclExtJpegApi.h OS_LAYER_PLATFORM_EXPORT_PATH(IclExtJpegApi.h) +../rom/IclExtJpegApi.iby CORE_OS_LAYER_IBY_EXPORT_PATH(IclExtJpegApi.iby) + +PRJ_MMPFILES +IclExtJpegApi.mmp + +// End of File + diff -r 5752a19fdefe -r 08469e5bb63e imagingextensions/imageadaptationextensions/iclextjpegapi/inc/IclExtJpegApiConst.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/imagingextensions/imageadaptationextensions/iclextjpegapi/inc/IclExtJpegApiConst.h Wed Sep 08 10:05:56 2010 +0530 @@ -0,0 +1,45 @@ +/* +* 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: Definition of constants for IclExtJpegApi +* +*/ + +#ifndef _ICLEXTJPEGAPICONST_ +#define _ICLEXTJPEGAPICONST_ + +//---------------------------------------------------------------------------- +// Common const definitions: +//---------------------------------------------------------------------------- +_LIT8( KJpgMimeType,"image/jpeg" ); +_LIT( KJpgFileExt,".jpg" ); + +const TInt KMinSwVersion = 64; +const TInt KMinHwVersion = 0; +const TInt KMaxSwVersion = 127; +const TInt KMaxHwVersion = 63; + +//---------------------------------------------------------------------------- +// V2 specific variations: +//---------------------------------------------------------------------------- + +const TUid KUidExtIclImageFrameFormat = { 0x11111111 }; + +//---------------------------------------------------------------------------- +// Initial version specific variations: +//---------------------------------------------------------------------------- + +#endif // _ICLEXTJPEGAPICONST_ + + +// End of File diff -r 5752a19fdefe -r 08469e5bb63e imagingextensions/imageadaptationextensions/iclextjpegapi/inc/IclExtJpegApiFrameImpl.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/imagingextensions/imageadaptationextensions/iclextjpegapi/inc/IclExtJpegApiFrameImpl.h Wed Sep 08 10:05:56 2010 +0530 @@ -0,0 +1,276 @@ +/* +* 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: Definition of TFrameFormatExt and CVisualFrameImpl +* +*/ + +#ifndef _ICLEXTJPEGAPIFRAMEIMPL_ +#define _ICLEXTJPEGAPIFRAMEIMPL_ + +#include +#include "IclExtJpegApiConst.h" + +class CVisualFrame::TFrameLayout; + +#include "imageframe.h" + +/** +* TFrameFormatExt +* @lib IclExtJpegApi.lib +* @since 3.2 +*/ +class TFrameFormatExt : public TFrameFormatBase + { + public: + + /** + * C++ default constructor. + */ + TFrameFormatExt( TInt aFormatCode ) : + TFrameFormatBase( KUidExtIclImageFrameFormat ), + iFormatCode( aFormatCode ) + { + Constructor(); + }; + + /** + * Duplicate + * @since 3.2 + * @return TFrameFormatExt + */ + TFrameFormatBase* DuplicateL() const + { + return new ( ELeave ) TFrameFormatExt( iFormatCode ); + }; + + /** + * Colour space + * @since 3.2 + * @return TUid + */ + TUid ColourSpace() const; + + /** + * Sampling + * @since 3.2 + * @return TUid + */ + TUid Sampling() const; + + /** + * Format code + * @since 3.2 + * @return TInt + */ + TInt FormatCode() const; + + /** + * Set colour space + * @since 3.2 + * @param aColourSpace + * @return void + */ + void SetColourSpace( TUid aColourSpace ); + + + protected: + + /** + * constructor. + */ + void Constructor(); + + protected: // Data + + // The image frame colour space + TUid iColourSpace; + // The frame sampling + TUid iSampling; + // The image frame format code which uniquely identifies all other parameters. + TInt iFormatCode; + + }; + + +/** +* CVisualFrameImpl +* @lib IclExtJpegApi.lib +* @since 3.2 +*/ +class CVisualFrameImpl : public CImageFrame + { + public: + + /** + * Two-phased constructor. + * @since 3.2 + * @param aBuffer A descriptor reference to buffer containing the image data. + * @param aDimension The dimensions of the corresponding image data. + * @param aFrameFormat The frame format of the corresponding image data. + */ + static CVisualFrameImpl* NewL( + TDes8& aBuffer, + const TSize& aDimension, + TInt aFrameFormat ); + + /** + * Two-phased constructor. + * @param aChunk An RChunk reference to buffer containing the image data. + * @param aSize The amount of image data in bytes. + * @param amaxSize The maximum size of the memory reserved in the chunk. + * @param aDataOffset The offset value specifying the location of the image + * data in the chunk. + * @param aDimension The dimensions of the corresponding image data. + * @param aFrameFormat The frame format of the corresponding image data. + */ + static CVisualFrameImpl* NewL( + RChunk& aChunk, + TInt aSize, + TInt aMaxSize, + TInt aDataOffset, + const TSize& aDimension, + TInt aFrameFormat ); + /** + * Two-phased constructor. + * @param aBuffer A descriptor reference to buffer containing the image data. + * @param aDimension The dimensions of the corresponding image data. + * @param aFrameLayout The layout of the image color components. + */ + static CVisualFrameImpl* NewL( + TDes8& aBuffer, + const TSize& aDimension, + TInt aFrameFormat, + const CVisualFrame::TFrameLayout& aFrameLayout ); + + /** + * Two-phased constructor. + * @param aChunk An RChunk reference to buffer containing the image data. + * @param aSize The amount of image data in bytes. + * @param aMaxSize The maximum size of the memory reserved in the chunk for + * the image data. + * @param aDimension The dimensions of the corresponding image data. + * @param aFrameFormat The frame format of the corresponding image data. + * @param aFrameLayout The layout of the image color components. TFrameLayout + * contains the scan line lengths and offsets for each component + * in planar YUV case + */ + static CVisualFrameImpl* NewL( + RChunk& aChunk, + TInt aSize, + TInt aMaxSize, + const TSize& aDimension, + TInt aFrameFormat, + const CVisualFrame::TFrameLayout& aFrameLayout ); + + static CVisualFrameImpl* NewL( const CImageFrame* aImageFrame ); + + /** + * Get image frame + * @since 3.2 + * @return CImageFrame + */ + CImageFrame* GetImageFrameL(); + + /** + * Returns a constant reference to the chunk containing + * the image data, if exists. + * @since 3.2 + * @return RChunk + */ + const RChunk& DataChunkL() const; + + /** + * Returns a descriptor pointer to the image data location, if exists + * @since 3.2 + * @return TPtr8 + */ + TPtr8 DataPtrL() const; + + /** + * Returns the dimensions of the image. + * @since 3.2 + * @return TSize + */ + TSize Dimension() const; + + /** + * Return the image data format. + * @since 3.2 + * @return TInt + */ + TInt FrameFormat2() const; + + /** + * Returns the offset of the image data for non-planar, + * single-component or compressed images. + * @since 3.2 + * @return TInt + */ + TInt DataOffset() const; + + /** + * Returns the amount of stored image data in bytes. + * @since 3.2 + * @return TInt + */ + TInt Size() const; + + /** + * Sets the amount of image data to the given value. + * Should be called when the image data amount is modified explicitly. + * @since 3.2 + * @param + * @return void + */ + void SetSizeL( TInt aSize ); + + /** + * Returns the maximum size of the memory space reserved for image data + * @since 3.2 + * @return TInt + */ + TInt MaxSize() const; + + /** + * Returns the storage type of the image data. + * @since 3.2 + * @return TInt + */ + TInt DataContainer() const; + + /** + * Returns the layout of the image data for planar compressed images. + * @since 3.2 + * @param + * @return CVisualFrame::TFrameLayout + */ + const CVisualFrame::TFrameLayout& FrameLayout2() const; + + /** + * Destructor. + */ + virtual ~CVisualFrameImpl(); + + private: // Data + + CVisualFrame::TFrameLayout iFrameLayout2; + + TInt iSize; + }; + + +#endif // _ICLEXTJPEGAPIFRAMEIMPL_ + + +// End of File diff -r 5752a19fdefe -r 08469e5bb63e imagingextensions/imageadaptationextensions/iclextjpegapi/inc_plat/IclExtJpegApi.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/imagingextensions/imageadaptationextensions/iclextjpegapi/inc_plat/IclExtJpegApi.h Wed Sep 08 10:05:56 2010 +0530 @@ -0,0 +1,1015 @@ +/* +* 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: Definition of CVisualFrame, CExtJpegDecoder and CExtJpegEncoder +* +*/ + +#ifndef _ICLEXTJPEGAPI_ +#define _ICLEXTJPEGAPI_ + +#include "imageconversion.h" +#include + +#include "iclexifimageframe.h" +const TInt KMaxNumberOfPlanes = KMaxPlanesInFrame; +const TUid KUidExtFormatJpeg = { 0 }; +const TUid KUidExtIclApiSupport = { 0 }; +const TInt KExtensionUID = 0x01010101; + +// FORWARD DECLARATIONS +class CVisualFrameImpl; + +// CLASS DECLARATION + +/** +* CVisualFrame +* @lib IclExtJpegApi.lib +* @since 3.2 +*/ +class CVisualFrame : public CBase + { + public: + + // TFrameLayout contains the scan line lengths and offsets for each component in planar YUV case + class TFrameLayout + { + public: + TInt iNumberOfPlanes; + TInt iScanLineLength[KMaxNumberOfPlanes]; + TInt iOffset[KMaxNumberOfPlanes]; + TInt iLength[KMaxNumberOfPlanes]; + TInt iMaxLength[KMaxNumberOfPlanes]; + }; + + enum TDataContainer + { + EInChunk, + EInDescriptor + }; + + enum TDataFormat + { + /* Copied from CCamera::TFormat: */ + + /** 8 bit greyscale values, 0=black, 255=white. */ + EFormatMonochrome = 0x0001,//+ + /** Packed RGB triplets, 4 bits per pixel with red in the least significant bits + and the 4 most significant bits unused. */ + EFormat16bitRGB444 = 0x0002,//+ + /** Packed RGB triplets, 5 bits per pixel for red and blue and 6 bits for green, + with red in the least significant bits. */ + EFormat16BitRGB565 = 0x0004,//+ + /** Packed RGB triplets, 8 bits per pixel with red in the least significant bits + and the 8 most significant bits unused. */ + EFormat32BitRGB888 = 0x0008,//+ + /** JFIF JPEG. */ + EFormatJpeg = 0x0010, + /** EXIF JPEG */ + EFormatExif = 0x0020, + /** CFbsBitmap object with display mode EColor4K. */ + EFormatFbsBitmapColor4K = 0x0040, + /** CFbsBitmap object with display mode EColor64K. */ + EFormatFbsBitmapColor64K = 0x0080, + /** CFbsBitmap object with display mode EColor16M. */ + EFormatFbsBitmapColor16M = 0x0100, + /** Implementation dependent. */ + EFormatUserDefined = 0x0200, + /** 4:2:0 format, 8 bits per sample, Y00Y01Y10Y11UV. */ + EFormatYUV420Interleaved = 0x0400,//+ + /** 4:2:0 format, 8 bits per sample, Y00Y01Y02Y03...U0...V0... */ + EFormatYUV420Planar = 0x0800,//+ + /** 4:2:2 format, 8 bits per sample, UY0VY1. */ + EFormatYUV422 = 0x1000,//+ + /** 4:2:2 format, 8 bits per sample, Y1VY0U. */ + EFormatYUV422Reversed = 0x2000,//+ + /** 4:4:4 format, 8 bits per sample, Y00U00V00 Y01U01V01... */ + EFormatYUV444 = 0x4000,//+ + /** 4:2:0 format, 8 bits per sample, Y00Y01Y02Y03...U0V0... */ + EFormatYUV420SemiPlanar = 0x8000,//+ + + /* Other formats: */ + + /** 4:2:2 format, 8 bits per sample, Y0Y1UV. */ + EFormatExtYUV422Interleaved = 0x00100000, + /** 4:2:2 format, 8 bits per sample, Y0Y1Y2...U0U1...V0V1. */ + EFormatExtYUV422Planar = 0x00200000, + /** 4:4:4 format, 8 bits per sample, Y0U0V0Y1U1V1. */ + EFormatExtYUV444Planar = 0x00400000, + /** DCT coefficients */ + EFormatExtDctCoeff = 0x00800000, + + }; + + public: // New functions + + /** + * Symbian C++ Two-phased constructor. + * @since 3.2 + * @param aBuffer A descriptor reference to buffer containing the image data. + * @param aDimension The dimensions of the corresponding image data. + * @param aFrameFormat The frame format of the corresponding image data. + * @return CVisualFrame* A pointer to frame object. + */ + IMPORT_C static CVisualFrame* NewL( + TDes8& aBuffer, + const TSize& aDimension, + TInt aFrameFormat ); + + /** + * Symbian C++ Two-phased constructor. + * @since 3.2 + * @param aChunk An RChunk reference to buffer containing the image data. + * @param aSize The amount of image data in bytes. + * @param amaxSize The maximum size of the memory reserved in the chunk. + * @param aDataOffset The offset value specifying the location of the image + * data in the chunk. + * @param aDimension The dimensions of the corresponding image data. + * @param aFrameFormat The frame format of the corresponding image data. + * @return CVisualFrame* A pointer to frame object. + */ + IMPORT_C static CVisualFrame* NewL( + RChunk& aChunk, + TInt aSize, + TInt aMaxSize, + TInt aDataOffset, + const TSize& aDimension, + TInt aFrameFormat ); + + /** + * Symbian C++ Two-phased constructor. + * @since 3.2 + * @param aBuffer A descriptor reference to buffer containing the image data. + * @param aDimension The dimensions of the corresponding image data. + * @param aFrameLayout The layout of the image color components. + * @return CVisualFrame* A pointer to frame object. + */ + IMPORT_C static CVisualFrame* NewL( + TDes8& aBuffer, + const TSize& aDimension, + TInt aFrameFormat, + const TFrameLayout& aFrameLayout ); + + /** + * Symbian C++ Two-phased constructor. + * @since 3.2 + * @param aChunk An RChunk reference to buffer containing the image data. + * @param aSize The amount of image data in bytes. + * @param aMaxSize The maximum size of the memory reserved in the chunk for + * the image data. + * @param aDimension The dimensions of the corresponding image data. + * @param aFrameFormat The frame format of the corresponding image data. + * @param aFrameLayout The layout of the image color components. TFrameLayout + * contains the scan line lengths and offsets for each component + * in planar YUV case + * @return CVisualFrame* A pointer to frame object. + */ + IMPORT_C static CVisualFrame* NewL( + RChunk& aChunk, + TInt aSize, + TInt aMaxSize, + const TSize& aDimension, + TInt aFrameFormat, + const TFrameLayout& aFrameLayout ); + + + /** + * Returns a constant reference to the chunk containing + * the image data, if exists. + * @since 3.2 + * @return RChunk + */ + IMPORT_C const RChunk& DataChunkL() const; + + /** + * Returns a descriptor pointer to the image data location, if exists + * @since 3.2 + * @return TPtr8 + */ + IMPORT_C TPtr8 DataPtrL() const; + + /** + * Returns the dimensions of the image. + * @since 3.2 + * @return TSize + */ + IMPORT_C TSize Dimension() const; + + /** + * Return the image data format. + * @since 3.2 + * @return TInt + */ + IMPORT_C TInt FrameFormat() const; + + /** + * Returns the offset of the image data for non-planar, + * single-component or compressed images. + * @since 3.2 + * @return TInt + */ + IMPORT_C TInt DataOffset() const; + + /** + * Returns the amount of stored image data in bytes. + * @since 3.2 + * @return TInt + */ + IMPORT_C TInt Size() const; + + /** + * Sets the amount of image data to the given value. + * Should be called when the image data amount is modified explicitly. + * @since 3.2 + * @return void + */ + IMPORT_C void SetSizeL( TInt aSize ); + + /** + * Returns the maximum size of the memory space reserved for image data + * @since 3.2 + * @return TInt + */ + IMPORT_C TInt MaxSize() const; + + /** + * Returns the storage type of the image data. + * @since 3.2 + * @return TDataContainer + */ + IMPORT_C TDataContainer DataContainer() const; + + /** + * Returns the layout of the image data for planar compressed images. + * @since 3.2 + * @return TFrameLayout + */ + IMPORT_C const TFrameLayout& FrameLayout() const; + + /** + * Destructor + */ + IMPORT_C virtual ~CVisualFrame(); + + /** + * Symbian C++ Two-phased constructor. + */ + IMPORT_C static CVisualFrame* NewL( const CImageFrame* aImageFrame ); + + /** + * Get image frame + * @since 3.2 + * @return CImageFrame + */ + IMPORT_C CImageFrame* GetImageFrameL(); + + + private: + + CVisualFrameImpl* iVisualFrameImpl; + + }; + + +// CLASS DECLARATION + +/** +* CExtJpegDecoder +* @lib IclExtJpegApi.lib +* @since 3.2 +*/ +class CExtJpegDecoder : public CJPEGImageFrameDecoder + { + public: + + enum TDecoderCapability + { + ECapNone = 0x0000, + ECapCropping = 0x0001, + ECapStreaming = 0x0002, + ECapRotation = 0x0004, + ECapFlipping = 0x0008, + ECapMirroring = 0x0010, + ECapDctDecoding = 0x0020, + ECapExifData = 0x0040 + }; + + enum TDecoderOperations + { + EEnd = 0x00010000, + ESupportedFormats = 0x00020000, + ECapabilities = 0x00040000, + EReadyForAsync = 0x00080000, + EConvert = 0x00100000, + EContinueConvert = 0x00200000 + }; + + enum TDecoderType + { + ESwImplementation = 0, + EHwImplementation + }; + + public: + + /** + * Symbian C++ Two-phased constructor. + * @since 3.2 + */ + IMPORT_C static CExtJpegDecoder* NewL(); + + + /** + * Creates and initializes CExtJpegDecoder + * @since 3.2 + * @param aFs A reference to a file server session to use. + * @param aSourceFilename The name of the Jpeg file to decode. + * @param aMIMEType The Jpeg MIME type for matching the decoder plugin. + * @param aOptions Decoder options defined in ICL. + * @return CExtJpegDecoder* A pointer to decoder object. + */ + IMPORT_C static CExtJpegDecoder* FileNewL( + RFs& aFs, + const TDesC& aSourceFilename, + const TDesC8& aMIMEType, + const TOptions aOptions = EOptionNone ); + + /** + * Creates and initializes CExtJpegDecoder + * @since 3.2 + * @param aFs A reference to a file server session to use. + * @param aSourceFilename The name of the Jpeg file to decode. + * @param aOptions Decoder options defined in ICL. + * @param aImageType The Jpeg image type. + * @param aImageSubType The Jpeg image subtype (Null UID). + * @param aDecoderUid The decoder plugin UID. + * @return CExtJpegDecoder* A pointer to decoder object. + */ + IMPORT_C static CExtJpegDecoder* FileNewL( + RFs& aFs, + const TDesC& aSourceFilename, + const TOptions aOptions = EOptionNone, + const TUid aImageType = KNullUid, + const TUid aImageSubType = KNullUid, + const TUid aDecoderUid = KNullUid ); + + /** + * Creates and initializes CExtJpegDecoder + * @since 3.2 + * @param aFs A reference to a file server session to use. + * @param aSourceData The descriptor reference for the Jpeg image data to decode. + * @param aMIMEType The Jpeg MIME type for matching the decoder plugin. + * @param aOptions Decoder options defined in ICL. + * @return CExtJpegDecoder* A pointer to decoder object. + */ + IMPORT_C static CExtJpegDecoder* DataNewL( + RFs& aFs, + const TDesC8& aSourceData, + const TDesC8& aMIMEType, + const TOptions aOptions = EOptionNone ); + /** + * Creates and initializes CExtJpegDecoder + * @since 3.2 + * @param aFs A reference to a file server session to use. + * @param aSourceData The descriptor reference for the Jpeg image data to decode. + * @param aOptions Decoder options defined in ICL. + * @param aImageType The Jpeg image type. + * @param aImageSubType The Jpeg image subtype (Null UID). + * @param aDecoderUid The decoder plugin UID. + * @return CExtJpegDecoder* A pointer to decoder object. + */ + IMPORT_C static CExtJpegDecoder* DataNewL( + RFs& aFs, + const TDesC8& aSourceData, + const TOptions aOptions = EOptionNone, + const TUid aImageType = KNullUid, + const TUid aImageSubType = KNullUid, + const TUid aDecoderUid = KNullUid ); + + /** + * Creates and initializes CExtJpegDecoder + * @since 3.2 + * @param aFs A reference to a file server session to use. + * @param aSourceData Pointer to the visual frame structure keeping + * the Jpeg image data to decode. + * @param aMIMEType The Jpeg MIME type for matching the decoder plugin. + * @param aOptions Decoder options defined in ICL. + * @return CExtJpegDecoder* A pointer to decoder object. + */ + IMPORT_C static CExtJpegDecoder* DataNewL( + RFs& aFs, + const CVisualFrame* aSourceData, + const TDesC8& aMIMEType, + const TOptions aOptions = EOptionNone ); + + /** + * Creates and initializes CExtJpegDecoder + * @since 3.2 + * @param aFs A reference to a file server session to use. + * @param aSourceData Pointer to the visual frame structure keeping + * the Jpeg image data to decode. + * @param aOptions Decoder options defined in ICL. + * @param aImageType The Jpeg image type. + * @param aImageSubType The Jpeg image subtype (Null UID). + * @param aDecoderUid The decoder plugin UID. + * @return CExtJpegDecoder* A pointer to decoder object. + */ + IMPORT_C static CExtJpegDecoder* DataNewL( + RFs& aFs, + const CVisualFrame* aSourceData, + const TOptions aOptions = EOptionNone, + const TUid aImageType = KNullUid, + const TUid aImageSubType = KNullUid, + const TUid aDecoderUid = KNullUid ); + + /** + * Destructor. + */ + IMPORT_C virtual ~CExtJpegDecoder(); + + /** + * Enables the use of cropping feature and specifies the cropping region. + * @since 3.2 + * @param aCropRect The rectangular cropping region that will be decoded. + * @return void + */ + IMPORT_C void SetCroppingL( TRect aCropRect ); + + /** + * Enables the use of streaming feature and retrieves the macroblock + * dimensions in the Jpeg data. + * @since 3.2 + * @param aMacroBlockSize The macroblock dimensions in the + * Jpeg image that is set by the decoder + * @return void + */ + IMPORT_C void SetStreamingL( TSize& aMacroBlockSize ); + + /** + * Enables the use of rotation feature and specifies the rotating degree. + * @since 3.2 + * @param aDegree The rotation degree. Can take any values between 1 and 359. + * @return void + */ + IMPORT_C void SetRotationL( TInt aDegree ); + + /** + * Enables the use of flipping feature. + * @since 3.2 + * @return void + */ + IMPORT_C void SetFlippingL(); + + /** + * Enables the use of mirroring feature. + * @since 3.2 + * @return void + */ + IMPORT_C void SetMirroringL(); + + /** + * SEnables the use of DCT decoding feature. + * @since 3.2 + * @return void + */ + IMPORT_C void SetDctDecodingL(); + + /** + * Asynchronous function for initiating the decoding + * @since 3.2 + * @param aRequestStatus The pointer to the status of the operation + * that is set by the decoder after it is completed. + * After a complete successful operation, the status + * is KErrNone. + * @param aDestinationFrame Pointer to the visual frame structure that is keeping + * the destination image data. The client should do the + * proper allocation of the destination location. + * @param aNoOfDecodedMBlocks Reference to the number of decoded macroblocks that is + * set by the decoder after the decoding is completed. + * @param aFrameNumber The frame index in the Jpeg image. + * @return void + */ + IMPORT_C void ConvertL( + TRequestStatus* aRequestStatus, + const CVisualFrame* aDestinationFrame, + TInt& aNoOfDecodedMBlocks, + TInt aFrameNumber = 0 ); + + /** + * Asynchronous function for initiating one of the iterations of streamed decoding. + * @since 3.2 + * @param aRequestStatus The pointer to the status of the operation + * that is set by the decoder after it is completed. + * After a complete successful operation, the status + * is KErrNone. + * @param aDestinationFrame Pointer to the visual frame structure that is keeping + * the destination image data. The client should do the + * proper allocation of the destination location. + * @param aNoOfDecodedMBlocks Reference to the number of decoded macroblocks that is + * set by the decoder after the decoding is completed. + * @param aFrameNumber The frame index in the Jpeg image. + * @return void + */ + IMPORT_C void ContinueConvertL( + TRequestStatus* aRequestStatus, + const CVisualFrame* aDestinationFrame, + TInt& aNoOfDecodedMBlocks, + TInt aFrameNumber = 0 ); + + /** + * Returns the destination (uncompressed) data formats that are supported by the decoder + * @since 3.2 + * @return TInt The supported destination (uncompressed) data formats. + * The value is a combination of the flags defined in + * CVisualFrame::TDataFormat. + */ + IMPORT_C TInt SupportedFormatsL(); + + /** + * Returns the Extended API features (capabilities) that are supported by the decoder. + * @since 3.2 + * @return TInt The supported Extended API features. + * The value is a combination of the flags defined in TDecoderCapabilities. + */ + IMPORT_C TInt CapabilitiesL(); + + /** + * Creates and initializes CExtJpegDecoder + * @since 3.2 + * @param aDecoderType Decoder implementation type: HW or SW. + * @param aFs A reference to a file server session to use. + * @param aSourceFilename The name of the Jpeg file to decode. + * @param aOptions Decoder options defined in ICL. + * @return CExtJpegDecoder* A pointer to decoder object. + */ + IMPORT_C static CExtJpegDecoder* FileNewL( + const TDecoderType aDecoderType, + RFs& aFs, + const TDesC& aSourceFilename, + const TOptions aOptions = EOptionNone ); + + /** + * Creates and initializes CExtJpegDecoder + * @since 3.2 + * @param aDecoderType Decoder implementation type: HW or SW. + * @param aFs A reference to a file server session to use. + * @param aSourceData The descriptor reference for the Jpeg image data to decode. + * @param aOptions Decoder options defined in ICL. + * @return CExtJpegDecoder* A pointer to decoder object. + */ + IMPORT_C static CExtJpegDecoder* DataNewL( + const TDecoderType aDecoderType, + RFs& aFs, + const TDesC8& aSourceData, + const TOptions aOptions = EOptionNone ); + + /** + * Creates and initializes CExtJpegDecoder + * @since 3.2 + * @param aDecoderType Decoder implementation type: HW or SW. + * @param aFs A reference to a file server session to use. + * @param aSourceData Pointer to the visual frame structure keeping + * the Jpeg image data to decode. + * @param aOptions Decoder options defined in ICL. + * @return CExtJpegDecoder* A pointer to decoder object. + */ + IMPORT_C static CExtJpegDecoder* DataNewL( + const TDecoderType aDecoderType, + RFs& aFs, + const CVisualFrame* aSourceData, + const TOptions aOptions = EOptionNone ); + + /** + * Convert + * @since 3.2 + * @param aRequestStatus The pointer to the status of the operation + * that is set by the decoder after it is completed. + * After a complete successful operation, the status + * is KErrNone. + * @param aDestination + * @param aFrameNumber The frame index in the Jpeg image. + * @return void + */ + IMPORT_C void Convert( TRequestStatus* aRequestStatus, + CFbsBitmap& aDestination, TInt aFrameNumber = 0); + + /** + * Convert + * @since 3.2 + * @param aRequestStatus The pointer to the status of the operation + * that is set by the decoder after it is completed. + * After a complete successful operation, the status + * is KErrNone. + * @param aDestination Bitmap destination + * @param aDestinationMask Bitmap destination mask + * @param aFrameNumber The frame index in the Jpeg image. + * @return void + */ + IMPORT_C void Convert( TRequestStatus* aRequestStatus, + CFbsBitmap& aDestination, + CFbsBitmap& aDestinationMask, + TInt aFrameNumber = 0 ); + + /** + * Continue convert + * @since 3.2 + * @param aRequestStatus The pointer to the status of the operation + * that is set by the decoder after it is completed. + * After a complete successful operation, the status + * is KErrNone. + * @return void + */ + IMPORT_C void ContinueConvert( TRequestStatus* aRequestStatus ); + + private: + + /** + * C++ default constructor. + */ + CExtJpegDecoder(); + + /** + * Get an uid by version range + * @since 3.2 + * @param aMinVersion + * @param aMaxVersion + * @return TUid + */ + static TUid GetUidByVersionRangeL( TInt aMinVersion, TInt aMaxVersion ); + + TBool iIsExtConvert; + + }; + + +// CLASS DECLARATION + +/** +* CExtJpegEncoder +* @lib IclExtJpegApi.lib +* @since 3.2 +*/ +class CExtJpegEncoder : public CJPEGImageFrameEncoder + { + public: + + enum TEncoderCapability + { + ECapNone = 0x0000, + ECapStreaming = 0x0001, + ECapBitmapOverlay = 0x0002, + ECapImageReplacing = 0x0004, + ECapBitmapReplacing = 0x0008, + ECapLosslessRotation = 0x0010, + ECapLosslessFlipping = 0x0020, + ECapLosslessMirroring = 0x0040, + ECapDctEncoding = 0x0080 + }; + + enum TEncoderOperations + { + EEnd = 0x00010000, + ESupportedFormats = 0x00020000, + ECapabilities = 0x00040000, + EReadyForAsync = 0x00080000, + EConvert = 0x00100000, + EContinueConvert = 0x00200000, + EDestVisualFrame = 0x00400000, + ENewDestData = 0x00800000, + EDestDataSize = 0x01000000 + }; + + enum TEncoderType + { + ESwImplementation = 0, + EHwImplementation + }; + + public: + + + /** + * Symbian C++ Two-phased constructor. + */ + IMPORT_C static CExtJpegEncoder* NewL(); + + /** + * Creates and initializes CExtJpegEncoder + * @since 3.2 + * @param aFs A reference to a file server session to use. + * @param aDestinationFilename The name of the destination Jpeg file. + * @param aMIMEType The Jpeg MIME type for matching the encoder plugin. + * @param aOptions Encoder options defined in ICL. + * @return CExtJpegEncoder* A pointer to encoder object. + */ + IMPORT_C static CExtJpegEncoder* FileNewL( + RFs& aFs, + const TDesC& aDestinationFilename, + const TDesC8& aMIMEType, + const TOptions aOptions = EOptionNone ); + + /** + * Creates and initializes CExtJpegEncoder + * @param aFs A reference to a file server session to use. + * @param aDestinationFilename The name of the destination Jpeg file. + * @param aOptions Encoder options defined in ICL. + * @param aImageT The Jpeg image type. + * @param aImageSubType The Jpeg image subtype (Null UID). + * @param aEncoderUid The encoder plugin UID. + * @return CExtJpegEncoder* A pointer to encoder object. + */ + IMPORT_C static CExtJpegEncoder* FileNewL( + RFs& aFs, + const TDesC& aDestinationFilename, + const TOptions aOptions = EOptionNone, + const TUid aImageType = KNullUid, + const TUid aImageSubType = KNullUid, + const TUid aEncoderUid = KNullUid ); + + /** + * Creates and initializes CExtJpegEncoder + * @param aDestinationData Pointer reference to the destination + * Jpeg data location that will be allocated by the encoder. + * @param aMIMEType The Jpeg MIME type for matching the encoder plugin. + * @param aOptions Encoder options defined in ICL. + * @return CExtJpegEncoder* A pointer to encoder object. + */ + IMPORT_C static CExtJpegEncoder* DataNewL( + HBufC8*& aDestinationData, + const TDesC8& aMIMEType, + const TOptions aOptions = EOptionNone); + /** + * Creates and initializes CExtJpegEncoder + * @param aDestinationData Pointer reference to the destination + * Jpeg data location that will be allocated by the encoder. + * @param aOptions Encoder options defined in ICL. + * @param aImageType The Jpeg image type. + * @param aImageSubType The Jpeg image subtype (Null UID). + * @param aEncoderUid The encoder plugin UID. + * @return CExtJpegEncoder* A pointer to encoder object. + */ + IMPORT_C static CExtJpegEncoder* DataNewL( + HBufC8*& aDestinationData, + const TOptions aOptions = EOptionNone, + const TUid aImageType = KNullUid, + const TUid aImageSubType = KNullUid, + const TUid aEncoderUid = KNullUid); + /** + * Creates and initializes CExtJpegEncoder + * @param aDestinationData Pointer to the visual frame structure keeping the destination + * Jpeg data allocated with maximum size by the client. + * @param aMIMEType The Jpeg MIME type for matching the encoder plugin. + * @param aOptions Encoder options defined in ICL. + * @return CExtJpegEncoder* A pointer to encoder object. + */ + IMPORT_C static CExtJpegEncoder* DataNewL( + const CVisualFrame* aDestinationData, + const TDesC8& aMIMEType, + const TOptions aOptions = EOptionNone); + /** + * Creates and initializes CExtJpegEncoder + * @param aDestinationData Pointer to the visual frame structure keeping the destination + * Jpeg data allocated with maximum size by the client. + * @param aOptions Encoder options defined in ICL. + * @param aImageType The Jpeg image type. + * @param aImageSubType The Jpeg image subtype (Null UID). + * @param aEncoderUid The encoder plugin UID. + * @return CExtJpegEncoder* A pointer to encoder object. + */ + IMPORT_C static CExtJpegEncoder* DataNewL( + const CVisualFrame* aDestinationData, + const TOptions aOptions = EOptionNone, + const TUid aImageType = KNullUid, + const TUid aImageSubType = KNullUid, + const TUid aEncoderUid = KNullUid); + + /** + * Destructor. + */ + IMPORT_C virtual ~CExtJpegEncoder(); + + /** + * Enables the use of streaming feature and retrieves the + * macroblock dimensions in the Jpeg data. + * @since 3.2 + * @param aMacroBlockSize The macroblock dimensions in the Jpeg + * image that is set by the encoder. + * @param aFrameImageData The pointer to the destination Jpeg image data structure. + * @return void + */ + IMPORT_C void SetStreamingL( TSize& aMacroBlockSize, + const CFrameImageData* aFrameImageData= NULL ); + + /** + * Enables the use of replacing feature, where the given image + * is replaced starting from the specified up-left corner point. + * @since 3.2 + * @param aReplaceImage The image data that will be replaced. + * @param aReplacePoint The up-left corner point of the replacing region. + * @return void + */ + IMPORT_C void SetImageReplaceL( const CVisualFrame* aReplaceImage, TPoint aReplacePoint ); + + /** + * Enables the use of replacing feature, where the given bitmap + * is replaced starting from the specified up-left corner point. + * @since 3.2 + * @param aReplaceBitmap The bitmap that will be replaced. + * @param aReplacePoint The up-left corner point of the replacing region. + * @return void + */ + IMPORT_C void SetBitmapReplaceL( const CFbsBitmap& aReplaceBitmap, TPoint aReplacePoint ); + + /** + * Enables the use of overlay feature, where the given bitmap + * is overlayed transparently based on the given alpha value + * starting from the specified up-left corner point. + * @since 3.2 + * @param aOverlayBitmap The bitmap that will be overlayed. + * @param aAlphaValue The alpha value for the transparency of the overlayed bitmap. + * @param aOverlayPoint The up-left corner point of the overlay region. + * @return void + */ + IMPORT_C void SetBitmapOverlayL( const CFbsBitmap& aOverlayBitmap, + TUint aAlphaValue, TPoint aOverlayPoint ); + + /** + * Enables the use of lossless rotation feature and specifies the rotating degree. + * @since 3.2 + * @param aDegree The rotation degree. Can take any values between 1 and 359. + * @return void + */ + IMPORT_C void SetLosslessRotationL( TInt aDegree ); + + /** + * Enables the use of lossless flipping feature. + * @since 3.2 + * @return void + */ + IMPORT_C void SetLosslessFlippingL(); + + /** + * SEnables the use of lossless mirroring feature. + * @since 3.2 + * @return void + */ + IMPORT_C void SetLosslessMirroringL(); + + /** + * Enables the use of DCT encoding feature. + * @since 3.2 + * @return void + */ + IMPORT_C void SetDctEncodingL(); + + /** + * Provides a new visual frame structure for the + * destination data replacing any previously delivered ones. + * All the operations coming after this function call should + * use the provided structure. + * @since 3.2 + * @param aDestinationData The new visual frame structure for the destination data. + * @return void + */ + IMPORT_C void ProvideNewDestDataL( const CVisualFrame* aDestinationData ); + + /** + * Asynchronous function for initiating the encoding. + * @since 3.2 + * @param aRequestStatus The pointer to the status of the operation + * that is set by the encoder after it is completed. + * After a complete successful operation, the status + * is KErrNone. + * @param aSourceFrame Pointer to the visual frame structure that is keeping + * the source image data. In streaming case, contains a + * part of the uncompressed image data at the beginning. + * @param aNoOfEncodedMBlocks Reference to the number of encoded macroblocks that is + * set by the encoder after the encoding is completed. + * @param aFrameImageData Pointer to optional frame image data structure defined in ICL. + * @return void + */ + IMPORT_C void ConvertL( + TRequestStatus* aRequestStatus, + const CVisualFrame* aSourceFrame, + TInt& aNoOfEncodedMBlocks, + const CFrameImageData* aFrameImageData = NULL ); + + /** + * Asynchronous function for initiating one of the iterations of streamed encoding. + * @since 3.2 + * @param aRequestStatus The pointer to the status of the operation + * that is set by the encoder after it is completed. + * After a complete successful operation, the status + * is KErrNone. + * @param aSourceFrame Pointer to the visual frame structure that is keeping + * the source image data. In streaming case, contains a + * part of the uncompressed image data at the beginning. + * @param aNoOfEncodedMBlocks Reference to the number of encoded macroblocks that is + * set by the encoder after the encoding is completed. + * @return + */ + IMPORT_C void ContinueConvertL( + TRequestStatus* aRequestStatus, + const CVisualFrame* aSourceFrame, + TInt& aNoOfEncodedMBlocks ); + + /** + * Returns the source (uncompressed) data formats that are supported by the encoder. + * @since 3.2 + * @return TInt The supported source (uncompressed) data formats. + * The value is a combination of the flags defined + * in CVisualFrame::TDataFormat. + */ + IMPORT_C TInt SupportedFormatsL(); + + /** + * Returns the Extended API features (capabilities) that are supported by the encoder. + * @since 3.2 + * @return TInt The supported Extended API features. + * The value is a combination of the flags defined + * in TEncoderCapabilities. + */ + IMPORT_C TInt CapabilitiesL(); + + /** + * Creates and initializes CExtJpegEncoder + * @since 3.2 + * @param aEncoderType Encoder implementation type: HW or SW. + * @param aFs A reference to a file server session to use. + * @param aDestinationFilename The name of the destination Jpeg file. + * @param aOptions Encoder options defined in ICL. + * @return CExtJpegEncoder* A pointer to encoder object. + */ + IMPORT_C static CExtJpegEncoder* FileNewL( + const TEncoderType aEncoderType, + RFs& aFs, + const TDesC& aDestinationFilename, + const TOptions aOptions = EOptionNone ); + + /** + * Creates and initializes CExtJpegEncoder + * @since 3.2 + * @param aEncoderType Encoder implementation type: HW or SW. + * @param aDestinationData Pointer reference to the destination Jpeg + * data location that will be allocated by the encoder. + * @param aOptions Encoder options defined in ICL. + * @return CExtJpegEncoder* A pointer to encoder object. + */ + IMPORT_C static CExtJpegEncoder* DataNewL( + const TEncoderType aEncoderType, + HBufC8*& aDestinationData, + const TOptions aOptions = EOptionNone ); + /** + * Creates and initializes CExtJpegEncoder + * @since 3.2 + * @param aEncoderType Encoder implementation type: HW or SW. + * @param aDestinationData Pointer to the visual frame structure keeping the + * destination Jpeg data allocated with maximum size by the client. + * @param aOptions Encoder options defined in ICL. + * @return CExtJpegEncoder* A pointer to encoder object. + */ + IMPORT_C static CExtJpegEncoder* DataNewL( + const TEncoderType aEncoderType, + const CVisualFrame* aDestinationData, + const TOptions aOptions = EOptionNone ); + + /** + * Returns the actual destination buffer size + * @since 3.2 + * @return TInt The actual destination buffer size required. + * -1 means the codec is not able to determine the required buffer size. + */ + IMPORT_C TInt GetDestinationDataSizeL(); + + + private: + + /** + * C++ default constructor. + */ + CExtJpegEncoder(); + + /** + * Get an uid by version range + * @since 3.2 + * @param aMinVersion + * @param aMaxVersion + * @return TUid + */ + static TUid GetUidByVersionRangeL( TInt aMinVersion, TInt aMaxVersion ); + + }; + +#endif // _ICLEXTJPEGAPI_ + +// End of File diff -r 5752a19fdefe -r 08469e5bb63e imagingextensions/imageadaptationextensions/iclextjpegapi/rom/IclExtJpegApi.iby --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/imagingextensions/imageadaptationextensions/iclextjpegapi/rom/IclExtJpegApi.iby Wed Sep 08 10:05:56 2010 +0530 @@ -0,0 +1,25 @@ +/* +* Copyright (c) 2002-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: Image description file for project IclExtJpegApi +* +*/ + + +#ifndef __ICLEXTJPEGAPI_IBY +#define __ICLEXTJPEGAPI_IBY + +//ExifLib +file=ABI_DIR\BUILD_DIR\IclExtJpegApi.dll SHARED_LIB_DIR\IclExtJpegApi.dll + +#endif //__ICLEXTJPEGAPI_IBY diff -r 5752a19fdefe -r 08469e5bb63e imagingextensions/imageadaptationextensions/iclextjpegapi/src/IclExtJpegApi.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/imagingextensions/imageadaptationextensions/iclextjpegapi/src/IclExtJpegApi.cpp Wed Sep 08 10:05:56 2010 +0530 @@ -0,0 +1,1296 @@ +/* +* Copyright (c) 2006-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: Implementation of CVisualFrame, CExtJpegDecoder and CExtJpegEncoder +* +*/ + +// INCLUDE FILES +#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS +#include +#endif +#include "IclExtJpegApi.h" +#include "IclExtJpegApiFrameImpl.h" + + +/*****************************************************/ +/* Visual Frame Data Structure in Extended ICL API */ +/*****************************************************/ + +// --------------------------------------------------------- +// CVisualFrame* CVisualFrame::NewL +// Two-phased constructor. +// --------------------------------------------------------- +// +EXPORT_C CVisualFrame* CVisualFrame::NewL( + TDes8& aBuffer, + const TSize& aDimension, + TInt aFrameFormat ) + { + + CVisualFrame* self = new ( ELeave ) CVisualFrame(); + CleanupStack::PushL( self ); + self->iVisualFrameImpl = CVisualFrameImpl::NewL( aBuffer, aDimension, aFrameFormat ); + CleanupStack::Pop( self ); + + return self; + } + +// --------------------------------------------------------- +// CVisualFrame* CVisualFrame::NewL +// Two-phased constructor. +// --------------------------------------------------------- +// +EXPORT_C CVisualFrame* CVisualFrame::NewL( + RChunk& aChunk, + TInt aSize, + TInt aMaxSize, + TInt aDataOffset, + const TSize& aDimension, + TInt aFrameFormat ) + { + CVisualFrame* self = new ( ELeave ) CVisualFrame(); + CleanupStack::PushL( self ); + self->iVisualFrameImpl = CVisualFrameImpl::NewL( aChunk, aSize, aMaxSize, + aDataOffset, aDimension, aFrameFormat ); + CleanupStack::Pop( self ); + + return self; + } + +// --------------------------------------------------------- +// CVisualFrame* CVisualFrame::NewL +// Two-phased constructor. +// --------------------------------------------------------- +// +EXPORT_C CVisualFrame* CVisualFrame::NewL( + TDes8& aBuffer, + const TSize& aDimension, + TInt aFrameFormat, + const TFrameLayout& aFrameLayout ) + { + CVisualFrame* self = new ( ELeave ) CVisualFrame(); + CleanupStack::PushL( self ); + self->iVisualFrameImpl = CVisualFrameImpl::NewL( aBuffer, aDimension, + aFrameFormat, aFrameLayout ); + CleanupStack::Pop( self ); + + return self; + } + +// --------------------------------------------------------- +// CVisualFrame* CVisualFrame::NewL +// Two-phased constructor. +// --------------------------------------------------------- +// +EXPORT_C CVisualFrame* CVisualFrame::NewL( + RChunk& aChunk, + TInt aSize, + TInt aMaxSize, + const TSize& aDimension, + TInt aFrameFormat, + const TFrameLayout& aFrameLayout ) + { + CVisualFrame* self = new ( ELeave ) CVisualFrame(); + CleanupStack::PushL( self ); + self->iVisualFrameImpl = CVisualFrameImpl::NewL( aChunk, aSize, aMaxSize, + aDimension, aFrameFormat, + aFrameLayout ); + CleanupStack::Pop( self ); + + return self; + } + +// ---------------------------------------------------------- +// CVisualFrame::DataChunkL +// ---------------------------------------------------------- +// +EXPORT_C const RChunk& CVisualFrame::DataChunkL() const + { + return iVisualFrameImpl->DataChunkL(); + } + +// ---------------------------------------------------------- +// CVisualFrame::DataPtrL +// ---------------------------------------------------------- +// +EXPORT_C TPtr8 CVisualFrame::DataPtrL() const + { + return iVisualFrameImpl->DataPtrL(); + } + +// ---------------------------------------------------------- +// CVisualFrame::Dimension +// ---------------------------------------------------------- +// +EXPORT_C TSize CVisualFrame::Dimension() const + { + return iVisualFrameImpl->Dimension(); + } + +// ---------------------------------------------------------- +// CVisualFrame::FrameFormat +// ---------------------------------------------------------- +// +EXPORT_C TInt CVisualFrame::FrameFormat() const + { + return iVisualFrameImpl->FrameFormat2(); + } + +// ---------------------------------------------------------- +// CVisualFrame::DataOffset +// ---------------------------------------------------------- +// +EXPORT_C TInt CVisualFrame::DataOffset() const + { + return iVisualFrameImpl->DataOffset(); + } + +// ---------------------------------------------------------- +// CVisualFrame::Size +// ---------------------------------------------------------- +// +EXPORT_C TInt CVisualFrame::Size() const + { + return iVisualFrameImpl->Size(); + } + +// ---------------------------------------------------------- +// CVisualFrame::SetSizeL +// ---------------------------------------------------------- +// +EXPORT_C void CVisualFrame::SetSizeL( TInt aSize ) + { + iVisualFrameImpl->SetSizeL( aSize ); + } + +// ---------------------------------------------------------- +// CVisualFrame::MaxSize +// ---------------------------------------------------------- +// +EXPORT_C TInt CVisualFrame::MaxSize() const + { + return iVisualFrameImpl->MaxSize(); + } + +// ---------------------------------------------------------- +// CVisualFrame::DataContainer +// ---------------------------------------------------------- +// +EXPORT_C CVisualFrame::TDataContainer CVisualFrame::DataContainer() const + { + return ( TDataContainer )iVisualFrameImpl->DataContainer(); + } + +// ---------------------------------------------------------- +// CVisualFrame::FrameLayout +// ---------------------------------------------------------- +// +EXPORT_C const CVisualFrame::TFrameLayout& CVisualFrame::FrameLayout() const + { + return iVisualFrameImpl->FrameLayout2(); + } + +// ---------------------------------------------------------- +// CVisualFrame::~CVisualFrame +// Destructor +// ---------------------------------------------------------- +// +EXPORT_C CVisualFrame::~CVisualFrame() + { + delete iVisualFrameImpl; + } + +// --------------------------------------------------------- +// CVisualFrame* CVisualFrame::NewL +// Two-phased constructor. +// --------------------------------------------------------- +// +EXPORT_C CVisualFrame* CVisualFrame::NewL( const CImageFrame* aImageFrame ) + { + CVisualFrame* self = new ( ELeave ) CVisualFrame(); + CleanupStack::PushL( self ); + self->iVisualFrameImpl = CVisualFrameImpl::NewL( aImageFrame ); + CleanupStack::Pop( self ); + + return self; + } + +// ---------------------------------------------------------- +// CVisualFrame::GetImageFrameL +// ---------------------------------------------------------- +// +EXPORT_C CImageFrame* CVisualFrame::GetImageFrameL() + { + return iVisualFrameImpl->GetImageFrameL(); + } + + +/*****************************************************/ +/* Extended ICL Jpeg Decoder API */ +/*****************************************************/ + +// --------------------------------------------------------- +// CExtJpegDecoder* CExtJpegDecoder::NewL +// Two-phased constructor. +// --------------------------------------------------------- +// +EXPORT_C CExtJpegDecoder* CExtJpegDecoder::NewL() + { + return new (ELeave) CExtJpegDecoder(); + } + +// --------------------------------------------------------- +// CExtJpegDecoder* CExtJpegDecoder::FileNewL +// Creates, initializes and returns a pointer to an object of +// class CExtJpegDecoder +// --------------------------------------------------------- +// +EXPORT_C CExtJpegDecoder* CExtJpegDecoder::FileNewL( + RFs& aFs, const TDesC& aSourceFilename, + const TDesC8& aMIMEType, + const TOptions aOptions ) + { + CExtJpegDecoder* dec = reinterpret_cast( + CImageDecoder::FileNewL( aFs, aSourceFilename, + aMIMEType, aOptions ) ); + CleanupStack::PushL( dec ); + if ( dec->CapabilitiesL() < ECapNone ) + { + User::Leave( KErrNotFound ); + } + CleanupStack::Pop(); + return dec; + } + +// --------------------------------------------------------- +// CExtJpegDecoder* CExtJpegDecoder::FileNewL +// Creates, initializes and returns a pointer to an object of +// class CExtJpegDecoder +// --------------------------------------------------------- +// +EXPORT_C CExtJpegDecoder* CExtJpegDecoder::FileNewL( + RFs& aFs, + const TDesC& aSourceFilename, + const TOptions aOptions, + const TUid aImageType, + const TUid aImageSubType, + const TUid aDecoderUid ) + { + CExtJpegDecoder* dec = reinterpret_cast( + CImageDecoder::FileNewL( aFs, aSourceFilename, aOptions, + aImageType, aImageSubType, aDecoderUid ) ); + CleanupStack::PushL( dec ); + if ( dec->CapabilitiesL() < ECapNone ) + { + User::Leave( KErrNotFound ); + } + CleanupStack::Pop(); + return dec; + } + +// --------------------------------------------------------- +// CExtJpegDecoder* CExtJpegDecoder::DataNewL +// Creates, initializes and returns a pointer to an object of +// class CExtJpegDecoder +// --------------------------------------------------------- +// +EXPORT_C CExtJpegDecoder* CExtJpegDecoder::DataNewL( + RFs& aFs, + const TDesC8& aSourceData, + const TDesC8& aMIMEType, + const TOptions aOptions ) + { + CExtJpegDecoder* dec = reinterpret_cast( + CImageDecoder::DataNewL( aFs, aSourceData, + aMIMEType, aOptions ) ); + CleanupStack::PushL( dec ); + if ( dec->CapabilitiesL() < ECapNone ) + { + User::Leave( KErrNotFound ); + } + CleanupStack::Pop(); + return dec; + } + +// --------------------------------------------------------- +// CExtJpegDecoder* CExtJpegDecoder::DataNewL +// Creates, initializes and returns a pointer to an object of +// class CExtJpegDecoder +// --------------------------------------------------------- +// +EXPORT_C CExtJpegDecoder* CExtJpegDecoder::DataNewL( + RFs& aFs, + const TDesC8& aSourceData, + const TOptions aOptions, + const TUid aImageType, + const TUid aImageSubType, + const TUid aDecoderUid ) + { + CExtJpegDecoder* dec = reinterpret_cast( + CImageDecoder::DataNewL( aFs, aSourceData, aOptions, + aImageType, aImageSubType, aDecoderUid ) ); + CleanupStack::PushL( dec ); + if ( dec->CapabilitiesL() < ECapNone ) + { + User::Leave( KErrNotFound ); + } + CleanupStack::Pop(); + return dec; + } + +// --------------------------------------------------------- +// CExtJpegDecoder* CExtJpegDecoder::DataNewL +// Creates, initializes and returns a pointer to an object of +// class CExtJpegDecoder +// --------------------------------------------------------- +// +EXPORT_C CExtJpegDecoder* CExtJpegDecoder::DataNewL( + RFs& aFs, + const CVisualFrame* aSourceData, + const TDesC8& aMIMEType, + const TOptions aOptions ) + { + + TUint8* sourcePtr = NULL; + CVisualFrame* sourceDataFrame = const_cast( aSourceData ); + if ( sourceDataFrame->DataContainer() == CVisualFrame::EInChunk ) + { + sourcePtr = sourceDataFrame->DataChunkL().Base() + sourceDataFrame->DataOffset(); + } + else if ( sourceDataFrame->DataContainer() == CVisualFrame::EInDescriptor ) + { + sourcePtr = const_cast( sourceDataFrame->DataPtrL().Ptr() ) + + sourceDataFrame->DataOffset(); + } + else + { + User::Leave( KErrArgument ); + } + TPtrC8 sourceData( sourcePtr, sourceDataFrame->Size() ); + CExtJpegDecoder* dec = reinterpret_cast( + CImageDecoder::DataNewL( aFs, sourceData, + aMIMEType, aOptions ) ); + CleanupStack::PushL( dec ); + if ( dec->CapabilitiesL() < ECapNone ) + { + User::Leave( KErrNotFound ); + } + CleanupStack::Pop(); + return dec; + } + +// --------------------------------------------------------- +// CExtJpegDecoder* CExtJpegDecoder::DataNewL +// Creates, initializes and returns a pointer to an object of +// class CExtJpegDecoder +// --------------------------------------------------------- +// +EXPORT_C CExtJpegDecoder* CExtJpegDecoder::DataNewL( + RFs& aFs, + const CVisualFrame* aSourceData, + const TOptions aOptions, + const TUid aImageType, + const TUid aImageSubType, + const TUid aDecoderUid ) + { + TUint8* sourcePtr = NULL; + CVisualFrame* sourceDataFrame = const_cast( aSourceData ); + if ( sourceDataFrame->DataContainer() == CVisualFrame::EInChunk ) + { + sourcePtr = sourceDataFrame->DataChunkL().Base() + sourceDataFrame->DataOffset(); + } + else if ( aSourceData->DataContainer() == CVisualFrame::EInDescriptor ) + { + sourcePtr = const_cast( sourceDataFrame->DataPtrL().Ptr() ) + + sourceDataFrame->DataOffset(); + } + else + { + User::Leave( KErrArgument ); + } + + TPtrC8 sourceData( sourcePtr, sourceDataFrame->Size() ); + CExtJpegDecoder* dec = reinterpret_cast( + CImageDecoder::DataNewL( aFs, sourceData, aOptions, + aImageType, aImageSubType, aDecoderUid ) ); + CleanupStack::PushL( dec ); + if ( dec->CapabilitiesL() < ECapNone ) + { + User::Leave( KErrNotFound ); + } + CleanupStack::Pop(); + return dec; + } + +// ---------------------------------------------------------- +// CExtJpegDecoder::~CExtJpegDecoder +// Destructor +// ---------------------------------------------------------- +// +EXPORT_C CExtJpegDecoder::~CExtJpegDecoder() + { + } + +// ---------------------------------------------------------- +// CExtJpegDecoder::SetCroppingL +// ---------------------------------------------------------- +// +EXPORT_C void CExtJpegDecoder::SetCroppingL( TRect aCropRect ) + { + CustomSyncL( KExtensionUID ); + CustomSyncL( ECapCropping ); + CustomSyncL( reinterpret_cast( &aCropRect ) ); + CustomSyncL( EEnd ); + } + +// ---------------------------------------------------------- +// CExtJpegDecoder::SetStreamingL +// ---------------------------------------------------------- +// +EXPORT_C void CExtJpegDecoder::SetStreamingL( TSize& aMacroBlockSize ) + { + CustomSyncL( KExtensionUID ); + CustomSyncL( ECapStreaming ); + CustomSyncL( reinterpret_cast( &aMacroBlockSize ) ); + CustomSyncL( EEnd ); + } + +// ---------------------------------------------------------- +// CExtJpegDecoder::SetRotationL +// ---------------------------------------------------------- +// +EXPORT_C void CExtJpegDecoder::SetRotationL( TInt aDegree ) + { + CustomSyncL( KExtensionUID ); + CustomSyncL( ECapRotation ); + CustomSyncL( aDegree ); + CustomSyncL( EEnd ); + } + +// ---------------------------------------------------------- +// CExtJpegDecoder::SetFlippingL +// ---------------------------------------------------------- +// +EXPORT_C void CExtJpegDecoder::SetFlippingL() + { + CustomSyncL( KExtensionUID ); + CustomSyncL( ECapFlipping ); + CustomSyncL( EEnd ); + } + +// ---------------------------------------------------------- +// CExtJpegDecoder::SetMirroringL +// ---------------------------------------------------------- +// +EXPORT_C void CExtJpegDecoder::SetMirroringL() + { + CustomSyncL( KExtensionUID ); + CustomSyncL( ECapMirroring ); + CustomSyncL( EEnd ); + } + +// ---------------------------------------------------------- +// CExtJpegDecoder::SetDctDecodingL +// ---------------------------------------------------------- +// +EXPORT_C void CExtJpegDecoder::SetDctDecodingL() + { + CustomSyncL( KExtensionUID ); + CustomSyncL( ECapDctDecoding ); + CustomSyncL( EEnd ); + } + +// ---------------------------------------------------------- +// CExtJpegDecoder::ConvertL +// ---------------------------------------------------------- +// +EXPORT_C void CExtJpegDecoder::ConvertL( + TRequestStatus* aRequestStatus, + const CVisualFrame* aDestinationFrame, + TInt& aNoOfDecodedMBlocks, + TInt aFrameNumber ) + { + iIsExtConvert = ETrue; + CustomSyncL( KExtensionUID ); + CustomSyncL( EConvert ); + CustomSyncL( reinterpret_cast( aDestinationFrame ) ); + CustomSyncL( reinterpret_cast( &aNoOfDecodedMBlocks ) ); + CustomSyncL( aFrameNumber ); + CustomSyncL( EReadyForAsync ); + CustomAsync( aRequestStatus, 0 ); + } + +// ---------------------------------------------------------- +// CExtJpegDecoder::ContinueConvertL +// ---------------------------------------------------------- +// +EXPORT_C void CExtJpegDecoder::ContinueConvertL( + TRequestStatus* aRequestStatus, + const CVisualFrame* aDestinationFrame, + TInt& aNoOfDecodedMBlocks, + TInt aFrameNumber ) + { + iIsExtConvert = ETrue; + CustomSyncL( KExtensionUID ); + CustomSyncL( EContinueConvert ); + CustomSyncL( reinterpret_cast( aDestinationFrame ) ); + CustomSyncL( reinterpret_cast( &aNoOfDecodedMBlocks ) ); + CustomSyncL( aFrameNumber ); + CustomSyncL( EReadyForAsync ); + CustomAsync( aRequestStatus, 0 ); + } + +// ---------------------------------------------------------- +// CExtJpegDecoder::SupportedFormatsL +// ---------------------------------------------------------- +// +EXPORT_C TInt CExtJpegDecoder::SupportedFormatsL() + { + CustomSyncL( KExtensionUID ); + CustomSyncL( ESupportedFormats ); + TInt retVal = KErrNotFound; + CustomSyncL( reinterpret_cast( &retVal ) ); + CustomSyncL( EEnd ); + return retVal; + } + +// ---------------------------------------------------------- +// CExtJpegDecoder::CapabilitiesL +// ---------------------------------------------------------- +// +EXPORT_C TInt CExtJpegDecoder::CapabilitiesL() + { + CustomSyncL( KExtensionUID ); + CustomSyncL( ECapabilities ); + TInt retVal = KErrNotFound; + CustomSyncL( reinterpret_cast( &retVal ) ); + CustomSyncL( EEnd ); + return retVal; + } + +// ---------------------------------------------------------- +// CExtJpegDecoder::CExtJpegDecoder +// ---------------------------------------------------------- +// +CExtJpegDecoder::CExtJpegDecoder() : CJPEGImageFrameDecoder() + { + } + +// ---------------------------------------------------------- +// CExtJpegDecoder::Convert +// ---------------------------------------------------------- +// +EXPORT_C void CExtJpegDecoder::Convert( TRequestStatus* aRequestStatus, + CFbsBitmap& aDestination, TInt aFrameNumber ) + { + iIsExtConvert = EFalse; + CImageDecoder::Convert( aRequestStatus, aDestination, aFrameNumber ); + } + +// ---------------------------------------------------------- +// CExtJpegDecoder::Convert +// ---------------------------------------------------------- +// +EXPORT_C void CExtJpegDecoder::Convert( TRequestStatus* aRequestStatus, + CFbsBitmap& aDestination, + CFbsBitmap& aDestinationMask, TInt aFrameNumber ) + { + iIsExtConvert = EFalse; + CImageDecoder::Convert( aRequestStatus, aDestination, aDestinationMask, aFrameNumber ); + } + +// ---------------------------------------------------------- +// CExtJpegDecoder::ContinueConvert +// ---------------------------------------------------------- +// +EXPORT_C void CExtJpegDecoder::ContinueConvert( TRequestStatus* aRequestStatus ) + { + if( iIsExtConvert ) + { + User::RequestComplete( aRequestStatus, KErrUnknown ); + } + else + { + CImageDecoder::ContinueConvert( aRequestStatus ); + } + } + +// ---------------------------------------------------------- +// CExtJpegDecoder* CExtJpegDecoder::FileNewL +// Creates, initializes and returns a pointer to an object of +// class CExtJpegDecoder +// ---------------------------------------------------------- +// +EXPORT_C CExtJpegDecoder* CExtJpegDecoder::FileNewL( + const TDecoderType aDecoderType, + RFs& aFs, + const TDesC& aSourceFileName, + const TOptions aOptions ) + { + TInt versionMin = KMinSwVersion; + TInt versionMax = KMaxSwVersion; + if ( aDecoderType == EHwImplementation ) + { + versionMin = KMinHwVersion; + versionMax = KMaxHwVersion; + } + TUid uId = GetUidByVersionRangeL( versionMin, versionMax ); + if ( uId == KNullUid ) + { + User::Leave( KErrNotFound ); + } + return CExtJpegDecoder::FileNewL( aFs, aSourceFileName, aOptions, + KImageTypeJPGUid, KNullUid, uId ); + } + +// ---------------------------------------------------------- +// CExtJpegDecoder* CExtJpegDecoder::DataNewL +// Creates, initializes and returns a pointer to an object of +// class CExtJpegDecoder +// ---------------------------------------------------------- +// +EXPORT_C CExtJpegDecoder* CExtJpegDecoder::DataNewL( + const TDecoderType aDecoderType, + RFs& aFs, + const TDesC8& aSourceData, + const TOptions aOptions ) + { + TInt versionMin = KMinSwVersion; + TInt versionMax = KMaxSwVersion; + if ( aDecoderType == EHwImplementation ) + { + versionMin = KMinHwVersion; + versionMax = KMaxHwVersion; + } + TUid uId = GetUidByVersionRangeL( versionMin, versionMax ); + if ( uId == KNullUid ) + { + User::Leave( KErrNotFound ); + } + return CExtJpegDecoder::DataNewL( aFs, aSourceData, aOptions, + KImageTypeJPGUid, KNullUid, uId ); + + } + +// ---------------------------------------------------------- +// CExtJpegDecoder* CExtJpegDecoder::DataNewL +// Creates, initializes and returns a pointer to an object of +// class CExtJpegDecoder +// ---------------------------------------------------------- +// +EXPORT_C CExtJpegDecoder* CExtJpegDecoder::DataNewL( + const TDecoderType aDecoderType, + RFs& aFs, + const CVisualFrame* aSourceData, + const TOptions aOptions ) + { + TInt versionMin = KMinSwVersion; + TInt versionMax = KMaxSwVersion; + if ( aDecoderType == EHwImplementation ) + { + versionMin = KMinHwVersion; + versionMax = KMaxHwVersion; + } + TUid uId = GetUidByVersionRangeL( versionMin, versionMax ); + if ( uId == KNullUid ) + { + User::Leave( KErrNotFound ); + } + return CExtJpegDecoder::DataNewL( aFs, aSourceData, aOptions, + KImageTypeJPGUid, KNullUid, uId ); + } + + +// ---------------------------------------------------------- +// CExtJpegDecoder::GetUidByVersionRangeL +// ---------------------------------------------------------- +// +TUid CExtJpegDecoder::GetUidByVersionRangeL( TInt aMinVersion, TInt aMaxVersion ) + { + TUid uId = KNullUid; + TUid propertyUid = KUidSwCodec; + + RUidDataArray implArray; + // based on the version decide what kind of codec to fetch + if( ( aMinVersion == KMinSwVersion ) && ( aMaxVersion == KMaxSwVersion ) ) + { + propertyUid = KUidSwCodec; + } + else if( ( aMinVersion == KMinHwVersion ) && ( aMaxVersion == KMaxHwVersion ) ) + { + propertyUid = KUidHwCodec; + } + + // property array to be verified + const TUid properties[] = { propertyUid, KImageTypeJPGUid }; + + // Request existing plugins with the desired properties + TRAPD( getIntErr, CImageDecoder::GetInterfaceImplementationsL( + properties, + 2, + implArray ) ); + CleanupClosePushL( implArray ); + User::LeaveIfError( getIntErr ); + + TInt count = implArray.Count(); + for( --count; uId == KNullUid && count >= 0; --count ) + { + // Get the Jpeg decoder UID and find out whether it is requested + // type of decoder by version number. + TUid tempUid = implArray[ count ]; + CImplementationInformationType* implInfo = NULL; + TRAPD( error, implInfo = + CImageDecoder::GetImplementationInformationL( tempUid ) ); + + User::LeaveIfError( error ); + + // check the opaque data and version no + TInt version = implInfo->Version(); + if ( ( implInfo->OpaqueData().Find( KJpgMimeType ) != KErrNotFound ) + && ( version <= aMaxVersion ) && ( version >= aMinVersion ) ) + { + uId = tempUid; + } + delete implInfo; + } // for - count + CleanupStack::PopAndDestroy(&implArray); + return uId; + + } + + + +/*****************************************************/ +/* Extended ICL Jpeg Encoder API */ +/*****************************************************/ + + +// --------------------------------------------------------- +// CExtJpegEncoder* CExtJpegEncoder::NewL +// Two-phased constructor. +// --------------------------------------------------------- +// +EXPORT_C CExtJpegEncoder* CExtJpegEncoder::NewL() + { + return new (ELeave) CExtJpegEncoder(); + } + +// --------------------------------------------------------- +// CExtJpegEncoder* CExtJpegEncoder::FileNewL +// Creates, initializes and returns a pointer to an object of +// class CExtJpegEncoder +// --------------------------------------------------------- +// +EXPORT_C CExtJpegEncoder* CExtJpegEncoder::FileNewL( + RFs& aFs, + const TDesC& aDestinationFilename, + const TDesC8& aMIMEType, + const TOptions aOptions ) + { + CExtJpegEncoder* enc = reinterpret_cast( + CImageEncoder::FileNewL( aFs, aDestinationFilename, + aMIMEType, aOptions ) ); + CleanupStack::PushL( enc ); + if ( enc->CapabilitiesL() < ECapNone ) + { + User::Leave( KErrNotFound ); + } + CleanupStack::Pop(); + return enc; + } + +// --------------------------------------------------------- +// CExtJpegEncoder* CExtJpegEncoder::FileNewL +// Creates, initializes and returns a pointer to an object of +// class CExtJpegEncoder +// --------------------------------------------------------- +// +EXPORT_C CExtJpegEncoder* CExtJpegEncoder::FileNewL( + RFs& aFs, + const TDesC& aDestinationFilename, + const TOptions aOptions, + const TUid aImageType, + const TUid aImageSubType, + const TUid aEncoderUid ) + { + CExtJpegEncoder* enc = reinterpret_cast( + CImageEncoder::FileNewL( aFs, aDestinationFilename, + aOptions, aImageType, aImageSubType, aEncoderUid ) ); + CleanupStack::PushL( enc ); + if ( enc->CapabilitiesL() < ECapNone ) + { + User::Leave( KErrNotFound ); + } + CleanupStack::Pop(); + return enc; + } + +// --------------------------------------------------------- +// CExtJpegEncoder* CExtJpegEncoder::DataNewL +// Creates, initializes and returns a pointer to an object of +// class CExtJpegEncoder +// --------------------------------------------------------- +// +EXPORT_C CExtJpegEncoder* CExtJpegEncoder::DataNewL( + HBufC8*& aDestinationData, + const TDesC8& aMIMEType, + const TOptions aOptions ) + { + CExtJpegEncoder* enc = reinterpret_cast( + CImageEncoder::DataNewL( aDestinationData, + aMIMEType, aOptions ) ); + CleanupStack::PushL( enc ); + if ( enc->CapabilitiesL() < ECapNone ) + { + User::Leave( KErrNotFound ); + } + CleanupStack::Pop(); + return enc; + } + +// --------------------------------------------------------- +// CExtJpegEncoder* CExtJpegEncoder::DataNewL +// Creates, initializes and returns a pointer to an object of +// class CExtJpegEncoder +// --------------------------------------------------------- +// +EXPORT_C CExtJpegEncoder* CExtJpegEncoder::DataNewL( + HBufC8*& aDestinationData, + const TOptions aOptions, + const TUid aImageType, + const TUid aImageSubType, + const TUid aEncoderUid ) + { + CExtJpegEncoder* enc = reinterpret_cast( + CImageEncoder::DataNewL( aDestinationData, + aOptions, aImageType, aImageSubType, aEncoderUid ) ); + CleanupStack::PushL( enc ); + if ( enc->CapabilitiesL() < ECapNone ) + { + User::Leave( KErrNotFound ); + } + CleanupStack::Pop(); + return enc; + } + +// --------------------------------------------------------- +// CExtJpegEncoder* CExtJpegEncoder::DataNewL +// Creates, initializes and returns a pointer to an object of +// class CExtJpegEncoder +// --------------------------------------------------------- +// +EXPORT_C CExtJpegEncoder* CExtJpegEncoder::DataNewL( + const CVisualFrame* aDestinationData, + const TDesC8& aMIMEType, + const TOptions aOptions ) + { + HBufC8* tmp = NULL; + CExtJpegEncoder* enc = reinterpret_cast( + CImageEncoder::DataNewL( tmp, + aMIMEType, aOptions ) ); + CleanupStack::PushL( enc ); + if ( enc->CapabilitiesL() < ECapNone ) + { + User::Leave( KErrNotFound ); + } + enc->CustomSyncL( KExtensionUID ); + enc->CustomSyncL( EDestVisualFrame ); + enc->CustomSyncL( reinterpret_cast( aDestinationData ) ); + enc->CustomSyncL( EEnd ); + CleanupStack::Pop(); + return enc; + } + +// --------------------------------------------------------- +// CExtJpegEncoder* CExtJpegEncoder::DataNewL +// Creates, initializes and returns a pointer to an object of +// class CExtJpegEncoder +// --------------------------------------------------------- +// +EXPORT_C CExtJpegEncoder* CExtJpegEncoder::DataNewL( + const CVisualFrame* aDestinationData, + const TOptions aOptions, + const TUid aImageType, + const TUid aImageSubType, + const TUid aEncoderUid ) + { + HBufC8* tmp = NULL; + CExtJpegEncoder* enc = reinterpret_cast( + CImageEncoder::DataNewL( tmp, aOptions, + aImageType, aImageSubType, aEncoderUid ) ); + CleanupStack::PushL( enc ); + if ( enc->CapabilitiesL() < ECapNone ) + { + User::Leave( KErrNotFound ); + } + enc->CustomSyncL( KExtensionUID ); + enc->CustomSyncL( EDestVisualFrame ); + enc->CustomSyncL( reinterpret_cast( aDestinationData ) ); + enc->CustomSyncL( EEnd ); + CleanupStack::Pop(); + return enc; + } + +// --------------------------------------------------------- +// CExtJpegEncoder::~CExtJpegEncoder +// Destructor. +// --------------------------------------------------------- +// +EXPORT_C CExtJpegEncoder::~CExtJpegEncoder() + { + } + +// --------------------------------------------------------- +// CExtJpegEncoder::SetStreamingL +// --------------------------------------------------------- +// +EXPORT_C void CExtJpegEncoder::SetStreamingL( TSize& aMacroBlockSize, + const CFrameImageData* aFrameImageData ) + { + CustomSyncL( KExtensionUID ); + CustomSyncL( ECapStreaming ); + CustomSyncL( reinterpret_cast( &aMacroBlockSize ) ); + CustomSyncL( reinterpret_cast( aFrameImageData ) ); + CustomSyncL( EEnd ); + } + +// --------------------------------------------------------- +// CExtJpegEncoder::SetImageReplaceL +// --------------------------------------------------------- +// +EXPORT_C void CExtJpegEncoder::SetImageReplaceL( const CVisualFrame* aReplaceImage, + TPoint aReplacePoint ) + { + CustomSyncL( KExtensionUID ); + CustomSyncL( ECapImageReplacing ); + CustomSyncL( reinterpret_cast( aReplaceImage ) ); + CustomSyncL( reinterpret_cast( &aReplacePoint ) ); + CustomSyncL( EEnd ); + } + +// --------------------------------------------------------- +// CExtJpegEncoder::SetBitmapReplaceL +// --------------------------------------------------------- +// +EXPORT_C void CExtJpegEncoder::SetBitmapReplaceL( const CFbsBitmap& aReplaceBitmap, + TPoint aReplacePoint ) + { + CustomSyncL( KExtensionUID ); + CustomSyncL( ECapBitmapReplacing ); + CustomSyncL( reinterpret_cast( &aReplaceBitmap ) ); + CustomSyncL( reinterpret_cast( &aReplacePoint ) ); + CustomSyncL( EEnd ); + } + +// --------------------------------------------------------- +// CExtJpegEncoder::SetBitmapOverlayL +// --------------------------------------------------------- +// +EXPORT_C void CExtJpegEncoder::SetBitmapOverlayL( const CFbsBitmap& aOverlayBitmap, + TUint aAlphaValue, TPoint aOverlayPoint ) + { + CustomSyncL( KExtensionUID ); + CustomSyncL( ECapBitmapOverlay ); + CustomSyncL( reinterpret_cast( &aOverlayBitmap ) ); + CustomSyncL( aAlphaValue ); + CustomSyncL( reinterpret_cast( &aOverlayPoint ) ); + CustomSyncL( EEnd ); + } + +// --------------------------------------------------------- +// CExtJpegEncoder::SetLosslessRotationL +// --------------------------------------------------------- +// +EXPORT_C void CExtJpegEncoder::SetLosslessRotationL( TInt aDegree ) + { + CustomSyncL( KExtensionUID ); + CustomSyncL( ECapLosslessRotation ); + CustomSyncL( aDegree ); + CustomSyncL( EEnd ); + } + +// --------------------------------------------------------- +// CExtJpegEncoder::SetLosslessFlippingL +// --------------------------------------------------------- +// +EXPORT_C void CExtJpegEncoder::SetLosslessFlippingL() + { + CustomSyncL( KExtensionUID ); + CustomSyncL( ECapLosslessFlipping ); + CustomSyncL( EEnd ); + } + +// --------------------------------------------------------- +// CExtJpegEncoder::SetLosslessMirroringL +// --------------------------------------------------------- +// +EXPORT_C void CExtJpegEncoder::SetLosslessMirroringL() + { + CustomSyncL( KExtensionUID ); + CustomSyncL( ECapLosslessMirroring ); + CustomSyncL( EEnd ); + } + +// --------------------------------------------------------- +// CExtJpegEncoder::SetDctEncodingL +// --------------------------------------------------------- +// +EXPORT_C void CExtJpegEncoder::SetDctEncodingL() + { + CustomSyncL( KExtensionUID ); + CustomSyncL( ECapDctEncoding ); + CustomSyncL( EEnd ); + } + +// --------------------------------------------------------- +// CExtJpegEncoder::ProvideNewDestDataL +// --------------------------------------------------------- +// +EXPORT_C void CExtJpegEncoder::ProvideNewDestDataL( const CVisualFrame* aDestinationData ) + { + CustomSyncL( KExtensionUID ); + CustomSyncL( ENewDestData ); + CustomSyncL( reinterpret_cast( aDestinationData ) ); + CustomSyncL( EEnd ); + } + +// --------------------------------------------------------- +// CExtJpegEncoder::ConvertL +// --------------------------------------------------------- +// +EXPORT_C void CExtJpegEncoder::ConvertL( + TRequestStatus* aRequestStatus, + const CVisualFrame* aSourceFrame, + TInt& aNoOfEncodedMBlocks, + const CFrameImageData* aFrameImageData ) + { + CustomSyncL( KExtensionUID ); + CustomSyncL( EConvert ); + CustomSyncL( reinterpret_cast( aSourceFrame ) ); + CustomSyncL( reinterpret_cast( &aNoOfEncodedMBlocks ) ); + CustomSyncL( reinterpret_cast( aFrameImageData ) ); + CustomSyncL( EReadyForAsync ); + CustomAsync( aRequestStatus, 0 ); + } + +// --------------------------------------------------------- +// CExtJpegEncoder::ContinueConvertL +// --------------------------------------------------------- +// +EXPORT_C void CExtJpegEncoder::ContinueConvertL( + TRequestStatus* aRequestStatus, + const CVisualFrame* aSourceFrame, + TInt& aNoOfEncodedMBlocks ) + { + CustomSyncL( KExtensionUID ); + CustomSyncL( EContinueConvert ); + CustomSyncL( reinterpret_cast( aSourceFrame ) ); + CustomSyncL( reinterpret_cast( &aNoOfEncodedMBlocks ) ); + CustomSyncL( EReadyForAsync ); + CustomAsync( aRequestStatus, 0 ); + } + +// --------------------------------------------------------- +// CExtJpegEncoder::SupportedFormatsL +// --------------------------------------------------------- +// +EXPORT_C TInt CExtJpegEncoder::SupportedFormatsL() + { + CustomSyncL( KExtensionUID ); + CustomSyncL( ESupportedFormats ); + TInt retVal = KErrNotFound; + CustomSyncL( reinterpret_cast( &retVal ) ); + CustomSyncL( EEnd ); + return retVal; + } + +// --------------------------------------------------------- +// CExtJpegEncoder::CapabilitiesL +// --------------------------------------------------------- +// +EXPORT_C TInt CExtJpegEncoder::CapabilitiesL() + { + CustomSyncL( KExtensionUID ); + CustomSyncL( ECapabilities ); + TInt retVal = KErrNotFound; + CustomSyncL( reinterpret_cast( &retVal ) ); + CustomSyncL( EEnd ); + return retVal; + } + +// --------------------------------------------------------- +// CExtJpegEncoder::CExtJpegEncoder +// --------------------------------------------------------- +// +CExtJpegEncoder::CExtJpegEncoder() : CJPEGImageFrameEncoder() + { + } + +// --------------------------------------------------------- +// CExtJpegEncoder* CExtJpegEncoder::FileNewL +// Creates, initializes and returns a pointer to an object of +// class CExtJpegEncoder +// --------------------------------------------------------- +// +EXPORT_C CExtJpegEncoder* CExtJpegEncoder::FileNewL( + const TEncoderType aEncoderType, + RFs& aFs, + const TDesC& aDestinationFilename, + const TOptions aOptions ) + { + TInt versionMin = KMinSwVersion; + TInt versionMax = KMaxSwVersion; + if ( aEncoderType == EHwImplementation ) + { + versionMin = KMinHwVersion; + versionMax = KMaxHwVersion; + } + TUid uId = GetUidByVersionRangeL( versionMin, versionMax ); + if ( uId == KNullUid ) + { + User::Leave( KErrNotFound ); + } + return CExtJpegEncoder::FileNewL( aFs, aDestinationFilename, aOptions, + KImageTypeJPGUid, KNullUid, uId ); + } + +// --------------------------------------------------------- +// CExtJpegEncoder* CExtJpegEncoder::DataNewL +// Creates, initializes and returns a pointer to an object of +// class CExtJpegEncoder +// --------------------------------------------------------- +// +EXPORT_C CExtJpegEncoder* CExtJpegEncoder::DataNewL( + const TEncoderType aEncoderType, + HBufC8*& aDestinationData, + const TOptions aOptions ) + { + TInt versionMin = KMinSwVersion; + TInt versionMax = KMaxSwVersion; + if ( aEncoderType == EHwImplementation ) + { + versionMin = KMinHwVersion; + versionMax = KMaxHwVersion; + } + TUid uId = GetUidByVersionRangeL( versionMin, versionMax ); + if ( uId == KNullUid ) + { + User::Leave( KErrNotFound ); + } + return CExtJpegEncoder::DataNewL( aDestinationData, aOptions, + KImageTypeJPGUid, KNullUid, uId ); + + } + +// --------------------------------------------------------- +// CExtJpegEncoder* CExtJpegEncoder::DataNewL +// Creates, initializes and returns a pointer to an object of +// class CExtJpegEncoder +// --------------------------------------------------------- +// +EXPORT_C CExtJpegEncoder* CExtJpegEncoder::DataNewL( + const TEncoderType aEncoderType, + const CVisualFrame* aDestinationData, + const TOptions aOptions ) + { + TInt versionMin = KMinSwVersion; + TInt versionMax = KMaxSwVersion; + if ( aEncoderType == EHwImplementation ) + { + versionMin = KMinHwVersion; + versionMax = KMaxHwVersion; + } + TUid uId = GetUidByVersionRangeL( versionMin, versionMax ); + if ( uId == KNullUid ) + { + User::Leave( KErrNotFound ); + } + return CExtJpegEncoder::DataNewL( aDestinationData, aOptions, + KImageTypeJPGUid, KNullUid, uId ); + } + +// --------------------------------------------------------- +// CExtJpegEncoder::GetDestinationDataSizeL +// --------------------------------------------------------- +// +EXPORT_C TInt CExtJpegEncoder::GetDestinationDataSizeL() + { + CustomSyncL( KExtensionUID ); + CustomSyncL( EDestDataSize ); + TInt retVal = KErrNotFound; + CustomSyncL( reinterpret_cast( &retVal ) ); + CustomSyncL( EEnd ); + return retVal; + } + +// --------------------------------------------------------- +// CExtJpegEncoder::GetUidByVersionRangeL +// --------------------------------------------------------- +// +TUid CExtJpegEncoder::GetUidByVersionRangeL( TInt aMinVersion, TInt aMaxVersion ) + { + TUid uId = KNullUid; + TUid propertyUid = KUidSwCodec; + + // based on the version decide what kind of codec to fetch + if( ( aMinVersion == KMinSwVersion ) && ( aMaxVersion == KMaxSwVersion ) ) + { + propertyUid = KUidSwCodec; + } + else if( ( aMinVersion == KMinHwVersion ) && ( aMaxVersion == KMaxHwVersion ) ) + { + propertyUid = KUidHwCodec; + } + + // property array to be verified + const TUid properties[] = { propertyUid, KImageTypeJPGUid }; + + RUidDataArray implArray; + // Request existing plugins with the desired properties + TRAPD( getIntErr, CImageEncoder::GetInterfaceImplementationsL( + properties, + 2, + implArray ) ); + CleanupClosePushL( implArray ); + User::LeaveIfError( getIntErr ); + + TInt count = implArray.Count(); + for( --count; uId == KNullUid && count >= 0; --count ) + { + // Check all encoders and find the one having Jpeg mime type, + TUid tempUid = implArray[ count ]; + + // Get the same encoder UID and find out more info for testing + TUid uId2 = { KEncoderInterfaceUidValue }; + RImplInfoPtrArray implInfo; + REComSession::ListImplementationsL( uId2, implInfo ); + TInt count2 = implInfo.Count(); + uId2 = tempUid; + for ( --count2; uId == KNullUid && count2 >= 0; --count2 ) + { + CImplementationInformation& implInfoCur = *implInfo[count2]; + if ( ( implInfoCur.ImplementationUid() == uId2 ) && + ( implInfoCur.OpaqueData().Find( KJpgMimeType ) != KErrNotFound ) ) + { + uId = uId2; + } + } + implInfo.ResetAndDestroy(); + } // for - count + + CleanupStack::PopAndDestroy( &implArray ); + return uId; + } + +// End of File diff -r 5752a19fdefe -r 08469e5bb63e imagingextensions/imageadaptationextensions/iclextjpegapi/src/IclExtJpegApiFrameImplV2.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/imagingextensions/imageadaptationextensions/iclextjpegapi/src/IclExtJpegApiFrameImplV2.cpp Wed Sep 08 10:05:56 2010 +0530 @@ -0,0 +1,663 @@ +/* +* 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: Implementation of CVisualFrameImpl +* +*/ + +#include "IclExtJpegApi.h" +#include "IclExtJpegApiFrameImpl.h" + +// --------------------------------------------------------- +// TFrameFormatExt::Constructor +// --------------------------------------------------------- +// +void TFrameFormatExt::Constructor() + { + switch ( iFormatCode ) + { + case CVisualFrame::EFormatMonochrome: + { + iColourSpace = KUidColourSpaceYCbCr; + iSampling = KUidSamplingMonochrome; + break; + } + case CVisualFrame::EFormat16bitRGB444: + case CVisualFrame::EFormat16BitRGB565: + case CVisualFrame::EFormat32BitRGB888: + case CVisualFrame::EFormatFbsBitmapColor4K: + case CVisualFrame::EFormatFbsBitmapColor64K: + case CVisualFrame::EFormatFbsBitmapColor16M: + { + iColourSpace = KUidColourSpaceRGB; + iSampling = KUidSamplingColor444; + break; + } + case CVisualFrame::EFormatYUV420SemiPlanar: + case CVisualFrame::EFormatYUV420Interleaved: + case CVisualFrame::EFormatYUV420Planar: + { + iColourSpace = KUidColourSpaceYCbCr; + iSampling = KUidSamplingColor420; + break; + } + case CVisualFrame::EFormatYUV422: + case CVisualFrame::EFormatYUV422Reversed: + case CVisualFrame::EFormatExtYUV422Interleaved: + case CVisualFrame::EFormatExtYUV422Planar: + { + iColourSpace = KUidColourSpaceYCbCr; + iSampling = KUidSamplingColor422; + break; + } + case CVisualFrame::EFormatExtYUV444Planar: + case CVisualFrame::EFormatYUV444: + { + iColourSpace = KUidColourSpaceYCbCr; + iSampling = KUidSamplingColor444; + break; + } + case CVisualFrame::EFormatJpeg: + case CVisualFrame::EFormatExif: + case CVisualFrame::EFormatUserDefined: + case CVisualFrame::EFormatExtDctCoeff: + { + iColourSpace = KNullUid; + iSampling = KNullUid; + break; + } + default: + { + iFormatCode = KErrNotFound; + iColourSpace = KNullUid; + iSampling = KNullUid; + } + } + } + +// ---------------------------------------------------------- +// TFrameFormatExt::ColourSpace +// ---------------------------------------------------------- +// +TUid TFrameFormatExt::ColourSpace() const + { + return iColourSpace; + } + +// ---------------------------------------------------------- +// TFrameFormatExt::Sampling +// ---------------------------------------------------------- +// +TUid TFrameFormatExt::Sampling() const + { + return iSampling; + } + +// ---------------------------------------------------------- +// TFrameFormatExt::FormatCode +// ---------------------------------------------------------- +// +TInt TFrameFormatExt::FormatCode() const + { + return iFormatCode; + } + +// ---------------------------------------------------------- +// TFrameFormatExt::ColourSpace +// ---------------------------------------------------------- +// +void TFrameFormatExt::SetColourSpace( TUid aColourSpace ) + { + iColourSpace = aColourSpace; + } + + + +/*****************************************************/ +/* Visual Frame Data Structure in Extended ICL API */ +/*****************************************************/ + + +// ---------------------------------------------------------- +// TFrameFormatBase* GetFrameFormatL +// ---------------------------------------------------------- +// +TFrameFormatBase* GetFrameFormatL( TInt aFrameFormatCode ) + { + TUid formatUid = KNullUid; + switch ( aFrameFormatCode ) + { + case CVisualFrame::EFormatMonochrome: + { + formatUid = KUidFormatYUVMonochrome; + break; + } + case CVisualFrame::EFormat16bitRGB444: + { + formatUid = KUidFormat16bitRGB444Interleaved; + break; + } + case CVisualFrame::EFormat16BitRGB565: + { + formatUid = KUidFormat16BitRGB565Interleaved; + break; + } + case CVisualFrame::EFormat32BitRGB888: + { + formatUid = KUidFormat32BitRGB888Interleaved; + break; + } + case CVisualFrame::EFormatYUV420Interleaved: + { + formatUid = KUidFormatYUV420Interleaved; + break; + } + case CVisualFrame::EFormatYUV420Planar: + { + formatUid = KUidFormatYUV420Planar; + break; + } + case CVisualFrame::EFormatYUV422: + { + formatUid = KUidFormatYUV422Interleaved; + break; + } + case CVisualFrame::EFormatYUV422Reversed: + { + formatUid = KUidFormatYUV422InterleavedReversed; + break; + } + case CVisualFrame::EFormatYUV444: + { + formatUid = KUidFormatYUV444Interleaved; + break; + } + case CVisualFrame::EFormatYUV420SemiPlanar: + { + formatUid = KUidFormatYUV420SemiPlanar; + break; + } + case CVisualFrame::EFormatExtYUV422Interleaved: + { + formatUid = KUidFormatYYUV422Interleaved; + break; + } + case CVisualFrame::EFormatExtYUV422Planar: + { + formatUid = KUidFormatYUV422Planar; + break; + } + case CVisualFrame::EFormatExtYUV444Planar: + { + formatUid = KUidFormatYUV444Planar; + break; + } + case CVisualFrame::EFormatJpeg: + case CVisualFrame::EFormatExif: + case CVisualFrame::EFormatFbsBitmapColor4K: + case CVisualFrame::EFormatFbsBitmapColor64K: + case CVisualFrame::EFormatFbsBitmapColor16M: + case CVisualFrame::EFormatUserDefined: + case CVisualFrame::EFormatExtDctCoeff: + { + break; + } + default: + { + User::Leave( KErrNotSupported ); + } + } + TFrameFormatBase* frameFormatBase = NULL; + if ( formatUid == KNullUid ) + { + frameFormatBase = new ( ELeave ) TFrameFormatExt( aFrameFormatCode ); + } + else + { + frameFormatBase = new ( ELeave ) TFrameFormat( formatUid ); + } + return frameFormatBase; + } + +// ---------------------------------------------------------- +// GetFrameFormat +// ---------------------------------------------------------- +// +TInt GetFrameFormat( const TFrameFormatBase& aFrameFormat ) + { + TInt frameFormatCode = KErrNotFound; + if ( aFrameFormat.Type() == KUidIclImageFrameFormat ) + { + const TFrameFormat& frameFormat = reinterpret_cast( aFrameFormat ); + switch ( frameFormat.FormatCode().iUid ) + { + case KFormatYUVMonochromeUidValue: + { + frameFormatCode = CVisualFrame::EFormatMonochrome; + break; + } + case KFormat16bitRGB444InterleavedUidValue: + { + frameFormatCode = CVisualFrame::EFormat16bitRGB444; + break; + } + case KFormat16BitRGB565InterleavedUidValue: + { + frameFormatCode = CVisualFrame::EFormat16BitRGB565; + break; + } + case KFormat32BitRGB888InterleavedUidValue: + { + frameFormatCode = CVisualFrame::EFormat32BitRGB888; + break; + } + case KFormatYUV420InterleavedUidValue: + { + frameFormatCode = CVisualFrame::EFormatYUV420Interleaved; + break; + } + case KFormatYUV420PlanarUidValue: + { + frameFormatCode = CVisualFrame::EFormatYUV420Planar; + break; + } + case KFormatYUV422InterleavedUidValue: + { + frameFormatCode = CVisualFrame::EFormatYUV422; + break; + } + case KFormatYUV422InterleavedReversedUidValue: + { + frameFormatCode = CVisualFrame::EFormatYUV422Reversed; + break; + } + case KFormatYUV444InterleavedUidValue: + { + frameFormatCode = CVisualFrame::EFormatYUV444; + break; + } + case KFormatYUV420SemiPlanarUidValue: + { + frameFormatCode = CVisualFrame::EFormatYUV420SemiPlanar; + break; + } + case KFormatYYUV422InterleavedUidValue: + { + frameFormatCode = CVisualFrame::EFormatExtYUV422Interleaved; + break; + } + case KFormatYUV422PlanarUidValue: + { + frameFormatCode = CVisualFrame::EFormatExtYUV422Planar; + break; + } + case KFormatYUV444PlanarUidValue: + { + frameFormatCode = CVisualFrame::EFormatExtYUV444Planar; + break; + } + default: + { + } + } + } + else if ( aFrameFormat.Type() == KUidExtIclImageFrameFormat ) + { + frameFormatCode = reinterpret_cast( aFrameFormat ).FormatCode(); + } + return frameFormatCode; + } + + + +// --------------------------------------------------------- +// CVisualFrameImpl* CVisualFrameImpl::NewL +// Two-phased constructor. +// --------------------------------------------------------- +// +CVisualFrameImpl* CVisualFrameImpl::NewL( + TDes8& aBuffer, + const TSize& aDimension, + TInt aFrameFormat ) + { + + TFrameFormatBase* frameFormat = GetFrameFormatL( aFrameFormat ); + + CleanupStack::PushL( frameFormat ); + + TFrameLayout frameLayout = TFrameLayout( 1 ); + frameLayout.SetStart( 0, 0 ); + frameLayout.SetScanLength( 0, aBuffer.MaxLength() ); + frameLayout.SetLength( 0, aBuffer.MaxLength() ); + frameLayout.SetCurrentLength( 0, aBuffer.Length() ); + + CVisualFrameImpl* self = new ( ELeave ) CVisualFrameImpl(); + CleanupStack::PushL( self ); + self->ConstructL( aBuffer, aBuffer.MaxLength(), aDimension, *frameFormat, frameLayout ); + CleanupStack::Pop( self ); + CleanupStack::PopAndDestroy( frameFormat ); + + return self; + } + +// --------------------------------------------------------- +// CVisualFrameImpl* CVisualFrameImpl::NewL +// Two-phased constructor. +// --------------------------------------------------------- +// +CVisualFrameImpl* CVisualFrameImpl::NewL( + RChunk& aChunk, + TInt aSize, + TInt aMaxSize, + TInt aDataOffset, + const TSize& aDimension, + TInt aFrameFormat ) + { + + TFrameFormatBase* frameFormat = GetFrameFormatL( aFrameFormat ); + CleanupStack::PushL( frameFormat ); + + TFrameLayout frameLayout = TFrameLayout( 1 ); + + frameLayout.SetStart( 0, aDataOffset ); + frameLayout.SetScanLength( 0, aMaxSize ); + frameLayout.SetLength( 0, aMaxSize ); + frameLayout.SetCurrentLength( 0, aSize ); + + CVisualFrameImpl* self = new ( ELeave ) CVisualFrameImpl(); + CleanupStack::PushL( self ); + self->ConstructL( &aChunk, aMaxSize, aDataOffset, aDimension, *frameFormat, frameLayout ); + self->iSize = aSize; + CleanupStack::Pop( self ); + CleanupStack::PopAndDestroy( frameFormat ); + + return self; + } + +// --------------------------------------------------------- +// CVisualFrameImpl* CVisualFrameImpl::NewL +// Two-phased constructor. +// --------------------------------------------------------- +// +CVisualFrameImpl* CVisualFrameImpl::NewL( + TDes8& aBuffer, + const TSize& aDimension, + TInt aFrameFormat, + const CVisualFrame::TFrameLayout& aFrameLayout ) + { + TFrameFormatBase* frameFormat = GetFrameFormatL( aFrameFormat ); + CleanupStack::PushL( frameFormat ); + + TFrameLayout frameLayout = TFrameLayout( aFrameLayout.iNumberOfPlanes ); + + for ( TInt i = 0; i < aFrameLayout.iNumberOfPlanes; ++i ) + { + frameLayout.SetStart( i, aFrameLayout.iOffset[i] ); + frameLayout.SetScanLength( i, aFrameLayout.iScanLineLength[i] ); + frameLayout.SetLength( i, aFrameLayout.iMaxLength[i] ); + frameLayout.SetCurrentLength( i, aFrameLayout.iLength[i] ); + } + + CVisualFrameImpl* self = new ( ELeave ) CVisualFrameImpl(); + CleanupStack::PushL( self ); + self->ConstructL( aBuffer, aBuffer.MaxLength(), aDimension, *frameFormat, frameLayout ); + CleanupStack::Pop( self ); + CleanupStack::PopAndDestroy( frameFormat ); + + return self; + } + +// --------------------------------------------------------- +// CVisualFrameImpl* CVisualFrameImpl::NewL +// Two-phased constructor. +// --------------------------------------------------------- +// +CVisualFrameImpl* CVisualFrameImpl::NewL( + RChunk& aChunk, + TInt aSize, + TInt aMaxSize, + const TSize& aDimension, + TInt aFrameFormat, + const CVisualFrame::TFrameLayout& aFrameLayout ) + { + TFrameFormatBase* frameFormat = GetFrameFormatL( aFrameFormat ); + CleanupStack::PushL( frameFormat ); + + TFrameLayout frameLayout = TFrameLayout( aFrameLayout.iNumberOfPlanes ); + + for ( TInt i = 0; i < aFrameLayout.iNumberOfPlanes; ++i ) + { + frameLayout.SetStart( i, aFrameLayout.iOffset[i] ); + frameLayout.SetScanLength( i, aFrameLayout.iScanLineLength[i] ); + frameLayout.SetLength( i, aFrameLayout.iMaxLength[i] ); + frameLayout.SetCurrentLength( i, aFrameLayout.iLength[i] ); + } + + CVisualFrameImpl* self = new ( ELeave ) CVisualFrameImpl(); + CleanupStack::PushL( self ); + self->ConstructL( &aChunk, aMaxSize, aFrameLayout.iOffset[0], aDimension, *frameFormat, frameLayout ); + self->iSize = aSize; + CleanupStack::Pop( self ); + CleanupStack::PopAndDestroy( frameFormat ); + + return self; + } + +// --------------------------------------------------------- +// CVisualFrameImpl* CVisualFrameImpl::NewL +// Two-phased constructor. +// --------------------------------------------------------- +// +CVisualFrameImpl* CVisualFrameImpl::NewL( const CImageFrame* aImageFrame ) + { + if ( ( aImageFrame->FrameFormat().Type() != KUidIclImageFrameFormat ) && + ( aImageFrame->FrameFormat().Type() != KUidExtIclImageFrameFormat ) ) + { + User::Leave( KErrNotSupported ); + } + CVisualFrameImpl* self = new ( ELeave ) CVisualFrameImpl(); + CleanupStack::PushL( self ); + if ( aImageFrame->IsChunk() ) + { + self->ConstructL( + &const_cast( aImageFrame )->DataChunk(), + aImageFrame->MaxBufferSize(), + aImageFrame->DataOffset(), + aImageFrame->FrameSizeInPixels(), + aImageFrame->FrameFormat(), + aImageFrame->FrameLayout() ); + const TFrameLayout& frameLayout = reinterpret_cast( aImageFrame->FrameLayout() ); + self->iSize = frameLayout.CurrentLength( frameLayout.Planes() - 1 ) + frameLayout.Start( frameLayout.Planes() - 1 ) - frameLayout.Start( 0 ); + } + else + { + self->ConstructL( + const_cast( aImageFrame )->Data(), + aImageFrame->MaxBufferSize(), + aImageFrame->FrameSizeInPixels(), + aImageFrame->FrameFormat(), + aImageFrame->FrameLayout() ); + } + + CleanupStack::Pop( self ); + + return self; + } + +// --------------------------------------------------------- +// CVisualFrameImpl::GetImageFrameL +// --------------------------------------------------------- +// +CImageFrame* CVisualFrameImpl::GetImageFrameL() + { + if ( FrameFormat().Type() != KUidIclImageFrameFormat ) + { + User::Leave( KErrNotSupported ); + } + + if ( IsChunk() ) + { + return CImageFrame::NewL( + &DataChunk(), + MaxBufferSize(), + DataOffset(), + FrameSizeInPixels(), + FrameFormat(), + FrameLayout() ); + } + else + { + return CImageFrame::NewL( + Data(), + MaxBufferSize(), + FrameSizeInPixels(), + FrameFormat(), + FrameLayout() ); + } + } + +// --------------------------------------------------------- +// CVisualFrameImpl::DataChunkL +// --------------------------------------------------------- +// +const RChunk& CVisualFrameImpl::DataChunkL() const + { + if ( !IsChunk() ) + { + User::Leave( KErrNotFound ); + } + return const_cast( this )->DataChunk(); + } + +// --------------------------------------------------------- +// CVisualFrameImpl::DataPtrL +// --------------------------------------------------------- +// +TPtr8 CVisualFrameImpl::DataPtrL() const + { + if ( IsChunk() ) + { + User::Leave( KErrNotFound ); + } + TDes8& des = const_cast( this )->Data(); + return TPtr8( const_cast( des.Ptr() ), des.Length(), des.MaxLength() ); + } + +// --------------------------------------------------------- +// CVisualFrameImpl::Dimension +// --------------------------------------------------------- +// +TSize CVisualFrameImpl::Dimension() const + { + return FrameSizeInPixels(); + } + +// --------------------------------------------------------- +// CVisualFrameImpl::FrameFormat2 +// --------------------------------------------------------- +// +TInt CVisualFrameImpl::FrameFormat2() const + { + return GetFrameFormat( FrameFormat() ); + } + +// --------------------------------------------------------- +// CVisualFrameImpl::DataOffset +// --------------------------------------------------------- +// +TInt CVisualFrameImpl::DataOffset() const + { + return CImageFrame::DataOffset(); + } + +// --------------------------------------------------------- +// CVisualFrameImpl::Size +// --------------------------------------------------------- +// +TInt CVisualFrameImpl::Size() const + { + if ( !IsChunk() ) + { + return Data().Length(); + } + return iSize; + } + +// --------------------------------------------------------- +// CVisualFrameImpl::SetSizeL +// --------------------------------------------------------- +// +void CVisualFrameImpl::SetSizeL( TInt aSize ) + { + if ( ( aSize < 0 ) || ( aSize > MaxSize() ) ) + { + User::Leave( KErrArgument ); + } + if ( !IsChunk() ) + { + Data().SetLength( aSize ); + } + iSize = aSize; + } + +// --------------------------------------------------------- +// CVisualFrameImpl::MaxSize +// --------------------------------------------------------- +// +TInt CVisualFrameImpl::MaxSize() const + { + return MaxBufferSize(); + } + +// --------------------------------------------------------- +// CVisualFrameImpl::DataContainer +// --------------------------------------------------------- +// +TInt CVisualFrameImpl::DataContainer() const + { + if ( IsChunk() ) + { + return CVisualFrame::EInChunk; + } + return CVisualFrame::EInDescriptor; + } + +// --------------------------------------------------------- +// CVisualFrameImpl::FrameLayout2 +// --------------------------------------------------------- +// +const CVisualFrame::TFrameLayout& CVisualFrameImpl::FrameLayout2() const + { + const TFrameLayout& frameLayout = reinterpret_cast( FrameLayout() ); + CVisualFrame::TFrameLayout& frameLayout2 = const_cast( this )->iFrameLayout2; + frameLayout2.iNumberOfPlanes = frameLayout.Planes(); + for (TInt i = 0; i < iFrameLayout2.iNumberOfPlanes; ++i ) + { + frameLayout2.iOffset[i] = frameLayout.Start( i ); + frameLayout2.iScanLineLength[i] = frameLayout.ScanLength( i ); + frameLayout2.iLength[i] = frameLayout.CurrentLength( i ); + frameLayout2.iMaxLength[i] = frameLayout.Length( i ); + } + return iFrameLayout2; + } + +// --------------------------------------------------------- +// CVisualFrameImpl::~CVisualFrameImpl +// Destructor +// --------------------------------------------------------- +// +CVisualFrameImpl::~CVisualFrameImpl() + { + } + +// End of File