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

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

Issue 11471006: Log MediaSource parsing errors to the MediaLog so they can appear in chrome:media-internals. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix nit. Created 8 years 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 | Annotate | Revision Log
« no previous file with comments | « media/webm/webm_stream_parser.cc ('k') | media/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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_WEBM_WEBM_TRACKS_PARSER_H_ 5 #ifndef MEDIA_WEBM_WEBM_TRACKS_PARSER_H_
6 #define MEDIA_WEBM_WEBM_TRACKS_PARSER_H_ 6 #define MEDIA_WEBM_WEBM_TRACKS_PARSER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/compiler_specific.h" 10 #include "base/compiler_specific.h"
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "media/base/media_log.h"
12 #include "media/webm/webm_content_encodings_client.h" 13 #include "media/webm/webm_content_encodings_client.h"
13 #include "media/webm/webm_parser.h" 14 #include "media/webm/webm_parser.h"
14 15
15 namespace media { 16 namespace media {
16 17
17 // Parser for WebM Tracks element. 18 // Parser for WebM Tracks element.
18 class WebMTracksParser : public WebMParserClient { 19 class WebMTracksParser : public WebMParserClient {
19 public: 20 public:
20 explicit WebMTracksParser(); 21 explicit WebMTracksParser(const LogCB& log_cb);
21 virtual ~WebMTracksParser(); 22 virtual ~WebMTracksParser();
22 23
23 // Parses a WebM Tracks element in |buf|. 24 // Parses a WebM Tracks element in |buf|.
24 // 25 //
25 // Returns -1 if the parse fails. 26 // Returns -1 if the parse fails.
26 // Returns 0 if more data is needed. 27 // Returns 0 if more data is needed.
27 // Returns the number of bytes parsed on success. 28 // Returns the number of bytes parsed on success.
28 int Parse(const uint8* buf, int size); 29 int Parse(const uint8* buf, int size);
29 30
30 int64 audio_track_num() const { return audio_track_num_; } 31 int64 audio_track_num() const { return audio_track_num_; }
(...skipping 15 matching lines...) Expand all
46 virtual bool OnString(int id, const std::string& str) OVERRIDE; 47 virtual bool OnString(int id, const std::string& str) OVERRIDE;
47 48
48 int64 track_type_; 49 int64 track_type_;
49 int64 track_num_; 50 int64 track_num_;
50 scoped_ptr<WebMContentEncodingsClient> track_content_encodings_client_; 51 scoped_ptr<WebMContentEncodingsClient> track_content_encodings_client_;
51 52
52 int64 audio_track_num_; 53 int64 audio_track_num_;
53 int64 video_track_num_; 54 int64 video_track_num_;
54 std::string audio_encryption_key_id_; 55 std::string audio_encryption_key_id_;
55 std::string video_encryption_key_id_; 56 std::string video_encryption_key_id_;
57 LogCB log_cb_;
56 58
57 DISALLOW_COPY_AND_ASSIGN(WebMTracksParser); 59 DISALLOW_COPY_AND_ASSIGN(WebMTracksParser);
58 }; 60 };
59 61
60 } // namespace media 62 } // namespace media
61 63
62 #endif // MEDIA_WEBM_WEBM_TRACKS_PARSER_H_ 64 #endif // MEDIA_WEBM_WEBM_TRACKS_PARSER_H_
OLDNEW
« no previous file with comments | « media/webm/webm_stream_parser.cc ('k') | media/webm/webm_tracks_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698