Skip to content

Commit

Permalink
VERBOSE -> LOG in libmythtv, part 3
Browse files Browse the repository at this point in the history
  • Loading branch information
Beirdo committed Jul 4, 2011
1 parent 43a2640 commit 4fbd934
Show file tree
Hide file tree
Showing 50 changed files with 1,076 additions and 1,003 deletions.
4 changes: 2 additions & 2 deletions mythtv/libs/libmythtv/audioinputalsa.cpp
Expand Up @@ -156,7 +156,7 @@ bool AudioInputALSA::PrepHwParams(void)
QString("failed to set sample format %1")
.arg(snd_pcm_format_description(format))))
return false;
if (VERBOSE_LEVEL_CHECK(VB_AUDIO|VB_EXTRA))
if (VERBOSE_LEVEL_CHECK(VB_AUDIO) && logLevel <= LOG_DEBUG)
{
uint min_chans, max_chans;
if(AlsaBad(snd_pcm_hw_params_get_channels_min(hwparams, &min_chans),
Expand All @@ -165,7 +165,7 @@ bool AudioInputALSA::PrepHwParams(void)
if(AlsaBad(snd_pcm_hw_params_get_channels_max(hwparams, &max_chans),
QString("unable to get max channel count")))
max_chans = 0;
LOG(VB_AUDIO, LOG_INFO, LOC_DEV +
LOG(VB_AUDIO, LOG_DEBUG, LOC_DEV +
QString("min channels %1, max channels %2, myth requests %3")
.arg(min_chans).arg(max_chans).arg(m_audio_channels));
}
Expand Down
14 changes: 7 additions & 7 deletions mythtv/libs/libmythtv/dvbrecorder.cpp
Expand Up @@ -46,7 +46,7 @@ bool DVBRecorder::Open(void)
{
if (IsOpen())
{
VERBOSE(VB_GENERAL, LOC_WARN + "Card already open");
LOG(VB_GENERAL, LOG_WARNING, LOC + "Card already open");
return true;
}

Expand All @@ -59,7 +59,7 @@ bool DVBRecorder::Open(void)

_stream_handler = DVBStreamHandler::Get(videodevice);

VERBOSE(VB_RECORD, LOC + "Card opened successfully");
LOG(VB_RECORD, LOG_INFO, LOC + "Card opened successfully");

return true;
}
Expand All @@ -71,19 +71,19 @@ bool DVBRecorder::IsOpen(void) const

void DVBRecorder::Close(void)
{
VERBOSE(VB_RECORD, LOC + "Close() -- begin");
LOG(VB_RECORD, LOG_INFO, LOC + "Close() -- begin");

DVBStreamHandler::Return(_stream_handler);

VERBOSE(VB_RECORD, LOC + "Close() -- end");
LOG(VB_RECORD, LOG_INFO, LOC + "Close() -- end");
}

void DVBRecorder::StartRecording(void)
{
if (!Open())
{
_error = "Failed to open DVB device";
VERBOSE(VB_IMPORTANT, LOC_ERR + _error);
LOG(VB_GENERAL, LOG_ERR, LOC + _error);
return;
}

Expand Down Expand Up @@ -126,7 +126,7 @@ void DVBRecorder::StartRecording(void)

if (!_input_pmt)
{
VERBOSE(VB_GENERAL, LOC_WARN +
LOG(VB_GENERAL, LOG_WARNING, LOC +
"Recording will not commence until a PMT is set.");
usleep(5000);
continue;
Expand All @@ -135,7 +135,7 @@ void DVBRecorder::StartRecording(void)
if (!_stream_handler->IsRunning())
{
_error = "Stream handler died unexpectedly.";
VERBOSE(VB_IMPORTANT, LOC_ERR + _error);
LOG(VB_GENERAL, LOG_ERR, LOC + _error);
}
}

Expand Down
14 changes: 7 additions & 7 deletions mythtv/libs/libmythtv/dvbsignalmonitor.cpp
Expand Up @@ -71,17 +71,17 @@ DVBSignalMonitor::DVBSignalMonitor(int db_cardnum, DVBChannel* _channel,
bool ok;
_channel->HasLock(&ok);
if (!ok)
VERBOSE(VB_IMPORTANT, LOC_ERR + "Cannot read DVB status" + ENO);
LOG(VB_GENERAL, LOG_ERR, LOC + "Cannot read DVB status" + ENO);

uint64_t rmflags = 0;

#define DVB_IO(FLAG, METHOD, MSG) \
do { if (HasFlags(FLAG)) { bool ok; _channel->METHOD(&ok); \
if (!ok) { \
VERBOSE(VB_IMPORTANT, LOC_WARN+"Cannot "+MSG+ENO); \
LOG(VB_GENERAL, LOG_WARNING, LOC+"Cannot "+MSG+ENO); \
rmflags |= FLAG; } \
else { \
VERBOSE(VB_CHANNEL, LOC + "Can " + MSG); } } } while (false)
LOG(VB_CHANNEL, LOG_INFO, LOC + "Can " + MSG); } } } while (false)

DVB_IO(kSigMon_WaitForSig, GetSignalStrength,
"measure Signal Strength");
Expand All @@ -96,7 +96,7 @@ DVBSignalMonitor::DVBSignalMonitor(int db_cardnum, DVBChannel* _channel,

RemoveFlags(rmflags);

VERBOSE(VB_CHANNEL, LOC + "DVBSignalMonitor::ctor " +
LOG(VB_CHANNEL, LOG_INFO, LOC + "DVBSignalMonitor::ctor " +
QString("initial flags %1").arg(sm_flags_to_string(flags)));

minimum_update_rate = _channel->GetMinSignalMonitorDelay();
Expand Down Expand Up @@ -144,13 +144,13 @@ void DVBSignalMonitor::GetRotorStatus(bool &was_moving, bool &is_moving)
*/
void DVBSignalMonitor::Stop(void)
{
VERBOSE(VB_CHANNEL, LOC + "Stop() -- begin");
LOG(VB_CHANNEL, LOG_INFO, LOC + "Stop() -- begin");
SignalMonitor::Stop();
if (GetStreamData())
streamHandler->RemoveListener(GetStreamData());
streamHandlerStarted = false;
streamHandler->SetRetuneAllowed(false, NULL, NULL);
VERBOSE(VB_CHANNEL, LOC + "Stop() -- end");
LOG(VB_CHANNEL, LOG_INFO, LOC + "Stop() -- end");
}

QStringList DVBSignalMonitor::GetStatusList(void) const
Expand Down Expand Up @@ -293,7 +293,7 @@ void DVBSignalMonitor::UpdateValues(void)
// Debug output
if (wasLocked != isLocked)
{
VERBOSE(VB_CHANNEL, LOC + "UpdateValues -- Signal " +
LOG(VB_CHANNEL, LOG_INFO, LOC + "UpdateValues -- Signal " +
(isLocked ? "Locked" : "Lost"));
}

Expand Down

0 comments on commit 4fbd934

Please sign in to comment.