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

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

Issue 2273793002: Don't fail on profile changes in GpuVideoDecoder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make MSE stop lying. Created 4 years, 4 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/mp2t/es_parser_h264.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/box_definitions.h" 5 #include "media/formats/mp4/box_definitions.h"
6 6
7 #include <memory> 7 #include <memory>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/command_line.h" 10 #include "base/command_line.h"
11 #include "base/logging.h" 11 #include "base/logging.h"
12 #include "base/strings/string_number_conversions.h" 12 #include "base/strings/string_number_conversions.h"
13 #include "media/base/media_switches.h" 13 #include "media/base/media_switches.h"
14 #include "media/base/video_types.h" 14 #include "media/base/video_types.h"
15 #include "media/base/video_util.h" 15 #include "media/base/video_util.h"
16 #include "media/filters/h264_parser.h"
16 #include "media/formats/mp4/avc.h" 17 #include "media/formats/mp4/avc.h"
17 #include "media/formats/mp4/es_descriptor.h" 18 #include "media/formats/mp4/es_descriptor.h"
18 #include "media/formats/mp4/rcheck.h" 19 #include "media/formats/mp4/rcheck.h"
19 #include "media/media_features.h" 20 #include "media/media_features.h"
20 21
21 #if BUILDFLAG(ENABLE_HEVC_DEMUXING) 22 #if BUILDFLAG(ENABLE_HEVC_DEMUXING)
22 #include "media/formats/mp4/hevc.h" 23 #include "media/formats/mp4/hevc.h"
23 #endif 24 #endif
24 25
25 namespace media { 26 namespace media {
(...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 const FourCC actual_format = 659 const FourCC actual_format =
659 format == FOURCC_ENCV ? sinf.format.format : format; 660 format == FOURCC_ENCV ? sinf.format.format : format;
660 switch (actual_format) { 661 switch (actual_format) {
661 case FOURCC_AVC1: 662 case FOURCC_AVC1:
662 case FOURCC_AVC3: { 663 case FOURCC_AVC3: {
663 DVLOG(2) << __FUNCTION__ 664 DVLOG(2) << __FUNCTION__
664 << " reading AVCDecoderConfigurationRecord (avcC)"; 665 << " reading AVCDecoderConfigurationRecord (avcC)";
665 std::unique_ptr<AVCDecoderConfigurationRecord> avcConfig( 666 std::unique_ptr<AVCDecoderConfigurationRecord> avcConfig(
666 new AVCDecoderConfigurationRecord()); 667 new AVCDecoderConfigurationRecord());
667 RCHECK(reader->ReadChild(avcConfig.get())); 668 RCHECK(reader->ReadChild(avcConfig.get()));
669 video_codec = kCodecH264;
670 video_codec_profile = H264Parser::ProfileIDCToVideoCodecProfile(
671 avcConfig->profile_indication);
668 frame_bitstream_converter = 672 frame_bitstream_converter =
669 make_scoped_refptr(new AVCBitstreamConverter(std::move(avcConfig))); 673 make_scoped_refptr(new AVCBitstreamConverter(std::move(avcConfig)));
670 video_codec = kCodecH264;
671 video_codec_profile = H264PROFILE_MAIN;
672 break; 674 break;
673 } 675 }
674 #if BUILDFLAG(ENABLE_HEVC_DEMUXING) 676 #if BUILDFLAG(ENABLE_HEVC_DEMUXING)
675 case FOURCC_HEV1: 677 case FOURCC_HEV1:
676 case FOURCC_HVC1: { 678 case FOURCC_HVC1: {
677 DVLOG(2) << __FUNCTION__ 679 DVLOG(2) << __FUNCTION__
678 << " parsing HEVCDecoderConfigurationRecord (hvcC)"; 680 << " parsing HEVCDecoderConfigurationRecord (hvcC)";
679 std::unique_ptr<HEVCDecoderConfigurationRecord> hevcConfig( 681 std::unique_ptr<HEVCDecoderConfigurationRecord> hevcConfig(
680 new HEVCDecoderConfigurationRecord()); 682 new HEVCDecoderConfigurationRecord());
681 RCHECK(reader->ReadChild(hevcConfig.get())); 683 RCHECK(reader->ReadChild(hevcConfig.get()));
(...skipping 590 matching lines...) Expand 10 before | Expand all | Expand 10 after
1272 SampleDependsOn IndependentAndDisposableSamples::sample_depends_on( 1274 SampleDependsOn IndependentAndDisposableSamples::sample_depends_on(
1273 size_t i) const { 1275 size_t i) const {
1274 if (i >= sample_depends_on_.size()) 1276 if (i >= sample_depends_on_.size())
1275 return kSampleDependsOnUnknown; 1277 return kSampleDependsOnUnknown;
1276 1278
1277 return sample_depends_on_[i]; 1279 return sample_depends_on_[i];
1278 } 1280 }
1279 1281
1280 } // namespace mp4 1282 } // namespace mp4
1281 } // namespace media 1283 } // namespace media
OLDNEW
« no previous file with comments | « media/formats/mp2t/es_parser_h264.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698