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

Side by Side Diff: media/webm/webm_cluster_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/mp4/track_run_iterator_unittest.cc ('k') | media/webm/webm_cluster_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_CLUSTER_PARSER_H_ 5 #ifndef MEDIA_WEBM_WEBM_CLUSTER_PARSER_H_
6 #define MEDIA_WEBM_WEBM_CLUSTER_PARSER_H_ 6 #define MEDIA_WEBM_WEBM_CLUSTER_PARSER_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <string> 9 #include <string>
10 10
11 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
12 #include "media/base/media_export.h" 12 #include "media/base/media_export.h"
13 #include "media/base/media_log.h"
13 #include "media/base/stream_parser_buffer.h" 14 #include "media/base/stream_parser_buffer.h"
14 #include "media/webm/webm_parser.h" 15 #include "media/webm/webm_parser.h"
15 16
16 namespace media { 17 namespace media {
17 18
18 class MEDIA_EXPORT WebMClusterParser : public WebMParserClient { 19 class MEDIA_EXPORT WebMClusterParser : public WebMParserClient {
19 public: 20 public:
20 typedef std::deque<scoped_refptr<StreamParserBuffer> > BufferQueue; 21 typedef std::deque<scoped_refptr<StreamParserBuffer> > BufferQueue;
21 22
22 WebMClusterParser(int64 timecode_scale, 23 WebMClusterParser(int64 timecode_scale,
23 int audio_track_num, 24 int audio_track_num,
24 int video_track_num, 25 int video_track_num,
25 const std::string& audio_encryption_key_id, 26 const std::string& audio_encryption_key_id,
26 const std::string& video_encryption_key_id); 27 const std::string& video_encryption_key_id,
28 const LogCB& log_cb);
27 virtual ~WebMClusterParser(); 29 virtual ~WebMClusterParser();
28 30
29 // Resets the parser state so it can accept a new cluster. 31 // Resets the parser state so it can accept a new cluster.
30 void Reset(); 32 void Reset();
31 33
32 // Parses a WebM cluster element in |buf|. 34 // Parses a WebM cluster element in |buf|.
33 // 35 //
34 // Returns -1 if the parse fails. 36 // Returns -1 if the parse fails.
35 // Returns 0 if more data is needed. 37 // Returns 0 if more data is needed.
36 // Returns the number of bytes parsed on success. 38 // Returns the number of bytes parsed on success.
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 int block_data_size_; 87 int block_data_size_;
86 int64 block_duration_; 88 int64 block_duration_;
87 89
88 int64 cluster_timecode_; 90 int64 cluster_timecode_;
89 base::TimeDelta cluster_start_time_; 91 base::TimeDelta cluster_start_time_;
90 bool cluster_ended_; 92 bool cluster_ended_;
91 93
92 Track audio_; 94 Track audio_;
93 Track video_; 95 Track video_;
94 96
97 LogCB log_cb_;
98
95 DISALLOW_IMPLICIT_CONSTRUCTORS(WebMClusterParser); 99 DISALLOW_IMPLICIT_CONSTRUCTORS(WebMClusterParser);
96 }; 100 };
97 101
98 } // namespace media 102 } // namespace media
99 103
100 #endif // MEDIA_WEBM_WEBM_CLUSTER_PARSER_H_ 104 #endif // MEDIA_WEBM_WEBM_CLUSTER_PARSER_H_
OLDNEW
« no previous file with comments | « media/mp4/track_run_iterator_unittest.cc ('k') | media/webm/webm_cluster_parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698