| 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 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 408 INVALID_ARGUMENT); | 408 INVALID_ARGUMENT); |
| 409 int32 id = buffers[i].id(); | 409 int32 id = buffers[i].id(); |
| 410 output_picture_buffers_.insert(std::make_pair(id, buffers[i])); | 410 output_picture_buffers_.insert(std::make_pair(id, buffers[i])); |
| 411 free_picture_ids_.push(id); | 411 free_picture_ids_.push(id); |
| 412 // Since the client might be re-using |picture_buffer_id| values, forget | 412 // Since the client might be re-using |picture_buffer_id| values, forget |
| 413 // about previously-dismissed IDs now. See ReusePictureBuffer() comment | 413 // about previously-dismissed IDs now. See ReusePictureBuffer() comment |
| 414 // about "zombies" for why we maintain this set in the first place. | 414 // about "zombies" for why we maintain this set in the first place. |
| 415 dismissed_picture_ids_.erase(id); | 415 dismissed_picture_ids_.erase(id); |
| 416 } | 416 } |
| 417 | 417 |
| 418 RETURN_ON_FAILURE(output_picture_buffers_.size() == kNumPictureBuffers, | 418 RETURN_ON_FAILURE(output_picture_buffers_.size() >= kNumPictureBuffers, |
| 419 "Invalid picture buffers were passed.", | 419 "Invalid picture buffers were passed.", |
| 420 INVALID_ARGUMENT); | 420 INVALID_ARGUMENT); |
| 421 | 421 |
| 422 DoIOTask(); | 422 DoIOTask(); |
| 423 } | 423 } |
| 424 | 424 |
| 425 void AndroidVideoDecodeAccelerator::ReusePictureBuffer( | 425 void AndroidVideoDecodeAccelerator::ReusePictureBuffer( |
| 426 int32 picture_buffer_id) { | 426 int32 picture_buffer_id) { |
| 427 DCHECK(thread_checker_.CalledOnValidThread()); | 427 DCHECK(thread_checker_.CalledOnValidThread()); |
| 428 | 428 |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 564 } | 564 } |
| 565 SupportedProfile profile; | 565 SupportedProfile profile; |
| 566 profile.profile = media::VP8PROFILE_ANY; | 566 profile.profile = media::VP8PROFILE_ANY; |
| 567 profile.min_resolution.SetSize(16, 16); | 567 profile.min_resolution.SetSize(16, 16); |
| 568 profile.max_resolution.SetSize(1920, 1088); | 568 profile.max_resolution.SetSize(1920, 1088); |
| 569 profiles.push_back(profile); | 569 profiles.push_back(profile); |
| 570 return profiles; | 570 return profiles; |
| 571 } | 571 } |
| 572 | 572 |
| 573 } // namespace content | 573 } // namespace content |
| OLD | NEW |