Ticket #5681: libs_libmythtv-dead-code.patch

File libs_libmythtv-dead-code.patch, 7.8 KB (added by Erik Hovland <erik@…>, 12 years ago)

Remove or fix code that cannot execute in libmythtv

  • mythtv/libs/libmythtv/NuppelVideoPlayer.cpp

    Remove code that cannot be executed.
    
    From: Erik Hovland <erik@hovland.org>
    
    
    ---
    
     mythtv/libs/libmythtv/NuppelVideoPlayer.cpp  |   16 +++++++---------
     mythtv/libs/libmythtv/decoderbase.cpp        |    2 +-
     mythtv/libs/libmythtv/dsmcc.cpp              |    2 +-
     mythtv/libs/libmythtv/mhi.cpp                |    7 ++-----
     mythtv/libs/libmythtv/scheduledrecording.cpp |    4 ----
     mythtv/libs/libmythtv/teletextdecoder.cpp    |    4 ++--
     mythtv/libs/libmythtv/vbitext/vbi.c          |   22 ++--------------------
     mythtv/libs/libmythtv/videodev_myth.h        |    4 +++-
     8 files changed, 18 insertions(+), 43 deletions(-)
    
    diff --git a/mythtv/libs/libmythtv/NuppelVideoPlayer.cpp b/mythtv/libs/libmythtv/NuppelVideoPlayer.cpp
    index d404530..23380c0 100644
    a b void NuppelVideoPlayer::StartPlaying(void) 
    32963296         !gContext->GetNumSetting("PVR350InternalAudioOnly")))
    32973297    {
    32983298        QString errMsg = ReinitAudio();
     3299/* TODO FIXME, not Qt4 safe
    32993300        DialogCode ret = kDialogCodeButton0;
    33003301        if ((errMsg != QString::null) && !using_null_videoout &&
    33013302            gContext->GetNumSetting("AudioNag", 1))
    33023303        {
    3303 /* TODO FIXME, not Qt4 safe
     3304            // XXX This section is not Qt4 safe, FIXME
    33043305            DialogBox *dlg = new DialogBox(gContext->GetMainWindow(), errMsg);
    33053306
    33063307            QString noaudio  = QObject::tr("Continue WITHOUT AUDIO!");
    void NuppelVideoPlayer::StartPlaying(void) 
    33173318
    33183319            ret = dlg->exec();
    33193320            dlg->deleteLater();
    3320 */
     3321            // XXX to here
    33213322        }
    33223323           
    33233324        if (kDialogCodeButton1 == ret)
    void NuppelVideoPlayer::StartPlaying(void) 
    33263327            gContext->SetSetting("AudioNag", 0);
    33273328        else if ((kDialogCodeButton3 == ret) || (kDialogCodeRejected == ret))
    33283329            return;
     3330*/
    33293331    }
    33303332
    33313333    if (audioOutput)
    void NuppelVideoPlayer::DisplayDVDButton(void) 
    70577059    bool numbuttons = ringBuffer->DVD()->NumMenuButtons();
    70587060    bool osdshown = osd->IsSetDisplaying("subtitles");
    70597061
    7060     if ((!numbuttons) ||
    7061         (osdshown) ||
     7062    if (!numbuttons || osdshown ||
    70627063        (dvd_stillframe_showing && buffer->timecode > 0) ||
    7063         ((!osdshown) &&
    7064             (!pausevideo) &&
    7065             (hidedvdbutton) &&
    7066             (buffer->timecode > 0)))
     7064        (!pausevideo && hidedvdbutton && (buffer->timecode > 0)))
    70677065    {
    7068         return; 
     7066        return;
    70697067    }
    70707068
    70717069    OSDSet *subtitleOSD = NULL;
  • mythtv/libs/libmythtv/decoderbase.cpp

    diff --git a/mythtv/libs/libmythtv/decoderbase.cpp b/mythtv/libs/libmythtv/decoderbase.cpp
    index 1a5bb79..7c18327 100644
    a b int DecoderBase::AutoSelectTrack(uint type) 
    948948    }
    949949
    950950    int oldTrack = currentTrack[type];
    951     currentTrack[type] = (selTrack < 0) ? -1 : selTrack;
     951    currentTrack[type] = selTrack;
    952952    StreamInfo tmp = tracks[type][currentTrack[type]];
    953953    selectedTrack[type] = tmp;
    954954
  • mythtv/libs/libmythtv/dsmcc.cpp

    diff --git a/mythtv/libs/libmythtv/dsmcc.cpp b/mythtv/libs/libmythtv/dsmcc.cpp
    index c073592..2f3eed5 100644
    a b void Dsmcc::ProcessSection(const unsigned char *data, int length, 
    414414        // We haven't seen this stream before but it has the correct
    415415        // data_broadcast_id. Create a carousel for it.
    416416        // This will only happen at start-up
    417         car = AddTap(componentTag, carouselId);
     417        AddTap(componentTag, carouselId);
    418418        m_startTag = componentTag;
    419419        found = true;
    420420    }
  • mythtv/libs/libmythtv/mhi.cpp

    diff --git a/mythtv/libs/libmythtv/mhi.cpp b/mythtv/libs/libmythtv/mhi.cpp
    index 008debe..c9162f4 100644
    a b void MHIContext::SetNetBootInfo(const unsigned char *data, uint length) 
    270270    QMutexLocker locker(&m_dsmccLock);
    271271    // Save the data from the descriptor.
    272272    m_nbiData.duplicate(data, length);
    273     // If there is no Network Boot Info or we're setting it
    274     // for the first time just update the "last version".
    275     if (length < 2)
    276         m_lastNbiVersion = NBI_VERSION_ABSENT;
    277     else if (m_lastNbiVersion == NBI_VERSION_UNSET)
     273    // If we're setting it for the first time just update the "last version".
     274    if (m_lastNbiVersion == NBI_VERSION_UNSET)
    278275        m_lastNbiVersion = data[0];
    279276    else
    280277        m_engine_wait.wakeAll();
  • mythtv/libs/libmythtv/scheduledrecording.cpp

    diff --git a/mythtv/libs/libmythtv/scheduledrecording.cpp b/mythtv/libs/libmythtv/scheduledrecording.cpp
    index a7c5915..1992671 100644
    a b ScheduledRecording::testRecording() 
    10151015        return;
    10161016    }
    10171017
    1018     bool resetID = false;
    10191018    if (getRecordID() == 0) {
    10201019        thequery = QString("SELECT MAX(recordid) FROM %1 ORDER BY recordid;")
    10211020                           .arg(ttable);
    ScheduledRecording::testRecording() 
    10461045        return;
    10471046    }
    10481047
    1049     if (resetID)
    1050         id->setValue(0);
    1051 
    10521048    vsd.exec();
    10531049}
    10541050
  • mythtv/libs/libmythtv/teletextdecoder.cpp

    diff --git a/mythtv/libs/libmythtv/teletextdecoder.cpp b/mythtv/libs/libmythtv/teletextdecoder.cpp
    index ca95474..513576f 100644
    a b using namespace std; 
    4646 */
    4747void TeletextDecoder::Decode(const unsigned char *buf, int vbimode)
    4848{
    49     int err = 0, latin1 = -1, zahl1, pagenum, subpagenum, lang, flags;
     49    int err = 0, zahl1, pagenum, subpagenum, lang, flags;
    5050    uint magazine, packet, header;
    5151
    5252    if (!m_teletextviewer)
    void TeletextDecoder::Decode(const unsigned char *buf, int vbimode) 
    142142            subpagenum= (b2 + b3 * 256) & 0x3f7f;
    143143            pagenum = (magazine?:8)*256 + b1;
    144144
    145             lang = "\0\4\2\6\1\5\3\7"[b4 >> 5] + (latin1 ? 0 : 8);
     145            lang = "\0\4\2\6\1\5\3\7"[b4 >> 5];
    146146            flags = b4 & 0x1F;
    147147            flags |= b3 & 0xC0;
    148148            flags |= (b2 & 0x80) >> 2;
  • mythtv/libs/libmythtv/vbitext/vbi.c

    diff --git a/mythtv/libs/libmythtv/vbitext/vbi.c b/mythtv/libs/libmythtv/vbitext/vbi.c
    index f7e31f4..0c67b5f 100644
    a b vbi_send(struct vbi *vbi, int type, int i1, int i2, int i3, void *p1) 
    114114static void
    115115vbi_send_page(struct vbi *vbi, struct raw_page *rvtp, int page)
    116116{
    117     struct vt_page *cvtp = 0;
    118 
    119117    if (rvtp->page->flags & PG_ACTIVE)
    120118    {
    121119       if (rvtp->page->pgno % 256 != page)
    122120       {
    123121           rvtp->page->flags &= ~PG_ACTIVE;
    124122           enhance(rvtp->enh, rvtp->page);
    125 //         if (vbi->cache)
    126 //             cvtp = vbi->cache->op->put(vbi->cache, rvtp->page);
    127            vbi_send(vbi, EV_PAGE, 0, 0, 0, cvtp ?: rvtp->page);
     123           vbi_send(vbi, EV_PAGE, 0, 0, 0, rvtp->page);
    128124       }
    129125    }
    130126}
    vbi_close(struct vbi *vbi) 
    693689struct vt_page *
    694690vbi_query_page(struct vbi *vbi, int pgno, int subno)
    695691{
    696     struct vt_page *vtp = 0;
    697 
    698     (void)pgno;
    699     (void)subno;
    700 
    701 //    if (vbi->cache)
    702 //     vtp = vbi->cache->op->get(vbi->cache, pgno, subno);
    703     if (vtp == 0)
    704     {
    705        // EV_PAGE will come later...
    706        return 0;
    707     }
    708 
    709     vbi_send(vbi, EV_PAGE, 1, 0, 0, vtp);
    710     return vtp;
     692    return 0;
    711693}
    712694
    713695void
  • mythtv/libs/libmythtv/videodev_myth.h

    diff --git a/mythtv/libs/libmythtv/videodev_myth.h b/mythtv/libs/libmythtv/videodev_myth.h
    index 95ede70..438bde0 100644
    a b struct video_tuner 
    6464#define VIDEO_MODE_PAL          0
    6565#define VIDEO_MODE_NTSC         1
    6666#define VIDEO_MODE_SECAM        2
    67 #define VIDEO_MODE_AUTO         3
     67#define VIDEO_MODE_PALNC        3
    6868#define VIDEO_MODE_ATSC         4       /* dtv */
     69#define VIDEO_MODE_PALN         5
     70#define VIDEO_MODE_NTSCJP       6
    6971        __u16 signal;                   /* Signal strength 16bit scale */
    7072};
    7173