| 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 13 matching lines...) Expand all Loading... |
| 24 client_(NULL), | 24 client_(NULL), |
| 25 first_(true), | 25 first_(true), |
| 26 weak_this_factory_(this) { | 26 weak_this_factory_(this) { |
| 27 DCHECK(stored_bitrates_); | 27 DCHECK(stored_bitrates_); |
| 28 } | 28 } |
| 29 | 29 |
| 30 FakeVideoEncodeAccelerator::~FakeVideoEncodeAccelerator() { | 30 FakeVideoEncodeAccelerator::~FakeVideoEncodeAccelerator() { |
| 31 weak_this_factory_.InvalidateWeakPtrs(); | 31 weak_this_factory_.InvalidateWeakPtrs(); |
| 32 } | 32 } |
| 33 | 33 |
| 34 std::vector<VideoEncodeAccelerator::SupportedProfile> |
| 35 FakeVideoEncodeAccelerator::GetSupportedProfiles() { |
| 36 return std::vector<VideoEncodeAccelerator::SupportedProfile>(); |
| 37 } |
| 38 |
| 34 bool FakeVideoEncodeAccelerator::Initialize( | 39 bool FakeVideoEncodeAccelerator::Initialize( |
| 35 media::VideoFrame::Format input_format, | 40 media::VideoFrame::Format input_format, |
| 36 const gfx::Size& input_visible_size, | 41 const gfx::Size& input_visible_size, |
| 37 VideoCodecProfile output_profile, | 42 VideoCodecProfile output_profile, |
| 38 uint32 initial_bitrate, | 43 uint32 initial_bitrate, |
| 39 Client* client) { | 44 Client* client) { |
| 40 client_ = client; | 45 client_ = client; |
| 41 if (output_profile != media::VP8PROFILE_ANY && | 46 if (output_profile != media::VP8PROFILE_ANY && |
| 42 output_profile != media::H264PROFILE_MAIN) { | 47 output_profile != media::H264PROFILE_MAIN) { |
| 43 return false; | 48 return false; |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 void FakeVideoEncodeAccelerator::DoBitstreamBufferReady( | 109 void FakeVideoEncodeAccelerator::DoBitstreamBufferReady( |
| 105 int32 bitstream_buffer_id, | 110 int32 bitstream_buffer_id, |
| 106 size_t payload_size, | 111 size_t payload_size, |
| 107 bool key_frame) const { | 112 bool key_frame) const { |
| 108 client_->BitstreamBufferReady(bitstream_buffer_id, payload_size, key_frame); | 113 client_->BitstreamBufferReady(bitstream_buffer_id, payload_size, key_frame); |
| 109 } | 114 } |
| 110 | 115 |
| 111 } // namespace test | 116 } // namespace test |
| 112 } // namespace cast | 117 } // namespace cast |
| 113 } // namespace media | 118 } // namespace media |
| OLD | NEW |