Ticket #4472: 4472-test-2.patch
File 4472-test-2.patch, 7.8 KB (added by , 16 years ago) |
---|
-
libs/libmythtv/firewirechannel.cpp
22 22 fw_opts(firewire_opts), 23 23 device(NULL), 24 24 current_channel(0), 25 isopen(false) 25 isopen(false), 26 initialized(false) 26 27 { 27 28 uint64_t guid = string_to_guid(videodevice); 28 29 uint subunitid = 0; // we only support first tuner on STB... … … 40 41 InitializeInputs(); 41 42 } 42 43 44 bool FirewireChannel::Init(QString &inputname, QString &startchannel) 45 { 46 if (!initialized) 47 { 48 DTVChannel::Init(inputname, startchannel); 49 } 50 else 51 { 52 VERBOSE(VB_CHANNEL, QString("[RE]Init(%1,%2)") 53 .arg(inputname).arg(startchannel)); 54 } 55 initialized = true; 56 } 57 43 58 bool FirewireChannel::SetChannelByString(const QString &channum) 44 59 { 45 60 QString loc = LOC + QString("SetChannelByString(%1)").arg(channum); … … 209 224 210 225 bool FirewireChannel::SetChannelByNumber(int channel) 211 226 { 227 VERBOSE(VB_CHANNEL, QString("SetChannelByNumber(%1)").arg(channel)); 212 228 current_channel = channel; 213 229 214 230 if (FirewireDevice::kAVCPowerOff == GetPowerState()) -
libs/libmythtv/firewiredevice.cpp
144 144 bool FirewireDevice::SetChannel(const QString &panel_model, 145 145 uint alt_method, uint channel) 146 146 { 147 VERBOSE(VB_CHANNEL, QString("SetChannel(model %1, alt %2, chan %3)") 148 .arg(panel_model).arg(alt_method).arg(channel)); 149 147 150 QMutexLocker locker(&m_lock); 151 VERBOSE(VB_CHANNEL, "SetChannel() -- locked"); 148 152 149 153 if (!IsSTBSupported(panel_model)) 150 154 { … … 160 164 digit[2] = (channel % 10); 161 165 162 166 if (m_subunitid >= kAVCSubunitIdExtended) 167 { 168 VERBOSE(VB_IMPORTANT, LOC_ERR + 169 "SetChannel: Extended subunits are not supported."); 170 163 171 return false; 172 } 164 173 165 174 vector<uint8_t> cmd; 166 175 vector<uint8_t> ret; -
libs/libmythtv/firewirerecorder.cpp
175 175 VERBOSE(VB_RECORD, LOC + "PauseAndWait("<<timeout<<") -- pause"); 176 176 if (!paused) 177 177 { 178 VERBOSE(VB_RECORD, LOC + "PauseAndWait() -- stop"); 178 179 StopStreaming(); 180 VERBOSE(VB_RECORD, LOC + "PauseAndWait() -- stopped"); 181 VERBOSE(VB_RECORD, LOC + "PauseAndWait() -- setting 'paused'"); 179 182 paused = true; 183 VERBOSE(VB_RECORD, LOC + "PauseAndWait() -- 'paused' set"); 180 184 pauseWait.wakeAll(); 181 185 if (tvrec) 186 { 187 VERBOSE(VB_RECORD, LOC + "PauseAndWait() -- rec paused"); 182 188 tvrec->RecorderPaused(); 189 } 183 190 } 191 VERBOSE(VB_RECORD, LOC + "PauseAndWait() -- wait for unpause"); 184 192 unpauseWait.wait(timeout); 193 VERBOSE(VB_RECORD, LOC + "PauseAndWait() -- unpaused or timeout"); 185 194 } 186 195 if (!request_pause && paused) 187 196 { 188 197 VERBOSE(VB_RECORD, LOC + "PauseAndWait("<<timeout<<") -- unpause"); 189 198 StartStreaming(); 199 VERBOSE(VB_RECORD, LOC + "PauseAndWait() -- clearing 'paused'"); 190 200 paused = false; 201 VERBOSE(VB_RECORD, LOC + "PauseAndWait() -- 'paused' cleared"); 191 202 } 203 204 VERBOSE(VB_RECORD, LOC + "PauseAndWait("<<timeout<<") -- done " 205 "-- paused("<<paused<<")"); 206 192 207 return paused; 193 208 } 194 209 -
libs/libmythtv/channelutil.cpp
920 920 const QString &new_channum, 921 921 const QString &old_channum) 922 922 { 923 VERBOSE(VB_CHANNEL, QString("IsOnSameMultiplex: old_channum: %1") 924 .arg(old_channum)); 925 VERBOSE(VB_CHANNEL, QString("IsOnSameMultiplex: new_channum: %1") 926 .arg(old_channum)); 927 923 928 if (new_channum.isEmpty() || old_channum.isEmpty()) 924 929 return false; 925 930 926 if (new_channum == old_channum)927 return true;931 // if (new_channum == old_channum) 932 // return true; 928 933 929 934 uint old_mplexid = GetMplexID(srcid, old_channum); 930 935 if (!old_mplexid) … … 934 939 if (!new_mplexid) 935 940 return false; 936 941 942 VERBOSE(VB_CHANNEL, QString("IsOnSameMultiplex? %1==%2 -> %3") 943 .arg(old_mplexid).arg(new_mplexid) 944 .arg(old_mplexid == new_mplexid)); 945 937 946 return old_mplexid == new_mplexid; 938 947 } 939 948 -
libs/libmythtv/firewirechannel.h
19 19 ~FirewireChannel() { Close(); } 20 20 21 21 // Commands 22 virtual bool Init(QString &inputname, QString &startchannel); 22 23 virtual bool Open(void); 23 24 virtual void Close(void); 24 25 … … 45 46 FirewireDevice *device; 46 47 uint current_channel; 47 48 bool isopen; 49 bool initialized; 48 50 }; 49 51 50 52 #endif // _FIREWIRECHANNEL_H_ -
libs/libmythtv/tv_rec.cpp
2795 2795 */ 2796 2796 void TVRec::PauseRecorder(void) 2797 2797 { 2798 VERBOSE(VB_IMPORTANT, "PauseRecorder -- begin"); 2798 2799 QMutexLocker lock(&stateChangeLock); 2799 2800 2800 2801 if (!recorder) … … 2805 2806 } 2806 2807 2807 2808 recorder->Pause(); 2809 VERBOSE(VB_IMPORTANT, "PauseRecorder -- done " 2810 "(still need to wait for pause)"); 2808 2811 } 2809 2812 2810 2813 /** \fn TVRec::RecorderPaused(void) … … 3012 3015 void TVRec::SetChannel(QString name, uint requestType) 3013 3016 { 3014 3017 QMutexLocker lock(&stateChangeLock); 3015 VERBOSE(VB_RECORD, LOC + "SetChannel()" + " -- begin");3018 VERBOSE(VB_RECORD, LOC + QString("SetChannel(%1) -- begin").arg(name)); 3016 3019 3017 3020 // Detect tuning request type if needed 3018 3021 if (requestType & kFlagDetect) … … 3035 3038 while (!HasFlags(kFlagRingBufferReady)) 3036 3039 WaitForEventThreadSleep(); 3037 3040 } 3038 VERBOSE(VB_RECORD, LOC + "SetChannel()" + " -- end");3041 VERBOSE(VB_RECORD, LOC + QString("SetChannel(%1) -- end").arg(name)); 3039 3042 } 3040 3043 3041 3044 /** \fn TVRec::GetNextProgram(int,QString&,QString&,QString&,QString&,QString&,QString&,QString&,QString&,QString&,QString&,QString&,QString&) … … 3335 3338 3336 3339 uint sourceid = channel->GetCurrentSourceID(); 3337 3340 QString oldchannum = channel->GetCurrentName(); 3338 QString newchannum = request.channel;3341 QString newchannum = QDeepCopy<QString>(request.channel); 3339 3342 3340 3343 if (ChannelUtil::IsOnSameMultiplex(sourceid, newchannum, oldchannum)) 3341 3344 { … … 3401 3404 kFlagEITScan|kFlagAntennaAdjust)) 3402 3405 { 3403 3406 if (!recorder) 3407 { 3408 VERBOSE(VB_RECORD, LOC + 3409 "No recorder yet, calling TuningFrequency"); 3404 3410 TuningFrequency(request); 3411 } 3405 3412 else 3413 { 3414 VERBOSE(VB_RECORD, LOC + "Waiting for recorder pause.."); 3406 3415 SetFlags(kFlagWaitingForRecPause); 3416 } 3407 3417 } 3408 3418 lastTuningRequest = request; 3409 3419 } … … 3423 3433 GetHDHRRecorder()->SetRingBuffer(NULL); 3424 3434 } 3425 3435 #endif // USING_HDHOMERUN 3436 VERBOSE(VB_RECORD, LOC + "Recorder paused, calling TuningFrequency"); 3426 3437 TuningFrequency(lastTuningRequest); 3427 3438 } 3428 3439