Ticket #3466: 3466-v1.patch

File 3466-v1.patch, 6.7 KB (added by danielk, 17 years ago)

Fix patch for this problem

  • libs/libmythtv/NuppelVideoPlayer.cpp

     
    14751475    }
    14761476}
    14771477
     1478void NuppelVideoPlayer::DrawUnusedRects(bool sync)
     1479{
     1480    if (videoOutput)
     1481        videoOutput->DrawUnusedRects(sync);
     1482}
     1483
    14781484void NuppelVideoPlayer::ResetCaptions(uint mode_override)
    14791485{
    14801486    uint origMode   = textDisplayMode;
  • libs/libmythtv/guidegrid.h

     
    8686    void paintEvent(QPaintEvent *);
    8787
    8888  private slots:
    89     void timeout();
    90     void jumpToChannelTimeout();
     89    void timeCheckTimeout(void);
     90    void repaintVideoTimeout(void);
     91    void jumpToChannelTimeout(void);
    9192
    9293  private:
    9394    void keyPressEvent(QKeyEvent *e);
     
    174175    QString currentTimeColor;
    175176
    176177    QTimer *timeCheck;
     178    QTimer *videoRepaintTimer;
    177179
    178180    bool keyDown;
    179181
  • libs/libmythtv/tv_play.h

     
    112112    void StopEmbeddingOutput(void);
    113113    bool IsEmbedding(void);
    114114    void EPGChannelUpdate(uint chanid, QString channum);
     115    void DrawUnusedRects(bool sync);
    115116   
    116117    // Recording commands
    117118    int  PlayFromRecorder(int recordernum);
  • libs/libmythtv/guidegrid.cpp

     
    261261
    262262    timeCheck = NULL;
    263263    timeCheck = new QTimer(this);
    264     connect(timeCheck, SIGNAL(timeout()), SLOT(timeout()) );
     264    connect(timeCheck, SIGNAL(timeout()), SLOT(timeCheckTimeout()) );
    265265    timeCheck->start(200);
    266266
     267    videoRepaintTimer = new QTimer(this);
     268    QObject::connect(videoRepaintTimer, SIGNAL(timeout()),
     269                     this,              SLOT(repaintVideoTimeout()));
     270    videoRepaintTimer->start(1000);
     271
    267272    selectState = false;
    268273
    269274    updateBackground();
     
    281286    for (int x = 0; x < MAX_DISPLAY_TIMES; x++)
    282287    {
    283288        if (m_timeInfos[x])
     289        {
    284290            delete m_timeInfos[x];
     291            m_timeInfos[x] = NULL;
     292        }
    285293    }
    286294
    287295    for (int y = 0; y < MAX_DISPLAY_CHANS; y++)
    288296    {
    289297        if (m_programs[y])
     298        {
    290299            delete m_programs[y];
     300            m_programs[y] = NULL;
     301        }
    291302    }
    292303
    293304    m_channelInfos.clear();
    294305
    295     delete theme;
     306    if (theme)
     307    {
     308        delete theme;
     309        theme = NULL;
     310    }
     311
     312    if (jumpToChannelTimer)
     313    {
     314        jumpToChannelTimer->deleteLater();
     315        jumpToChannelTimer = NULL;
     316    }
     317
     318    if (timeCheck)
     319    {
     320        timeCheck->deleteLater();
     321        timeCheck = NULL;
     322    }
     323
     324    if (videoRepaintTimer)
     325    {
     326        videoRepaintTimer->deleteLater();
     327        videoRepaintTimer = NULL;
     328    }
    296329}
    297330
    298331void GuideGrid::keyPressEvent(QKeyEvent *e)
     
    533566    return m_channelInfos[idx].chanid;
    534567}
    535568
    536 void GuideGrid::timeout()
     569void GuideGrid::timeCheckTimeout(void)
    537570{
    538571    timeCheck->changeInterval((int)(60 * 1000));
    539572    QTime new_time = QTime::currentTime();
     
    561594    repaint(curInfoRect, false);
    562595}
    563596
     597void GuideGrid::repaintVideoTimeout(void)
     598{
     599    timeCheck->changeInterval(1000);
     600    update(videoRect);
     601}
     602
    564603void GuideGrid::fillChannelInfos(bool gotostartchannel)
    565604{
    566605    m_channelInfos.clear();
     
    9741013    if (r.intersects(videoRect) && m_player)
    9751014    {
    9761015        timeCheck->changeInterval((int)(200));
     1016        m_player->DrawUnusedRects(false);
    9771017    }
    9781018
    9791019    qApp->unlock();
     
    17941834    ChannelInfo info = m_channelInfos[idx];
    17951835
    17961836    if (m_player)
     1837    {
    17971838        m_player->EPGChannelUpdate(info.chanid, info.chanstr);
     1839        videoRepaintTimer->start(200);
     1840    }
    17981841}
    17991842
    18001843//
  • libs/libmythtv/NuppelVideoPlayer.h

     
    118118    void StopEmbedding(void);
    119119    void ExposeEvent(void);
    120120    bool IsEmbedding(void);
     121    void DrawUnusedRects(bool sync);
    121122
    122123    // Audio Sets
    123124    void SetNoAudio(void)                     { no_audio_out = true; }
  • libs/libmythtv/tv_play.cpp

     
    50355035    return false;
    50365036}
    50375037
     5038void TV::DrawUnusedRects(bool sync)
     5039{
     5040    if (nvp)
     5041        nvp->DrawUnusedRects(sync);
     5042}
     5043
    50385044void TV::doEditSchedule(int editType)
    50395045{
    50405046    if (!playbackinfo)
  • libs/libmythtv/videoout_xv.cpp

     
    24652465    }
    24662466
    24672467    if ((needrepaint || xv_need_bobdeint_repaint) &&
    2468         (VideoOutputSubType() >= XVideo))
     2468        (VideoOutputSubType() >= XVideo) && !embedding)
    24692469    {
    24702470        DrawUnusedRects(/* don't do a sync*/false);
    24712471    }
     
    24802480
    24812481void VideoOutputXv::DrawUnusedRects(bool sync)
    24822482{
    2483     // Unfortunately, this gets drawn in the wrong place on prebuffering
    2484     // pauses when embedding and this is rarely useful when embedding
    2485     // since the background is drawn in guidegrid so we bail here. -- dtk
    2486     if (embedding)
    2487         return;
    2488 
    24892483    // boboff assumes the smallest interlaced resolution is 480 lines - 5%
    24902484    bool use_bob   = (m_deinterlacing && m_deintfiltername == "bobdeint");
    24912485    int boboff_raw = (int)round(((double)display_video_rect.height()) /
     
    25122506
    25132507    X11L;
    25142508
    2515     if (xv_draw_colorkey && needrepaint)
     2509    // This is used to avoid drawing the colorkey when embedding and
     2510    // not using overlay. This is needed because we don't paint this
     2511    // in the vertical retrace period when calling this from the EPG.
     2512    bool clrdraw = xv_colorkey || !embedding;
     2513
     2514    if (xv_draw_colorkey && needrepaint && clrdraw)
    25162515    {
    25172516        XSetForeground(XJ_disp, XJ_gc, xv_colorkey);
    25182517        XFillRectangle(XJ_disp, XJ_curwin, XJ_gc,
     
    25212520                       display_visible_rect.width(),
    25222521                       display_visible_rect.height() - 2 * boboff);
    25232522    }
    2524     else if (xv_draw_colorkey && xv_need_bobdeint_repaint)
     2523    else if (xv_draw_colorkey && xv_need_bobdeint_repaint && clrdraw)
    25252524    {
    25262525        // if this is only for deinterlacing mode switching, draw
    25272526        // the border areas, presumably the main image is undamaged.