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/mp2t/ts_section_psi.h" | 5 #include "media/formats/mp2t/ts_section_psi.h" |
6 | 6 |
| 7 #include <algorithm> |
| 8 |
7 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
8 #include "base/logging.h" | 10 #include "base/logging.h" |
9 #include "media/base/bit_reader.h" | 11 #include "media/base/bit_reader.h" |
10 #include "media/formats/mp2t/mp2t_common.h" | 12 #include "media/formats/mp2t/mp2t_common.h" |
11 | 13 |
12 static bool IsCrcValid(const uint8* buf, int size) { | 14 static bool IsCrcValid(const uint8* buf, int size) { |
13 uint32 crc = 0xffffffffu; | 15 uint32 crc = 0xffffffffu; |
14 const uint32 kCrcPoly = 0x4c11db7; | 16 const uint32 kCrcPoly = 0x4c11db7; |
15 | 17 |
16 for (int k = 0; k < size; k++) { | 18 for (int k = 0; k < size; k++) { |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 | 125 |
124 void TsSectionPsi::ResetPsiState() { | 126 void TsSectionPsi::ResetPsiState() { |
125 wait_for_pusi_ = true; | 127 wait_for_pusi_ = true; |
126 psi_byte_queue_.Reset(); | 128 psi_byte_queue_.Reset(); |
127 leading_bytes_to_discard_ = 0; | 129 leading_bytes_to_discard_ = 0; |
128 } | 130 } |
129 | 131 |
130 } // namespace mp2t | 132 } // namespace mp2t |
131 } // namespace media | 133 } // namespace media |
132 | 134 |
OLD | NEW |