Index: media/formats/mp2t/es_parser_mpeg1audio.h |
diff --git a/media/formats/mp2t/es_parser_adts.h b/media/formats/mp2t/es_parser_mpeg1audio.h |
similarity index 64% |
copy from media/formats/mp2t/es_parser_adts.h |
copy to media/formats/mp2t/es_parser_mpeg1audio.h |
index 320180460f00b0d044dad6b5714dc9e7bbfae4ad..ba7f1803a50a0e78b571f95283fbefc8f844452b 100644 |
--- a/media/formats/mp2t/es_parser_adts.h |
+++ b/media/formats/mp2t/es_parser_mpeg1audio.h |
@@ -2,8 +2,8 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef MEDIA_FORMATS_MP2T_ES_PARSER_ADTS_H_ |
-#define MEDIA_FORMATS_MP2T_ES_PARSER_ADTS_H_ |
+#ifndef MEDIA_FORMATS_MP2T_ES_PARSER_MPEG1AUDIO_H_ |
+#define MEDIA_FORMATS_MP2T_ES_PARSER_MPEG1AUDIO_H_ |
#include <list> |
#include <utility> |
@@ -26,14 +26,13 @@ class StreamParserBuffer; |
namespace media { |
namespace mp2t { |
-class MEDIA_EXPORT EsParserAdts : public EsParser { |
+class MEDIA_EXPORT EsParserMpeg1Audio : public EsParser { |
public: |
typedef base::Callback<void(const AudioDecoderConfig&)> NewAudioConfigCB; |
- EsParserAdts(const NewAudioConfigCB& new_audio_config_cb, |
- const EmitBufferCB& emit_buffer_cb, |
- bool sbr_in_mimetype); |
- virtual ~EsParserAdts(); |
+ EsParserMpeg1Audio(const NewAudioConfigCB& new_audio_config_cb, |
+ const EmitBufferCB& emit_buffer_cb); |
+ virtual ~EsParserMpeg1Audio(); |
// EsParser implementation. |
virtual bool Parse(const uint8* buf, int size, |
@@ -47,22 +46,22 @@ class MEDIA_EXPORT EsParserAdts : public EsParser { |
typedef std::pair<int64, base::TimeDelta> EsPts; |
typedef std::list<EsPts> EsPtsList; |
- struct AdtsFrame; |
+ struct Mpeg1AudioFrame; |
- // Synchronize the stream on an ADTS syncword (consuming bytes from |
+ // Synchronize the stream on a Mpeg1 audio syncword (consuming bytes from |
// |es_queue_| if needed). |
- // Returns true when a full ADTS frame has been found: in that case |
- // |adts_frame| structure is filled up accordingly. |
- // Returns false otherwise (no ADTS syncword found or partial ADTS frame). |
- bool LookForAdtsFrame(AdtsFrame* adts_frame); |
- |
- // Skip an ADTS frame in the ES queue. |
- void SkipAdtsFrame(const AdtsFrame& adts_frame); |
+ // Returns true when a full Mpeg1 audio frame has been found: in that case |
+ // |mpeg1audio_frame| structure is filled up accordingly. |
+ // Returns false otherwise (no Mpeg1 audio syncword found or partial Mpeg1 |
+ // audio frame). |
+ bool LookForMpeg1AudioFrame(Mpeg1AudioFrame* mpeg1audio_frame); |
// Signal any audio configuration change (if any). |
// Return false if the current audio config is not |
- // a supported ADTS audio config. |
- bool UpdateAudioConfiguration(const uint8* adts_header); |
+ // a supported Mpeg1 audio config. |
+ bool UpdateAudioConfiguration(const uint8* mpeg1audio_header); |
+ |
+ void SkipMpeg1AudioFrame(const Mpeg1AudioFrame& mpeg1audio_frame); |
// Callbacks: |
// - to signal a new audio configuration, |
@@ -70,10 +69,6 @@ class MEDIA_EXPORT EsParserAdts : public EsParser { |
NewAudioConfigCB new_audio_config_cb_; |
EmitBufferCB emit_buffer_cb_; |
- // True when AAC SBR extension is signalled in the mimetype |
- // (mp4a.40.5 in the codecs parameter). |
- bool sbr_in_mimetype_; |
- |
// Bytes of the ES stream that have not been emitted yet. |
scoped_ptr<media::OffsetByteQueue> es_queue_; |
@@ -86,10 +81,10 @@ class MEDIA_EXPORT EsParserAdts : public EsParser { |
// Last audio config. |
AudioDecoderConfig last_audio_decoder_config_; |
- DISALLOW_COPY_AND_ASSIGN(EsParserAdts); |
+ DISALLOW_COPY_AND_ASSIGN(EsParserMpeg1Audio); |
}; |
} // namespace mp2t |
} // namespace media |
-#endif |
+#endif // MEDIA_FORMATS_MP2T_ES_PARSER_MPEG1AUDIO_H_ |