Ticket #13350: 20181122_fire4K_support.patch

File 20181122_fire4K_support.patch, 2.6 KB (added by Peter Bennett, 17 months ago)

Support Fire TV stick 4K

  • mythtv/libs/libmythtv/openglvideo.cpp

    diff --git a/mythtv/libs/libmythtv/openglvideo.cpp b/mythtv/libs/libmythtv/openglvideo.cpp
    index 455cd2f12e4..077797dbe4f 100644
    a b void OpenGLVideo::CheckResize(bool deinterlacing, bool allow) 
    312312    // UYVY packed pixels must be sampled exactly and any overscan settings will
    313313    // break sampling - so always force an extra stage
    314314    resize_down |= videoTextureType == MYTHTV_UYVY;
     315    // Extra stage needed on Fire Stick 4k, maybe others, because of blank screen when playing.
     316    resize_down |= gCoreContext->GetBoolSetting("OpenGLExtraStage", false);
    315317
    316318    if (resize_up && (defaultUpsize == kGLFilterBicubic))
    317319    {
  • mythtv/libs/libmythui/mythrender_opengl2es.h

    diff --git a/mythtv/libs/libmythui/mythrender_opengl2es.h b/mythtv/libs/libmythui/mythrender_opengl2es.h
    index 97c3239a8e1..be743c523c3 100644
    a b class MUI_PUBLIC MythRenderOpenGL2ES : public MythRenderOpenGL2 
    2121        // GLSL version
    2222        m_GLSLVersion = "#version 100\n";
    2323        // GLSL ES precision qualifiers
    24         m_qualifiers = "precision mediump float;\n";
     24        m_qualifiers = "precision highp float;\n";
    2525
    2626        // Default OpenGL ES 2.0
    2727        m_glCreateShader     = (MYTH_GLCREATESHADERPROC)
  • mythtv/programs/mythfrontend/globalsettings.cpp

    diff --git a/mythtv/programs/mythfrontend/globalsettings.cpp b/mythtv/programs/mythfrontend/globalsettings.cpp
    index 023ebfc564f..8035c8ea989 100644
    a b static HostCheckBoxSetting *OpenGLUYVY() 
    151151    return gc;
    152152}
    153153
     154static HostCheckBoxSetting *OpenGLExtraStage()
     155{
     156    HostCheckBoxSetting *gc = new HostCheckBoxSetting("OpenGLExtraStage");
     157
     158    gc->setLabel(PlaybackSettings::tr("Extra stage of OpenGL Shading"));
     159
     160    gc->setHelpText(PlaybackSettings::tr("This may be needed if video is blank or distorted. "
     161                                         "In particular, it may be needed on Fire TV 4K. "
     162                                         "This may cause slowdown or dropped frames. By default this is disabled. "));
     163    gc->setValue(false);
     164
     165    return gc;
     166}
     167
    154168#if CONFIG_DEBUGTYPE
    155169static HostCheckBoxSetting *FFmpegDemuxer()
    156170{
    void PlaybackSettings::Load(void) 
    41964210    avsync2->addTargetedChild("1",AVSync2AdjustMS());
    41974211    advanced->addChild(OpenGLYV12());
    41984212    advanced->addChild(OpenGLUYVY());
     4213    advanced->addChild(OpenGLExtraStage());
    41994214    addChild(advanced);
    42004215
    42014216    m_playbackProfiles = CurrentPlaybackProfile();