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

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

Issue 1897363004: Reland of Implement support for vp9 in ISO-BMFF (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/fourccs.h ('k') | media/media.gyp » ('j') | 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 8
9 #include <limits> 9 #include <limits>
10 #include <memory> 10 #include <memory>
(...skipping 531 matching lines...) Expand 10 before | Expand all | Expand 10 after
542 decrypt_config = runs_->GetDecryptConfig(); 542 decrypt_config = runs_->GetDecryptConfig();
543 if (!decrypt_config) { 543 if (!decrypt_config) {
544 *err = true; 544 *err = true;
545 return false; 545 return false;
546 } 546 }
547 subsamples = decrypt_config->subsamples(); 547 subsamples = decrypt_config->subsamples();
548 } 548 }
549 549
550 std::vector<uint8_t> frame_buf(buf, buf + runs_->sample_size()); 550 std::vector<uint8_t> frame_buf(buf, buf + runs_->sample_size());
551 if (video) { 551 if (video) {
552 DCHECK(runs_->video_description().frame_bitstream_converter); 552 if (runs_->video_description().video_codec == kCodecH264 ||
553 if (!runs_->video_description().frame_bitstream_converter->ConvertFrame( 553 runs_->video_description().video_codec == kCodecHEVC) {
554 &frame_buf, runs_->is_keyframe(), &subsamples)) { 554 DCHECK(runs_->video_description().frame_bitstream_converter);
555 MEDIA_LOG(ERROR, media_log_) 555 if (!runs_->video_description().frame_bitstream_converter->ConvertFrame(
556 << "Failed to prepare video sample for decode"; 556 &frame_buf, runs_->is_keyframe(), &subsamples)) {
557 *err = true; 557 MEDIA_LOG(ERROR, media_log_)
558 return false; 558 << "Failed to prepare video sample for decode";
559 *err = true;
560 return false;
561 }
559 } 562 }
560 } 563 }
561 564
562 if (audio) { 565 if (audio) {
563 if (ESDescriptor::IsAAC(runs_->audio_description().esds.object_type) && 566 if (ESDescriptor::IsAAC(runs_->audio_description().esds.object_type) &&
564 !PrepareAACBuffer(runs_->audio_description().esds.aac, 567 !PrepareAACBuffer(runs_->audio_description().esds.aac,
565 &frame_buf, &subsamples)) { 568 &frame_buf, &subsamples)) {
566 MEDIA_LOG(ERROR, media_log_) << "Failed to prepare AAC sample for decode"; 569 MEDIA_LOG(ERROR, media_log_) << "Failed to prepare AAC sample for decode";
567 *err = true; 570 *err = true;
568 return false; 571 return false;
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
695 runs.AdvanceSample(); 698 runs.AdvanceSample();
696 } 699 }
697 runs.AdvanceRun(); 700 runs.AdvanceRun();
698 } 701 }
699 702
700 return true; 703 return true;
701 } 704 }
702 705
703 } // namespace mp4 706 } // namespace mp4
704 } // namespace media 707 } // namespace media
OLDNEW
« no previous file with comments | « media/formats/mp4/fourccs.h ('k') | media/media.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698