vtengines/videoteleng/Inc/Media/CVtEngLocalVideo.h
branchRCL_3
changeset 24 f15ac8e65a02
parent 0 ed9695c8bcbe
child 25 779871d1e4f4
equal deleted inserted replaced
23:890b5dd735f8 24:f15ac8e65a02
    30 #include "MVtEngMedia.h" //TMediaSource
    30 #include "MVtEngMedia.h" //TMediaSource
    31 #include "MVtEngSettingPSObserver.h"
    31 #include "MVtEngSettingPSObserver.h"
    32 #include "CVTEngPubSubsListener.h"
    32 #include "CVTEngPubSubsListener.h"
    33 #include "mvtengcamerapreferencesobserver.h"
    33 #include "mvtengcamerapreferencesobserver.h"
    34 
    34 
       
    35 #include "graphics/surfacemanager.h"
       
    36 #include "graphics/surface.h"
       
    37 #include "graphics/surfaceupdateclient.h"
       
    38 
    35 // FORWARD DECLARATIONS
    39 // FORWARD DECLARATIONS
    36 class CVSDataProvider;
    40 class CVSDataProvider;
    37 class CVtEngMediaHandler;
    41 class CVtEngMediaHandler;
    38 class CVtEngCameraPreferences;
    42 class CVtEngCameraPreferences;
       
    43 
       
    44 
       
    45 // LOCAL CONSTANTS
       
    46 // Default source width.
       
    47 static const TInt KVtEngLocalVideoDefaultWidth = 176;
       
    48 
       
    49 // Default source height.
       
    50 static const TInt KVtEngLocalVideoDefaultHeight = 144;
    39 
    51 
    40 // CLASS DECLARATION
    52 // CLASS DECLARATION
    41 
    53 
    42 /**
    54 /**
    43 *  Local (uplink) video handling.
    55 *  Local (uplink) video handling.
   175         * Sets DP configuration for view finder.
   187         * Sets DP configuration for view finder.
   176         * @param aDP DP configuration
   188         * @param aDP DP configuration
   177         */
   189         */
   178         void SetViewFinderParameters( const TVtEngRenderingOptionsDP& aDP );
   190         void SetViewFinderParameters( const TVtEngRenderingOptionsDP& aDP );
   179 
   191 
       
   192         
       
   193         /**
       
   194         * Sets NGA configuration for view finder.
       
   195         * @param aNGA NGA configuration
       
   196         */
       
   197         void SetViewFinderParameters( const TVtEngRenderingOptionsNGA &aNGA );
       
   198 
   180         /**
   199         /**
   181         * Sets default still image.
   200         * Sets default still image.
   182         */
   201         */
   183         void SetDefaultStillImageL();
   202         void SetDefaultStillImageL();
   184 
   203 
   537             /** waiting for blank provider switch */
   556             /** waiting for blank provider switch */
   538             EWaiting,
   557             EWaiting,
   539             /** changing still image */
   558             /** changing still image */
   540             ERefreshing
   559             ERefreshing
   541             };
   560             };
       
   561 
       
   562 	private: // inner classes
   542 
   563 
   543         /**
   564         /**
   544         * Provider information.
   565         * Provider information.
   545         */
   566         */
   546         NONSHARABLE_CLASS( TProviderItem ) :
   567         NONSHARABLE_CLASS( TProviderItem ) :
  1008         // Stored provider type
  1029         // Stored provider type
  1009         TVtEngProviderType iStored;
  1030         TVtEngProviderType iStored;
  1010 
  1031 
  1011         };
  1032         };
  1012 
  1033 
       
  1034 		// class for NGA rendering viewfinder bitmap.
       
  1035 		NONSHARABLE_CLASS( CVtEngVFBitmapNGARender ) : public CActive
       
  1036 			{
       
  1037 			
       
  1038 		public: // constructor and destructor
       
  1039 		
       
  1040 			/**
       
  1041             * Two-phased constructor.
       
  1042             * @param aObserver call back interface to Display Sink
       
  1043             * @return instance of CVtEngDrawDSA
       
  1044             */
       
  1045 			static CVtEngVFBitmapNGARender * NewL();
       
  1046 
       
  1047 			// Destructor.
       
  1048 			~CVtEngVFBitmapNGARender();
       
  1049 
       
  1050 		public: // New mothod
       
  1051 		
       
  1052 			// update the buffer for bitmap, also activate this AO
       
  1053 			TInt UpdateBitmapL( CFbsBitmap& aFrame );
       
  1054 
       
  1055 			// Initialize surface and set it to the background
       
  1056 			TInt AttachSurfaceL( RWsSession *aWs, RWindow *aWindow );
       
  1057 
       
  1058 		private: // constructors
       
  1059 		
       
  1060 			// C++ constructor.
       
  1061 			CVtEngVFBitmapNGARender();
       
  1062 
       
  1063             /**
       
  1064             * By default Symbian 2nd phase constructor is private.
       
  1065             */
       
  1066             void ConstructL( );
       
  1067 
       
  1068 		private: // From CActive.
       
  1069 
       
  1070 		    /*
       
  1071             * @see CActive::RunL
       
  1072             */
       
  1073             virtual void RunL();
       
  1074 
       
  1075             /**
       
  1076             * @see CActive::DoCancel()
       
  1077             */
       
  1078             virtual void DoCancel();
       
  1079 
       
  1080         private:  // enumerations
       
  1081 
       
  1082             enum { EVtEngVFMaxBuffers = 1 };
       
  1083             
       
  1084         private:    // Data
       
  1085         
       
  1086             RSurfaceManager iSurfaceManager;
       
  1087             RSurfaceUpdateSession iSurfaceUpdateSession;
       
  1088 
       
  1089             //Surface pixel format
       
  1090             const TUidPixelFormat iSurfaceFormat;
       
  1091     
       
  1092             RChunk* iSurfaceChunk;
       
  1093 
       
  1094             TUint8* iBuffer;
       
  1095     
       
  1096             //NGA surface id
       
  1097             TSurfaceId iSurfaceId;
       
  1098             
       
  1099             RWsSession *iWs;
       
  1100             RWindow *iWindow;
       
  1101     
       
  1102             //NGA surface has created
       
  1103             TBool iSurfaceCreated;
       
  1104             
       
  1105             TTimeStamp iTimeStamp;
       
  1106             
       
  1107             };
       
  1108 		
  1013         private:
  1109         private:
  1014 
  1110 
  1015         /**
  1111         /**
  1016         * Rendering method.
  1112         * Rendering method.
  1017         */
  1113         */
  1466         // Pointer to provider item that is being initialized
  1562         // Pointer to provider item that is being initialized
  1467         TProviderItem* iInitializingProvider;
  1563         TProviderItem* iInitializingProvider;
  1468 
  1564 
  1469         // Number of cameras in the device
  1565         // Number of cameras in the device
  1470         TInt iNumSupportedCameras;
  1566         TInt iNumSupportedCameras;
       
  1567 
       
  1568 		CVtEngVFBitmapNGARender *iNGARender; 
       
  1569 		RWindow *iWindow;
       
  1570 		RWsSession *iWs;
  1471     };
  1571     };
  1472 
  1572 
  1473 #endif      // CVTENGLOCALVIDEO_H
  1573 #endif      // CVTENGLOCALVIDEO_H
  1474 
  1574 
  1475 // End of File
  1575 // End of File