diff -r 890b5dd735f8 -r f15ac8e65a02 vtengines/videoteleng/Inc/Media/CVtEngLocalVideo.h --- a/vtengines/videoteleng/Inc/Media/CVtEngLocalVideo.h Thu Aug 19 09:57:36 2010 +0300 +++ b/vtengines/videoteleng/Inc/Media/CVtEngLocalVideo.h Tue Aug 31 15:16:10 2010 +0300 @@ -32,11 +32,23 @@ #include "CVTEngPubSubsListener.h" #include "mvtengcamerapreferencesobserver.h" +#include "graphics/surfacemanager.h" +#include "graphics/surface.h" +#include "graphics/surfaceupdateclient.h" + // FORWARD DECLARATIONS class CVSDataProvider; class CVtEngMediaHandler; class CVtEngCameraPreferences; + +// LOCAL CONSTANTS +// Default source width. +static const TInt KVtEngLocalVideoDefaultWidth = 176; + +// Default source height. +static const TInt KVtEngLocalVideoDefaultHeight = 144; + // CLASS DECLARATION /** @@ -177,6 +189,13 @@ */ void SetViewFinderParameters( const TVtEngRenderingOptionsDP& aDP ); + + /** + * Sets NGA configuration for view finder. + * @param aNGA NGA configuration + */ + void SetViewFinderParameters( const TVtEngRenderingOptionsNGA &aNGA ); + /** * Sets default still image. */ @@ -540,6 +559,8 @@ ERefreshing }; + private: // inner classes + /** * Provider information. */ @@ -1010,6 +1031,81 @@ }; + // class for NGA rendering viewfinder bitmap. + NONSHARABLE_CLASS( CVtEngVFBitmapNGARender ) : public CActive + { + + public: // constructor and destructor + + /** + * Two-phased constructor. + * @param aObserver call back interface to Display Sink + * @return instance of CVtEngDrawDSA + */ + static CVtEngVFBitmapNGARender * NewL(); + + // Destructor. + ~CVtEngVFBitmapNGARender(); + + public: // New mothod + + // update the buffer for bitmap, also activate this AO + TInt UpdateBitmapL( CFbsBitmap& aFrame ); + + // Initialize surface and set it to the background + TInt AttachSurfaceL( RWsSession *aWs, RWindow *aWindow ); + + private: // constructors + + // C++ constructor. + CVtEngVFBitmapNGARender(); + + /** + * By default Symbian 2nd phase constructor is private. + */ + void ConstructL( ); + + private: // From CActive. + + /* + * @see CActive::RunL + */ + virtual void RunL(); + + /** + * @see CActive::DoCancel() + */ + virtual void DoCancel(); + + private: // enumerations + + enum { EVtEngVFMaxBuffers = 1 }; + + private: // Data + + RSurfaceManager iSurfaceManager; + RSurfaceUpdateSession iSurfaceUpdateSession; + + //Surface pixel format + const TUidPixelFormat iSurfaceFormat; + + RChunk* iSurfaceChunk; + + TUint8* iBuffer; + + //NGA surface id + TSurfaceId iSurfaceId; + + RWsSession *iWs; + RWindow *iWindow; + + //NGA surface has created + TBool iSurfaceCreated; + + TTimeStamp iTimeStamp; + + }; + private: /** @@ -1468,6 +1564,10 @@ // Number of cameras in the device TInt iNumSupportedCameras; + + CVtEngVFBitmapNGARender *iNGARender; + RWindow *iWindow; + RWsSession *iWs; }; #endif // CVTENGLOCALVIDEO_H