| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/cast/test/fake_video_encode_accelerator.h" | 5 #include "media/cast/test/fake_video_encode_accelerator.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/location.h" | 8 #include "base/location.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 first_(true), | 25 first_(true), |
| 26 will_initialization_succeed_(true), | 26 will_initialization_succeed_(true), |
| 27 weak_this_factory_(this) { | 27 weak_this_factory_(this) { |
| 28 DCHECK(stored_bitrates_); | 28 DCHECK(stored_bitrates_); |
| 29 } | 29 } |
| 30 | 30 |
| 31 FakeVideoEncodeAccelerator::~FakeVideoEncodeAccelerator() { | 31 FakeVideoEncodeAccelerator::~FakeVideoEncodeAccelerator() { |
| 32 weak_this_factory_.InvalidateWeakPtrs(); | 32 weak_this_factory_.InvalidateWeakPtrs(); |
| 33 } | 33 } |
| 34 | 34 |
| 35 std::vector<VideoEncodeAccelerator::SupportedProfile> | 35 std::vector<gpu::VideoEncodeAcceleratorSupportedProfile> |
| 36 FakeVideoEncodeAccelerator::GetSupportedProfiles() { | 36 FakeVideoEncodeAccelerator::GetSupportedProfiles() { |
| 37 return std::vector<VideoEncodeAccelerator::SupportedProfile>(); | 37 return std::vector<gpu::VideoEncodeAcceleratorSupportedProfile>(); |
| 38 } | 38 } |
| 39 | 39 |
| 40 bool FakeVideoEncodeAccelerator::Initialize( | 40 bool FakeVideoEncodeAccelerator::Initialize( |
| 41 media::VideoFrame::Format input_format, | 41 media::VideoFrame::Format input_format, |
| 42 const gfx::Size& input_visible_size, | 42 const gfx::Size& input_visible_size, |
| 43 VideoCodecProfile output_profile, | 43 VideoCodecProfile output_profile, |
| 44 uint32 initial_bitrate, | 44 uint32 initial_bitrate, |
| 45 Client* client) { | 45 Client* client) { |
| 46 if (!will_initialization_succeed_) | 46 if (!will_initialization_succeed_) |
| 47 return false; | 47 return false; |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 112 void FakeVideoEncodeAccelerator::DoBitstreamBufferReady( | 112 void FakeVideoEncodeAccelerator::DoBitstreamBufferReady( |
| 113 int32 bitstream_buffer_id, | 113 int32 bitstream_buffer_id, |
| 114 size_t payload_size, | 114 size_t payload_size, |
| 115 bool key_frame) const { | 115 bool key_frame) const { |
| 116 client_->BitstreamBufferReady(bitstream_buffer_id, payload_size, key_frame); | 116 client_->BitstreamBufferReady(bitstream_buffer_id, payload_size, key_frame); |
| 117 } | 117 } |
| 118 | 118 |
| 119 } // namespace test | 119 } // namespace test |
| 120 } // namespace cast | 120 } // namespace cast |
| 121 } // namespace media | 121 } // namespace media |
| OLD | NEW |