Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Live TV: Ensure embedding is preserved through video re-initialisation.
There are still issues with both OpenGL and VDPAU playback embedding
when we transition from the live-tv dummy playback.

Refs #9573
  • Loading branch information
Mark Kendall committed Mar 19, 2011
1 parent feea745 commit 91e5d35
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions mythtv/libs/libmythtv/videooutbase.cpp
Expand Up @@ -400,6 +400,14 @@ bool VideoOutput::Init(int width, int height, float aspect, WId winid,
(void)embedid;

video_codec_id = codec_id;
bool wasembedding = window.IsEmbedding();
QRect oldrect;
if (wasembedding)
{
oldrect = window.GetDisplayVisibleRect();
StopEmbedding();
}

bool mainSuccess = window.Init(
QSize(width, height), aspect,
QRect(winx, winy, winw, winh),
Expand All @@ -414,6 +422,11 @@ bool VideoOutput::Init(int width, int height, float aspect, WId winid,
adjustfill = db_adjustfill >= kAdjustFill_AutoDetect_DefaultOff ?
(AdjustFillMode) (db_adjustfill - kAdjustFill_AutoDetect_DefaultOff) : db_adjustfill;
*/
if (wasembedding)
{
VERBOSE(VB_PLAYBACK, LOC + "Restoring embedded playback");
EmbedInWidget(oldrect.x(), oldrect.y(), oldrect.width(), oldrect.height());
}

VideoAspectRatioChanged(aspect); // apply aspect ratio and letterbox mode

Expand Down

0 comments on commit 91e5d35

Please sign in to comment.