| 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/gpu/vaapi_video_decode_accelerator.h" | 5 #include "media/gpu/vaapi_video_decode_accelerator.h" |
| 6 | 6 |
| 7 #include <string.h> | 7 #include <string.h> |
| 8 | 8 |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| (...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 479 return; | 479 return; |
| 480 } | 480 } |
| 481 | 481 |
| 482 RETURN_AND_NOTIFY_ON_FAILURE(shm->Map(), "Failed to map input buffer", | 482 RETURN_AND_NOTIFY_ON_FAILURE(shm->Map(), "Failed to map input buffer", |
| 483 UNREADABLE_INPUT, ); | 483 UNREADABLE_INPUT, ); |
| 484 | 484 |
| 485 base::AutoLock auto_lock(lock_); | 485 base::AutoLock auto_lock(lock_); |
| 486 | 486 |
| 487 // Set up a new input buffer and queue it for later. | 487 // Set up a new input buffer and queue it for later. |
| 488 linked_ptr<InputBuffer> input_buffer(new InputBuffer()); | 488 linked_ptr<InputBuffer> input_buffer(new InputBuffer()); |
| 489 input_buffer->shm.reset(shm.release()); | 489 input_buffer->shm = std::move(shm); |
| 490 input_buffer->id = bitstream_buffer.id(); | 490 input_buffer->id = bitstream_buffer.id(); |
| 491 | 491 |
| 492 ++num_stream_bufs_at_decoder_; | 492 ++num_stream_bufs_at_decoder_; |
| 493 TRACE_COUNTER1("Video Decoder", "Stream buffers at decoder", | 493 TRACE_COUNTER1("Video Decoder", "Stream buffers at decoder", |
| 494 num_stream_bufs_at_decoder_); | 494 num_stream_bufs_at_decoder_); |
| 495 | 495 |
| 496 input_buffers_.push(input_buffer); | 496 input_buffers_.push(input_buffer); |
| 497 input_ready_.Signal(); | 497 input_ready_.Signal(); |
| 498 } | 498 } |
| 499 | 499 |
| (...skipping 1381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1881 return vaapi_pic->dec_surface(); | 1881 return vaapi_pic->dec_surface(); |
| 1882 } | 1882 } |
| 1883 | 1883 |
| 1884 // static | 1884 // static |
| 1885 VideoDecodeAccelerator::SupportedProfiles | 1885 VideoDecodeAccelerator::SupportedProfiles |
| 1886 VaapiVideoDecodeAccelerator::GetSupportedProfiles() { | 1886 VaapiVideoDecodeAccelerator::GetSupportedProfiles() { |
| 1887 return VaapiWrapper::GetSupportedDecodeProfiles(); | 1887 return VaapiWrapper::GetSupportedDecodeProfiles(); |
| 1888 } | 1888 } |
| 1889 | 1889 |
| 1890 } // namespace media | 1890 } // namespace media |
| OLD | NEW |