OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 int NumStreamsDisabled(const std::vector<bool>& streams) { | 134 int NumStreamsDisabled(const std::vector<bool>& streams) { |
135 int num_disabled = 0; | 135 int num_disabled = 0; |
136 for (bool stream : streams) { | 136 for (bool stream : streams) { |
137 if (!stream) | 137 if (!stream) |
138 ++num_disabled; | 138 ++num_disabled; |
139 } | 139 } |
140 return num_disabled; | 140 return num_disabled; |
141 } | 141 } |
142 } // namespace | 142 } // namespace |
143 | 143 |
| 144 VP8Encoder* VP8Encoder::Create() { |
| 145 return new VP8EncoderImpl(); |
| 146 } |
| 147 |
| 148 VP8Decoder* VP8Decoder::Create() { |
| 149 return new VP8DecoderImpl(); |
| 150 } |
| 151 |
144 const float kTl1MaxTimeToDropFrames = 20.0f; | 152 const float kTl1MaxTimeToDropFrames = 20.0f; |
145 | 153 |
146 VP8EncoderImpl::VP8EncoderImpl() | 154 VP8EncoderImpl::VP8EncoderImpl() |
147 : encoded_complete_callback_(NULL), | 155 : encoded_complete_callback_(NULL), |
148 inited_(false), | 156 inited_(false), |
149 timestamp_(0), | 157 timestamp_(0), |
150 feedback_mode_(false), | 158 feedback_mode_(false), |
151 qp_max_(56), // Setting for max quantizer. | 159 qp_max_(56), // Setting for max quantizer. |
152 cpu_speed_default_(-6), | 160 cpu_speed_default_(-6), |
153 rc_max_intra_target_(0), | 161 rc_max_intra_target_(0), |
(...skipping 1240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1394 return -1; | 1402 return -1; |
1395 } | 1403 } |
1396 if (vpx_codec_control(copy->decoder_, VP8_SET_REFERENCE, ref_frame_) != | 1404 if (vpx_codec_control(copy->decoder_, VP8_SET_REFERENCE, ref_frame_) != |
1397 VPX_CODEC_OK) { | 1405 VPX_CODEC_OK) { |
1398 return -1; | 1406 return -1; |
1399 } | 1407 } |
1400 return 0; | 1408 return 0; |
1401 } | 1409 } |
1402 | 1410 |
1403 } // namespace webrtc | 1411 } // namespace webrtc |
OLD | NEW |