本文整理汇总了C++中MythMainWindow::size方法的典型用法代码示例。如果您正苦于以下问题:C++ MythMainWindow::size方法的具体用法?C++ MythMainWindow::size怎么用?C++ MythMainWindow::size使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MythMainWindow
的用法示例。
在下文中一共展示了MythMainWindow::size方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: SetupOpenGL
bool VideoOutputOpenGL::SetupOpenGL(void)
{
if (!gl_context)
return false;
QRect dvr = window.GetDisplayVisibleRect();
MythMainWindow *mainWin = GetMythMainWindow();
QSize mainSize = mainWin->size();
// If the Video screen mode has vertically less pixels
// than the GUI screen mode - OpenGL coordinate adjustments
// must be made to put the video at the top of the display
// area instead of at the bottom.
if (dvr.height() < mainSize.height())
dvr.setTop(dvr.top()-mainSize.height()+dvr.height());
// If the Video screen mode has horizontally less pixels
// than the GUI screen mode - OpenGL width must be set
// as the higher GUI width so that the Program Guide
// invoked from playback is not cut off.
if (dvr.width() < mainSize.width())
dvr.setWidth(mainSize.width());
if (video_codec_id == kCodec_NONE)
{
gl_context->SetViewPort(QRect(QPoint(),dvr.size()));
return true;
}
if (window.GetPIPState() >= kPIPStandAlone)
{
QRect tmprect = QRect(QPoint(0,0), dvr.size());
ResizeDisplayWindow(tmprect, true);
}
bool success = false;
OpenGLLocker ctx_lock(gl_context);
gl_videochain = new OpenGLVideo();
QString options = GetFilters();
if (gl_opengl_lite)
options += " preferycbcr";
success = gl_videochain->Init(gl_context, &videoColourSpace,
window.GetVideoDim(),
window.GetVideoDispDim(), dvr,
window.GetDisplayVideoRect(),
window.GetVideoRect(), true,
options, !codec_sw_copy(video_codec_id));
if (success)
{
bool temp_deinterlacing = m_deinterlacing;
if (!m_deintfiltername.isEmpty() &&
!m_deintfiltername.contains("opengl"))
{
gl_videochain->SetSoftwareDeinterlacer(m_deintfiltername);
}
SetDeinterlacingEnabled(true);
if (!temp_deinterlacing)
{
SetDeinterlacingEnabled(false);
}
}
return success;
}