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

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

Issue 1235793005: Deprecate LogCB in favor of using MediaLog (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments and attempt to fix Android compilation Created 5 years, 5 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
« no previous file with comments | « media/formats/webm/webm_stream_parser.cc ('k') | media/formats/webm/webm_tracks_parser.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <map> 8 #include <map>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
11 #include <vector> 11 #include <vector>
12 12
13 #include "base/compiler_specific.h" 13 #include "base/compiler_specific.h"
14 #include "base/memory/scoped_ptr.h" 14 #include "base/memory/scoped_ptr.h"
15 #include "base/time/time.h" 15 #include "base/time/time.h"
16 #include "media/base/audio_decoder_config.h" 16 #include "media/base/audio_decoder_config.h"
17 #include "media/base/media_log.h" 17 #include "media/base/media_log.h"
18 #include "media/base/text_track_config.h" 18 #include "media/base/text_track_config.h"
19 #include "media/base/video_decoder_config.h" 19 #include "media/base/video_decoder_config.h"
20 #include "media/formats/webm/webm_audio_client.h" 20 #include "media/formats/webm/webm_audio_client.h"
21 #include "media/formats/webm/webm_content_encodings_client.h" 21 #include "media/formats/webm/webm_content_encodings_client.h"
22 #include "media/formats/webm/webm_parser.h" 22 #include "media/formats/webm/webm_parser.h"
23 #include "media/formats/webm/webm_video_client.h" 23 #include "media/formats/webm/webm_video_client.h"
24 24
25 namespace media { 25 namespace media {
26 26
27 // Parser for WebM Tracks element. 27 // Parser for WebM Tracks element.
28 class MEDIA_EXPORT WebMTracksParser : public WebMParserClient { 28 class MEDIA_EXPORT WebMTracksParser : public WebMParserClient {
29 public: 29 public:
30 explicit WebMTracksParser(const LogCB& log_cb, bool ignore_text_tracks); 30 WebMTracksParser(const scoped_refptr<MediaLog>& media_log,
31 bool ignore_text_tracks);
31 ~WebMTracksParser() override; 32 ~WebMTracksParser() override;
32 33
33 // Parses a WebM Tracks element in |buf|. 34 // Parses a WebM Tracks element in |buf|.
34 // 35 //
35 // Returns -1 if the parse fails. 36 // Returns -1 if the parse fails.
36 // Returns 0 if more data is needed. 37 // Returns 0 if more data is needed.
37 // Returns the number of bytes parsed on success. 38 // Returns the number of bytes parsed on success.
38 int Parse(const uint8* buf, int size); 39 int Parse(const uint8* buf, int size);
39 40
40 int64 audio_track_num() const { return audio_track_num_; } 41 int64 audio_track_num() const { return audio_track_num_; }
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 96
96 int64 audio_track_num_; 97 int64 audio_track_num_;
97 int64 audio_default_duration_; 98 int64 audio_default_duration_;
98 int64 video_track_num_; 99 int64 video_track_num_;
99 int64 video_default_duration_; 100 int64 video_default_duration_;
100 bool ignore_text_tracks_; 101 bool ignore_text_tracks_;
101 TextTracks text_tracks_; 102 TextTracks text_tracks_;
102 std::set<int64> ignored_tracks_; 103 std::set<int64> ignored_tracks_;
103 std::string audio_encryption_key_id_; 104 std::string audio_encryption_key_id_;
104 std::string video_encryption_key_id_; 105 std::string video_encryption_key_id_;
105 LogCB log_cb_; 106 scoped_refptr<MediaLog> media_log_;
106 107
107 WebMAudioClient audio_client_; 108 WebMAudioClient audio_client_;
108 AudioDecoderConfig audio_decoder_config_; 109 AudioDecoderConfig audio_decoder_config_;
109 110
110 WebMVideoClient video_client_; 111 WebMVideoClient video_client_;
111 VideoDecoderConfig video_decoder_config_; 112 VideoDecoderConfig video_decoder_config_;
112 113
113 DISALLOW_COPY_AND_ASSIGN(WebMTracksParser); 114 DISALLOW_COPY_AND_ASSIGN(WebMTracksParser);
114 }; 115 };
115 116
116 } // namespace media 117 } // namespace media
117 118
118 #endif // MEDIA_FORMATS_WEBM_WEBM_TRACKS_PARSER_H_ 119 #endif // MEDIA_FORMATS_WEBM_WEBM_TRACKS_PARSER_H_
OLDNEW
« no previous file with comments | « media/formats/webm/webm_stream_parser.cc ('k') | media/formats/webm/webm_tracks_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698