| 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_WEBM_WEBM_STREAM_PARSER_H_ | 5 #ifndef MEDIA_FORMATS_WEBM_WEBM_STREAM_PARSER_H_ |
| 6 #define MEDIA_FORMATS_WEBM_WEBM_STREAM_PARSER_H_ | 6 #define MEDIA_FORMATS_WEBM_WEBM_STREAM_PARSER_H_ |
| 7 | 7 |
| 8 #include "base/callback_forward.h" | 8 #include "base/callback_forward.h" |
| 9 #include "base/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
| 10 #include "media/base/audio_decoder_config.h" | 10 #include "media/base/audio_decoder_config.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 ~WebMStreamParser() override; | 23 ~WebMStreamParser() override; |
| 24 | 24 |
| 25 // StreamParser implementation. | 25 // StreamParser implementation. |
| 26 void Init(const InitCB& init_cb, | 26 void Init(const InitCB& init_cb, |
| 27 const NewConfigCB& config_cb, | 27 const NewConfigCB& config_cb, |
| 28 const NewBuffersCB& new_buffers_cb, | 28 const NewBuffersCB& new_buffers_cb, |
| 29 bool ignore_text_tracks, | 29 bool ignore_text_tracks, |
| 30 const EncryptedMediaInitDataCB& encrypted_media_init_data_cb, | 30 const EncryptedMediaInitDataCB& encrypted_media_init_data_cb, |
| 31 const NewMediaSegmentCB& new_segment_cb, | 31 const NewMediaSegmentCB& new_segment_cb, |
| 32 const base::Closure& end_of_segment_cb, | 32 const base::Closure& end_of_segment_cb, |
| 33 const LogCB& log_cb) override; | 33 const scoped_refptr<MediaLog>& media_log) override; |
| 34 void Flush() override; | 34 void Flush() override; |
| 35 bool Parse(const uint8* buf, int size) override; | 35 bool Parse(const uint8* buf, int size) override; |
| 36 | 36 |
| 37 private: | 37 private: |
| 38 enum State { | 38 enum State { |
| 39 kWaitingForInit, | 39 kWaitingForInit, |
| 40 kParsingHeaders, | 40 kParsingHeaders, |
| 41 kParsingClusters, | 41 kParsingClusters, |
| 42 kError | 42 kError |
| 43 }; | 43 }; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 68 | 68 |
| 69 State state_; | 69 State state_; |
| 70 InitCB init_cb_; | 70 InitCB init_cb_; |
| 71 NewConfigCB config_cb_; | 71 NewConfigCB config_cb_; |
| 72 NewBuffersCB new_buffers_cb_; | 72 NewBuffersCB new_buffers_cb_; |
| 73 bool ignore_text_tracks_; | 73 bool ignore_text_tracks_; |
| 74 EncryptedMediaInitDataCB encrypted_media_init_data_cb_; | 74 EncryptedMediaInitDataCB encrypted_media_init_data_cb_; |
| 75 | 75 |
| 76 NewMediaSegmentCB new_segment_cb_; | 76 NewMediaSegmentCB new_segment_cb_; |
| 77 base::Closure end_of_segment_cb_; | 77 base::Closure end_of_segment_cb_; |
| 78 LogCB log_cb_; | 78 scoped_refptr<MediaLog> media_log_; |
| 79 | 79 |
| 80 bool unknown_segment_size_; | 80 bool unknown_segment_size_; |
| 81 | 81 |
| 82 scoped_ptr<WebMClusterParser> cluster_parser_; | 82 scoped_ptr<WebMClusterParser> cluster_parser_; |
| 83 ByteQueue byte_queue_; | 83 ByteQueue byte_queue_; |
| 84 | 84 |
| 85 DISALLOW_COPY_AND_ASSIGN(WebMStreamParser); | 85 DISALLOW_COPY_AND_ASSIGN(WebMStreamParser); |
| 86 }; | 86 }; |
| 87 | 87 |
| 88 } // namespace media | 88 } // namespace media |
| 89 | 89 |
| 90 #endif // MEDIA_FORMATS_WEBM_WEBM_STREAM_PARSER_H_ | 90 #endif // MEDIA_FORMATS_WEBM_WEBM_STREAM_PARSER_H_ |
| OLD | NEW |