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

Side by Side Diff: media/formats/common/stream_parser_test_base.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 unified diff | Download patch
« no previous file with comments | « media/filters/stream_parser_factory.cc ('k') | media/formats/mp2t/es_parser_mpeg1audio.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "media/formats/common/stream_parser_test_base.h" 5 #include "media/formats/common/stream_parser_test_base.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "media/base/test_data_util.h" 8 #include "media/base/test_data_util.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
(...skipping 20 matching lines...) Expand all
31 scoped_ptr<StreamParser> stream_parser) 31 scoped_ptr<StreamParser> stream_parser)
32 : parser_(stream_parser.Pass()) { 32 : parser_(stream_parser.Pass()) {
33 parser_->Init( 33 parser_->Init(
34 base::Bind(&StreamParserTestBase::OnInitDone, base::Unretained(this)), 34 base::Bind(&StreamParserTestBase::OnInitDone, base::Unretained(this)),
35 base::Bind(&StreamParserTestBase::OnNewConfig, base::Unretained(this)), 35 base::Bind(&StreamParserTestBase::OnNewConfig, base::Unretained(this)),
36 base::Bind(&StreamParserTestBase::OnNewBuffers, base::Unretained(this)), 36 base::Bind(&StreamParserTestBase::OnNewBuffers, base::Unretained(this)),
37 true, 37 true,
38 base::Bind(&StreamParserTestBase::OnKeyNeeded, base::Unretained(this)), 38 base::Bind(&StreamParserTestBase::OnKeyNeeded, base::Unretained(this)),
39 base::Bind(&StreamParserTestBase::OnNewSegment, base::Unretained(this)), 39 base::Bind(&StreamParserTestBase::OnNewSegment, base::Unretained(this)),
40 base::Bind(&StreamParserTestBase::OnEndOfSegment, base::Unretained(this)), 40 base::Bind(&StreamParserTestBase::OnEndOfSegment, base::Unretained(this)),
41 LogCB()); 41 new MediaLog());
42 } 42 }
43 43
44 StreamParserTestBase::~StreamParserTestBase() {} 44 StreamParserTestBase::~StreamParserTestBase() {}
45 45
46 std::string StreamParserTestBase::ParseFile(const std::string& filename, 46 std::string StreamParserTestBase::ParseFile(const std::string& filename,
47 int append_bytes) { 47 int append_bytes) {
48 results_stream_.clear(); 48 results_stream_.clear();
49 scoped_refptr<DecoderBuffer> buffer = ReadTestDataFile(filename); 49 scoped_refptr<DecoderBuffer> buffer = ReadTestDataFile(filename);
50 EXPECT_TRUE( 50 EXPECT_TRUE(
51 AppendDataInPieces(buffer->data(), buffer->data_size(), append_bytes)); 51 AppendDataInPieces(buffer->data(), buffer->data_size(), append_bytes));
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 DVLOG(1) << __FUNCTION__; 118 DVLOG(1) << __FUNCTION__;
119 results_stream_ << "NewSegment"; 119 results_stream_ << "NewSegment";
120 } 120 }
121 121
122 void StreamParserTestBase::OnEndOfSegment() { 122 void StreamParserTestBase::OnEndOfSegment() {
123 DVLOG(1) << __FUNCTION__; 123 DVLOG(1) << __FUNCTION__;
124 results_stream_ << "EndOfSegment"; 124 results_stream_ << "EndOfSegment";
125 } 125 }
126 126
127 } // namespace media 127 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/stream_parser_factory.cc ('k') | media/formats/mp2t/es_parser_mpeg1audio.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698