| 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/mp4_stream_parser.h" | 5 #include "media/formats/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/time.h" | 10 #include "base/time/time.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 namespace mp4 { | 23 namespace mp4 { |
| 24 | 24 |
| 25 // TODO(xhwang): Figure out the init data type appropriately once it's spec'ed. | 25 // TODO(xhwang): Figure out the init data type appropriately once it's spec'ed. |
| 26 static const char kMp4InitDataType[] = "video/mp4"; | 26 static const char kMp4InitDataType[] = "video/mp4"; |
| 27 | 27 |
| 28 MP4StreamParser::MP4StreamParser(const std::set<int>& audio_object_types, | 28 MP4StreamParser::MP4StreamParser(const std::set<int>& audio_object_types, |
| 29 bool has_sbr) | 29 bool has_sbr) |
| 30 : state_(kWaitingForInit), | 30 : state_(kWaitingForInit), |
| 31 moof_head_(0), | 31 moof_head_(0), |
| 32 mdat_tail_(0), | 32 mdat_tail_(0), |
| 33 highest_end_offset_(0), |
| 33 has_audio_(false), | 34 has_audio_(false), |
| 34 has_video_(false), | 35 has_video_(false), |
| 35 audio_track_id_(0), | 36 audio_track_id_(0), |
| 36 video_track_id_(0), | 37 video_track_id_(0), |
| 37 audio_object_types_(audio_object_types), | 38 audio_object_types_(audio_object_types), |
| 38 has_sbr_(has_sbr), | 39 has_sbr_(has_sbr), |
| 39 is_audio_track_encrypted_(false), | 40 is_audio_track_encrypted_(false), |
| 40 is_video_track_encrypted_(false) { | 41 is_video_track_encrypted_(false) { |
| 41 } | 42 } |
| 42 | 43 |
| (...skipping 583 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 626 runs.AdvanceSample(); | 627 runs.AdvanceSample(); |
| 627 } | 628 } |
| 628 runs.AdvanceRun(); | 629 runs.AdvanceRun(); |
| 629 } | 630 } |
| 630 | 631 |
| 631 return true; | 632 return true; |
| 632 } | 633 } |
| 633 | 634 |
| 634 } // namespace mp4 | 635 } // namespace mp4 |
| 635 } // namespace media | 636 } // namespace media |
| OLD | NEW |