Ticket #13247: 13247-2.patch
File 13247-2.patch, 5.5 KB (added by , 6 years ago) |
---|
-
mythtv/libs/libmythtv/recorders/v4lchannel.cpp
diff --git a/mythtv/libs/libmythtv/recorders/v4lchannel.cpp b/mythtv/libs/libmythtv/recorders/v4lchannel.cpp index f4e268628e..fccbaea966 100644
a b V4LChannel::V4LChannel(TVRec *parent, const QString &videodevice, 40 40 audio_device(audiodevice), videofd(-1), 41 41 device_name(), driver_name(), 42 42 curList(NULL), totalChannels(0), 43 currentFormat(),44 43 has_stream_io(false), has_std_io(false), 45 44 has_async_io(false), 46 45 has_tuner(false), has_sliced_vbi(false), … … void V4LChannel::SetFormat(const QString &format) 301 300 LOG(VB_CHANNEL, LOG_INFO, LOC + QString("SetFormat(%1) fmt(%2) input(%3)") 302 301 .arg(format).arg(fmt).arg(inputNum)); 303 302 304 if ((fmt == currentFormat) || SetInputAndFormat(inputNum, fmt)) 305 { 306 currentFormat = fmt; 307 } 303 if (!SetInputAndFormat(inputNum, fmt)) 304 LOG(VB_GENERAL, LOG_ERR, LOC + "Failed to set format." + ENO); 305 308 306 } 309 307 310 308 int V4LChannel::SetDefaultFreqTable(const QString &name) -
mythtv/libs/libmythtv/recorders/v4lchannel.h
diff --git a/mythtv/libs/libmythtv/recorders/v4lchannel.h b/mythtv/libs/libmythtv/recorders/v4lchannel.h index 6b6b54ae88..bdabb47359 100644
a b class V4LChannel : public DTVChannel 94 94 struct CHANLIST *curList; 95 95 int totalChannels; 96 96 97 QString currentFormat;98 97 bool has_stream_io; 99 98 bool has_std_io; 100 99 bool has_async_io; -
mythtv/libs/libmythtv/tv_rec.cpp
diff --git a/mythtv/libs/libmythtv/tv_rec.cpp b/mythtv/libs/libmythtv/tv_rec.cpp index ecb43af392..6556380a1f 100644
a b void TVRec::HandleTuning(void) 3551 3551 } 3552 3552 } 3553 3553 3554 /** \fn TVRec::TuningCheckForHWChange(const TuningRequest&,QString&,QString&)3555 * \brief Returns inputid for device info row in capturecard if it changes.3556 */3557 uint TVRec::TuningCheckForHWChange(const TuningRequest &request,3558 QString &channum,3559 QString &inputname)3560 {3561 LOG(VB_RECORD, LOG_INFO, LOC + QString("request (%1) channum (%2) inputname (%3)")3562 .arg(request.toString()).arg(channum).arg(inputname));3563 if (!channel)3564 return 0;3565 3566 uint curInputID = 0, newInputID = 0;3567 channum = request.channel;3568 inputname = request.input;3569 3570 if (request.program)3571 request.program->QueryTuningInfo(channum, inputname);3572 3573 if (!channum.isEmpty() && inputname.isEmpty())3574 channel->CheckChannel(channum);3575 3576 if (!inputname.isEmpty())3577 {3578 curInputID = channel->GetInputID();3579 newInputID = channel->GetInputID();3580 LOG(VB_GENERAL, LOG_INFO, LOC + QString("HW Tuner: %1->%2")3581 .arg(curInputID).arg(newInputID));3582 }3583 3584 if (curInputID != newInputID || !CardUtil::IsChannelReusable(genOpt.inputtype))3585 {3586 LOG(VB_RECORD, LOG_INFO, LOC + QString("Inputtype HW Tuner newinputid channum curinputid: %1->%2 %3")3587 .arg(curInputID).arg(newInputID).arg(channum));3588 if (channum.isEmpty())3589 channum = GetStartChannel(newInputID);3590 return newInputID;3591 }3592 3593 return 0;3594 }3595 3596 3554 /** \fn TVRec::TuningShutdowns(const TuningRequest&) 3597 3555 * \brief This shuts down anything that needs to be shut down 3598 3556 * before handling the passed in tuning request. … … void TVRec::TuningShutdowns(const TuningRequest &request) 3603 3561 .arg(request.toString())); 3604 3562 3605 3563 QString channum, inputname; 3606 uint newInputID = TuningCheckForHWChange(request, channum, inputname);3607 3564 3608 3565 if (scanner && !(request.flags & kFlagEITScan) && 3609 3566 HasFlags(kFlagEITScannerRunning)) … … void TVRec::TuningShutdowns(const TuningRequest &request) 3635 3592 3636 3593 // At this point any waits are canceled. 3637 3594 3638 if ( newInputID || (request.flags & kFlagNoRec))3595 if (request.flags & kFlagNoRec) 3639 3596 { 3640 3597 if (HasFlags(kFlagDummyRecorderRunning)) 3641 3598 { … … void TVRec::TuningShutdowns(const TuningRequest &request) 3659 3616 // At this point the channel is shut down 3660 3617 } 3661 3618 3662 // handle HW change for digital/analog inputs3663 if (newInputID)3664 {3665 LOG(VB_CHANNEL, LOG_INFO, LOC +3666 "TuningShutdowns: Recreating channel...");3667 channel->Close();3668 delete channel;3669 channel = NULL;3670 3671 GetDevices(newInputID, genOpt, dvbOpt, fwOpt);3672 CreateChannel(channum, false);3673 }3674 3675 3619 if (ringBuffer && (request.flags & kFlagKillRingBuffer)) 3676 3620 { 3677 3621 LOG(VB_RECORD, LOG_INFO, LOC + "Tearing down RingBuffer"); -
mythtv/libs/libmythtv/tv_rec.h
diff --git a/mythtv/libs/libmythtv/tv_rec.h b/mythtv/libs/libmythtv/tv_rec.h index e8106d8b40..20fb29b21e 100644
a b class MTV_PUBLIC TVRec : public SignalMonitorListener, public QRunnable 299 299 void TuningNewRecorder(MPEGStreamData*); 300 300 void TuningRestartRecorder(void); 301 301 QString TuningGetChanNum(const TuningRequest&, QString &input) const; 302 uint TuningCheckForHWChange(const TuningRequest&,303 QString &channum,304 QString &inputname);305 302 bool TuningOnSameMultiplex(TuningRequest &request); 306 303 307 304 void HandleStateChange(void);