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

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

Issue 2815303006: Convert MediaLog from being ref counted to owned by WebMediaPlayer. (Closed)
Patch Set: Rebase. Created 3 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 13 matching lines...) Expand all
24 #include "media/formats/webm/webm_audio_client.h" 24 #include "media/formats/webm/webm_audio_client.h"
25 #include "media/formats/webm/webm_content_encodings_client.h" 25 #include "media/formats/webm/webm_content_encodings_client.h"
26 #include "media/formats/webm/webm_parser.h" 26 #include "media/formats/webm/webm_parser.h"
27 #include "media/formats/webm/webm_video_client.h" 27 #include "media/formats/webm/webm_video_client.h"
28 28
29 namespace media { 29 namespace media {
30 30
31 // Parser for WebM Tracks element. 31 // Parser for WebM Tracks element.
32 class MEDIA_EXPORT WebMTracksParser : public WebMParserClient { 32 class MEDIA_EXPORT WebMTracksParser : public WebMParserClient {
33 public: 33 public:
34 WebMTracksParser(const scoped_refptr<MediaLog>& media_log, 34 WebMTracksParser(MediaLog* media_log, bool ignore_text_tracks);
35 bool ignore_text_tracks);
36 ~WebMTracksParser() override; 35 ~WebMTracksParser() override;
37 36
38 // Parses a WebM Tracks element in |buf|. 37 // Parses a WebM Tracks element in |buf|.
39 // 38 //
40 // Returns -1 if the parse fails. 39 // Returns -1 if the parse fails.
41 // Returns 0 if more data is needed. 40 // Returns 0 if more data is needed.
42 // Returns the number of bytes parsed on success. 41 // Returns the number of bytes parsed on success.
43 int Parse(const uint8_t* buf, int size); 42 int Parse(const uint8_t* buf, int size);
44 43
45 int64_t audio_track_num() const { return audio_track_num_; } 44 int64_t audio_track_num() const { return audio_track_num_; }
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 118
120 int64_t audio_track_num_; 119 int64_t audio_track_num_;
121 int64_t audio_default_duration_; 120 int64_t audio_default_duration_;
122 int64_t video_track_num_; 121 int64_t video_track_num_;
123 int64_t video_default_duration_; 122 int64_t video_default_duration_;
124 bool ignore_text_tracks_; 123 bool ignore_text_tracks_;
125 TextTracks text_tracks_; 124 TextTracks text_tracks_;
126 std::set<int64_t> ignored_tracks_; 125 std::set<int64_t> ignored_tracks_;
127 std::string audio_encryption_key_id_; 126 std::string audio_encryption_key_id_;
128 std::string video_encryption_key_id_; 127 std::string video_encryption_key_id_;
129 scoped_refptr<MediaLog> media_log_; 128 MediaLog* media_log_;
130 129
131 WebMAudioClient audio_client_; 130 WebMAudioClient audio_client_;
132 AudioDecoderConfig audio_decoder_config_; 131 AudioDecoderConfig audio_decoder_config_;
133 132
134 WebMVideoClient video_client_; 133 WebMVideoClient video_client_;
135 VideoDecoderConfig video_decoder_config_; 134 VideoDecoderConfig video_decoder_config_;
136 135
137 int detected_audio_track_count_; 136 int detected_audio_track_count_;
138 int detected_video_track_count_; 137 int detected_video_track_count_;
139 int detected_text_track_count_; 138 int detected_text_track_count_;
140 std::unique_ptr<MediaTracks> media_tracks_; 139 std::unique_ptr<MediaTracks> media_tracks_;
141 140
142 DISALLOW_COPY_AND_ASSIGN(WebMTracksParser); 141 DISALLOW_COPY_AND_ASSIGN(WebMTracksParser);
143 }; 142 };
144 143
145 } // namespace media 144 } // namespace media
146 145
147 #endif // MEDIA_FORMATS_WEBM_WEBM_TRACKS_PARSER_H_ 146 #endif // MEDIA_FORMATS_WEBM_WEBM_TRACKS_PARSER_H_
OLDNEW
« no previous file with comments | « media/formats/webm/webm_stream_parser_unittest.cc ('k') | media/formats/webm/webm_tracks_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698