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

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

Issue 2702803002: media-internals: Remove audio/video codec reporting from mp4 parser (Closed)
Patch Set: comments addressed Created 3 years, 10 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/box_definitions.cc ('k') | media/formats/mp4/mp4_stream_parser_unittest.cc » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/hevc.h" 5 #include "media/formats/mp4/hevc.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <memory> 8 #include <memory>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 arrays[j].units.resize(numNalus); 109 arrays[j].units.resize(numNalus);
110 for (uint32_t i = 0; i < numNalus; ++i) { 110 for (uint32_t i = 0; i < numNalus; ++i) {
111 uint16_t naluLength = 0; 111 uint16_t naluLength = 0;
112 RCHECK(reader->Read2(&naluLength) && 112 RCHECK(reader->Read2(&naluLength) &&
113 reader->ReadVec(&arrays[j].units[i], naluLength)); 113 reader->ReadVec(&arrays[j].units[i], naluLength));
114 DVLOG(4) << __func__ << " naluType=" << (int)(arrays[j].first_byte & 0x3f) 114 DVLOG(4) << __func__ << " naluType=" << (int)(arrays[j].first_byte & 0x3f)
115 << " size=" << arrays[j].units[i].size(); 115 << " size=" << arrays[j].units[i].size();
116 } 116 }
117 } 117 }
118 118
119 if (media_log.get()) {
120 MEDIA_LOG(INFO, media_log) << "Video codec: hevc";
121 }
122
123 return true; 119 return true;
124 } 120 }
125 121
126 VideoCodecProfile HEVCDecoderConfigurationRecord::GetVideoProfile() const { 122 VideoCodecProfile HEVCDecoderConfigurationRecord::GetVideoProfile() const {
127 // The values of general_profile_idc are taken from the HEVC standard, see 123 // The values of general_profile_idc are taken from the HEVC standard, see
128 // the latest https://www.itu.int/rec/T-REC-H.265/en section A.3 124 // the latest https://www.itu.int/rec/T-REC-H.265/en section A.3
129 switch (general_profile_idc) { 125 switch (general_profile_idc) {
130 case 1: 126 case 1:
131 return HEVCPROFILE_MAIN; 127 return HEVCPROFILE_MAIN;
132 case 2: 128 case 2:
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
247 // count for that first subsample. 243 // count for that first subsample.
248 RCHECK(HEVC::InsertParamSetsAnnexB(*hevc_config_, frame_buf, subsamples)); 244 RCHECK(HEVC::InsertParamSetsAnnexB(*hevc_config_, frame_buf, subsamples));
249 } 245 }
250 246
251 DCHECK(HEVC::IsValidAnnexB(*frame_buf, *subsamples)); 247 DCHECK(HEVC::IsValidAnnexB(*frame_buf, *subsamples));
252 return true; 248 return true;
253 } 249 }
254 250
255 } // namespace mp4 251 } // namespace mp4
256 } // namespace media 252 } // namespace media
OLDNEW
« no previous file with comments | « media/formats/mp4/box_definitions.cc ('k') | media/formats/mp4/mp4_stream_parser_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698