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 "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 // TODO(hkuang): get the StreamTexture transform matrix in GPU process | 357 // TODO(hkuang): get the StreamTexture transform matrix in GPU process |
358 // instead of using default matrix crbug.com/226218. | 358 // instead of using default matrix crbug.com/226218. |
359 const static GLfloat default_matrix[16] = {1.0f, 0.0f, 0.0f, 0.0f, | 359 const static GLfloat default_matrix[16] = {1.0f, 0.0f, 0.0f, 0.0f, |
360 0.0f, 1.0f, 0.0f, 0.0f, | 360 0.0f, 1.0f, 0.0f, 0.0f, |
361 0.0f, 0.0f, 1.0f, 0.0f, | 361 0.0f, 0.0f, 1.0f, 0.0f, |
362 0.0f, 0.0f, 0.0f, 1.0f}; | 362 0.0f, 0.0f, 0.0f, 1.0f}; |
363 copier_->DoCopyTextureWithTransform(gl_decoder_.get(), | 363 copier_->DoCopyTextureWithTransform(gl_decoder_.get(), |
364 GL_TEXTURE_EXTERNAL_OES, | 364 GL_TEXTURE_EXTERNAL_OES, |
365 surface_texture_id_, | 365 surface_texture_id_, |
366 picture_buffer_texture_id, | 366 picture_buffer_texture_id, |
| 367 0, |
367 size_.width(), | 368 size_.width(), |
368 size_.height(), | 369 size_.height(), |
369 false, | 370 false, |
370 false, | 371 false, |
371 false, | 372 false, |
372 default_matrix); | 373 default_matrix); |
373 | 374 |
374 base::MessageLoop::current()->PostTask( | 375 base::MessageLoop::current()->PostTask( |
375 FROM_HERE, base::Bind(&AndroidVideoDecodeAccelerator::NotifyPictureReady, | 376 FROM_HERE, base::Bind(&AndroidVideoDecodeAccelerator::NotifyPictureReady, |
376 weak_this_factory_.GetWeakPtr(), | 377 weak_this_factory_.GetWeakPtr(), |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
548 void AndroidVideoDecodeAccelerator::NotifyResetDone() { | 549 void AndroidVideoDecodeAccelerator::NotifyResetDone() { |
549 client_->NotifyResetDone(); | 550 client_->NotifyResetDone(); |
550 } | 551 } |
551 | 552 |
552 void AndroidVideoDecodeAccelerator::NotifyError( | 553 void AndroidVideoDecodeAccelerator::NotifyError( |
553 media::VideoDecodeAccelerator::Error error) { | 554 media::VideoDecodeAccelerator::Error error) { |
554 client_->NotifyError(error); | 555 client_->NotifyError(error); |
555 } | 556 } |
556 | 557 |
557 } // namespace content | 558 } // namespace content |
OLD | NEW |