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

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

Issue 1826583003: MSE: Record counts of detected MSE audio, video and text tracks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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 <utility> 7 #include <utility>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 // Check that the length of the Pascal-style string is correct. 454 // Check that the length of the Pascal-style string is correct.
455 RCHECK(name_bytes[0] == (name_bytes.size() - 1)); 455 RCHECK(name_bytes[0] == (name_bytes.size() - 1));
456 // Skip the first byte, containing the length of the Pascal-string. 456 // Skip the first byte, containing the length of the Pascal-string.
457 name = std::string(name_bytes.begin() + 1, name_bytes.end()); 457 name = std::string(name_bytes.begin() + 1, name_bytes.end());
458 } 458 }
459 459
460 if (hdlr_type == FOURCC_VIDE) { 460 if (hdlr_type == FOURCC_VIDE) {
461 type = kVideo; 461 type = kVideo;
462 } else if (hdlr_type == FOURCC_SOUN) { 462 } else if (hdlr_type == FOURCC_SOUN) {
463 type = kAudio; 463 type = kAudio;
464 } else if (hdlr_type == FOURCC_META || hdlr_type == FOURCC_SUBT ||
wolenetz 2016/03/23 01:45:50 Note, this follows the logic in https://dev.w3.org
chcunningham 2016/03/23 23:05:56 Acknowledged.
465 hdlr_type == FOURCC_TEXT) {
466 type = kText;
464 } else { 467 } else {
465 type = kInvalid; 468 type = kInvalid;
466 } 469 }
467 return true; 470 return true;
468 } 471 }
469 472
470 AVCDecoderConfigurationRecord::AVCDecoderConfigurationRecord() 473 AVCDecoderConfigurationRecord::AVCDecoderConfigurationRecord()
471 : version(0), 474 : version(0),
472 profile_indication(0), 475 profile_indication(0),
473 profile_compatibility(0), 476 profile_compatibility(0),
(...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after
1147 SampleDependsOn IndependentAndDisposableSamples::sample_depends_on( 1150 SampleDependsOn IndependentAndDisposableSamples::sample_depends_on(
1148 size_t i) const { 1151 size_t i) const {
1149 if (i >= sample_depends_on_.size()) 1152 if (i >= sample_depends_on_.size())
1150 return kSampleDependsOnUnknown; 1153 return kSampleDependsOnUnknown;
1151 1154
1152 return sample_depends_on_[i]; 1155 return sample_depends_on_[i];
1153 } 1156 }
1154 1157
1155 } // namespace mp4 1158 } // namespace mp4
1156 } // namespace media 1159 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698