@@ -115,7 +115,7 @@ CetonStreamHandler::CetonStreamHandler(const QString &device) :
115115 QStringList parts = device.split (" -" );
116116 if (parts.size () != 2 )
117117 {
118- LOG (VB_RECORD , LOG_ERR, LOC +
118+ LOG (VB_GENERAL , LOG_ERR, LOC +
119119 QString (" Invalid device id %1" ).arg (_device));
120120 return ;
121121 }
@@ -130,15 +130,15 @@ CetonStreamHandler::CetonStreamHandler(const QString &device) :
130130 }
131131 else
132132 {
133- LOG (VB_RECORD , LOG_ERR, LOC +
133+ LOG (VB_GENERAL , LOG_ERR, LOC +
134134 QString (" Invalid device id %1" ).arg (_device));
135135 return ;
136136 }
137137
138138 if (GetVar (" diag" , " Host_IP_Address" ) == " " )
139139 {
140- LOG (VB_RECORD , LOG_ERR, LOC +
141- QString ( " Ceton tuner does not seem to be available at IP" ) );
140+ LOG (VB_GENERAL , LOG_ERR, LOC +
141+ " Ceton tuner does not seem to be available at IP" );
142142 return ;
143143 }
144144
@@ -149,8 +149,7 @@ CetonStreamHandler::CetonStreamHandler(const QString &device) :
149149
150150 if (!QFile (_device_path).exists ())
151151 {
152- LOG (VB_RECORD, LOG_ERR, LOC +
153- QString (" Tuner device unavailable" ));
152+ LOG (VB_GENERAL, LOG_ERR, LOC + " Tuner device unavailable" );
154153 return ;
155154 }
156155 }
@@ -201,7 +200,7 @@ void CetonStreamHandler::run(void)
201200 {
202201 if (!(rtp.Init () && rtp.StartStreaming ()))
203202 {
204- LOG (VB_RECORD , LOG_ERR, LOC +
203+ LOG (VB_GENERAL , LOG_ERR, LOC +
205204 " Starting recording (RTP initialization failed). Aborting." );
206205 _error = true ;
207206 }
@@ -210,7 +209,7 @@ void CetonStreamHandler::run(void)
210209 {
211210 if (!file.open (QIODevice::ReadOnly))
212211 {
213- LOG (VB_RECORD , LOG_ERR, LOC +
212+ LOG (VB_GENERAL , LOG_ERR, LOC +
214213 " Starting recording (file open failed). Aborting." );
215214 _error = true ;
216215 }
@@ -461,7 +460,7 @@ bool CetonStreamHandler::TuneFrequency(
461460
462461 if (!result)
463462 {
464- LOG (VB_RECORD , LOG_ERR, LOC +
463+ LOG (VB_GENERAL , LOG_ERR, LOC +
465464 QString (" TuneFrequency() - HTTP status = %1 - response = %2" )
466465 .arg (status).arg (response));
467466 }
@@ -476,8 +475,9 @@ bool CetonStreamHandler::TuneProgram(uint program)
476475 QStringList program_list = GetProgramList ();
477476 if (!program_list.contains (QString::number (program)))
478477 {
479- LOG (VB_RECORD, LOG_ERR, LOC +
480- QString (" TuneProgram(%1) - Requested program not in the program list" ).arg (program));
478+ LOG (VB_GENERAL, LOG_ERR, LOC +
479+ QString (" TuneProgram(%1) - Requested program not in the program list" )
480+ .arg (program));
481481 return false ;
482482 };
483483
@@ -495,7 +495,7 @@ bool CetonStreamHandler::TuneProgram(uint program)
495495
496496 if (!result)
497497 {
498- LOG (VB_RECORD , LOG_ERR, LOC +
498+ LOG (VB_GENERAL , LOG_ERR, LOC +
499499 QString (" TuneProgram() - HTTP status = %1 - response = %2" )
500500 .arg (status).arg (response));
501501 }
@@ -523,7 +523,7 @@ bool CetonStreamHandler::TuneVChannel(const QString &vchannel)
523523
524524 if (!result)
525525 {
526- LOG (VB_RECORD , LOG_ERR, LOC +
526+ LOG (VB_GENERAL , LOG_ERR, LOC +
527527 QString (" TuneVChannel() - HTTP status = %1 - response = %2" )
528528 .arg (status).arg (response));
529529 }
@@ -541,15 +541,17 @@ void CetonStreamHandler::ClearProgramNumber(void)
541541 usleep (20000 );
542542 };
543543
544- LOG (VB_RECORD , LOG_ERR, LOC + QString ( " Program number failed to clear" ) );
544+ LOG (VB_GENERAL , LOG_ERR, LOC + " Program number failed to clear" );
545545}
546546
547547uint CetonStreamHandler::GetProgramNumber (void ) const
548548{
549549 for (int i = 1 ; i <= 30 ; i++)
550550 {
551551 QString prog = GetVar (" mux" , " ProgramNumber" );
552- LOG (VB_RECORD, LOG_INFO, LOC + QString (" GetProgramNumber() got %1 on attempt %2" ).arg (prog).arg (i));
552+ LOG (VB_RECORD, LOG_INFO, LOC +
553+ QString (" GetProgramNumber() got %1 on attempt %2" )
554+ .arg (prog).arg (i));
553555
554556 uint prognum = prog.toUInt ();
555557 if (prognum != 0 )
@@ -558,7 +560,9 @@ uint CetonStreamHandler::GetProgramNumber(void) const
558560 usleep (100000 );
559561 };
560562
561- LOG (VB_RECORD, LOG_ERR, LOC + QString (" Error: GetProgramNumber() failed to get a non-zero program number" ));
563+ LOG (VB_GENERAL, LOG_ERR, LOC +
564+ " GetProgramNumber() failed to get a non-zero program number" );
565+
562566 return 0 ;
563567}
564568
@@ -577,15 +581,15 @@ QString CetonStreamHandler::GetVar(
577581 uint status;
578582 if (!HttpRequest (" GET" , " /get_var.json" , params, response, status))
579583 {
580- LOG (VB_RECORD , LOG_ERR, loc +
584+ LOG (VB_GENERAL , LOG_ERR, loc +
581585 QString (" HttpRequest failed - %1" ).arg (response));
582586 return QString ();
583587 }
584588
585589 QRegExp regex (" ^\\ { \" ?result\" ?: \" (.*)\" \\ }$" );
586590 if (regex.indexIn (response) == -1 )
587591 {
588- LOG (VB_RECORD , LOG_ERR, loc +
592+ LOG (VB_GENERAL , LOG_ERR, loc +
589593 QString (" unexpected http response: -->%1<--" ).arg (response));
590594 return QString ();
591595 }
@@ -607,7 +611,7 @@ QStringList CetonStreamHandler::GetProgramList()
607611 uint status;
608612 if (!HttpRequest (" GET" , " /get_pat.json" , params, response, status))
609613 {
610- LOG (VB_RECORD , LOG_ERR,
614+ LOG (VB_GENERAL , LOG_ERR,
611615 loc + QString (" HttpRequest failed - %1" ).arg (response));
612616 return QStringList ();
613617 }
@@ -617,7 +621,7 @@ QStringList CetonStreamHandler::GetProgramList()
617621
618622 if (regex.indexIn (response) == -1 )
619623 {
620- LOG (VB_RECORD , LOG_ERR,
624+ LOG (VB_GENERAL , LOG_ERR,
621625 loc + QString (" returned unexpected output: -->%1<--" )
622626 .arg (response));
623627 return QStringList ();
0 commit comments