Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(408)

Unified Diff: media/formats/mp2t/es_parser_mpeg1audio.cc

Issue 1235793005: Deprecate LogCB in favor of using MediaLog (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments and attempt to fix Android compilation Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « media/formats/mp2t/es_parser_mpeg1audio.h ('k') | media/formats/mp2t/es_parser_mpeg1audio_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/formats/mp2t/es_parser_mpeg1audio.cc
diff --git a/media/formats/mp2t/es_parser_mpeg1audio.cc b/media/formats/mp2t/es_parser_mpeg1audio.cc
index 51176140e3a07d6bda830cd5d7955a2ac64a6a22..27bb34556ab0aabebc166910aefbefc1e6f881de 100644
--- a/media/formats/mp2t/es_parser_mpeg1audio.cc
+++ b/media/formats/mp2t/es_parser_mpeg1audio.cc
@@ -38,10 +38,10 @@ struct EsParserMpeg1Audio::Mpeg1AudioFrame {
EsParserMpeg1Audio::EsParserMpeg1Audio(
const NewAudioConfigCB& new_audio_config_cb,
const EmitBufferCB& emit_buffer_cb,
- const LogCB& log_cb)
- : log_cb_(log_cb),
- new_audio_config_cb_(new_audio_config_cb),
- emit_buffer_cb_(emit_buffer_cb) {
+ const scoped_refptr<MediaLog>& media_log)
+ : media_log_(media_log),
+ new_audio_config_cb_(new_audio_config_cb),
+ emit_buffer_cb_(emit_buffer_cb) {
}
EsParserMpeg1Audio::~EsParserMpeg1Audio() {
@@ -122,7 +122,7 @@ bool EsParserMpeg1Audio::LookForMpeg1AudioFrame(
int remaining_size = es_size - offset;
DCHECK_GE(remaining_size, MPEG1AudioStreamParser::kHeaderSize);
MPEG1AudioStreamParser::Header header;
- if (!MPEG1AudioStreamParser::ParseHeader(log_cb_, cur_buf, &header))
+ if (!MPEG1AudioStreamParser::ParseHeader(media_log_, cur_buf, &header))
continue;
if (remaining_size < header.frame_size) {
@@ -162,8 +162,7 @@ bool EsParserMpeg1Audio::LookForMpeg1AudioFrame(
bool EsParserMpeg1Audio::UpdateAudioConfiguration(
const uint8* mpeg1audio_header) {
MPEG1AudioStreamParser::Header header;
- if (!MPEG1AudioStreamParser::ParseHeader(log_cb_,
- mpeg1audio_header,
+ if (!MPEG1AudioStreamParser::ParseHeader(media_log_, mpeg1audio_header,
&header)) {
return false;
}
« no previous file with comments | « media/formats/mp2t/es_parser_mpeg1audio.h ('k') | media/formats/mp2t/es_parser_mpeg1audio_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698