| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef MEDIA_FORMATS_MPEG_ADTS_HEADER_PARSER_H_ | 5 #ifndef MEDIA_FORMATS_MPEG_ADTS_HEADER_PARSER_H_ |
| 6 #define MEDIA_FORMATS_MPEG_ADTS_HEADER_PARSER_H_ | 6 #define MEDIA_FORMATS_MPEG_ADTS_HEADER_PARSER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include "media/base/media_export.h" | 10 #include "media/base/media_export.h" |
| 11 | 11 |
| 12 namespace media { | 12 namespace media { |
| 13 | 13 |
| 14 class AudioDecoderConfig; | 14 class AudioDecoderConfig; |
| 15 class EncryptionScheme; |
| 15 | 16 |
| 16 // Parses ADTS header |adts_header| (4 bytes) and extracts the information into | 17 // Parses ADTS header |adts_header| (4 bytes) and extracts the information into |
| 17 // |config| structure if the parsing succeeds. Returns true if the parsing | 18 // |config| structure if the parsing succeeds. Returns true if the parsing |
| 18 // succeeds or false otherwise. The |is_sbr| flag stands for Spectral Band | 19 // succeeds or false otherwise. The |is_sbr| flag stands for Spectral Band |
| 19 // Replication. | 20 // Replication. |
| 20 MEDIA_EXPORT bool ParseAdtsHeader(const uint8_t* adts_header, | 21 MEDIA_EXPORT bool ParseAdtsHeader(const uint8_t* adts_header, |
| 21 bool is_sbr, | 22 bool is_sbr, |
| 23 const EncryptionScheme& scheme, |
| 22 AudioDecoderConfig* config); | 24 AudioDecoderConfig* config); |
| 23 | 25 |
| 24 } // namespace media | 26 } // namespace media |
| 25 | 27 |
| 26 #endif // MEDIA_FORMATS_MPEG_ADTS_HEADER_PARSER_H_ | 28 #endif // MEDIA_FORMATS_MPEG_ADTS_HEADER_PARSER_H_ |
| OLD | NEW |