OLD | NEW |
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/mp4/mp4_stream_parser.h" | 5 #include "media/formats/mp4/mp4_stream_parser.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 353 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
364 #endif | 364 #endif |
365 auto params = GetDefaultInitParametersExpectations(); | 365 auto params = GetDefaultInitParametersExpectations(); |
366 params.duration = base::TimeDelta::FromMicroseconds(1002000); | 366 params.duration = base::TimeDelta::FromMicroseconds(1002000); |
367 params.liveness = DemuxerStream::LIVENESS_RECORDED; | 367 params.liveness = DemuxerStream::LIVENESS_RECORDED; |
368 params.detected_audio_track_count = 0; | 368 params.detected_audio_track_count = 0; |
369 InitializeParserWithInitParametersExpectations(params); | 369 InitializeParserWithInitParametersExpectations(params); |
370 | 370 |
371 scoped_refptr<DecoderBuffer> buffer = ReadTestDataFile("bear-hevc-frag.mp4"); | 371 scoped_refptr<DecoderBuffer> buffer = ReadTestDataFile("bear-hevc-frag.mp4"); |
372 EXPECT_EQ(expect_success, | 372 EXPECT_EQ(expect_success, |
373 AppendDataInPieces(buffer->data(), buffer->data_size(), 512)); | 373 AppendDataInPieces(buffer->data(), buffer->data_size(), 512)); |
| 374 #if BUILDFLAG(ENABLE_HEVC_DEMUXING) |
| 375 EXPECT_EQ(kCodecHEVC, video_decoder_config_.codec()); |
| 376 EXPECT_EQ(HEVCPROFILE_MAIN, video_decoder_config_.profile()); |
| 377 #endif |
374 } | 378 } |
375 | 379 |
376 // Sample encryption information is stored as CencSampleAuxiliaryDataFormat | 380 // Sample encryption information is stored as CencSampleAuxiliaryDataFormat |
377 // (ISO/IEC 23001-7:2015 8) inside 'mdat' box. No SampleEncryption ('senc') box. | 381 // (ISO/IEC 23001-7:2015 8) inside 'mdat' box. No SampleEncryption ('senc') box. |
378 TEST_F(MP4StreamParserTest, CencWithEncryptionInfoStoredAsAuxDataInMdat) { | 382 TEST_F(MP4StreamParserTest, CencWithEncryptionInfoStoredAsAuxDataInMdat) { |
379 // Encrypted test mp4 files have non-zero duration and are treated as | 383 // Encrypted test mp4 files have non-zero duration and are treated as |
380 // recorded streams. | 384 // recorded streams. |
381 auto params = GetDefaultInitParametersExpectations(); | 385 auto params = GetDefaultInitParametersExpectations(); |
382 params.duration = base::TimeDelta::FromMicroseconds(2736066); | 386 params.duration = base::TimeDelta::FromMicroseconds(2736066); |
383 params.liveness = DemuxerStream::LIVENESS_RECORDED; | 387 params.liveness = DemuxerStream::LIVENESS_RECORDED; |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
566 const MediaTrack& audio_track2 = *(media_tracks_->tracks()[3]); | 570 const MediaTrack& audio_track2 = *(media_tracks_->tracks()[3]); |
567 EXPECT_EQ(audio_track2.type(), MediaTrack::Audio); | 571 EXPECT_EQ(audio_track2.type(), MediaTrack::Audio); |
568 EXPECT_EQ(audio_track2.bytestream_track_id(), 4); | 572 EXPECT_EQ(audio_track2.bytestream_track_id(), 4); |
569 EXPECT_EQ(audio_track2.kind(), ""); | 573 EXPECT_EQ(audio_track2.kind(), ""); |
570 EXPECT_EQ(audio_track2.label(), "SoundHandler"); | 574 EXPECT_EQ(audio_track2.label(), "SoundHandler"); |
571 EXPECT_EQ(audio_track2.language(), "und"); | 575 EXPECT_EQ(audio_track2.language(), "und"); |
572 } | 576 } |
573 | 577 |
574 } // namespace mp4 | 578 } // namespace mp4 |
575 } // namespace media | 579 } // namespace media |
OLD | NEW |