| 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 // Inform the encoder about the new target bit rate. | 114 // Inform the encoder about the new target bit rate. |
| 115 // | 115 // |
| 116 // Input: | 116 // Input: |
| 117 // - bitrate : New target bit rate | 117 // - bitrate : New target bit rate |
| 118 // - framerate : The target frame rate | 118 // - framerate : The target frame rate |
| 119 // | 119 // |
| 120 // Return value : WEBRTC_VIDEO_CODEC_OK if OK, < 0 otherwise. | 120 // Return value : WEBRTC_VIDEO_CODEC_OK if OK, < 0 otherwise. |
| 121 virtual int32_t SetRates(uint32_t bitrate, uint32_t framerate) = 0; | 121 virtual int32_t SetRates(uint32_t bitrate, uint32_t framerate) = 0; |
| 122 | 122 |
| 123 virtual int32_t SetPeriodicKeyFrames(bool enable) { return -1; } | 123 virtual int32_t SetPeriodicKeyFrames(bool enable) { return -1; } |
| 124 virtual int32_t CodecConfigParameters(uint8_t* /*buffer*/, int32_t /*size*/) { | |
| 125 return -1; | |
| 126 } | |
| 127 virtual void OnDroppedFrame() {} | 124 virtual void OnDroppedFrame() {} |
| 128 virtual int GetTargetFramerate() { return -1; } | 125 virtual int GetTargetFramerate() { return -1; } |
| 129 virtual bool SupportsNativeHandle() const { return false; } | 126 virtual bool SupportsNativeHandle() const { return false; } |
| 130 }; | 127 }; |
| 131 | 128 |
| 132 // Class used to wrap external VideoEncoders to provide a fallback option on | 129 // Class used to wrap external VideoEncoders to provide a fallback option on |
| 133 // software encoding when a hardware encoder fails to encode a stream due to | 130 // software encoding when a hardware encoder fails to encode a stream due to |
| 134 // hardware restrictions, such as max resolution. | 131 // hardware restrictions, such as max resolution. |
| 135 class VideoEncoderSoftwareFallbackWrapper : public VideoEncoder { | 132 class VideoEncoderSoftwareFallbackWrapper : public VideoEncoder { |
| 136 public: | 133 public: |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 int64_t rtt_; | 172 int64_t rtt_; |
| 176 | 173 |
| 177 const EncoderType encoder_type_; | 174 const EncoderType encoder_type_; |
| 178 webrtc::VideoEncoder* const encoder_; | 175 webrtc::VideoEncoder* const encoder_; |
| 179 | 176 |
| 180 rtc::scoped_ptr<webrtc::VideoEncoder> fallback_encoder_; | 177 rtc::scoped_ptr<webrtc::VideoEncoder> fallback_encoder_; |
| 181 EncodedImageCallback* callback_; | 178 EncodedImageCallback* callback_; |
| 182 }; | 179 }; |
| 183 } // namespace webrtc | 180 } // namespace webrtc |
| 184 #endif // WEBRTC_VIDEO_ENCODER_H_ | 181 #endif // WEBRTC_VIDEO_ENCODER_H_ |
| OLD | NEW |