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

Side by Side Diff: media/formats/mp4/mp4_stream_parser_unittest.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/formats/mp4/mp4_stream_parser.cc ('k') | media/formats/mp4/track_run_iterator.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 <algorithm> 5 #include <algorithm>
6 #include <string> 6 #include <string>
7 7
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/bind_helpers.h" 9 #include "base/bind_helpers.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
138 DemuxerStream::Liveness expected_liveness) { 138 DemuxerStream::Liveness expected_liveness) {
139 parser_->Init( 139 parser_->Init(
140 base::Bind(&MP4StreamParserTest::InitF, base::Unretained(this), 140 base::Bind(&MP4StreamParserTest::InitF, base::Unretained(this),
141 expected_liveness), 141 expected_liveness),
142 base::Bind(&MP4StreamParserTest::NewConfigF, base::Unretained(this)), 142 base::Bind(&MP4StreamParserTest::NewConfigF, base::Unretained(this)),
143 base::Bind(&MP4StreamParserTest::NewBuffersF, base::Unretained(this)), 143 base::Bind(&MP4StreamParserTest::NewBuffersF, base::Unretained(this)),
144 true, 144 true,
145 base::Bind(&MP4StreamParserTest::KeyNeededF, base::Unretained(this)), 145 base::Bind(&MP4StreamParserTest::KeyNeededF, base::Unretained(this)),
146 base::Bind(&MP4StreamParserTest::NewSegmentF, base::Unretained(this)), 146 base::Bind(&MP4StreamParserTest::NewSegmentF, base::Unretained(this)),
147 base::Bind(&MP4StreamParserTest::EndOfSegmentF, base::Unretained(this)), 147 base::Bind(&MP4StreamParserTest::EndOfSegmentF, base::Unretained(this)),
148 LogCB()); 148 new MediaLog());
149 } 149 }
150 150
151 void InitializeParser() { 151 void InitializeParser() {
152 // Most unencrypted test mp4 files have zero duration and are treated as 152 // Most unencrypted test mp4 files have zero duration and are treated as
153 // live streams. 153 // live streams.
154 InitializeParserAndExpectLiveness(DemuxerStream::LIVENESS_LIVE); 154 InitializeParserAndExpectLiveness(DemuxerStream::LIVENESS_LIVE);
155 } 155 }
156 156
157 bool ParseMP4File(const std::string& filename, int append_bytes) { 157 bool ParseMP4File(const std::string& filename, int append_bytes) {
158 InitializeParser(); 158 InitializeParser();
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 // recorded streams. 256 // recorded streams.
257 InitializeParserAndExpectLiveness(DemuxerStream::LIVENESS_RECORDED); 257 InitializeParserAndExpectLiveness(DemuxerStream::LIVENESS_RECORDED);
258 258
259 scoped_refptr<DecoderBuffer> buffer = 259 scoped_refptr<DecoderBuffer> buffer =
260 ReadTestDataFile("bear-1280x720-v_frag-cenc.mp4"); 260 ReadTestDataFile("bear-1280x720-v_frag-cenc.mp4");
261 EXPECT_TRUE(AppendDataInPieces(buffer->data(), buffer->data_size(), 512)); 261 EXPECT_TRUE(AppendDataInPieces(buffer->data(), buffer->data_size(), 512));
262 } 262 }
263 263
264 } // namespace mp4 264 } // namespace mp4
265 } // namespace media 265 } // namespace media
OLDNEW
« no previous file with comments | « media/formats/mp4/mp4_stream_parser.cc ('k') | media/formats/mp4/track_run_iterator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698