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

Side by Side Diff: media/filters/chunk_demuxer.cc

Issue 10534096: Generalize AesDecryptor to make it more spec compliant. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Updated to pass layout tests. Created 8 years, 6 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
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/filters/chunk_demuxer.h" 5 #include "media/filters/chunk_demuxer.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/message_loop.h" 9 #include "base/message_loop.h"
10 #include "media/base/audio_decoder_config.h" 10 #include "media/base/audio_decoder_config.h"
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
497 } 497 }
498 498
499 stream_parser_.reset(factory_function()); 499 stream_parser_.reset(factory_function());
500 CHECK(stream_parser_.get()); 500 CHECK(stream_parser_.get());
501 501
502 stream_parser_->Init( 502 stream_parser_->Init(
503 base::Bind(&ChunkDemuxer::OnStreamParserInitDone, this), 503 base::Bind(&ChunkDemuxer::OnStreamParserInitDone, this),
504 base::Bind(&ChunkDemuxer::OnNewConfigs, base::Unretained(this)), 504 base::Bind(&ChunkDemuxer::OnNewConfigs, base::Unretained(this)),
505 audio_cb, 505 audio_cb,
506 video_cb, 506 video_cb,
507 base::Bind(&ChunkDemuxer::OnKeyNeeded, base::Unretained(this))); 507 base::Bind(&ChunkDemuxer::OnNeedKey, base::Unretained(this)));
508 508
509 return kOk; 509 return kOk;
510 } 510 }
511 511
512 void ChunkDemuxer::RemoveId(const std::string& id) { 512 void ChunkDemuxer::RemoveId(const std::string& id) {
513 CHECK(!source_id_.empty()); 513 CHECK(!source_id_.empty());
514 CHECK_EQ(source_id_, id); 514 CHECK_EQ(source_id_, id);
515 source_id_ = ""; 515 source_id_ = "";
516 has_audio_ = false; 516 has_audio_ = false;
517 has_video_ = false; 517 has_video_ = false;
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
793 793
794 if (!video_) 794 if (!video_)
795 return false; 795 return false;
796 796
797 // TODO(annacc): return Append's result after http://crbug.com/125072 is fixed 797 // TODO(annacc): return Append's result after http://crbug.com/125072 is fixed
798 video_->Append(buffers); 798 video_->Append(buffers);
799 799
800 return true; 800 return true;
801 } 801 }
802 802
803 bool ChunkDemuxer::OnKeyNeeded(scoped_array<uint8> init_data, 803 bool ChunkDemuxer::OnNeedKey(scoped_array<uint8> init_data,
804 int init_data_size) { 804 int init_data_size) {
805 client_->KeyNeeded(init_data.Pass(), init_data_size); 805 client_->DemuxerNeedKey(init_data.Pass(), init_data_size);
806 return true; 806 return true;
807 } 807 }
808 808
809 } // namespace media 809 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698