| 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_TRACKS_PARSER_H_ | 5 #ifndef MEDIA_FORMATS_WEBM_WEBM_TRACKS_PARSER_H_ |
| 6 #define MEDIA_FORMATS_WEBM_WEBM_TRACKS_PARSER_H_ | 6 #define MEDIA_FORMATS_WEBM_WEBM_TRACKS_PARSER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <map> | 10 #include <map> |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 // Note: Calling media_tracks() method passes the ownership of the MediaTracks | 81 // Note: Calling media_tracks() method passes the ownership of the MediaTracks |
| 82 // object from WebMTracksParser to the caller (which is typically | 82 // object from WebMTracksParser to the caller (which is typically |
| 83 // WebMStreamParser object). So this method must be called only once, after | 83 // WebMStreamParser object). So this method must be called only once, after |
| 84 // track parsing has been completed. | 84 // track parsing has been completed. |
| 85 scoped_ptr<MediaTracks> media_tracks() { | 85 scoped_ptr<MediaTracks> media_tracks() { |
| 86 CHECK(media_tracks_.get()); | 86 CHECK(media_tracks_.get()); |
| 87 return std::move(media_tracks_); | 87 return std::move(media_tracks_); |
| 88 } | 88 } |
| 89 | 89 |
| 90 private: | 90 private: |
| 91 void Reset(); |
| 92 void ResetTrackEntry(); |
| 93 |
| 91 // WebMParserClient implementation. | 94 // WebMParserClient implementation. |
| 92 WebMParserClient* OnListStart(int id) override; | 95 WebMParserClient* OnListStart(int id) override; |
| 93 bool OnListEnd(int id) override; | 96 bool OnListEnd(int id) override; |
| 94 bool OnUInt(int id, int64_t val) override; | 97 bool OnUInt(int id, int64_t val) override; |
| 95 bool OnFloat(int id, double val) override; | 98 bool OnFloat(int id, double val) override; |
| 96 bool OnBinary(int id, const uint8_t* data, int size) override; | 99 bool OnBinary(int id, const uint8_t* data, int size) override; |
| 97 bool OnString(int id, const std::string& str) override; | 100 bool OnString(int id, const std::string& str) override; |
| 98 | 101 |
| 102 bool reset_on_next_parse_; |
| 99 int64_t track_type_; | 103 int64_t track_type_; |
| 100 int64_t track_num_; | 104 int64_t track_num_; |
| 101 std::string track_name_; | 105 std::string track_name_; |
| 102 std::string track_language_; | 106 std::string track_language_; |
| 103 std::string codec_id_; | 107 std::string codec_id_; |
| 104 std::vector<uint8_t> codec_private_; | 108 std::vector<uint8_t> codec_private_; |
| 105 int64_t seek_preroll_; | 109 int64_t seek_preroll_; |
| 106 int64_t codec_delay_; | 110 int64_t codec_delay_; |
| 107 int64_t default_duration_; | 111 int64_t default_duration_; |
| 108 scoped_ptr<WebMContentEncodingsClient> track_content_encodings_client_; | 112 scoped_ptr<WebMContentEncodingsClient> track_content_encodings_client_; |
| (...skipping 16 matching lines...) Expand all Loading... |
| 125 VideoDecoderConfig video_decoder_config_; | 129 VideoDecoderConfig video_decoder_config_; |
| 126 | 130 |
| 127 scoped_ptr<MediaTracks> media_tracks_; | 131 scoped_ptr<MediaTracks> media_tracks_; |
| 128 | 132 |
| 129 DISALLOW_COPY_AND_ASSIGN(WebMTracksParser); | 133 DISALLOW_COPY_AND_ASSIGN(WebMTracksParser); |
| 130 }; | 134 }; |
| 131 | 135 |
| 132 } // namespace media | 136 } // namespace media |
| 133 | 137 |
| 134 #endif // MEDIA_FORMATS_WEBM_WEBM_TRACKS_PARSER_H_ | 138 #endif // MEDIA_FORMATS_WEBM_WEBM_TRACKS_PARSER_H_ |
| OLD | NEW |