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

Side by Side Diff: media/formats/mp4/mp4_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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 DVLOG(1) << "KeyNeededF: " << init_data.size(); 149 DVLOG(1) << "KeyNeededF: " << init_data.size();
150 EXPECT_EQ(EmeInitDataType::CENC, type); 150 EXPECT_EQ(EmeInitDataType::CENC, type);
151 EXPECT_FALSE(init_data.empty()); 151 EXPECT_FALSE(init_data.empty());
152 } 152 }
153 153
154 void NewSegmentF() { 154 void NewSegmentF() {
155 DVLOG(1) << "NewSegmentF"; 155 DVLOG(1) << "NewSegmentF";
156 lower_bound_ = kNoDecodeTimestamp(); 156 lower_bound_ = kNoDecodeTimestamp();
157 } 157 }
158 158
159 void EndOfSegmentF() { 159 bool EndOfSegmentF() {
160 DVLOG(1) << "EndOfSegmentF()"; 160 DVLOG(1) << "EndOfSegmentF()";
161 lower_bound_ = 161 lower_bound_ =
162 DecodeTimestamp::FromPresentationTime(base::TimeDelta::Max()); 162 DecodeTimestamp::FromPresentationTime(base::TimeDelta::Max());
163 return true; // BIG TODO test !
chcunningham 2016/01/07 22:23:57 :)
wolenetz 2016/01/16 01:23:35 No longer changed (PS5, at least).
163 } 164 }
164 165
165 void InitializeParserAndExpectLiveness( 166 void InitializeParserAndExpectLiveness(
166 DemuxerStream::Liveness expected_liveness) { 167 DemuxerStream::Liveness expected_liveness) {
167 parser_->Init( 168 parser_->Init(
168 base::Bind(&MP4StreamParserTest::InitF, base::Unretained(this), 169 base::Bind(&MP4StreamParserTest::InitF, base::Unretained(this),
169 expected_liveness), 170 expected_liveness),
170 base::Bind(&MP4StreamParserTest::NewConfigF, base::Unretained(this)), 171 base::Bind(&MP4StreamParserTest::NewConfigF, base::Unretained(this)),
171 base::Bind(&MP4StreamParserTest::NewBuffersF, base::Unretained(this)), 172 base::Bind(&MP4StreamParserTest::NewBuffersF, base::Unretained(this)),
172 true, 173 true,
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 scoped_refptr<DecoderBuffer> buffer = 337 scoped_refptr<DecoderBuffer> buffer =
337 ReadTestDataFile("bear-640x360-non_square_pixel-with_pasp.mp4"); 338 ReadTestDataFile("bear-640x360-non_square_pixel-with_pasp.mp4");
338 339
339 EXPECT_MEDIA_LOG(VideoCodecLog("avc1.6401e")); 340 EXPECT_MEDIA_LOG(VideoCodecLog("avc1.6401e"));
340 EXPECT_TRUE(AppendDataInPieces(buffer->data(), buffer->data_size(), 512)); 341 EXPECT_TRUE(AppendDataInPieces(buffer->data(), buffer->data_size(), 512));
341 EXPECT_EQ(gfx::Size(639, 360), video_decoder_config_.natural_size()); 342 EXPECT_EQ(gfx::Size(639, 360), video_decoder_config_.natural_size());
342 } 343 }
343 344
344 } // namespace mp4 345 } // namespace mp4
345 } // namespace media 346 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698