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_MP2T_ES_PARSER_ADTS_H_ | 5 #ifndef MEDIA_FORMATS_MP2T_ES_PARSER_ADTS_H_ |
6 #define MEDIA_FORMATS_MP2T_ES_PARSER_ADTS_H_ | 6 #define MEDIA_FORMATS_MP2T_ES_PARSER_ADTS_H_ |
7 | 7 |
8 #include <list> | 8 #include <list> |
9 #include <utility> | 9 #include <utility> |
10 | 10 |
(...skipping 18 matching lines...) Expand all Loading... |
29 class MEDIA_EXPORT EsParserAdts : public EsParser { | 29 class MEDIA_EXPORT EsParserAdts : public EsParser { |
30 public: | 30 public: |
31 typedef base::Callback<void(const AudioDecoderConfig&)> NewAudioConfigCB; | 31 typedef base::Callback<void(const AudioDecoderConfig&)> NewAudioConfigCB; |
32 | 32 |
33 EsParserAdts(const NewAudioConfigCB& new_audio_config_cb, | 33 EsParserAdts(const NewAudioConfigCB& new_audio_config_cb, |
34 const EmitBufferCB& emit_buffer_cb, | 34 const EmitBufferCB& emit_buffer_cb, |
35 bool sbr_in_mimetype); | 35 bool sbr_in_mimetype); |
36 virtual ~EsParserAdts(); | 36 virtual ~EsParserAdts(); |
37 | 37 |
38 // EsParser implementation. | 38 // EsParser implementation. |
39 virtual void Flush() OVERRIDE; | 39 virtual void Flush() override; |
40 | 40 |
41 private: | 41 private: |
42 struct AdtsFrame; | 42 struct AdtsFrame; |
43 | 43 |
44 // EsParser implementation. | 44 // EsParser implementation. |
45 virtual bool ParseFromEsQueue() OVERRIDE; | 45 virtual bool ParseFromEsQueue() override; |
46 virtual void ResetInternal() OVERRIDE; | 46 virtual void ResetInternal() override; |
47 | 47 |
48 // Synchronize the stream on an ADTS syncword (consuming bytes from | 48 // Synchronize the stream on an ADTS syncword (consuming bytes from |
49 // |es_queue_| if needed). | 49 // |es_queue_| if needed). |
50 // Returns true when a full ADTS frame has been found: in that case | 50 // Returns true when a full ADTS frame has been found: in that case |
51 // |adts_frame| structure is filled up accordingly. | 51 // |adts_frame| structure is filled up accordingly. |
52 // Returns false otherwise (no ADTS syncword found or partial ADTS frame). | 52 // Returns false otherwise (no ADTS syncword found or partial ADTS frame). |
53 bool LookForAdtsFrame(AdtsFrame* adts_frame); | 53 bool LookForAdtsFrame(AdtsFrame* adts_frame); |
54 | 54 |
55 // Skip an ADTS frame in the ES queue. | 55 // Skip an ADTS frame in the ES queue. |
56 void SkipAdtsFrame(const AdtsFrame& adts_frame); | 56 void SkipAdtsFrame(const AdtsFrame& adts_frame); |
(...skipping 19 matching lines...) Expand all Loading... |
76 // Last audio config. | 76 // Last audio config. |
77 AudioDecoderConfig last_audio_decoder_config_; | 77 AudioDecoderConfig last_audio_decoder_config_; |
78 | 78 |
79 DISALLOW_COPY_AND_ASSIGN(EsParserAdts); | 79 DISALLOW_COPY_AND_ASSIGN(EsParserAdts); |
80 }; | 80 }; |
81 | 81 |
82 } // namespace mp2t | 82 } // namespace mp2t |
83 } // namespace media | 83 } // namespace media |
84 | 84 |
85 #endif | 85 #endif |
OLD | NEW |