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

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

Issue 2650823006: media: Pass CdmContext in decoder reinitialization (Closed)
Patch Set: Created 3 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
« no previous file with comments | « no previous file | media/filters/fake_video_decoder.h » ('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 #include "media/filters/decoder_stream.h" 5 #include "media/filters/decoder_stream.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/callback_helpers.h" 10 #include "base/callback_helpers.h"
(...skipping 666 matching lines...) Expand 10 before | Expand all | Expand 10 after
677 template <DemuxerStream::Type StreamType> 677 template <DemuxerStream::Type StreamType>
678 void DecoderStream<StreamType>::ReinitializeDecoder() { 678 void DecoderStream<StreamType>::ReinitializeDecoder() {
679 FUNCTION_DVLOG(2); 679 FUNCTION_DVLOG(2);
680 DCHECK(task_runner_->BelongsToCurrentThread()); 680 DCHECK(task_runner_->BelongsToCurrentThread());
681 DCHECK_EQ(state_, STATE_FLUSHING_DECODER); 681 DCHECK_EQ(state_, STATE_FLUSHING_DECODER);
682 DCHECK_EQ(pending_decode_requests_, 0); 682 DCHECK_EQ(pending_decode_requests_, 0);
683 683
684 state_ = STATE_REINITIALIZING_DECODER; 684 state_ = STATE_REINITIALIZING_DECODER;
685 // Decoders should not need a new CDM during reinitialization. 685 // Decoders should not need a new CDM during reinitialization.
686 traits_.InitializeDecoder( 686 traits_.InitializeDecoder(
687 decoder_.get(), stream_, nullptr, 687 decoder_.get(), stream_, cdm_context_,
688 base::Bind(&DecoderStream<StreamType>::OnDecoderReinitialized, 688 base::Bind(&DecoderStream<StreamType>::OnDecoderReinitialized,
689 weak_factory_.GetWeakPtr()), 689 weak_factory_.GetWeakPtr()),
690 base::Bind(&DecoderStream<StreamType>::OnDecodeOutputReady, 690 base::Bind(&DecoderStream<StreamType>::OnDecodeOutputReady,
691 fallback_weak_factory_.GetWeakPtr())); 691 fallback_weak_factory_.GetWeakPtr()));
692 } 692 }
693 693
694 template <DemuxerStream::Type StreamType> 694 template <DemuxerStream::Type StreamType>
695 void DecoderStream<StreamType>::OnDecoderReinitialized(bool success) { 695 void DecoderStream<StreamType>::OnDecoderReinitialized(bool success) {
696 FUNCTION_DVLOG(2); 696 FUNCTION_DVLOG(2);
697 DCHECK(task_runner_->BelongsToCurrentThread()); 697 DCHECK(task_runner_->BelongsToCurrentThread());
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after
773 } 773 }
774 774
775 // The resetting process will be continued in OnDecoderReinitialized(). 775 // The resetting process will be continued in OnDecoderReinitialized().
776 ReinitializeDecoder(); 776 ReinitializeDecoder();
777 } 777 }
778 778
779 template class DecoderStream<DemuxerStream::VIDEO>; 779 template class DecoderStream<DemuxerStream::VIDEO>;
780 template class DecoderStream<DemuxerStream::AUDIO>; 780 template class DecoderStream<DemuxerStream::AUDIO>;
781 781
782 } // namespace media 782 } // namespace media
OLDNEW
« no previous file with comments | « no previous file | media/filters/fake_video_decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698