Skip to content

Commit

Permalink
Pi: Background shows through with ffmpeg & openmax
Browse files Browse the repository at this point in the history
aa676f7 prevented background bleed where the decoder was openmax
but does not cover the case where the decoder is ffmpeg and the renderer is openmax,
which still bleeds through. This is a viable combination which provides better quality
than openmax decoder in some cases.

Also fixes a segfault documented by #12700 & #12709, which was introduced by the fix for #12691.

Fixes #12693

Signed-off-by: Roger Siddons <rsiddons@mythtv.org>
  • Loading branch information
Peter Bennett authored and dizygotheca committed Apr 10, 2016
1 parent 2e98fb5 commit ed3741d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
11 changes: 8 additions & 3 deletions mythtv/libs/libmythtv/tv_play.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2610,11 +2610,16 @@ void TV::HandleStateChange(PlayerContext *mctx, PlayerContext *ctx)
QSize(QWIDGETSIZE_MAX, QWIDGETSIZE_MAX));
mainWindow->setGeometry(player_bounds);
mainWindow->ResizePainterWindow(player_bounds.size());
// PGB Do not disable the GUI when using openmax decoder,
// PGB Do not disable the GUI when using openmax renderer,
// to ensure that space next to letterbox pictures
// is painted.
QString decName = ctx->player->GetDecoder()->GetCodecDecoderName();
if (decName != "openmax" && !weDisabledGUI)
bool isOpenMaxRender = false;
if (ctx && ctx->player)
{
VideoOutput *vo = ctx->player->GetVideoOutput();
isOpenMaxRender = vo && vo->GetName() == "openmax";
}
if (!isOpenMaxRender && !weDisabledGUI)
{
weDisabledGUI = true;
GetMythMainWindow()->PushDrawDisabled();
Expand Down
1 change: 1 addition & 0 deletions mythtv/libs/libmythtv/videoout_omx.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class VideoOutputOMX : public VideoOutput, private OMXComponentCtx
virtual bool ApproveDeintFilter(const QString&) const;
virtual bool SetDeinterlacingEnabled(bool interlaced);
virtual bool SetupDeinterlace(bool interlaced, const QString& ovrf="");
virtual QString GetName(void) const { return kName; } // = "openmax"
virtual bool IsPIPSupported(void) const { return true; }
virtual bool IsPBPSupported(void) const { return true; }
virtual QRect GetPIPRect(PIPLocation, MythPlayer* = NULL, bool = true) const;
Expand Down
1 change: 1 addition & 0 deletions mythtv/libs/libmythtv/videooutbase.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ class VideoOutput

bool AllowPreviewEPG(void) const;

virtual QString GetName(void) const { return QString(); }
virtual bool IsPIPSupported(void) const { return false; }
virtual bool IsPBPSupported(void) const { return false; }
virtual bool NeedExtraAudioDecode(void) const { return false; }
Expand Down

0 comments on commit ed3741d

Please sign in to comment.