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

Side by Side Diff: media/formats/mp2t/mp2t_stream_parser_unittest.cc

Issue 1564983003: MSE: Log a warning if muxed AV media segment has no A or has no V block (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 <stddef.h> 5 #include <stddef.h>
6 #include <stdint.h> 6 #include <stdint.h>
7 7
8 #include <algorithm> 8 #include <algorithm>
9 #include <string> 9 #include <string>
10 10
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 void OnKeyNeeded(EmeInitDataType type, 179 void OnKeyNeeded(EmeInitDataType type,
180 const std::vector<uint8_t>& init_data) { 180 const std::vector<uint8_t>& init_data) {
181 NOTREACHED() << "OnKeyNeeded not expected in the Mpeg2 TS parser"; 181 NOTREACHED() << "OnKeyNeeded not expected in the Mpeg2 TS parser";
182 } 182 }
183 183
184 void OnNewSegment() { 184 void OnNewSegment() {
185 DVLOG(1) << "OnNewSegment"; 185 DVLOG(1) << "OnNewSegment";
186 segment_count_++; 186 segment_count_++;
187 } 187 }
188 188
189 void OnEndOfSegment() { 189 bool OnEndOfSegment() {
190 NOTREACHED() << "OnEndOfSegment not expected in the Mpeg2 TS parser"; 190 NOTREACHED() << "OnEndOfSegment not expected in the Mpeg2 TS parser";
191 return false;
191 } 192 }
192 193
193 void InitializeParser() { 194 void InitializeParser() {
194 parser_->Init( 195 parser_->Init(
195 base::Bind(&Mp2tStreamParserTest::OnInit, base::Unretained(this)), 196 base::Bind(&Mp2tStreamParserTest::OnInit, base::Unretained(this)),
196 base::Bind(&Mp2tStreamParserTest::OnNewConfig, base::Unretained(this)), 197 base::Bind(&Mp2tStreamParserTest::OnNewConfig, base::Unretained(this)),
197 base::Bind(&Mp2tStreamParserTest::OnNewBuffers, base::Unretained(this)), 198 base::Bind(&Mp2tStreamParserTest::OnNewBuffers, base::Unretained(this)),
198 true, 199 true,
199 base::Bind(&Mp2tStreamParserTest::OnKeyNeeded, base::Unretained(this)), 200 base::Bind(&Mp2tStreamParserTest::OnKeyNeeded, base::Unretained(this)),
200 base::Bind(&Mp2tStreamParserTest::OnNewSegment, base::Unretained(this)), 201 base::Bind(&Mp2tStreamParserTest::OnNewSegment, base::Unretained(this)),
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 parser_->Flush(); 291 parser_->Flush();
291 EXPECT_EQ(audio_frame_count_, 40); 292 EXPECT_EQ(audio_frame_count_, 40);
292 EXPECT_EQ(video_frame_count_, 0); 293 EXPECT_EQ(video_frame_count_, 0);
293 // This stream has no mid-stream configuration change. 294 // This stream has no mid-stream configuration change.
294 EXPECT_EQ(config_count_, 1); 295 EXPECT_EQ(config_count_, 1);
295 EXPECT_EQ(segment_count_, 1); 296 EXPECT_EQ(segment_count_, 1);
296 } 297 }
297 298
298 } // namespace mp2t 299 } // namespace mp2t
299 } // namespace media 300 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698