Ticket #328: dbox2-fix.patch
File dbox2-fix.patch, 2.9 KB (added by , 18 years ago) |
---|
-
libs/libmythtv/tv_rec.cpp
185 185 channel = new DBox2Channel(this, &dboxOpt, cardid); 186 186 channel->Open(); 187 187 InitChannel(genOpt.defaultinput, startchannel); 188 connect(GetDBox2Channel(), SIGNAL(ChannelChanged()), 189 this, SLOT(DBox2ChannelChanged())); 190 188 191 init_run = true; 189 192 #endif 190 193 } … … 2835 2838 } 2836 2839 2837 2840 // Clear the RingBuffer reset flag, in case we wait for a reset below 2838 ClearFlags(kFlagRingBufferReset); 2841 // Also clear DBox2ChannelChanged flag, in case tuning proc waits on DBox2 2842 ClearFlags(kFlagRingBufferReset | kFlagDBox2ChannelChanged); 2839 2843 2840 2844 // Actually add the tuning request to the queue, and 2841 2845 // then wait for it to start tuning … … 3290 3294 ClearFlags(kFlagWaitingForRecPause); 3291 3295 if (ringBuffer) 3292 3296 ringBuffer->Reset(); 3297 TuningFrequency(lastTuningRequest); 3298 3299 // BEGIN UGLY Hack! DBOX should use signal monitor class 3300 // instead of the ChannelChanged signal. 3301 while (GetDBox2Channel() && !HasFlags(kFlagDBox2ChannelChanged)) 3302 { 3303 stateChangeLock.unlock(); 3304 triggerEventLoop.wait(1000 /* ms */); 3305 stateChangeLock.lock(); 3306 } 3307 // END UGLY Hack 3308 3293 3309 SetFlags(kFlagRingBufferReset); 3294 TuningFrequency(lastTuningRequest);3295 3310 } 3296 3311 3297 3312 if (HasFlags(kFlagWaitingForSignal)) -
libs/libmythtv/tv_rec.h
253 253 { QMutexLocker lock(&stateChangeLock); triggerEventLoop.wakeAll(); } 254 254 255 255 public slots: 256 void DBox2ChannelChanged() { SetFlags(kFlagDBox2ChannelChanged); } 256 257 void SignalMonitorAllGood() { triggerEventLoop.wakeAll(); } 257 258 void SetPMTObject(const PMTObject*) 258 259 { QMutexLocker lock(&stateChangeLock); triggerEventLoop.wakeAll(); } … … 448 449 static const uint kFlagSIParserRunning = 0x02000000; 449 450 static const uint kFlagEITScannerRunning = 0x04000000; 450 451 451 static const uint kFlagDummyRecorderRunning = 0x 10000000;452 static const uint kFlagRecorderRunning = 0x 20000000;453 static const uint kFlagAnyRecRunning = 0x 30000000;454 static const uint kFlagAnyRunning = 0x 3F000000;452 static const uint kFlagDummyRecorderRunning = 0x08000000; 453 static const uint kFlagRecorderRunning = 0x10000000; 454 static const uint kFlagAnyRecRunning = 0x18000000; 455 static const uint kFlagAnyRunning = 0x1F000000; 455 456 456 457 // Tuning state 458 static const uint kFlagDBox2ChannelChanged = 0x20000000; 457 459 static const uint kFlagRingBufferReset = 0x40000000; 458 460 static const uint kFlagDetect = 0x80000000; 459 461 };