OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/mp4/mp4_stream_parser.h" | 5 #include "media/mp4/mp4_stream_parser.h" |
6 | 6 |
7 #include "base/callback.h" | 7 #include "base/callback.h" |
8 #include "base/callback_helpers.h" | 8 #include "base/callback_helpers.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/time.h" | 10 #include "base/time.h" |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
138 DVLOG(2) << "Skipping unrecognized top-level box: " | 138 DVLOG(2) << "Skipping unrecognized top-level box: " |
139 << FourCCToString(reader->type()); | 139 << FourCCToString(reader->type()); |
140 } | 140 } |
141 | 141 |
142 queue_.Pop(reader->size()); | 142 queue_.Pop(reader->size()); |
143 return !(*err); | 143 return !(*err); |
144 } | 144 } |
145 | 145 |
146 | 146 |
147 bool MP4StreamParser::ParseMoov(BoxReader* reader) { | 147 bool MP4StreamParser::ParseMoov(BoxReader* reader) { |
148 // TODO(strobe): Respect edit lists. | |
149 moov_.reset(new Movie); | 148 moov_.reset(new Movie); |
150 RCHECK(moov_->Parse(reader)); | 149 RCHECK(moov_->Parse(reader)); |
151 runs_.reset(new TrackRunIterator(moov_.get())); | 150 runs_.reset(new TrackRunIterator(moov_.get())); |
152 | 151 |
153 has_audio_ = false; | 152 has_audio_ = false; |
154 has_video_ = false; | 153 has_video_ = false; |
155 | 154 |
156 AudioDecoderConfig audio_config; | 155 AudioDecoderConfig audio_config; |
157 VideoDecoderConfig video_config; | 156 VideoDecoderConfig video_config; |
158 | 157 |
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
471 return !err; | 470 return !err; |
472 } | 471 } |
473 | 472 |
474 void MP4StreamParser::ChangeState(State new_state) { | 473 void MP4StreamParser::ChangeState(State new_state) { |
475 DVLOG(2) << "Changing state: " << new_state; | 474 DVLOG(2) << "Changing state: " << new_state; |
476 state_ = new_state; | 475 state_ = new_state; |
477 } | 476 } |
478 | 477 |
479 } // namespace mp4 | 478 } // namespace mp4 |
480 } // namespace media | 479 } // namespace media |
OLD | NEW |