equal
deleted
inserted
replaced
20 |
20 |
21 #include <e32svr.h> |
21 #include <e32svr.h> |
22 #include <bautils.h> |
22 #include <bautils.h> |
23 #include <imageconversion.h> |
23 #include <imageconversion.h> |
24 #include <cvtimageconverter.h> |
24 #include <cvtimageconverter.h> |
25 #include <rphcltserver.h> |
25 #include <RPhCltServer.h> |
26 #include <cphcltimagehandler.h> |
26 #include <CPhCltImageHandler.h> |
27 #include <w32std.h> |
27 #include <w32std.h> |
28 |
28 |
29 #include "CVSStillImageDataProvider.h" |
29 #include "CVSStillImageDataProvider.h" |
30 #include "CVSDataSourceImp.h" |
30 #include "CVSDataSourceImp.h" |
31 #include "VSPanic.h" |
31 #include "VSPanic.h" |
325 iVFTimer = CVSFrameRateTimer::NewL( this ); |
325 iVFTimer = CVSFrameRateTimer::NewL( this ); |
326 CActiveScheduler::Add( iVFTimer ); |
326 CActiveScheduler::Add( iVFTimer ); |
327 iActiveWait = new (ELeave) CVSActiveWait< CVSStillImageDataProvider > ( this ); |
327 iActiveWait = new (ELeave) CVSActiveWait< CVSStillImageDataProvider > ( this ); |
328 |
328 |
329 //Create viewer |
329 //Create viewer |
330 iViewer = CMultiframeProvider::NewL( this , iDisplayMode ); |
330 iViewer = CMultiframeProvider::NewL( this , EColor16MU/*iDisplayMode*/ ); |
331 User::LeaveIfError( iFreezeCS.CreateLocal() ); |
331 User::LeaveIfError( iFreezeCS.CreateLocal() ); |
332 |
332 |
333 __IF_DEBUG(Print(_L("VideoSource [%d]: CVSStillImageDataProvider::CommonInitializeL() <<"), RThread().Id().operator TUint())); |
333 __IF_DEBUG(Print(_L("VideoSource [%d]: CVSStillImageDataProvider::CommonInitializeL() <<"), RThread().Id().operator TUint())); |
334 } |
334 } |
335 |
335 |
803 // Just to make sure that we're actually playing. We also check that |
803 // Just to make sure that we're actually playing. We also check that |
804 // iProtoTimer still exists BECAUSE BufferFilledL() may call |
804 // iProtoTimer still exists BECAUSE BufferFilledL() may call |
805 // SourceThreadLogoff() if a switch is pending |
805 // SourceThreadLogoff() if a switch is pending |
806 if( iProtoTimer && ( iPSState == EPSPlaying ) ) |
806 if( iProtoTimer && ( iPSState == EPSPlaying ) ) |
807 { |
807 { |
808 iProtoTimer->After( iProtoUpdateRate, &CVSStillImageDataProvider::ProtoTimer ); |
808 iProtoTimer->After( iProtoUpdateRate, &ProtoTimer ); |
809 } |
809 } |
810 __IF_DEBUG(Print(_L("VideoSource[%d]: CVSStillImageDataProvider::ProtoTimer() this %x <<"), RThread().Id().operator TUint(), this)); |
810 __IF_DEBUG(Print(_L("VideoSource[%d]: CVSStillImageDataProvider::ProtoTimer() this %x <<"), RThread().Id().operator TUint(), this)); |
811 } |
811 } |
812 |
812 |
813 // ----------------------------------------------------------------------------- |
813 // ----------------------------------------------------------------------------- |
892 User::LeaveIfError( wsSession.Connect() ); |
892 User::LeaveIfError( wsSession.Connect() ); |
893 CleanupClosePushL( wsSession ); |
893 CleanupClosePushL( wsSession ); |
894 CWsScreenDevice* wsScreenDevice = new ( ELeave ) CWsScreenDevice( wsSession ); |
894 CWsScreenDevice* wsScreenDevice = new ( ELeave ) CWsScreenDevice( wsSession ); |
895 CleanupStack::PushL( wsScreenDevice ); |
895 CleanupStack::PushL( wsScreenDevice ); |
896 User::LeaveIfError( wsScreenDevice->Construct() ); |
896 User::LeaveIfError( wsScreenDevice->Construct() ); |
897 //iDisplayMode = wsScreenDevice->DisplayMode();/* = EColor16MU;*/ |
897 iDisplayMode = wsScreenDevice->DisplayMode();/* = EColor16MU;*/ |
898 iDisplayMode = EColor16MU; |
|
899 CleanupStack::PopAndDestroy( 2 ); // wsSession, wsScreenDevice |
898 CleanupStack::PopAndDestroy( 2 ); // wsSession, wsScreenDevice |
900 __IF_DEBUG(Print(_L("VideoSource [%d]: CVSStillImageDataProvider::ConstructL() this %x <<"), RThread().Id().operator TUint(), this)); |
899 __IF_DEBUG(Print(_L("VideoSource [%d]: CVSStillImageDataProvider::ConstructL() this %x <<"), RThread().Id().operator TUint(), this)); |
901 } |
900 } |
902 |
901 |
903 // ----------------------------------------------------------------------------- |
902 // ----------------------------------------------------------------------------- |
1095 aVFBitMap.iIsBitmapFree = ETrue; |
1094 aVFBitMap.iIsBitmapFree = ETrue; |
1096 // Allow VF refresh only if size is what |
1095 // Allow VF refresh only if size is what |
1097 // has beed aquired and play state is on |
1096 // has beed aquired and play state is on |
1098 if ( ( iTargetSize == iVFBitmap->Size() ) && ( iVFState == EVFPlaying ) ) |
1097 if ( ( iTargetSize == iVFBitmap->Size() ) && ( iVFState == EVFPlaying ) ) |
1099 { |
1098 { |
1100 iVFTimer->After( 1, &CVSStillImageDataProvider::VFTimer ); |
1099 iVFTimer->After( 1, &VFTimer ); |
1101 } |
1100 } |
1102 else |
1101 else |
1103 { |
1102 { |
1104 __IF_DEBUG(Print(_L("VideoSource [%d]: CVSStillImageDataProvider::RefreshViewFinder() conditon doesn't match, iVFState[%d] "), RThread().Id().operator TUint(), iVFState)); |
1103 __IF_DEBUG(Print(_L("VideoSource [%d]: CVSStillImageDataProvider::RefreshViewFinder() conditon doesn't match, iVFState[%d] "), RThread().Id().operator TUint(), iVFState)); |
1105 } |
1104 } |