Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(649)

Side by Side Diff: media/formats/webm/webm_tracks_parser.h

Issue 1842503002: MSE: Cleanup WebM tracks parser initialization (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
99 int64_t track_type_; 102 int64_t track_type_;
100 int64_t track_num_; 103 int64_t track_num_;
(...skipping 24 matching lines...) Expand all
125 VideoDecoderConfig video_decoder_config_; 128 VideoDecoderConfig video_decoder_config_;
126 129
127 scoped_ptr<MediaTracks> media_tracks_; 130 scoped_ptr<MediaTracks> media_tracks_;
128 131
129 DISALLOW_COPY_AND_ASSIGN(WebMTracksParser); 132 DISALLOW_COPY_AND_ASSIGN(WebMTracksParser);
130 }; 133 };
131 134
132 } // namespace media 135 } // namespace media
133 136
134 #endif // MEDIA_FORMATS_WEBM_WEBM_TRACKS_PARSER_H_ 137 #endif // MEDIA_FORMATS_WEBM_WEBM_TRACKS_PARSER_H_
OLDNEW
« no previous file with comments | « no previous file | media/formats/webm/webm_tracks_parser.cc » ('j') | media/formats/webm/webm_tracks_parser.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698