Ticket #3015: disable_overscan_dvd_mythvid.diff
File disable_overscan_dvd_mythvid.diff, 3.7 KB (added by , 17 years ago) |
---|
-
libs/libmythtv/videooutbase.h
271 271 /// \brief Tells the player to resize the video frame (used for ITV) 272 272 void SetVideoResize(const QRect &videoRect); 273 273 274 void SetVideoScalingAllowed(bool change); 275 276 /// \brief check if video underscan/overscan is allowed 277 bool IsVideoScalingAllowed(void) { return scaling_allowed; } 278 274 279 /// \brief returns QRect of PIP based on PIPLocation 275 280 virtual QRect GetPIPRect(int location, NuppelVideoPlayer *pipplayer = NULL); 276 281 protected: … … 363 368 QString m_deintfiltername; 364 369 FilterManager *m_deintFiltMan; 365 370 FilterChain *m_deintFilter; 366 bool m_deinterlaceBeforeOSD; ;371 bool m_deinterlaceBeforeOSD; 367 372 368 373 /// VideoBuffers instance used to track video output buffers. 369 374 VideoBuffers vbuffers; … … 374 379 bool allowpreviewepg; 375 380 bool errored; 376 381 long long framesPlayed; 382 bool scaling_allowed; ///< disable this to prevent overscan/underscan 377 383 }; 378 384 379 385 #endif -
libs/libmythtv/videooutbase.cpp
274 274 // Various state variables 275 275 embedding(false), needrepaint(false), 276 276 allowpreviewepg(true), errored(false), 277 framesPlayed(0) 277 framesPlayed(0), scaling_allowed(true) 278 278 { 279 279 db_display_dim = QSize(gContext->GetNumSetting("DisplaySizeWidth", 0), 280 280 gContext->GetNumSetting("DisplaySizeHeight", 0)); … … 282 282 db_move = QPoint(gContext->GetNumSetting("xScanDisplacement", 0), 283 283 gContext->GetNumSetting("yScanDisplacement", 0)); 284 284 285 db_scale_vert = gContext->GetNumSetting("VertScanPercentage", 5) / 100.0;286 db_scale_horiz = gContext->GetNumSetting("HorizScanPercentage", 5) / 100.0;287 288 285 db_pip_location = gContext->GetNumSetting("PIPLocation", 0); 289 286 db_pip_size = gContext->GetNumSetting("PIPSize", 26); 290 287 … … 339 336 video_dim = QSize(width, height); 340 337 video_rect = QRect(QPoint(winx, winy), fix_1080i(video_dim)); 341 338 339 SetVideoScalingAllowed(true); 340 342 341 db_vdisp_profile->SetInput(video_dim); 343 342 344 343 letterbox = db_letterbox; … … 1495 1494 } 1496 1495 1497 1496 /** 1497 * \brief Disable or enable underscan/overscan 1498 */ 1499 void VideoOutput::SetVideoScalingAllowed(bool change) 1500 { 1501 if (change) 1502 { 1503 db_scale_vert = gContext->GetNumSetting("VertScanPercentage", 5) / 100.0; 1504 db_scale_horiz = gContext->GetNumSetting("HorizScanPercentage", 5) / 100.0; 1505 scaling_allowed = true; 1506 } 1507 else 1508 { 1509 db_scale_vert = 0.0f; 1510 db_scale_horiz = 0.0f; 1511 scaling_allowed = false; 1512 } 1513 } 1514 1515 /** 1498 1516 * \fn VideoOutput::DisplayOSD(VideoFrame*,OSD *,int,int) 1499 1517 * \brief If the OSD has changed, this will convert the OSD buffer 1500 1518 * to the OSDSurface's color format. -
libs/libmythtv/NuppelVideoPlayer.cpp
580 580 return false; 581 581 } 582 582 583 if (ringBuffer->isDVD()) 584 videoOutput->SetVideoScalingAllowed(false); 585 583 586 // We need to tell it this for automatic deinterlacer settings 584 587 videoOutput->SetVideoFrameRate(video_frame_rate * play_speed); 585 588