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

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

Issue 935243002: Decryptors can report kNoKey to WebMediaPlayer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/fake_video_decoder.h" 5 #include "media/filters/fake_video_decoder.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback_helpers.h" 8 #include "base/callback_helpers.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/message_loop/message_loop_proxy.h" 10 #include "base/message_loop/message_loop_proxy.h"
(...skipping 29 matching lines...) Expand all
40 if (!reset_cb_.IsNull()) 40 if (!reset_cb_.IsNull())
41 SatisfyReset(); 41 SatisfyReset();
42 42
43 decoded_frames_.clear(); 43 decoded_frames_.clear();
44 } 44 }
45 45
46 std::string FakeVideoDecoder::GetDisplayName() const { 46 std::string FakeVideoDecoder::GetDisplayName() const {
47 return "FakeVideoDecoder"; 47 return "FakeVideoDecoder";
48 } 48 }
49 49
50 void FakeVideoDecoder::Initialize(const VideoDecoderConfig& config, 50 void FakeVideoDecoder::Initialize(
51 bool low_delay, 51 const VideoDecoderConfig& config,
52 const PipelineStatusCB& status_cb, 52 bool low_delay,
53 const OutputCB& output_cb) { 53 const PipelineStatusCB& status_cb,
54 const OutputCB& output_cb,
55 const base::Closure& /* waiting_for_encryption_key_cb */) {
54 DCHECK(thread_checker_.CalledOnValidThread()); 56 DCHECK(thread_checker_.CalledOnValidThread());
55 DCHECK(config.IsValidConfig()); 57 DCHECK(config.IsValidConfig());
56 DCHECK(held_decode_callbacks_.empty()) 58 DCHECK(held_decode_callbacks_.empty())
57 << "No reinitialization during pending decode."; 59 << "No reinitialization during pending decode.";
58 DCHECK(reset_cb_.IsNull()) << "No reinitialization during pending reset."; 60 DCHECK(reset_cb_.IsNull()) << "No reinitialization during pending reset.";
59 61
60 current_config_ = config; 62 current_config_ = config;
61 init_cb_.SetCallback(BindToCurrentLoop(status_cb)); 63 init_cb_.SetCallback(BindToCurrentLoop(status_cb));
62 64
63 // Don't need BindToCurrentLoop() because |output_cb_| is only called from 65 // Don't need BindToCurrentLoop() because |output_cb_| is only called from
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 256
255 void FakeVideoDecoder::DoReset() { 257 void FakeVideoDecoder::DoReset() {
256 DCHECK(thread_checker_.CalledOnValidThread()); 258 DCHECK(thread_checker_.CalledOnValidThread());
257 DCHECK(held_decode_callbacks_.empty()); 259 DCHECK(held_decode_callbacks_.empty());
258 DCHECK(!reset_cb_.IsNull()); 260 DCHECK(!reset_cb_.IsNull());
259 261
260 reset_cb_.RunOrHold(); 262 reset_cb_.RunOrHold();
261 } 263 }
262 264
263 } // namespace media 265 } // namespace media
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698