videoplayback/hbvideoplaybackview/viewsrc/mpxvideoplaybackdisplayhandler.cpp
changeset 41 229f037ce963
parent 38 ff53afa8ad05
child 42 17f382c040b1
equal deleted inserted replaced
40:13331705e488 41:229f037ce963
    13 *
    13 *
    14 * Description:   Implementation of video playback display handler
    14 * Description:   Implementation of video playback display handler
    15 *
    15 *
    16 */
    16 */
    17 
    17 
    18 // Version : %version:  21 %
    18 // Version : %version:  22 %
    19 
    19 
    20 #include <sysutil.h>
    20 #include <sysutil.h>
    21 #include <s32file.h>
    21 #include <s32file.h>
    22 #include <mpxcommand.h>
    22 #include <mpxcommand.h>
    23 #include <mpxcommandgeneraldefs.h>
    23 #include <mpxcommandgeneraldefs.h>
   273             }
   273             }
   274         }
   274         }
   275 
   275 
   276         //
   276         //
   277         //  if can't find out match aspect ratio in dat file,
   277         //  if can't find out match aspect ratio in dat file,
   278         //  choose the scaling type through the rule
   278         //  choose the scaling type through the rule        
   279         //      videoAspectRatio - aDisplayAspectRatio > 0.1 ==> zoom
   279         //      aspectRatioDiff =  videoAspectRatio - aDisplayAspectRatio
   280         //      videoAspectRatio - aDisplayAspectRatio < 0.1 ==> stretch
   280         //      aspectRatioDiff ==  0        ==> natural
   281         //      videoAspectRatio = aDisplayAspectRatio ==> natural
   281         //      aspectRatioDiff > 0.1        ==> zoom
   282         //
   282         //      aspectRatioDiff < - 0.3      ==> natural
       
   283         //      aspectRatioDiff >= - 0.3 and <= 0.1   ==> stretch
       
   284         //
       
   285         
   283         if ( i == cnt )
   286         if ( i == cnt )
   284         {
   287         {
   285             if ( videoAspectRatio - aDisplayAspectRatio > 0.1 )
   288             if ( videoAspectRatio - aDisplayAspectRatio > 0.1 )
   286             {
   289             {
   287                 scalingType = EMMFZoom;
   290                 scalingType = EMMFZoom;
   288             }
   291             }
   289             else if ( videoAspectRatio != aDisplayAspectRatio )
   292             else if ( ( videoAspectRatio != aDisplayAspectRatio ) &&
       
   293                       ( videoAspectRatio - aDisplayAspectRatio > (- 0.3) ) )
   290             {
   294             {
   291                 scalingType = EMMFStretch;
   295                 scalingType = EMMFStretch;
   292             }
   296             }
   293 
   297 
   294             TMPXAspectRatio ratio;
   298             TMPXAspectRatio ratio;