| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 ~WebMStreamParser() override; | 28 ~WebMStreamParser() override; |
| 29 | 29 |
| 30 // StreamParser implementation. | 30 // StreamParser implementation. |
| 31 void Init(const InitCB& init_cb, | 31 void Init(const InitCB& init_cb, |
| 32 const NewConfigCB& config_cb, | 32 const NewConfigCB& config_cb, |
| 33 const NewBuffersCB& new_buffers_cb, | 33 const NewBuffersCB& new_buffers_cb, |
| 34 bool ignore_text_tracks, | 34 bool ignore_text_tracks, |
| 35 const EncryptedMediaInitDataCB& encrypted_media_init_data_cb, | 35 const EncryptedMediaInitDataCB& encrypted_media_init_data_cb, |
| 36 const NewMediaSegmentCB& new_segment_cb, | 36 const NewMediaSegmentCB& new_segment_cb, |
| 37 const EndMediaSegmentCB& end_of_segment_cb, | 37 const EndMediaSegmentCB& end_of_segment_cb, |
| 38 const scoped_refptr<MediaLog>& media_log) override; | 38 MediaLog* media_log) override; |
| 39 void Flush() override; | 39 void Flush() override; |
| 40 bool Parse(const uint8_t* buf, int size) override; | 40 bool Parse(const uint8_t* buf, int size) override; |
| 41 | 41 |
| 42 private: | 42 private: |
| 43 enum State { | 43 enum State { |
| 44 kWaitingForInit, | 44 kWaitingForInit, |
| 45 kParsingHeaders, | 45 kParsingHeaders, |
| 46 kParsingClusters, | 46 kParsingClusters, |
| 47 kError | 47 kError |
| 48 }; | 48 }; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 73 | 73 |
| 74 State state_; | 74 State state_; |
| 75 InitCB init_cb_; | 75 InitCB init_cb_; |
| 76 NewConfigCB config_cb_; | 76 NewConfigCB config_cb_; |
| 77 NewBuffersCB new_buffers_cb_; | 77 NewBuffersCB new_buffers_cb_; |
| 78 bool ignore_text_tracks_; | 78 bool ignore_text_tracks_; |
| 79 EncryptedMediaInitDataCB encrypted_media_init_data_cb_; | 79 EncryptedMediaInitDataCB encrypted_media_init_data_cb_; |
| 80 | 80 |
| 81 NewMediaSegmentCB new_segment_cb_; | 81 NewMediaSegmentCB new_segment_cb_; |
| 82 EndMediaSegmentCB end_of_segment_cb_; | 82 EndMediaSegmentCB end_of_segment_cb_; |
| 83 scoped_refptr<MediaLog> media_log_; | 83 MediaLog* media_log_; |
| 84 | 84 |
| 85 bool unknown_segment_size_; | 85 bool unknown_segment_size_; |
| 86 | 86 |
| 87 std::unique_ptr<WebMClusterParser> cluster_parser_; | 87 std::unique_ptr<WebMClusterParser> cluster_parser_; |
| 88 ByteQueue byte_queue_; | 88 ByteQueue byte_queue_; |
| 89 | 89 |
| 90 DISALLOW_COPY_AND_ASSIGN(WebMStreamParser); | 90 DISALLOW_COPY_AND_ASSIGN(WebMStreamParser); |
| 91 }; | 91 }; |
| 92 | 92 |
| 93 } // namespace media | 93 } // namespace media |
| 94 | 94 |
| 95 #endif // MEDIA_FORMATS_WEBM_WEBM_STREAM_PARSER_H_ | 95 #endif // MEDIA_FORMATS_WEBM_WEBM_STREAM_PARSER_H_ |
| OLD | NEW |