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

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

Issue 2640113004: Introduce Dolby Vision video codec and Demuxer support (Closed)
Patch Set: fix build break on Android Created 3 years, 9 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_options.gni » ('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 626 matching lines...) Expand 10 before | Expand all | Expand 10 after
637 if (!decrypt_config) { 637 if (!decrypt_config) {
638 *err = true; 638 *err = true;
639 return false; 639 return false;
640 } 640 }
641 subsamples = decrypt_config->subsamples(); 641 subsamples = decrypt_config->subsamples();
642 } 642 }
643 643
644 std::vector<uint8_t> frame_buf(buf, buf + runs_->sample_size()); 644 std::vector<uint8_t> frame_buf(buf, buf + runs_->sample_size());
645 if (video) { 645 if (video) {
646 if (runs_->video_description().video_codec == kCodecH264 || 646 if (runs_->video_description().video_codec == kCodecH264 ||
647 runs_->video_description().video_codec == kCodecHEVC) { 647 runs_->video_description().video_codec == kCodecHEVC ||
648 runs_->video_description().video_codec == kCodecDolbyVision) {
648 DCHECK(runs_->video_description().frame_bitstream_converter); 649 DCHECK(runs_->video_description().frame_bitstream_converter);
649 if (!runs_->video_description().frame_bitstream_converter->ConvertFrame( 650 if (!runs_->video_description().frame_bitstream_converter->ConvertFrame(
650 &frame_buf, runs_->is_keyframe(), &subsamples)) { 651 &frame_buf, runs_->is_keyframe(), &subsamples)) {
651 MEDIA_LOG(ERROR, media_log_) 652 MEDIA_LOG(ERROR, media_log_)
652 << "Failed to prepare video sample for decode"; 653 << "Failed to prepare video sample for decode";
653 *err = true; 654 *err = true;
654 return false; 655 return false;
655 } 656 }
656 } 657 }
657 } 658 }
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
776 runs.AdvanceSample(); 777 runs.AdvanceSample();
777 } 778 }
778 runs.AdvanceRun(); 779 runs.AdvanceRun();
779 } 780 }
780 781
781 return true; 782 return true;
782 } 783 }
783 784
784 } // namespace mp4 785 } // namespace mp4
785 } // namespace media 786 } // namespace media
OLDNEW
« no previous file with comments | « media/formats/mp4/fourccs.h ('k') | media/media_options.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698