Ticket #1043: dvdmenu_code_cleanup1.patch

File dvdmenu_code_cleanup1.patch, 3.5 KB (added by skamithi@…, 18 years ago)

move dvd subtitle osd clearing from avformatdecoder to dvdringbuffer.cpp

  • libs/libmythtv/DVDRingBuffer.h

     
    5555    uint GetAudioLanguage(int id);
    5656    uint GetSubtitleLanguage(int id);
    5757    long long MenuSpuPts(void) { return menuspupts; }
    58     int CellChange(void) { return cellChange; }
    5958
    6059    // commands
    6160    bool OpenFile(const QString &filename);
     
    119118    bool           buttonSelected;
    120119    bool           buttonExists;
    121120    long long      menuspupts;
    122     int            cellChange;
    123121
    124122    NuppelVideoPlayer *parent;
    125123
  • libs/libmythtv/avformatdecoder.cpp

     
    275275      // language preference
    276276      languagePreference(iso639_get_language_key_list()),
    277277      // DVD
    278       lastdvdtitle(0), lastdvdpart(0),
    279       lastdvdcellchange(0)
     278      lastdvdtitle(0)
    280279{
    281280    bzero(&params, sizeof(AVFormatParameters));
    282281    bzero(prvpkt, 3 * sizeof(char));
     
    22732272            int dvdtitle  = 0;
    22742273            int dvdpart = 0;
    22752274            ringBuffer->DVD()->GetPartAndTitle(dvdtitle,dvdpart);
    2276             int dvdcellchange = ringBuffer->DVD()->CellChange();
    2277             if ((dvdtitle != lastdvdtitle || dvdpart != lastdvdpart ||
    2278                         dvdcellchange != lastdvdcellchange))
    2279             {
    2280                 GetNVP()->GetOSD()->HideSet("subtitles");
    2281                 GetNVP()->GetOSD()->ClearAll("subtitles");
    2282             }
    22832275            if (dvdtitle != lastdvdtitle)
    22842276            {
    22852277                posmapStarted = false;
     
    22922284                            .arg(framesPlayed));
    22932285            }
    22942286            lastdvdtitle = dvdtitle;
    2295             lastdvdpart = dvdpart;
    2296             lastdvdcellchange = dvdcellchange;
    22972287           
    22982288            if (storedPackets.count() < 2 && !dvdvideopause)
    22992289                storevideoframes = true;
  • libs/libmythtv/DVDRingBuffer.cpp

     
    3434      skipstillorwait(true), spuStreamLetterbox(false),
    3535      cellstartPos(0), buttonSelected(false),
    3636      buttonExists(false), menuspupts(0),
    37       cellChange(0), parent(0)
     37      parent(0)
    3838{
    3939    dvdMenuButton = (AVSubtitleRect*)av_mallocz(sizeof(AVSubtitleRect));
    4040}
     
    223223                titleLength = length *DVD_BLOCK_SIZE;
    224224                cellstartPos = GetReadPosition();
    225225                buttonSelected = false;
    226                 if (cellChange == 100)
    227                     cellChange = 0;
    228                 else
    229                     cellChange++;
    230226
     227                if (parent)
     228                {
     229                    parent->GetOSD()->HideSet("subtitles");
     230                    parent->GetOSD()->ClearAll("subtitles");
     231                }
     232
    231233                if (blockBuf != dvdBlockWriteBuf)
    232234                {
    233235                    dvdnav_free_cache_block(dvdnav, blockBuf);
  • libs/libmythtv/avformatdecoder.h

     
    257257
    258258    // DVD
    259259    int lastdvdtitle;
    260     int lastdvdpart;
    261     int lastdvdcellchange;
    262260};
    263261
    264262#endif