Skip to content

Commit

Permalink
Don't use the CAM when on an unencrypted channel or when
Browse files Browse the repository at this point in the history
just looking for EIT data

Refs #11021

Signed-off-by: Stuart Auchterlonie <stuarta@squashedfrog.net>
  • Loading branch information
Shinck@web.de authored and jyavenard committed Mar 8, 2013
1 parent b4bd90d commit 93f2d2b
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 12 deletions.
10 changes: 10 additions & 0 deletions mythtv/libs/libmythtv/recorders/dtvsignalmonitor.cpp
Expand Up @@ -372,7 +372,12 @@ void DTVSignalMonitor::HandlePMT(uint, const ProgramMapTable *pmt)
{
if (pmt->IsEncrypted(GetDTVChannel()->GetSIStandard()) &&
!ignore_encrypted)
{
DVBChannel *dvbchannel = GetDVBChannel();
if (dvbchannel)
dvbchannel->SetPMT(pmt);
AddFlags(kDTVSigMon_WaitForCrypt);
}

AddFlags(kDTVSigMon_PMTMatch);
}
Expand Down Expand Up @@ -546,6 +551,11 @@ const ScanStreamData *DTVSignalMonitor::GetScanStreamData() const
return dynamic_cast<const ScanStreamData*>(stream_data);
}

DVBChannel *DTVSignalMonitor::GetDVBChannel(void)
{
return dynamic_cast<DVBChannel*>(channel);
}

bool DTVSignalMonitor::IsAllGood(void) const
{
QMutexLocker locker(&statusLock);
Expand Down
2 changes: 2 additions & 0 deletions mythtv/libs/libmythtv/recorders/dtvsignalmonitor.h
Expand Up @@ -11,6 +11,7 @@ using namespace std;
#include "streamlisteners.h"

class DTVChannel;
class DVBChannel;

class DTVSignalMonitor : public SignalMonitor,
public MPEGStreamListener,
Expand Down Expand Up @@ -103,6 +104,7 @@ class DTVSignalMonitor : public SignalMonitor,

protected:
DTVChannel *GetDTVChannel(void);
DVBChannel *GetDVBChannel(void);
void UpdateMonitorValues(void);
void UpdateListeningForEIT(void);

Expand Down
6 changes: 3 additions & 3 deletions mythtv/libs/libmythtv/recorders/dvbchannel.cpp
Expand Up @@ -272,8 +272,6 @@ bool DVBChannel::Open(DVBChannel *who)
diseqc_tree->Open(fd_frontend);
}

dvbcam->Start();

first_tune = true;

if (!InitializeInputs())
Expand Down Expand Up @@ -464,7 +462,7 @@ bool DVBChannel::CheckCodeRate(DTVCodeRate rate) const
}

/**
* \brief Return true iff modulation is supported modulation on the frontend
* \brief Return true if modulation is supported modulation on the frontend
*/
bool DVBChannel::CheckModulation(DTVModulation modulation) const
{
Expand All @@ -491,6 +489,8 @@ bool DVBChannel::CheckModulation(DTVModulation modulation) const
*/
void DVBChannel::SetPMT(const ProgramMapTable *pmt)
{
if (!dvbcam->IsRunning())
dvbcam->Start();
if (pmt && dvbcam->IsRunning())
dvbcam->SetPMT(this, pmt);
}
Expand Down
3 changes: 2 additions & 1 deletion mythtv/libs/libmythtv/recorders/dvbrecorder.cpp
Expand Up @@ -181,7 +181,8 @@ QString DVBRecorder::GetSIStandard(void) const

void DVBRecorder::SetCAMPMT(const ProgramMapTable *pmt)
{
_channel->SetPMT(pmt);
if (pmt->IsEncrypted(_channel->GetSIStandard()))
_channel->SetPMT(pmt);
}

void DVBRecorder::UpdateCAMTimeOffset(void)
Expand Down
8 changes: 0 additions & 8 deletions mythtv/libs/libmythtv/recorders/dvbsignalmonitor.cpp
Expand Up @@ -17,7 +17,6 @@
#include "cardutil.h"

#include "dvbtypes.h"
#include "dvbchannel.h"
#include "dvbrecorder.h"
#include "dvbstreamhandler.h"

Expand Down Expand Up @@ -172,13 +171,6 @@ QStringList DVBSignalMonitor::GetStatusList(void) const
void DVBSignalMonitor::HandlePMT(uint program_num, const ProgramMapTable *pmt)
{
DTVSignalMonitor::HandlePMT(program_num, pmt);

if (pmt->ProgramNumber() == (uint)programNumber)
{
DVBChannel *dvbchannel = GetDVBChannel();
if (dvbchannel)
dvbchannel->SetPMT(pmt);
}
}

void DVBSignalMonitor::HandleSTT(const SystemTimeTable *stt)
Expand Down

0 comments on commit 93f2d2b

Please sign in to comment.