| OLD | NEW |
| 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/decrypting_video_decoder.h" | 5 #include "media/filters/decrypting_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/logging.h" | 10 #include "base/logging.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 | 35 |
| 36 std::string DecryptingVideoDecoder::GetDisplayName() const { | 36 std::string DecryptingVideoDecoder::GetDisplayName() const { |
| 37 return kDecoderName; | 37 return kDecoderName; |
| 38 } | 38 } |
| 39 | 39 |
| 40 void DecryptingVideoDecoder::Initialize(const VideoDecoderConfig& config, | 40 void DecryptingVideoDecoder::Initialize(const VideoDecoderConfig& config, |
| 41 bool /* low_delay */, | 41 bool /* low_delay */, |
| 42 CdmContext* cdm_context, | 42 CdmContext* cdm_context, |
| 43 const InitCB& init_cb, | 43 const InitCB& init_cb, |
| 44 const OutputCB& output_cb) { | 44 const OutputCB& output_cb) { |
| 45 DVLOG(2) << __FUNCTION__ << ": " << config.AsHumanReadableString(); | 45 DVLOG(2) << __func__ << ": " << config.AsHumanReadableString(); |
| 46 | 46 |
| 47 DCHECK(task_runner_->BelongsToCurrentThread()); | 47 DCHECK(task_runner_->BelongsToCurrentThread()); |
| 48 DCHECK(state_ == kUninitialized || | 48 DCHECK(state_ == kUninitialized || |
| 49 state_ == kIdle || | 49 state_ == kIdle || |
| 50 state_ == kDecodeFinished) << state_; | 50 state_ == kDecodeFinished) << state_; |
| 51 DCHECK(decode_cb_.is_null()); | 51 DCHECK(decode_cb_.is_null()); |
| 52 DCHECK(reset_cb_.is_null()); | 52 DCHECK(reset_cb_.is_null()); |
| 53 DCHECK(config.IsValidConfig()); | 53 DCHECK(config.IsValidConfig()); |
| 54 DCHECK(config.is_encrypted()); | 54 DCHECK(config.is_encrypted()); |
| 55 | 55 |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 300 } | 300 } |
| 301 | 301 |
| 302 void DecryptingVideoDecoder::DoReset() { | 302 void DecryptingVideoDecoder::DoReset() { |
| 303 DCHECK(init_cb_.is_null()); | 303 DCHECK(init_cb_.is_null()); |
| 304 DCHECK(decode_cb_.is_null()); | 304 DCHECK(decode_cb_.is_null()); |
| 305 state_ = kIdle; | 305 state_ = kIdle; |
| 306 base::ResetAndReturn(&reset_cb_).Run(); | 306 base::ResetAndReturn(&reset_cb_).Run(); |
| 307 } | 307 } |
| 308 | 308 |
| 309 } // namespace media | 309 } // namespace media |
| OLD | NEW |