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 #ifndef MEDIA_FORMATS_MPEG_ADTS_STREAM_PARSER_H_ | 5 #ifndef MEDIA_FORMATS_MPEG_ADTS_STREAM_PARSER_H_ |
6 #define MEDIA_FORMATS_MPEG_ADTS_STREAM_PARSER_H_ | 6 #define MEDIA_FORMATS_MPEG_ADTS_STREAM_PARSER_H_ |
7 | 7 |
| 8 #include <stdint.h> |
| 9 |
8 #include "base/macros.h" | 10 #include "base/macros.h" |
9 #include "media/base/media_export.h" | 11 #include "media/base/media_export.h" |
10 #include "media/formats/mpeg/mpeg_audio_stream_parser_base.h" | 12 #include "media/formats/mpeg/mpeg_audio_stream_parser_base.h" |
11 | 13 |
12 namespace media { | 14 namespace media { |
13 | 15 |
14 class MEDIA_EXPORT ADTSStreamParser : public MPEGAudioStreamParserBase { | 16 class MEDIA_EXPORT ADTSStreamParser : public MPEGAudioStreamParserBase { |
15 public: | 17 public: |
16 ADTSStreamParser(); | 18 ADTSStreamParser(); |
17 ~ADTSStreamParser() override; | 19 ~ADTSStreamParser() override; |
18 | 20 |
19 private: | 21 private: |
20 // MPEGAudioStreamParserBase overrides. | 22 // MPEGAudioStreamParserBase overrides. |
21 int ParseFrameHeader(const uint8_t* data, | 23 int ParseFrameHeader(const uint8_t* data, |
22 int size, | 24 int size, |
23 int* frame_size, | 25 int* frame_size, |
24 int* sample_rate, | 26 int* sample_rate, |
25 ChannelLayout* channel_layout, | 27 ChannelLayout* channel_layout, |
26 int* sample_count, | 28 int* sample_count, |
27 bool* metadata_frame) const override; | 29 bool* metadata_frame) const override; |
28 | 30 |
29 DISALLOW_COPY_AND_ASSIGN(ADTSStreamParser); | 31 DISALLOW_COPY_AND_ASSIGN(ADTSStreamParser); |
30 }; | 32 }; |
31 | 33 |
32 } // namespace media | 34 } // namespace media |
33 | 35 |
34 #endif // MEDIA_FORMATS_MPEG_ADTS_STREAM_PARSER_H_ | 36 #endif // MEDIA_FORMATS_MPEG_ADTS_STREAM_PARSER_H_ |
OLD | NEW |