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

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

Issue 2317273003: Use the correct HEVC profile in VideoDecoderConfig (Closed)
Patch Set: Added a comment to explain where general_profile_idc values are from Created 4 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
« no previous file with comments | « media/formats/mp4/hevc.cc ('k') | no next file » | 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 "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
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
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
OLDNEW
« no previous file with comments | « media/formats/mp4/hevc.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698