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

Side by Side Diff: media/formats/mp4/mp4_stream_parser_unittest.cc

Issue 816353010: Implemented HEVC video demuxing and parsing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase to ToT Created 5 years, 3 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 <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 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 EXPECT_FALSE(AppendDataInPieces(buffer->data(), buffer->data_size(), 512)); 287 EXPECT_FALSE(AppendDataInPieces(buffer->data(), buffer->data_size(), 512));
288 } 288 }
289 289
290 // Test a file where all video samples start with an Access Unit 290 // Test a file where all video samples start with an Access Unit
291 // Delimiter (AUD) NALU. 291 // Delimiter (AUD) NALU.
292 TEST_F(MP4StreamParserTest, VideoSamplesStartWithAUDs) { 292 TEST_F(MP4StreamParserTest, VideoSamplesStartWithAUDs) {
293 EXPECT_MEDIA_LOG(VideoCodecLog("avc1.4d4028")); 293 EXPECT_MEDIA_LOG(VideoCodecLog("avc1.4d4028"));
294 ParseMP4File("bear-1280x720-av_with-aud-nalus_frag.mp4", 512); 294 ParseMP4File("bear-1280x720-av_with-aud-nalus_frag.mp4", 512);
295 } 295 }
296 296
297 #if defined(ENABLE_HEVC_DEMUXING)
298 TEST_F(MP4StreamParserTest, HEVC_in_MP4_container) {
wolenetz 2015/09/02 21:56:59 cast_shell_linux try bot doesn't seem to have run
wolenetz 2015/09/02 22:09:24 Hmm. More complicated than I initially thought. EN
servolk 2015/09/03 00:17:51 As we've discussed offline we are in the same situ
wolenetz 2015/09/08 19:53:10 Acknowledged.
299 InitializeParserAndExpectLiveness(DemuxerStream::LIVENESS_RECORDED);
300 scoped_refptr<DecoderBuffer> buffer = ReadTestDataFile("bear-hevc-frag.mp4");
301 EXPECT_TRUE(AppendDataInPieces(buffer->data(), buffer->data_size(), 512));
wolenetz 2015/09/02 20:43:18 ditto nit: I would think my recent changes would n
wolenetz 2015/09/02 22:09:24 See also my comment earlier in this test case.
servolk 2015/09/03 00:17:51 Indeed, the test wasn't running, because ENABLE_HE
wolenetz 2015/09/08 19:53:10 Acknowledged. Thanks for fixing.
302 }
303 #endif
304
297 TEST_F(MP4StreamParserTest, CENC) { 305 TEST_F(MP4StreamParserTest, CENC) {
298 // Encrypted test mp4 files have non-zero duration and are treated as 306 // Encrypted test mp4 files have non-zero duration and are treated as
299 // recorded streams. 307 // recorded streams.
300 InitializeParserAndExpectLiveness(DemuxerStream::LIVENESS_RECORDED); 308 InitializeParserAndExpectLiveness(DemuxerStream::LIVENESS_RECORDED);
301 309
302 scoped_refptr<DecoderBuffer> buffer = 310 scoped_refptr<DecoderBuffer> buffer =
303 ReadTestDataFile("bear-1280x720-v_frag-cenc.mp4"); 311 ReadTestDataFile("bear-1280x720-v_frag-cenc.mp4");
304 EXPECT_MEDIA_LOG(VideoCodecLog("avc1.6401f")); 312 EXPECT_MEDIA_LOG(VideoCodecLog("avc1.6401f"));
305 EXPECT_TRUE(AppendDataInPieces(buffer->data(), buffer->data_size(), 512)); 313 EXPECT_TRUE(AppendDataInPieces(buffer->data(), buffer->data_size(), 512));
306 } 314 }
(...skipping 15 matching lines...) Expand all
322 scoped_refptr<DecoderBuffer> buffer = 330 scoped_refptr<DecoderBuffer> buffer =
323 ReadTestDataFile("bear-640x360-non_square_pixel-with_pasp.mp4"); 331 ReadTestDataFile("bear-640x360-non_square_pixel-with_pasp.mp4");
324 332
325 EXPECT_MEDIA_LOG(VideoCodecLog("avc1.6401e")); 333 EXPECT_MEDIA_LOG(VideoCodecLog("avc1.6401e"));
326 EXPECT_TRUE(AppendDataInPieces(buffer->data(), buffer->data_size(), 512)); 334 EXPECT_TRUE(AppendDataInPieces(buffer->data(), buffer->data_size(), 512));
327 EXPECT_EQ(gfx::Size(639, 360), video_decoder_config_.natural_size()); 335 EXPECT_EQ(gfx::Size(639, 360), video_decoder_config_.natural_size());
328 } 336 }
329 337
330 } // namespace mp4 338 } // namespace mp4
331 } // namespace media 339 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698