| 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 19 matching lines...) Expand all Loading... |
| 30 typedef base::Callback<void(const AudioDecoderConfig&)> NewAudioConfigCB; | 30 typedef base::Callback<void(const AudioDecoderConfig&)> NewAudioConfigCB; |
| 31 | 31 |
| 32 EsParserAdts(const NewAudioConfigCB& new_audio_config_cb, | 32 EsParserAdts(const NewAudioConfigCB& new_audio_config_cb, |
| 33 const EmitBufferCB& emit_buffer_cb, | 33 const EmitBufferCB& emit_buffer_cb, |
| 34 bool sbr_in_mimetype); | 34 bool sbr_in_mimetype); |
| 35 virtual ~EsParserAdts(); | 35 virtual ~EsParserAdts(); |
| 36 | 36 |
| 37 // EsParser implementation. | 37 // EsParser implementation. |
| 38 virtual bool Parse(const uint8* buf, int size, | 38 virtual bool Parse(const uint8* buf, int size, |
| 39 base::TimeDelta pts, | 39 base::TimeDelta pts, |
| 40 base::TimeDelta dts) OVERRIDE; | 40 DecodeTimestamp dts) OVERRIDE; |
| 41 virtual void Flush() OVERRIDE; | 41 virtual void Flush() OVERRIDE; |
| 42 virtual void Reset() OVERRIDE; | 42 virtual void Reset() OVERRIDE; |
| 43 | 43 |
| 44 private: | 44 private: |
| 45 // Used to link a PTS with a byte position in the ES stream. | 45 // Used to link a PTS with a byte position in the ES stream. |
| 46 typedef std::pair<int64, base::TimeDelta> EsPts; | 46 typedef std::pair<int64, base::TimeDelta> EsPts; |
| 47 typedef std::list<EsPts> EsPtsList; | 47 typedef std::list<EsPts> EsPtsList; |
| 48 | 48 |
| 49 struct AdtsFrame; | 49 struct AdtsFrame; |
| 50 | 50 |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 // Last audio config. | 85 // Last audio config. |
| 86 AudioDecoderConfig last_audio_decoder_config_; | 86 AudioDecoderConfig last_audio_decoder_config_; |
| 87 | 87 |
| 88 DISALLOW_COPY_AND_ASSIGN(EsParserAdts); | 88 DISALLOW_COPY_AND_ASSIGN(EsParserAdts); |
| 89 }; | 89 }; |
| 90 | 90 |
| 91 } // namespace mp2t | 91 } // namespace mp2t |
| 92 } // namespace media | 92 } // namespace media |
| 93 | 93 |
| 94 #endif | 94 #endif |
| 95 | |
| OLD | NEW |