| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <limits> | 9 #include <limits> |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 393 // See https://crbug.com/597073 | 393 // See https://crbug.com/597073 |
| 394 if (track->media.handler.type == kText) | 394 if (track->media.handler.type == kText) |
| 395 detected_text_track_count++; | 395 detected_text_track_count++; |
| 396 } | 396 } |
| 397 | 397 |
| 398 if (!moov_->pssh.empty()) | 398 if (!moov_->pssh.empty()) |
| 399 OnEncryptedMediaInitData(moov_->pssh); | 399 OnEncryptedMediaInitData(moov_->pssh); |
| 400 | 400 |
| 401 RCHECK(config_cb_.Run(std::move(media_tracks), TextTrackConfigMap())); | 401 RCHECK(config_cb_.Run(std::move(media_tracks), TextTrackConfigMap())); |
| 402 | 402 |
| 403 StreamParser::InitParameters params(kInfiniteDuration()); | 403 StreamParser::InitParameters params(kInfiniteDuration); |
| 404 if (moov_->extends.header.fragment_duration > 0) { | 404 if (moov_->extends.header.fragment_duration > 0) { |
| 405 params.duration = TimeDeltaFromRational( | 405 params.duration = TimeDeltaFromRational( |
| 406 moov_->extends.header.fragment_duration, moov_->header.timescale); | 406 moov_->extends.header.fragment_duration, moov_->header.timescale); |
| 407 params.liveness = DemuxerStream::LIVENESS_RECORDED; | 407 params.liveness = DemuxerStream::LIVENESS_RECORDED; |
| 408 } else if (moov_->header.duration > 0 && | 408 } else if (moov_->header.duration > 0 && |
| 409 moov_->header.duration != std::numeric_limits<uint64_t>::max()) { | 409 moov_->header.duration != std::numeric_limits<uint64_t>::max()) { |
| 410 params.duration = | 410 params.duration = |
| 411 TimeDeltaFromRational(moov_->header.duration, moov_->header.timescale); | 411 TimeDeltaFromRational(moov_->header.duration, moov_->header.timescale); |
| 412 params.liveness = DemuxerStream::LIVENESS_RECORDED; | 412 params.liveness = DemuxerStream::LIVENESS_RECORDED; |
| 413 } else { | 413 } else { |
| (...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 708 runs.AdvanceSample(); | 708 runs.AdvanceSample(); |
| 709 } | 709 } |
| 710 runs.AdvanceRun(); | 710 runs.AdvanceRun(); |
| 711 } | 711 } |
| 712 | 712 |
| 713 return true; | 713 return true; |
| 714 } | 714 } |
| 715 | 715 |
| 716 } // namespace mp4 | 716 } // namespace mp4 |
| 717 } // namespace media | 717 } // namespace media |
| OLD | NEW |