OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 <fcntl.h> | 5 #include <fcntl.h> |
6 #include <linux/videodev2.h> | 6 #include <linux/videodev2.h> |
7 #include <poll.h> | 7 #include <poll.h> |
8 #include <sys/eventfd.h> | 8 #include <sys/eventfd.h> |
9 #include <sys/ioctl.h> | 9 #include <sys/ioctl.h> |
10 #include <sys/mman.h> | 10 #include <sys/mman.h> |
(...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
426 weak_this_, error)); | 426 weak_this_, error)); |
427 return; | 427 return; |
428 } | 428 } |
429 | 429 |
430 if (client_) { | 430 if (client_) { |
431 client_->NotifyError(error); | 431 client_->NotifyError(error); |
432 client_ptr_factory_.reset(); | 432 client_ptr_factory_.reset(); |
433 } | 433 } |
434 } | 434 } |
435 | 435 |
| 436 // static |
| 437 std::vector<media::VideoDecodeAccelerator::SupportedProfile> |
| 438 V4L2SliceVideoDecodeAccelerator::GetSupportedProfiles() { |
| 439 return V4L2Device::GetSupportedDecodeProfiles(); |
| 440 } |
| 441 |
436 bool V4L2SliceVideoDecodeAccelerator::Initialize( | 442 bool V4L2SliceVideoDecodeAccelerator::Initialize( |
437 media::VideoCodecProfile profile, | 443 media::VideoCodecProfile profile, |
438 VideoDecodeAccelerator::Client* client) { | 444 VideoDecodeAccelerator::Client* client) { |
439 DVLOGF(3) << "profile: " << profile; | 445 DVLOGF(3) << "profile: " << profile; |
440 DCHECK(child_message_loop_proxy_->BelongsToCurrentThread()); | 446 DCHECK(child_message_loop_proxy_->BelongsToCurrentThread()); |
441 DCHECK_EQ(state_, kUninitialized); | 447 DCHECK_EQ(state_, kUninitialized); |
442 | 448 |
443 client_ptr_factory_.reset( | 449 client_ptr_factory_.reset( |
444 new base::WeakPtrFactory<VideoDecodeAccelerator::Client>(client)); | 450 new base::WeakPtrFactory<VideoDecodeAccelerator::Client>(client)); |
445 client_ = client_ptr_factory_->GetWeakPtr(); | 451 client_ = client_ptr_factory_->GetWeakPtr(); |
(...skipping 2025 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2471 DCHECK_GT(picture_clearing_count_, 0); | 2477 DCHECK_GT(picture_clearing_count_, 0); |
2472 picture_clearing_count_--; | 2478 picture_clearing_count_--; |
2473 SendPictureReady(); | 2479 SendPictureReady(); |
2474 } | 2480 } |
2475 | 2481 |
2476 bool V4L2SliceVideoDecodeAccelerator::CanDecodeOnIOThread() { | 2482 bool V4L2SliceVideoDecodeAccelerator::CanDecodeOnIOThread() { |
2477 return true; | 2483 return true; |
2478 } | 2484 } |
2479 | 2485 |
2480 } // namespace content | 2486 } // namespace content |
OLD | NEW |