| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 | 182 |
| 183 int32_t Release() override; | 183 int32_t Release() override; |
| 184 int32_t Encode(const VideoFrame& frame, | 184 int32_t Encode(const VideoFrame& frame, |
| 185 const CodecSpecificInfo* codec_specific_info, | 185 const CodecSpecificInfo* codec_specific_info, |
| 186 const std::vector<FrameType>* frame_types) override; | 186 const std::vector<FrameType>* frame_types) override; |
| 187 int32_t SetChannelParameters(uint32_t packet_loss, int64_t rtt) override; | 187 int32_t SetChannelParameters(uint32_t packet_loss, int64_t rtt) override; |
| 188 | 188 |
| 189 int32_t SetRates(uint32_t bitrate, uint32_t framerate) override; | 189 int32_t SetRates(uint32_t bitrate, uint32_t framerate) override; |
| 190 void OnDroppedFrame() override; | 190 void OnDroppedFrame() override; |
| 191 bool SupportsNativeHandle() const override; | 191 bool SupportsNativeHandle() const override; |
| 192 const char* ImplementationName() const override; | |
| 193 | 192 |
| 194 private: | 193 private: |
| 195 bool InitFallbackEncoder(); | 194 bool InitFallbackEncoder(); |
| 196 | 195 |
| 197 // Settings used in the last InitEncode call and used if a dynamic fallback to | 196 // Settings used in the last InitEncode call and used if a dynamic fallback to |
| 198 // software is required. | 197 // software is required. |
| 199 VideoCodec codec_settings_; | 198 VideoCodec codec_settings_; |
| 200 int32_t number_of_cores_; | 199 int32_t number_of_cores_; |
| 201 size_t max_payload_size_; | 200 size_t max_payload_size_; |
| 202 | 201 |
| 203 // The last bitrate/framerate set, and a flag for noting they are set. | 202 // The last bitrate/framerate set, and a flag for noting they are set. |
| 204 bool rates_set_; | 203 bool rates_set_; |
| 205 uint32_t bitrate_; | 204 uint32_t bitrate_; |
| 206 uint32_t framerate_; | 205 uint32_t framerate_; |
| 207 | 206 |
| 208 // The last channel parameters set, and a flag for noting they are set. | 207 // The last channel parameters set, and a flag for noting they are set. |
| 209 bool channel_parameters_set_; | 208 bool channel_parameters_set_; |
| 210 uint32_t packet_loss_; | 209 uint32_t packet_loss_; |
| 211 int64_t rtt_; | 210 int64_t rtt_; |
| 212 | 211 |
| 213 const EncoderType encoder_type_; | 212 const EncoderType encoder_type_; |
| 214 webrtc::VideoEncoder* const encoder_; | 213 webrtc::VideoEncoder* const encoder_; |
| 215 | 214 |
| 216 std::unique_ptr<webrtc::VideoEncoder> fallback_encoder_; | 215 std::unique_ptr<webrtc::VideoEncoder> fallback_encoder_; |
| 217 std::string fallback_implementation_name_; | 216 std::string fallback_implementation_name_; |
| 218 EncodedImageCallback* callback_; | 217 EncodedImageCallback* callback_; |
| 219 }; | 218 }; |
| 220 } // namespace webrtc | 219 } // namespace webrtc |
| 221 #endif // WEBRTC_VIDEO_ENCODER_H_ | 220 #endif // WEBRTC_VIDEO_ENCODER_H_ |
| OLD | NEW |