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

Side by Side Diff: media/formats/common/stream_parser_test_base.cc

Issue 2815303006: Convert MediaLog from being ref counted to owned by WebMediaPlayer. (Closed)
Patch Set: Rebase. Created 3 years, 8 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
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 <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 26 matching lines...) Expand all
37 std::unique_ptr<StreamParser> stream_parser) 37 std::unique_ptr<StreamParser> stream_parser)
38 : parser_(std::move(stream_parser)) { 38 : parser_(std::move(stream_parser)) {
39 parser_->Init( 39 parser_->Init(
40 base::Bind(&StreamParserTestBase::OnInitDone, base::Unretained(this)), 40 base::Bind(&StreamParserTestBase::OnInitDone, base::Unretained(this)),
41 base::Bind(&StreamParserTestBase::OnNewConfig, base::Unretained(this)), 41 base::Bind(&StreamParserTestBase::OnNewConfig, base::Unretained(this)),
42 base::Bind(&StreamParserTestBase::OnNewBuffers, base::Unretained(this)), 42 base::Bind(&StreamParserTestBase::OnNewBuffers, base::Unretained(this)),
43 true, 43 true,
44 base::Bind(&StreamParserTestBase::OnKeyNeeded, base::Unretained(this)), 44 base::Bind(&StreamParserTestBase::OnKeyNeeded, base::Unretained(this)),
45 base::Bind(&StreamParserTestBase::OnNewSegment, base::Unretained(this)), 45 base::Bind(&StreamParserTestBase::OnNewSegment, base::Unretained(this)),
46 base::Bind(&StreamParserTestBase::OnEndOfSegment, base::Unretained(this)), 46 base::Bind(&StreamParserTestBase::OnEndOfSegment, base::Unretained(this)),
47 new MediaLog()); 47 &media_log_);
48 } 48 }
49 49
50 StreamParserTestBase::~StreamParserTestBase() {} 50 StreamParserTestBase::~StreamParserTestBase() {}
51 51
52 std::string StreamParserTestBase::ParseFile(const std::string& filename, 52 std::string StreamParserTestBase::ParseFile(const std::string& filename,
53 int append_bytes) { 53 int append_bytes) {
54 results_stream_.clear(); 54 results_stream_.clear();
55 scoped_refptr<DecoderBuffer> buffer = ReadTestDataFile(filename); 55 scoped_refptr<DecoderBuffer> buffer = ReadTestDataFile(filename);
56 EXPECT_TRUE( 56 EXPECT_TRUE(
57 AppendDataInPieces(buffer->data(), buffer->data_size(), append_bytes)); 57 AppendDataInPieces(buffer->data(), buffer->data_size(), append_bytes));
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 DVLOG(1) << __func__; 128 DVLOG(1) << __func__;
129 results_stream_ << "NewSegment"; 129 results_stream_ << "NewSegment";
130 } 130 }
131 131
132 void StreamParserTestBase::OnEndOfSegment() { 132 void StreamParserTestBase::OnEndOfSegment() {
133 DVLOG(1) << __func__; 133 DVLOG(1) << __func__;
134 results_stream_ << "EndOfSegment"; 134 results_stream_ << "EndOfSegment";
135 } 135 }
136 136
137 } // namespace media 137 } // namespace media
OLDNEW
« no previous file with comments | « media/formats/common/stream_parser_test_base.h ('k') | media/formats/mp2t/es_parser_mpeg1audio.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698