| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 "media/gpu/android_video_encode_accelerator.h" | 5 #include "media/gpu/android_video_encode_accelerator.h" |
| 6 | 6 |
| 7 #include <memory> | 7 #include <memory> |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 413 buf_index, offset, shm->memory(), size); | 413 buf_index, offset, shm->memory(), size); |
| 414 RETURN_ON_FAILURE(status == media::MEDIA_CODEC_OK, | 414 RETURN_ON_FAILURE(status == media::MEDIA_CODEC_OK, |
| 415 "CopyFromOutputBuffer failed", kPlatformFailureError); | 415 "CopyFromOutputBuffer failed", kPlatformFailureError); |
| 416 media_codec_->ReleaseOutputBuffer(buf_index, false); | 416 media_codec_->ReleaseOutputBuffer(buf_index, false); |
| 417 --num_buffers_at_codec_; | 417 --num_buffers_at_codec_; |
| 418 | 418 |
| 419 base::MessageLoop::current()->PostTask( | 419 base::MessageLoop::current()->PostTask( |
| 420 FROM_HERE, | 420 FROM_HERE, |
| 421 base::Bind(&VideoEncodeAccelerator::Client::BitstreamBufferReady, | 421 base::Bind(&VideoEncodeAccelerator::Client::BitstreamBufferReady, |
| 422 client_ptr_factory_->GetWeakPtr(), bitstream_buffer.id(), size, | 422 client_ptr_factory_->GetWeakPtr(), bitstream_buffer.id(), size, |
| 423 key_frame)); | 423 key_frame, base::Time::Now() - base::Time())); |
| 424 } | 424 } |
| 425 | 425 |
| 426 } // namespace media | 426 } // namespace media |
| OLD | NEW |