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> | |
36 FakeVideoEncodeAccelerator::GetSupportedProfiles() { | |
37 return std::vector<VideoEncodeAccelerator::SupportedProfile>(); | |
Pawel Osciak
2014/09/23 00:08:49
Would be nice to add this query to cast unittests,
wuchengli
2014/09/23 03:37:25
Acknowledged.
| |
38 } | |
39 | |
35 bool FakeVideoEncodeAccelerator::Initialize( | 40 bool FakeVideoEncodeAccelerator::Initialize( |
36 media::VideoFrame::Format input_format, | 41 media::VideoFrame::Format input_format, |
37 const gfx::Size& input_visible_size, | 42 const gfx::Size& input_visible_size, |
38 VideoCodecProfile output_profile, | 43 VideoCodecProfile output_profile, |
39 uint32 initial_bitrate, | 44 uint32 initial_bitrate, |
40 Client* client) { | 45 Client* client) { |
41 if (!will_initialization_succeed_) | 46 if (!will_initialization_succeed_) |
42 return false; | 47 return false; |
43 client_ = client; | 48 client_ = client; |
44 if (output_profile != media::VP8PROFILE_ANY && | 49 if (output_profile != media::VP8PROFILE_ANY && |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
107 void FakeVideoEncodeAccelerator::DoBitstreamBufferReady( | 112 void FakeVideoEncodeAccelerator::DoBitstreamBufferReady( |
108 int32 bitstream_buffer_id, | 113 int32 bitstream_buffer_id, |
109 size_t payload_size, | 114 size_t payload_size, |
110 bool key_frame) const { | 115 bool key_frame) const { |
111 client_->BitstreamBufferReady(bitstream_buffer_id, payload_size, key_frame); | 116 client_->BitstreamBufferReady(bitstream_buffer_id, payload_size, key_frame); |
112 } | 117 } |
113 | 118 |
114 } // namespace test | 119 } // namespace test |
115 } // namespace cast | 120 } // namespace cast |
116 } // namespace media | 121 } // namespace media |
OLD | NEW |