Ticket #1153: 1153-v2.patch
File 1153-v2.patch, 3.1 KB (added by , 17 years ago) |
---|
-
libs/libmythtv/tv_rec.cpp
125 125 internalState(kState_None), desiredNextState(kState_None), 126 126 changeState(false), pauseNotify(true), 127 127 stateFlags(0), lastTuningRequest(0), 128 // Previous recording info 129 lastRecording(NULL), 128 130 // Current recording info 129 131 curRecording(NULL), autoRunJobs(JOB_NONE), 130 132 // Pending recording info … … 1268 1270 // Check for the end of the current program.. 1269 1271 if (GetState() == kState_WatchingLiveTV) 1270 1272 { 1271 #define LIVETV_END (now >= curRecording->endts)1272 // use the following instead to test ringbuffer switching1273 //static QDateTime last = QDateTime::currentDateTime();1274 //#define LIVETV_END ((now >= curRecording->recstartts.addSecs(20)) && (now > last))1275 1276 1273 QDateTime now = QDateTime::currentDateTime(); 1277 1274 bool has_finish = HasFlags(kFlagFinishRecording); 1278 1275 bool has_rec = pseudoLiveTVRecording; … … 1300 1297 1301 1298 SetPseudoLiveTVRecording(NULL); 1302 1299 } 1303 else if (!has_rec && !rec_soon && curRecording && LIVETV_END) 1300 else if (!has_rec && !rec_soon && curRecording && 1301 (now >= curRecording->endts)) 1304 1302 { 1305 SwitchLiveTVRingBuffer(); 1303 if (lastRecording != curRecording) 1304 { 1305 lastRecording = curRecording; 1306 1306 1307 QDateTime starttime; starttime.setTime_t(0); 1308 if (curRecording) 1309 starttime = curRecording->recstartts; 1310 VERBOSE(VB_RECORD, LOC 1311 <<"!has_rec("<<!has_rec<<") " 1312 <<"!rec_soon("<<!rec_soon<<") " 1313 <<"curRec("<<curRecording<<") " 1314 <<"starttm("<<starttime.toString(Qt::ISODate)<<")"); 1315 // last = QDateTime::currentDateTime().addSecs(20); 1307 SwitchLiveTVRingBuffer(false, true); 1308 1309 QDateTime starttime; starttime.setTime_t(0); 1310 if (curRecording) 1311 starttime = curRecording->recstartts; 1312 1313 VERBOSE(VB_RECORD, LOC 1314 <<"!has_rec("<<!has_rec<<") " 1315 <<"!rec_soon("<<!rec_soon<<") " 1316 <<"curRec("<<curRecording<<") " 1317 <<"starttm(" 1318 <<starttime.toString(Qt::ISODate)<<")"); 1319 } 1316 1320 } 1317 1321 else 1318 1322 enable_ui = false; -
libs/libmythtv/tv_rec.h
351 351 QWaitCondition triggerEventLoop; 352 352 QWaitCondition triggerEventSleep; 353 353 354 // Previous recording pointer (do not dereference) 355 ProgramInfo *lastRecording; 356 354 357 // Current recording info 355 358 ProgramInfo *curRecording; 356 359 QDateTime recordEndTime;