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