| 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/gpu_video_decoder.h" | 5 #include "media/filters/gpu_video_decoder.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 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 223 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 234 return; | 234 return; |
| 235 } | 235 } |
| 236 | 236 |
| 237 switch (state_) { | 237 switch (state_) { |
| 238 case kDecoderDrained: | 238 case kDecoderDrained: |
| 239 if (!ready_video_frames_.empty()) { | 239 if (!ready_video_frames_.empty()) { |
| 240 EnqueueFrameAndTriggerFrameDelivery(NULL); | 240 EnqueueFrameAndTriggerFrameDelivery(NULL); |
| 241 return; | 241 return; |
| 242 } | 242 } |
| 243 state_ = kNormal; | 243 state_ = kNormal; |
| 244 // Fall-through. | 244 FALLTHROUGH_INTENDED; |
| 245 case kNormal: | 245 case kNormal: |
| 246 break; | 246 break; |
| 247 case kDrainingDecoder: | 247 case kDrainingDecoder: |
| 248 DCHECK(buffer->end_of_stream()); | 248 DCHECK(buffer->end_of_stream()); |
| 249 // Do nothing. Will be satisfied either by a PictureReady or | 249 // Do nothing. Will be satisfied either by a PictureReady or |
| 250 // NotifyFlushDone below. | 250 // NotifyFlushDone below. |
| 251 return; | 251 return; |
| 252 case kError: | 252 case kError: |
| 253 NOTREACHED(); | 253 NOTREACHED(); |
| 254 return; | 254 return; |
| (...skipping 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 617 | 617 |
| 618 state_ = kError; | 618 state_ = kError; |
| 619 | 619 |
| 620 if (!pending_decode_cb_.is_null()) { | 620 if (!pending_decode_cb_.is_null()) { |
| 621 base::ResetAndReturn(&pending_decode_cb_).Run(kDecodeError, NULL); | 621 base::ResetAndReturn(&pending_decode_cb_).Run(kDecodeError, NULL); |
| 622 return; | 622 return; |
| 623 } | 623 } |
| 624 } | 624 } |
| 625 | 625 |
| 626 } // namespace media | 626 } // namespace media |
| OLD | NEW |