Ticket #1959: dvd_changetrack.diff
File dvd_changetrack.diff, 2.2 KB (added by , 18 years ago) |
---|
-
libs/libmythtv/DVDRingBuffer.cpp
963 963 return dvdfps; 964 964 } 965 965 966 bool DVDRingBufferPriv::IsSameChapter(int tmpcellid, int tmpvobid) 967 { 968 if ((tmpcellid == cellid) && (tmpvobid == vobid)) 969 return true; 970 971 return false; 972 } 973 966 974 /** \fn DVDRingBufferPriv::guess_palette(uint32_t, uint8_t, uint8_t) 967 975 * \brief converts palette values from YUV to RGB 968 976 */ -
libs/libmythtv/DVDRingBuffer.h
60 60 61 61 bool JumpToTitle(void) { return jumptotitle; } 62 62 double GetFrameRate(void); 63 int GetCellID(void) { return cellid; } 64 int GetVobID(void) { return vobid; } 65 bool IsSameChapter(int tmpcellid, int tmpvobid); 63 66 64 67 // commands 65 68 bool OpenFile(const QString &filename); -
libs/libmythtv/decoderbase.cpp
689 689 690 690 void DecoderBase::ChangeDVDTrack(bool ffw) 691 691 { 692 bool result = true;693 692 if (!ringBuffer->isDVD()) 694 693 return; 694 695 bool result = true; 696 int prevcellstart = ringBuffer->DVD()->GetCellStart(); 697 int prevcellid = ringBuffer->DVD()->GetCellID(); 698 int prevvobid = ringBuffer->DVD()->GetVobID(); 695 699 696 uint prevcellstart = ringBuffer->DVD()->GetCellStart();697 698 700 if (ffw) 699 701 result = ringBuffer->DVD()->nextTrack(); 700 702 else … … 704 706 { 705 707 if ((prevcellstart == 0 && ffw) || (prevcellstart != 0)) 706 708 { 707 while (prevcellstart == ringBuffer->DVD()->GetCellStart()) 709 int limit = 0; 710 while (ringBuffer->DVD()->IsSameChapter(prevcellid, prevvobid) 711 && limit < 50) 712 { 713 limt++; 708 714 usleep(10000); 715 } 709 716 } 710 717 711 718 uint elapsed = ringBuffer->DVD()->GetCellStart();