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 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
366 picture_buffer_texture_id, | 366 picture_buffer_texture_id, |
367 0, | 367 0, |
368 size_.width(), | 368 size_.width(), |
369 size_.height(), | 369 size_.height(), |
370 false, | 370 false, |
371 false, | 371 false, |
372 false, | 372 false, |
373 default_matrix); | 373 default_matrix); |
374 | 374 |
375 base::MessageLoop::current()->PostTask( | 375 base::MessageLoop::current()->PostTask( |
376 FROM_HERE, base::Bind(&AndroidVideoDecodeAccelerator::NotifyPictureReady, | 376 FROM_HERE, |
377 weak_this_factory_.GetWeakPtr(), | 377 base::Bind( |
378 media::Picture(picture_buffer_id, bitstream_id, | 378 &AndroidVideoDecodeAccelerator::NotifyPictureReady, |
379 gfx::Rect(size_), false))); | 379 weak_this_factory_.GetWeakPtr(), |
| 380 media::Picture(picture_buffer_id, bitstream_id, gfx::Rect(size_)))); |
380 } | 381 } |
381 | 382 |
382 void AndroidVideoDecodeAccelerator::Decode( | 383 void AndroidVideoDecodeAccelerator::Decode( |
383 const media::BitstreamBuffer& bitstream_buffer) { | 384 const media::BitstreamBuffer& bitstream_buffer) { |
384 DCHECK(thread_checker_.CalledOnValidThread()); | 385 DCHECK(thread_checker_.CalledOnValidThread()); |
385 if (bitstream_buffer.id() != -1 && bitstream_buffer.size() == 0) { | 386 if (bitstream_buffer.id() != -1 && bitstream_buffer.size() == 0) { |
386 base::MessageLoop::current()->PostTask( | 387 base::MessageLoop::current()->PostTask( |
387 FROM_HERE, | 388 FROM_HERE, |
388 base::Bind(&AndroidVideoDecodeAccelerator::NotifyEndOfBitstreamBuffer, | 389 base::Bind(&AndroidVideoDecodeAccelerator::NotifyEndOfBitstreamBuffer, |
389 weak_this_factory_.GetWeakPtr(), | 390 weak_this_factory_.GetWeakPtr(), |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
549 void AndroidVideoDecodeAccelerator::NotifyResetDone() { | 550 void AndroidVideoDecodeAccelerator::NotifyResetDone() { |
550 client_->NotifyResetDone(); | 551 client_->NotifyResetDone(); |
551 } | 552 } |
552 | 553 |
553 void AndroidVideoDecodeAccelerator::NotifyError( | 554 void AndroidVideoDecodeAccelerator::NotifyError( |
554 media::VideoDecodeAccelerator::Error error) { | 555 media::VideoDecodeAccelerator::Error error) { |
555 client_->NotifyError(error); | 556 client_->NotifyError(error); |
556 } | 557 } |
557 | 558 |
558 } // namespace content | 559 } // namespace content |
OLD | NEW |