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

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: Yet another attempt to fix that link failure. MEDIA_EXPORT should do it! 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/box_definitions.h ('k') | media/formats/mp4/fourccs.h » ('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/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 ||
465 hdlr_type == FOURCC_TEXT || hdlr_type == FOURCC_SBTL) {
466 // For purposes of detection, we include 'sbtl' handler here. Note, though
467 // that ISO-14496-12 and its 2012 Amendment 2, and the spec for sourcing
468 // inband tracks all reference only 'text' or 'subt', and 14496-30
469 // references only 'subt'. Yet ffmpeg can encode subtitles as 'sbtl'.
470 type = kText;
464 } else { 471 } else {
465 type = kInvalid; 472 type = kInvalid;
466 } 473 }
467 return true; 474 return true;
468 } 475 }
469 476
470 AVCDecoderConfigurationRecord::AVCDecoderConfigurationRecord() 477 AVCDecoderConfigurationRecord::AVCDecoderConfigurationRecord()
471 : version(0), 478 : version(0),
472 profile_indication(0), 479 profile_indication(0),
473 profile_compatibility(0), 480 profile_compatibility(0),
(...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after
1147 SampleDependsOn IndependentAndDisposableSamples::sample_depends_on( 1154 SampleDependsOn IndependentAndDisposableSamples::sample_depends_on(
1148 size_t i) const { 1155 size_t i) const {
1149 if (i >= sample_depends_on_.size()) 1156 if (i >= sample_depends_on_.size())
1150 return kSampleDependsOnUnknown; 1157 return kSampleDependsOnUnknown;
1151 1158
1152 return sample_depends_on_[i]; 1159 return sample_depends_on_[i];
1153 } 1160 }
1154 1161
1155 } // namespace mp4 1162 } // namespace mp4
1156 } // namespace media 1163 } // namespace media
OLDNEW
« no previous file with comments | « media/formats/mp4/box_definitions.h ('k') | media/formats/mp4/fourccs.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698