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