2010-09-22, 22:21
I've been looking at some optimizations (or features) for XBMC when using a HD projector and a 1:2.35 projector screen.
The background for this is that I use XBMC with a Panasonic AE3000 projector onto a 1:2.35 screen. Now in terms of image quality I am very happy with this setup, and since the AE3000 has a zoom memory feature that allows me to easily zoom the image so that a 1:2.35 movie fills the whole screen.
Now, the caveat here is that when zoomed to 1:2.35 I essentially get an image with a huge overscan (parts of the image is outside the screen). What I am trying to do now is to patch XBMC to display the GUI in the 1:2.35 area, but only during playback of 1:2.35 video.
I have partially succeeded by setting the overscan parameters when the movie starts playing, thus forcing the GUI to appear where I want it (inside the 1:2.35 area).
In GUIWindowFullScreen::OnMessage(CGUIMessage& message) I did something like
At GUI_MSG_WINDOW_DEINIT I revert the overscan settings.
This works, but the problem is that is also modifies the guisettings.xml file.
That, I do not want, since if XBMC crashed or the computer hangs or something of that sort, the GUI will be messed up next time I restart.
Ideally what I want is to modify the overscan parameters for the UI only while a video is playing, without any side effect like writing to guisettings.xml.
After the video is stopped I want to revert the overscan settings.
My question then is: How can I modify the overscan settings (temporarily) without affecting guisettings.xml? Shall I even be doing this in the GUIWindowFullScreen class; perhaps some other place is better suited?
Any input is appreciated.
Thanks
Micke
The background for this is that I use XBMC with a Panasonic AE3000 projector onto a 1:2.35 screen. Now in terms of image quality I am very happy with this setup, and since the AE3000 has a zoom memory feature that allows me to easily zoom the image so that a 1:2.35 movie fills the whole screen.
Now, the caveat here is that when zoomed to 1:2.35 I essentially get an image with a huge overscan (parts of the image is outside the screen). What I am trying to do now is to patch XBMC to display the GUI in the 1:2.35 area, but only during playback of 1:2.35 video.
I have partially succeeded by setting the overscan parameters when the movie starts playing, thus forcing the GUI to appear where I want it (inside the 1:2.35 area).
In GUIWindowFullScreen::OnMessage(CGUIMessage& message) I did something like
Code:
bool CGUIWindowFullScreen::OnMessage(CGUIMessage& message)
{
switch (message.GetMessage())
{
case GUI_MSG_WINDOW_INIT:
// :
// : Start of patch
// :
CRect SrcRect,DestRect;
g_application.m_pPlayer->GetVideoRect(SrcRect,DestRect);
CLog::Log(LOGDEBUG, "CGUIWindowFullScreen::OnMessage(WINDOW_INIT) - Dest VideoRect: (%f,%f) -> (%f,%f)",DestRect.x1,DestRect.y1,DestRect.x2,DestRect.y2);
m_videoFrameBottom = (int)DestRect.y2;
m_videoFrameTop = (int)DestRect.y1;
if (m_cinemascopeMode)
{
RESOLUTION myRes;
myRes = g_graphicsContext.GetVideoResolution();
oldOverscan = g_settings.m_ResInfo[myRes].Overscan;
g_settings.m_ResInfo[myRes].Overscan.top = m_videoFrameTop;
g_settings.m_ResInfo[myRes].Overscan.bottom = m_videoFrameBottom;
m_overscanModified = true;
}
// :
// : End of patch
// :
// switch resolution
g_graphicsContext.SetFullScreenVideo(true);
}
At GUI_MSG_WINDOW_DEINIT I revert the overscan settings.
This works, but the problem is that is also modifies the guisettings.xml file.
That, I do not want, since if XBMC crashed or the computer hangs or something of that sort, the GUI will be messed up next time I restart.
Ideally what I want is to modify the overscan parameters for the UI only while a video is playing, without any side effect like writing to guisettings.xml.
After the video is stopped I want to revert the overscan settings.
My question then is: How can I modify the overscan settings (temporarily) without affecting guisettings.xml? Shall I even be doing this in the GUIWindowFullScreen class; perhaps some other place is better suited?
Any input is appreciated.
Thanks
Micke