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

Side by Side Diff: media/webm/webm_stream_parser.cc

Issue 11777018: Added debug logging for MSE config changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed feedback. Created 7 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « media/filters/source_buffer_stream.cc ('k') | no next file » | 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 #include "media/webm/webm_stream_parser.h" 5 #include "media/webm/webm_stream_parser.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 byte_queue_.Pop(bytes_parsed); 266 byte_queue_.Pop(bytes_parsed);
267 return true; 267 return true;
268 } 268 }
269 269
270 void WebMStreamParser::ChangeState(State new_state) { 270 void WebMStreamParser::ChangeState(State new_state) {
271 DVLOG(1) << "ChangeState() : " << state_ << " -> " << new_state; 271 DVLOG(1) << "ChangeState() : " << state_ << " -> " << new_state;
272 state_ = new_state; 272 state_ = new_state;
273 } 273 }
274 274
275 int WebMStreamParser::ParseInfoAndTracks(const uint8* data, int size) { 275 int WebMStreamParser::ParseInfoAndTracks(const uint8* data, int size) {
276 DVLOG(2) << "ParseInfoAndTracks()";
276 DCHECK(data); 277 DCHECK(data);
277 DCHECK_GT(size, 0); 278 DCHECK_GT(size, 0);
278 279
279 const uint8* cur = data; 280 const uint8* cur = data;
280 int cur_size = size; 281 int cur_size = size;
281 int bytes_parsed = 0; 282 int bytes_parsed = 0;
282 283
283 int id; 284 int id;
284 int64 element_size; 285 int64 element_size;
285 int result = WebMParseElementHeader(cur, cur_size, &id, &element_size); 286 int result = WebMParseElementHeader(cur, cur_size, &id, &element_size);
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 467
467 void WebMStreamParser::FireNeedKey(const std::string& key_id) { 468 void WebMStreamParser::FireNeedKey(const std::string& key_id) {
468 int key_id_size = key_id.size(); 469 int key_id_size = key_id.size();
469 DCHECK_GT(key_id_size, 0); 470 DCHECK_GT(key_id_size, 0);
470 scoped_array<uint8> key_id_array(new uint8[key_id_size]); 471 scoped_array<uint8> key_id_array(new uint8[key_id_size]);
471 memcpy(key_id_array.get(), key_id.data(), key_id_size); 472 memcpy(key_id_array.get(), key_id.data(), key_id_size);
472 need_key_cb_.Run(kWebMInitDataType, key_id_array.Pass(), key_id_size); 473 need_key_cb_.Run(kWebMInitDataType, key_id_array.Pass(), key_id_size);
473 } 474 }
474 475
475 } // namespace media 476 } // namespace media
OLDNEW
« no previous file with comments | « media/filters/source_buffer_stream.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698