| 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_demuxer_stream.h" | 5 #include "media/filters/decrypting_demuxer_stream.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 170 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 DCHECK_EQ(demuxer_stream_->type() == VIDEO, video_config_.IsValidConfig()); | 181 DCHECK_EQ(demuxer_stream_->type() == VIDEO, video_config_.IsValidConfig()); |
| 182 | 182 |
| 183 // Update the decoder config, which the decoder will use when it is notified | 183 // Update the decoder config, which the decoder will use when it is notified |
| 184 // of kConfigChanged. | 184 // of kConfigChanged. |
| 185 InitializeDecoderConfig(); | 185 InitializeDecoderConfig(); |
| 186 state_ = kIdle; | 186 state_ = kIdle; |
| 187 base::ResetAndReturn(&read_cb_).Run(kConfigChanged, NULL); | 187 base::ResetAndReturn(&read_cb_).Run(kConfigChanged, NULL); |
| 188 return; | 188 return; |
| 189 } | 189 } |
| 190 | 190 |
| 191 if (buffer->IsEndOfStream()) { | 191 if (buffer->is_end_of_stream()) { |
| 192 DVLOG(2) << "DoDecryptBuffer() - EOS buffer."; | 192 DVLOG(2) << "DoDecryptBuffer() - EOS buffer."; |
| 193 state_ = kIdle; | 193 state_ = kIdle; |
| 194 base::ResetAndReturn(&read_cb_).Run(status, buffer); | 194 base::ResetAndReturn(&read_cb_).Run(status, buffer); |
| 195 return; | 195 return; |
| 196 } | 196 } |
| 197 | 197 |
| 198 pending_buffer_to_decrypt_ = buffer; | 198 pending_buffer_to_decrypt_ = buffer; |
| 199 state_ = kPendingDecrypt; | 199 state_ = kPendingDecrypt; |
| 200 DecryptPendingBuffer(); | 200 DecryptPendingBuffer(); |
| 201 } | 201 } |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 break; | 322 break; |
| 323 } | 323 } |
| 324 | 324 |
| 325 default: | 325 default: |
| 326 NOTREACHED(); | 326 NOTREACHED(); |
| 327 return; | 327 return; |
| 328 } | 328 } |
| 329 } | 329 } |
| 330 | 330 |
| 331 } // namespace media | 331 } // namespace media |
| OLD | NEW |