mmsharing/mmshui/src/musuilivesharingview.cpp
branchRCL_3
changeset 11 ff8a573c0e2e
parent 6 c47a75a8cd72
child 16 71306c87785a
equal deleted inserted replaced
10:04980be5c5fe 11:ff8a573c0e2e
   707 // -----------------------------------------------------------------------------
   707 // -----------------------------------------------------------------------------
   708 //
   708 //
   709 void CMusUiLiveSharingView::RefreshCameraOrientationL(TRect& aNewRect)
   709 void CMusUiLiveSharingView::RefreshCameraOrientationL(TRect& aNewRect)
   710     {
   710     {
   711     MUS_LOG( "mus: [MUSUI ]  -> CMusUiLiveSharingView::RefreshCameraOrientation" );
   711     MUS_LOG( "mus: [MUSUI ]  -> CMusUiLiveSharingView::RefreshCameraOrientation" );
   712     if( iController && iController->IsPlayingL() )
   712     if ( !iController || !iController->EngineSession() )
   713         {        
   713         {        
       
   714         MUS_LOG( "mus: [MUSUI ]  <- CMusUiLiveSharingView::RefreshCameraOrientation, no session" );
       
   715         return;
       
   716         }
   714         TRect oldRect = iController->EngineSession()->Rect();
   717         TRect oldRect = iController->EngineSession()->Rect();
   715         MUS_LOG2( "mus: [MUSUI ]  -> Old Rect (width = %d,height=%d)",oldRect.Width(),oldRect.Height() );
   718         MUS_LOG2( "mus: [MUSUI ]  -> Old Rect (width = %d,height=%d)",oldRect.Width(),oldRect.Height() );
   716         MUS_LOG2( "mus: [MUSUI ]  -> New Rect (width = %d,height=%d)",aNewRect.Width(),aNewRect.Height() );
   719         MUS_LOG2( "mus: [MUSUI ]  -> New Rect (width = %d,height=%d)",aNewRect.Width(),aNewRect.Height() );
   717         if ( !( (  ( oldRect.Width() > oldRect.Height() ) && //check lanscape
   720         if ( !( (  ( oldRect.Width() > oldRect.Height() ) && //check lanscape
   718                    ( aNewRect.Width() > aNewRect.Height() )
   721                    ( aNewRect.Width() > aNewRect.Height() )
   724                 )
   727                 )
   725               )
   728               )
   726            )
   729            )
   727            {
   730            {
   728            MUS_LOG( "mus: [MUSUI ]  -> Orientation Changed.Restart Camera" );
   731            MUS_LOG( "mus: [MUSUI ]  -> Orientation Changed.Restart Camera" );
   729            iController->PauseL();
   732            iController->RefreshCameraOrientationL();
   730            iController->PlayL();        
       
   731            }  
   733            }  
   732         else
   734         else
   733            {
   735            {
   734            MUS_LOG( "mus: [MUSUI ]  -> Orientation Not changed. dont restart camera");    
   736            MUS_LOG( "mus: [MUSUI ]  -> Orientation Not changed. dont restart camera");    
   735            }          
   737            }          
   736         }        
   738        
   737     else
   739 
   738         {
       
   739         MUS_LOG( "mus: [MUSUI ]  -> Not Playing");
       
   740         }
       
   741 
   740 
   742     MUS_LOG( "mus: [MUSUI ]  <- CMusUiLiveSharingView::RefreshCameraOrientation" );
   741     MUS_LOG( "mus: [MUSUI ]  <- CMusUiLiveSharingView::RefreshCameraOrientation" );
   743     }
   742     }
   744 
   743 
   745 // -----------------------------------------------------------------------------
   744 // -----------------------------------------------------------------------------