videoplayback/videoplaybackviews/src/mpxvideoplaybackdisplayhandler.cpp
branchRCL_3
changeset 20 2d690156cf8f
parent 12 7f2b2a65da29
child 21 315810614048
equal deleted inserted replaced
18:baf439b22ddd 20:2d690156cf8f
    14 * Description:   Implementation of video playback display handler
    14 * Description:   Implementation of video playback display handler
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 
    18 
    19 // Version : %version: 14 %
    19 // Version : %version: 15 %
    20 
    20 
    21 
    21 
    22 #include <sysutil.h>
    22 #include <sysutil.h>
    23 #include <s32file.h>
    23 #include <s32file.h>
    24 #include <mpxcommand.h>
    24 #include <mpxcommand.h>
   237             }
   237             }
   238         }
   238         }
   239 
   239 
   240         //
   240         //
   241         //  if can't find out match aspect ratio in dat file,
   241         //  if can't find out match aspect ratio in dat file,
   242         //  choose the scaling type through the rule
   242         //  choose the scaling type through the rule        
   243         //      videoAspectRatio - aDisplayAspectRatio > 0.1 ==> zoom
   243         //      aspectRatioDiff =  videoAspectRatio - aDisplayAspectRatio
   244         //      videoAspectRatio - aDisplayAspectRatio < 0.1 ==> stretch
   244         //      aspectRatioDiff ==  0        ==> natural
   245         //      videoAspectRatio = aDisplayAspectRatio ==> natural
   245         //      aspectRatioDiff > 0.1        ==> zoom
       
   246         //      aspectRatioDiff < - 0.3      ==> natural
       
   247         //      aspectRatioDiff >= - 0.3 and <= 0.1   ==> stretch
       
   248 
   246         //
   249         //
   247         if ( i == cnt )
   250         if ( i == cnt )
   248         {
   251         {
   249             if ( videoAspectRatio - displayAspectRatio > 0.1 )
   252             if ( videoAspectRatio - displayAspectRatio > 0.1 )
   250             {
   253             {
   251                 scalingType = EMMFZoom;
   254                 scalingType = EMMFZoom;
   252             }
   255             }
   253             else if ( videoAspectRatio != displayAspectRatio )
   256             else if ( ( videoAspectRatio != displayAspectRatio ) &&
       
   257                       ( videoAspectRatio - displayAspectRatio > (- 0.3) ) )
   254             {
   258             {
   255                 scalingType = EMMFStretch;
   259                 scalingType = EMMFStretch;
   256             }
   260             }
   257 
   261 
   258             TMPXAspectRatio ratio;
   262             TMPXAspectRatio ratio;