| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 "content/common/gpu/media/android_video_decode_accelerator.h" | 5 #include "content/common/gpu/media/android_video_decode_accelerator.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/message_loop/message_loop.h" | 9 #include "base/message_loop/message_loop.h" |
| 10 #include "content/common/gpu/gpu_channel.h" | |
| 11 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" | |
| 12 #include "media/base/bitstream_buffer.h" | 10 #include "media/base/bitstream_buffer.h" |
| 13 #include "media/base/limits.h" | 11 #include "media/base/limits.h" |
| 14 #include "media/video/picture.h" | 12 #include "media/video/picture.h" |
| 15 #include "ui/gl/android/scoped_java_surface.h" | 13 #include "ui/gl/android/scoped_java_surface.h" |
| 14 #include "ui/gl/android/surface_texture_bridge.h" |
| 16 #include "ui/gl/gl_bindings.h" | 15 #include "ui/gl/gl_bindings.h" |
| 17 | 16 |
| 18 namespace content { | 17 namespace content { |
| 19 | 18 |
| 20 // Helper macros for dealing with failure. If |result| evaluates false, emit | 19 // Helper macros for dealing with failure. If |result| evaluates false, emit |
| 21 // |log| to ERROR, register |error| with the decoder, and return. | 20 // |log| to ERROR, register |error| with the decoder, and return. |
| 22 #define RETURN_ON_FAILURE(result, log, error) \ | 21 #define RETURN_ON_FAILURE(result, log, error) \ |
| 23 do { \ | 22 do { \ |
| 24 if (!(result)) { \ | 23 if (!(result)) { \ |
| 25 DLOG(ERROR) << log; \ | 24 DLOG(ERROR) << log; \ |
| (...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 465 void AndroidVideoDecodeAccelerator::NotifyResetDone() { | 464 void AndroidVideoDecodeAccelerator::NotifyResetDone() { |
| 466 client_->NotifyResetDone(); | 465 client_->NotifyResetDone(); |
| 467 } | 466 } |
| 468 | 467 |
| 469 void AndroidVideoDecodeAccelerator::NotifyError( | 468 void AndroidVideoDecodeAccelerator::NotifyError( |
| 470 media::VideoDecodeAccelerator::Error error) { | 469 media::VideoDecodeAccelerator::Error error) { |
| 471 client_->NotifyError(error); | 470 client_->NotifyError(error); |
| 472 } | 471 } |
| 473 | 472 |
| 474 } // namespace content | 473 } // namespace content |
| OLD | NEW |