| 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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 // configuration changes. | 56 // configuration changes. |
| 57 class EncoderSink : public EncodedImageCallback { | 57 class EncoderSink : public EncodedImageCallback { |
| 58 public: | 58 public: |
| 59 virtual void OnEncoderConfigurationChanged( | 59 virtual void OnEncoderConfigurationChanged( |
| 60 std::vector<VideoStream> streams, | 60 std::vector<VideoStream> streams, |
| 61 int min_transmit_bitrate_bps) = 0; | 61 int min_transmit_bitrate_bps) = 0; |
| 62 }; | 62 }; |
| 63 | 63 |
| 64 // Downscale resolution at most 2 times for CPU reasons. | 64 // Downscale resolution at most 2 times for CPU reasons. |
| 65 static const int kMaxCpuDowngrades = 2; | 65 static const int kMaxCpuDowngrades = 2; |
| 66 // Downscale resolution at most 2 times for low-quality reasons. | |
| 67 static const int kMaxQualityDowngrades = 2; | |
| 68 | 66 |
| 69 ViEEncoder(uint32_t number_of_cores, | 67 ViEEncoder(uint32_t number_of_cores, |
| 70 SendStatisticsProxy* stats_proxy, | 68 SendStatisticsProxy* stats_proxy, |
| 71 const VideoSendStream::Config::EncoderSettings& settings, | 69 const VideoSendStream::Config::EncoderSettings& settings, |
| 72 rtc::VideoSinkInterface<VideoFrame>* pre_encode_callback, | 70 rtc::VideoSinkInterface<VideoFrame>* pre_encode_callback, |
| 73 EncodedFrameObserver* encoder_timing); | 71 EncodedFrameObserver* encoder_timing); |
| 74 ~ViEEncoder(); | 72 ~ViEEncoder(); |
| 75 // RegisterProcessThread register |module_process_thread| with those objects | 73 // RegisterProcessThread register |module_process_thread| with those objects |
| 76 // that use it. Registration has to happen on the thread where | 74 // that use it. Registration has to happen on the thread where |
| 77 // |module_process_thread| was created (libjingle's worker thread). | 75 // |module_process_thread| was created (libjingle's worker thread). |
| (...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 // All public methods are proxied to |encoder_queue_|. It must must be | 235 // All public methods are proxied to |encoder_queue_|. It must must be |
| 238 // destroyed first to make sure no tasks are run that use other members. | 236 // destroyed first to make sure no tasks are run that use other members. |
| 239 rtc::TaskQueue encoder_queue_; | 237 rtc::TaskQueue encoder_queue_; |
| 240 | 238 |
| 241 RTC_DISALLOW_COPY_AND_ASSIGN(ViEEncoder); | 239 RTC_DISALLOW_COPY_AND_ASSIGN(ViEEncoder); |
| 242 }; | 240 }; |
| 243 | 241 |
| 244 } // namespace webrtc | 242 } // namespace webrtc |
| 245 | 243 |
| 246 #endif // WEBRTC_VIDEO_VIE_ENCODER_H_ | 244 #endif // WEBRTC_VIDEO_VIE_ENCODER_H_ |
| OLD | NEW |