mmlibs/mmfw/src/Client/Video/mediaclientvideodisplaybody.cpp
branchRCL_3
changeset 11 d5f04de580b7
parent 8 bc06d8566074
child 12 b74061f7f3d2
equal deleted inserted replaced
8:bc06d8566074 11:d5f04de580b7
   693             inputHeight = static_cast<TReal32>(viewport.Width());
   693             inputHeight = static_cast<TReal32>(viewport.Width());
   694             pixelAspectRatio = static_cast<TReal32>(iAspectRatio.iDenominator) / iAspectRatio.iNumerator;
   694             pixelAspectRatio = static_cast<TReal32>(iAspectRatio.iDenominator) / iAspectRatio.iNumerator;
   695             break;
   695             break;
   696         default:
   696         default:
   697             // Should never get to default unless there's been some programming error.
   697             // Should never get to default unless there's been some programming error.
   698             User::Invariant();
   698 			DEBUG_PRINTF2("CMediaClientVideoDisplayBody::SetBackgroundSurface --- Returned with error %d", KErrArgument);
   699             break;
   699 			return KErrArgument;
   700         }
   700         }
   701     
   701     
   702     TReal32 viewportAspect = pixelAspectRatio * inputWidth / inputHeight;
   702     TReal32 viewportAspect = pixelAspectRatio * inputWidth / inputHeight;
   703     TReal32 vidextAspect = static_cast<TReal32>(videoExtent.Width()) / static_cast<TReal32>(videoExtent.Height());
   703     TReal32 vidextAspect = static_cast<TReal32>(videoExtent.Width()) / static_cast<TReal32>(videoExtent.Height());
   704     
   704     
   865         viewport.iTl.iX += (TInt) (wRatio * static_cast<TReal32>(db));
   865         viewport.iTl.iX += (TInt) (wRatio * static_cast<TReal32>(db));
   866         viewport.iTl.iY += (TInt) (hRatio * static_cast<TReal32>(dl));
   866         viewport.iTl.iY += (TInt) (hRatio * static_cast<TReal32>(dl));
   867         break;
   867         break;
   868     default:
   868     default:
   869         // Should never get to default unless there's been some programming error.
   869         // Should never get to default unless there's been some programming error.
   870         User::Invariant();
   870 		DEBUG_PRINTF2("CMediaClientVideoDisplayBody::SetBackgroundSurface --- Returned with error %d", KErrArgument);
   871         break;
   871         return KErrArgument;
   872     }
   872     }
   873     
   873     
   874     DEBUG_PRINTF5("CMediaClientVideoDisplayBody::SetBackgroundSurface - viewport2 %d,%d - %d,%d", viewport.iTl.iX, viewport.iTl.iY, viewport.iBr.iX, viewport.iBr.iY);
   874     DEBUG_PRINTF5("CMediaClientVideoDisplayBody::SetBackgroundSurface - viewport2 %d,%d - %d,%d", viewport.iTl.iX, viewport.iTl.iY, viewport.iBr.iX, viewport.iBr.iY);
   875 
   875 
   876     // Clip the extent.
   876     // Clip the extent.
   961 		case EVideoRotationClockwise270:
   961 		case EVideoRotationClockwise270:
   962 		    orientation = CFbsBitGc::EGraphicsOrientationRotated90;
   962 		    orientation = CFbsBitGc::EGraphicsOrientationRotated90;
   963 		    break;
   963 		    break;
   964 		default:
   964 		default:
   965 			// Should never get to default unless there's been some programming error.
   965 			// Should never get to default unless there's been some programming error.
   966 			User::Invariant();
   966 			DEBUG_PRINTF2("CMediaClientVideoDisplayBody::ConvertRotation --- Failed due to %d bad aRotation argument", aRotation);
   967 			// This is never reached, just to keep the compiler happy
   967 			__ASSERT_DEBUG(FALSE, User::Invariant());
       
   968 			// Use the normal option otherwise
   968 			orientation = CFbsBitGc::EGraphicsOrientationNormal;
   969 			orientation = CFbsBitGc::EGraphicsOrientationNormal;
   969 		}
   970 		}
   970     DEBUG_PRINTF2("CMediaClientVideoDisplayBody::ConvertRotation --- return %d", orientation);	
   971     DEBUG_PRINTF2("CMediaClientVideoDisplayBody::ConvertRotation --- return %d", orientation);	
   971     return orientation;
   972     return orientation;
   972 	}
   973 	}