| OLD | NEW |
| 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 "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "media/formats/mp4/es_descriptor.h" | 8 #include "media/formats/mp4/es_descriptor.h" |
| 9 #include "media/formats/mp4/rcheck.h" | 9 #include "media/formats/mp4/rcheck.h" |
| 10 | 10 |
| (...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 650 return reader->ScanChildren() && | 650 return reader->ScanChildren() && |
| 651 reader->MaybeReadChild(&header) && | 651 reader->MaybeReadChild(&header) && |
| 652 reader->ReadChildren(&tracks); | 652 reader->ReadChildren(&tracks); |
| 653 } | 653 } |
| 654 | 654 |
| 655 Movie::Movie() : fragmented(false) {} | 655 Movie::Movie() : fragmented(false) {} |
| 656 Movie::~Movie() {} | 656 Movie::~Movie() {} |
| 657 FourCC Movie::BoxType() const { return FOURCC_MOOV; } | 657 FourCC Movie::BoxType() const { return FOURCC_MOOV; } |
| 658 | 658 |
| 659 bool Movie::Parse(BoxReader* reader) { | 659 bool Movie::Parse(BoxReader* reader) { |
| 660 return reader->ScanChildren() && | 660 RCHECK(reader->ScanChildren() && reader->ReadChild(&header) && |
| 661 reader->ReadChild(&header) && | 661 reader->ReadChildren(&tracks)); |
| 662 reader->ReadChildren(&tracks) && | 662 |
| 663 // Media Source specific: 'mvex' required | 663 RCHECK_MEDIA_LOGGED(reader->ReadChild(&extends), reader->log_cb(), |
| 664 reader->ReadChild(&extends) && | 664 "Detected unfragmented MP4. Media Source Extensions " |
| 665 reader->MaybeReadChildren(&pssh); | 665 "require ISO BMFF moov to contain mvex to indicate that " |
| 666 "Movie Fragments are to be expected."); |
| 667 |
| 668 return reader->MaybeReadChildren(&pssh); |
| 666 } | 669 } |
| 667 | 670 |
| 668 TrackFragmentDecodeTime::TrackFragmentDecodeTime() : decode_time(0) {} | 671 TrackFragmentDecodeTime::TrackFragmentDecodeTime() : decode_time(0) {} |
| 669 TrackFragmentDecodeTime::~TrackFragmentDecodeTime() {} | 672 TrackFragmentDecodeTime::~TrackFragmentDecodeTime() {} |
| 670 FourCC TrackFragmentDecodeTime::BoxType() const { return FOURCC_TFDT; } | 673 FourCC TrackFragmentDecodeTime::BoxType() const { return FOURCC_TFDT; } |
| 671 | 674 |
| 672 bool TrackFragmentDecodeTime::Parse(BoxReader* reader) { | 675 bool TrackFragmentDecodeTime::Parse(BoxReader* reader) { |
| 673 RCHECK(reader->ReadFullBoxHeader()); | 676 RCHECK(reader->ReadFullBoxHeader()); |
| 674 if (reader->version() == 1) | 677 if (reader->version() == 1) |
| 675 return reader->Read8(&decode_time); | 678 return reader->Read8(&decode_time); |
| (...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 947 SampleDependsOn IndependentAndDisposableSamples::sample_depends_on( | 950 SampleDependsOn IndependentAndDisposableSamples::sample_depends_on( |
| 948 size_t i) const { | 951 size_t i) const { |
| 949 if (i >= sample_depends_on_.size()) | 952 if (i >= sample_depends_on_.size()) |
| 950 return kSampleDependsOnUnknown; | 953 return kSampleDependsOnUnknown; |
| 951 | 954 |
| 952 return sample_depends_on_[i]; | 955 return sample_depends_on_[i]; |
| 953 } | 956 } |
| 954 | 957 |
| 955 } // namespace mp4 | 958 } // namespace mp4 |
| 956 } // namespace media | 959 } // namespace media |
| OLD | NEW |