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 "content/common/gpu/media/vaapi_video_decode_accelerator.h" | 5 #include "content/common/gpu/media/vaapi_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/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
10 #include "base/stl_util.h" | 10 #include "base/stl_util.h" |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 } else if (profile >= media::VP8PROFILE_MIN && | 300 } else if (profile >= media::VP8PROFILE_MIN && |
301 profile <= media::VP8PROFILE_MAX) { | 301 profile <= media::VP8PROFILE_MAX) { |
302 vp8_accelerator_.reset(new VaapiVP8Accelerator(this, vaapi_wrapper_.get())); | 302 vp8_accelerator_.reset(new VaapiVP8Accelerator(this, vaapi_wrapper_.get())); |
303 decoder_.reset(new VP8Decoder(vp8_accelerator_.get())); | 303 decoder_.reset(new VP8Decoder(vp8_accelerator_.get())); |
304 } else { | 304 } else { |
305 DLOG(ERROR) << "Unsupported profile " << profile; | 305 DLOG(ERROR) << "Unsupported profile " << profile; |
306 return false; | 306 return false; |
307 } | 307 } |
308 | 308 |
309 CHECK(decoder_thread_.Start()); | 309 CHECK(decoder_thread_.Start()); |
310 decoder_thread_proxy_ = decoder_thread_.message_loop_proxy(); | 310 decoder_thread_proxy_ = decoder_thread_.task_runner(); |
311 | 311 |
312 state_ = kIdle; | 312 state_ = kIdle; |
313 return true; | 313 return true; |
314 } | 314 } |
315 | 315 |
316 void VaapiVideoDecodeAccelerator::OutputPicture( | 316 void VaapiVideoDecodeAccelerator::OutputPicture( |
317 const scoped_refptr<VASurface>& va_surface, | 317 const scoped_refptr<VASurface>& va_surface, |
318 int32 input_id, | 318 int32 input_id, |
319 VaapiPicture* picture) { | 319 VaapiPicture* picture) { |
320 DCHECK_EQ(message_loop_, base::MessageLoop::current()); | 320 DCHECK_EQ(message_loop_, base::MessageLoop::current()); |
(...skipping 1188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1509 return vaapi_pic->dec_surface(); | 1509 return vaapi_pic->dec_surface(); |
1510 } | 1510 } |
1511 | 1511 |
1512 // static | 1512 // static |
1513 media::VideoDecodeAccelerator::SupportedProfiles | 1513 media::VideoDecodeAccelerator::SupportedProfiles |
1514 VaapiVideoDecodeAccelerator::GetSupportedProfiles() { | 1514 VaapiVideoDecodeAccelerator::GetSupportedProfiles() { |
1515 return VaapiWrapper::GetSupportedDecodeProfiles(); | 1515 return VaapiWrapper::GetSupportedDecodeProfiles(); |
1516 } | 1516 } |
1517 | 1517 |
1518 } // namespace content | 1518 } // namespace content |
OLD | NEW |