Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable verbose logging in es_parser_teletext.cc #4

Open
wants to merge 1 commit into
base: teletext-heartbeat
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 17 additions & 17 deletions packager/media/formats/mp2t/es_parser_teletext.cc
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,8 @@ bool EsParserTeletext::ParseInternal(const uint8_t* data,

TextRow row;
if (ParseDataBlock(pts, data_block, packet_nr, magazine, row)) {
LOG(INFO) << "pts=" << pts << " row=" << row.row_number << " text=\""
<< row.fragment.body << "\"";
// LOG(INFO) << "pts=" << pts << " row=" << row.row_number << " text=\""
// << row.fragment.body << "\"";
rows.emplace_back(std::move(row));
}
}
Expand All @@ -221,7 +221,7 @@ bool EsParserTeletext::ParseInternal(const uint8_t* data,

auto page_state_itr = page_state_.find(index);
if (page_state_itr == page_state_.end()) {
LOG(INFO) << "index=" << index << " create TextBlock pts=" << pts;
// LOG(INFO) << "index=" << index << " create TextBlock pts=" << pts;
page_state_.emplace(index, TextBlock{std::move(rows), {}, last_pts_});
} else {
for (auto& row : rows) {
Expand Down Expand Up @@ -265,20 +265,20 @@ bool EsParserTeletext::ParseDataBlock(const int64_t pts,
const uint8_t subcode_c11_c14 = ReadHamming(reader);
const uint8_t subcode_c11_serial = subcode_c11_c14 & 1;
const uint8_t charset_code = subcode_c11_c14 >> 1;
LOG(INFO) << "index=" << index << " pts=" << pts << " erase page "
<< int(erase_code_s4) << " charset=" << int(charset_code)
<< " serial=" << int(subcode_c11_serial);
// LOG(INFO) << "index=" << index << " pts=" << pts << " erase page "
// << int(erase_code_s4) << " charset=" << int(charset_code)
// << " serial=" << int(subcode_c11_serial);
if (charset_code != charset_code_) {
LOG(INFO) << "pts=" << pts << " new charset_code " << int(charset_code);
// LOG(INFO) << "pts=" << pts << " new charset_code " << int(charset_code);
charset_code_ = charset_code;
UpdateCharset();
}
page_state_.emplace(index, TextBlock{{}, {}, last_pts_});
LOG(INFO) << "index=" << index
<< " create TextBlock triggered by packet 0 pts=" << pts;
// LOG(INFO) << "index=" << index
// << " create TextBlock triggered by packet 0 pts=" << pts;
return false;
} else if (packet_nr == 26) {
LOG(INFO) << "pts=" << pts << " packet26";
// LOG(INFO) << "pts=" << pts << " packet26";
ParsePacket26(data_block);
return false;
} else if (packet_nr > 26) {
Expand All @@ -302,7 +302,7 @@ bool EsParserTeletext::ParseDataBlock(const int64_t pts,

void EsParserTeletext::UpdateCharset() {
memcpy(current_charset_, TELETEXT_CHARSET_G0_LATIN, sizeof(TELETEXT_CHARSET_G0_LATIN));
LOG(INFO) << "update charset: " << int(charset_code_);
// LOG(INFO) << "update charset: " << int(charset_code_);
if (charset_code_ > 7) {
return;
}
Expand Down Expand Up @@ -433,7 +433,7 @@ void EsParserTeletext::SendCueStart(const uint16_t index) {
void EsParserTeletext::SendCueEnd(const uint16_t index, const int64_t pts_end) {
auto page_state_itr = page_state_.find(index);
if (page_state_itr != page_state_.end()) {
LOG(INFO) << "index=" << index << " erasing state at pts=" << pts_end;
// LOG(INFO) << "index=" << index << " erasing state at pts=" << pts_end;
page_state_.erase(index);
}

Expand All @@ -445,7 +445,7 @@ void EsParserTeletext::SendCueEnd(const uint16_t index, const int64_t pts_end) {
return;
}

LOG(INFO) << "index=" << index << " sending cueEnd pts=" << pts_end;
// LOG(INFO) << "index=" << index << " sending cueEnd pts=" << pts_end;
TextSettings text_settings;
auto end_sample = std::make_shared<TextSample>(
"", pts_end, pts_end, text_settings, TextFragment({}, ""),
Expand Down Expand Up @@ -511,8 +511,8 @@ EsParserTeletext::TextRow EsParserTeletext::BuildRow(const uint8_t* data_block,
if (column_replacement_map) {
const auto column_itr = column_replacement_map->find(i);
if (column_itr != column_replacement_map->cend()) {
LOG(INFO) << "packet26 replacing col " << int(i) << " with "
<< column_itr->second;
// LOG(INFO) << "packet26 replacing col " << int(i) << " with "
// << column_itr->second;
next_string.append(column_itr->second);
continue;
}
Expand Down Expand Up @@ -617,8 +617,8 @@ void EsParserTeletext::ParsePacket26(const uint8_t* data_block) {
const uint16_t index = magazine_ * 100 + page_number_;
auto page_state_itr = page_state_.find(index);
if (page_state_itr == page_state_.end()) {
LOG(INFO) << "index=" << index
<< " create TextBlock triggered by packet 26 pts=" << last_pts_;
// LOG(INFO) << "index=" << index
// << " create TextBlock triggered by packet 26 pts=" << last_pts_;
page_state_.emplace(index, TextBlock{{}, {}, last_pts_});
}
auto& replacement_map = page_state_[index].packet_26_replacements;
Expand Down