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/track_run_iterator.h" | 5 #include "media/formats/mp4/track_run_iterator.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <iomanip> | 8 #include <iomanip> |
9 #include <limits> | 9 #include <limits> |
10 #include <memory> | 10 #include <memory> |
11 | 11 |
12 #include "base/macros.h" | 12 #include "base/macros.h" |
13 #include "media/formats/mp4/rcheck.h" | 13 #include "media/formats/mp4/rcheck.h" |
14 #include "media/formats/mp4/sample_to_group_iterator.h" | 14 #include "media/formats/mp4/sample_to_group_iterator.h" |
15 #include "media/media_features.h" | 15 #include "media/media_features.h" |
16 | 16 |
17 namespace media { | 17 namespace media { |
18 namespace mp4 { | 18 namespace mp4 { |
19 | 19 |
20 struct SampleInfo { | 20 struct SampleInfo { |
21 int size; | 21 uint32_t size; |
22 int duration; | 22 uint32_t duration; |
23 int cts_offset; | 23 int cts_offset; |
24 bool is_keyframe; | 24 bool is_keyframe; |
25 uint32_t cenc_group_description_index; | 25 uint32_t cenc_group_description_index; |
26 }; | 26 }; |
27 | 27 |
28 struct TrackRunInfo { | 28 struct TrackRunInfo { |
29 uint32_t track_id; | 29 uint32_t track_id; |
30 std::vector<SampleInfo> samples; | 30 std::vector<SampleInfo> samples; |
31 int64_t timescale; | 31 int64_t timescale; |
32 int64_t start_dts; | 32 int64_t start_dts; |
(...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
711 index == 0 ? track_encryption().default_constant_iv | 711 index == 0 ? track_encryption().default_constant_iv |
712 : GetSampleEncryptionInfoEntry(*run_itr_, index)->constant_iv; | 712 : GetSampleEncryptionInfoEntry(*run_itr_, index)->constant_iv; |
713 RCHECK(constant_iv != nullptr); | 713 RCHECK(constant_iv != nullptr); |
714 memcpy(entry->initialization_vector, constant_iv, kInitializationVectorSize); | 714 memcpy(entry->initialization_vector, constant_iv, kInitializationVectorSize); |
715 return true; | 715 return true; |
716 } | 716 } |
717 #endif | 717 #endif |
718 | 718 |
719 } // namespace mp4 | 719 } // namespace mp4 |
720 } // namespace media | 720 } // namespace media |
OLD | NEW |