self made ViewMode for help
#1
for some movie have wrong PixelRatio get from Mplayer, i made a new VideoMode for replace VIEW_MODE_ORIGINAL (this mode is few to use).
http://forum.xbmc.org/showthread.php?tid=21673

with jmarshall help , i make it down, it work pefect and easy to use , but today i found if use movie stack , use this mode in second files in stack or 3rd files , this PixelRatio will wrong , the screen will blank, it's see stack mode g_application.m_pPlayer->GetVideoAspectRatio is not work right in second files or 3rd files and next files. if stop movie then resume play , work again.


Code:
else // if (g_stSettings.m_currentVideoSettings.m_ViewMode == VIEW_MODE_ORIGINAL)
  {
    RECT SrcRect, DestRect;
    float fAR;
    g_application.m_pPlayer->GetVideoRect(SrcRect, DestRect);
    g_application.m_pPlayer->GetVideoAspectRatio(fAR);
  
    g_stSettings.m_fZoomAmount = 1.0;

   g_stSettings.m_fPixelRatio = (float)(((float)(SrcRect.right - SrcRect.left)/(float)(SrcRect.bottom - SrcRect.top)) / fAR) ;

  }

Code:
else // if (g_stSettings.m_currentVideoSettings.m_ViewMode == VIEW_MODE_ORIGINAL)
  {
    RECT SrcRect, DestRect;
    float fAR;
    g_application.m_pPlayer->GetVideoRect(SrcRect, DestRect);
    g_application.m_pPlayer->GetVideoAspectRatio(fAR);
  
    g_stSettings.m_fZoomAmount = 1.0;

    g_stSettings.m_fPixelRatio = (float)(((float)(SrcRect.right - SrcRect.left)/(float)(SrcRect.bottom - SrcRect.top)) / fSourceFrameRatio) ;

  }

it see fAR is same with fSourceFrameRatio.

can help me to fix this code work with stack mode?

i sguesst add this view mode offical , it's so useful to some moive , and easy to use than use coustom PixelRatio .
Reply
#2
forget , this is XBoxRenderer.cpp
Reply
#3
the first stack movie , ViewMode Norman , 2.89 AR is Wrong , Right is 2:38
Image

i self made View Mode Orginal , you can see all right
Image

the second movie in stack , blank screen because some worng
Image

the 3rd movie in stack , blank screen because some worng
Image
Reply
#4
another bug in stack mode, now cvs can't rewind in diff movie in stack , but can ffward in stack. exp, if you use ff to 2nd movie in stack , you can use rewind to back to 1st movie.
Reply
#5
the 3rd movie in stack , blank screen because some worng
Image
Reply
#6
Image
Reply
#7
Seems pretty clear that one of those routines isn't valid at the video startup time. You should debug what is coming out of the Aspect ratio calculations.

Use CLog::Log() to do so.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#8
jmarshall Wrote:Seems pretty clear that one of those routines isn't valid at the video startup time. You should debug what is coming out of the Aspect ratio calculations.

Use CLog::Log() to do so.

jmarshall , i am no ablity to debug and fix this, can add this viewmode to offical , i think more xbmc user nedd this.
Reply
#9
Try:

Code:
g_stSettings.m_fZoomAmount = 1.0;
    g_stSettings.m_fPixelRatio = (float)(m_iSourceWidth)/(float)(m_iSourceHeight) / fSourceFrameRatio;
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#10
great jmarshall, the code works pefect ,
thx,and thx.

i also modify GUIWindowFullScreen.cpp to show source AR ,

strong sguest add the ViewMode to xbmc, i think more xbmc user need this.

Code:
strSizing.Format("Sizing: (%i,%i) %2.2f:1 ->(%i,%i) (Zoom x%2.2f) AR:%2.2f:1 (Pixels: %2.2f:1)",
                       SrcRect.right - SrcRect.left, SrcRect.bottom - SrcRect.top,
                       (float)((float)(SrcRect.right - SrcRect.left)/(float)(SrcRect.bottom - SrcRect.top)),
                       DestRect.right - DestRect.left, DestRect.bottom - DestRect.top, g_stSettings.m_fZoomAmount, fAR*g_stSettings.m_fPixelRatio, g_stSettings.m_fPixelRatio);
Reply
#11
why would we add any viewmode just to compensate for bad encoding?

answer: we wouldnt.

my 2 cent
Reply
#12
spiff Wrote:why would we add any viewmode just to compensate for bad encoding?

answer: we wouldnt.

my 2 cent


yes , this is bad encoding movie.

i made this viewmode becasue it's a easy way for my wife use xbmc watch, i can use cumstom view mode to adjust pixelraito , she can't , so i wang a easy way.

thx jmarshall help , thx great.
Reply

Logout Mark Read Team Forum Stats Members Help
self made ViewMode for help0