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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 bool internalSource); | 86 bool internalSource); |
87 | 87 |
88 int32_t CodecConfigParameters(uint8_t* buffer, int32_t size) const; | 88 int32_t CodecConfigParameters(uint8_t* buffer, int32_t size) const; |
89 int32_t SentFrameCount(VCMFrameCount* frameCount); | 89 int32_t SentFrameCount(VCMFrameCount* frameCount); |
90 int Bitrate(unsigned int* bitrate) const; | 90 int Bitrate(unsigned int* bitrate) const; |
91 int FrameRate(unsigned int* framerate) const; | 91 int FrameRate(unsigned int* framerate) const; |
92 | 92 |
93 int32_t SetChannelParameters(uint32_t target_bitrate, // bits/s. | 93 int32_t SetChannelParameters(uint32_t target_bitrate, // bits/s. |
94 uint8_t lossRate, | 94 uint8_t lossRate, |
95 int64_t rtt); | 95 int64_t rtt); |
| 96 int32_t UpdateEncoderParameters(); |
96 | 97 |
97 int32_t RegisterTransportCallback(VCMPacketizationCallback* transport); | 98 int32_t RegisterTransportCallback(VCMPacketizationCallback* transport); |
98 int32_t RegisterSendStatisticsCallback(VCMSendStatisticsCallback* sendStats); | 99 int32_t RegisterSendStatisticsCallback(VCMSendStatisticsCallback* sendStats); |
99 int32_t RegisterProtectionCallback(VCMProtectionCallback* protection); | 100 int32_t RegisterProtectionCallback(VCMProtectionCallback* protection); |
100 void SetVideoProtection(bool enable, VCMVideoProtection videoProtection); | 101 void SetVideoProtection(bool enable, VCMVideoProtection videoProtection); |
101 | 102 |
102 int32_t AddVideoFrame(const VideoFrame& videoFrame, | 103 int32_t AddVideoFrame(const VideoFrame& videoFrame, |
103 const VideoContentMetrics* _contentMetrics, | 104 const VideoContentMetrics* _contentMetrics, |
104 const CodecSpecificInfo* codecSpecificInfo); | 105 const CodecSpecificInfo* codecSpecificInfo); |
105 | 106 |
(...skipping 19 matching lines...) Expand all Loading... |
125 VCMCodecDataBase _codecDataBase; | 126 VCMCodecDataBase _codecDataBase; |
126 bool frame_dropper_enabled_; | 127 bool frame_dropper_enabled_; |
127 VCMProcessTimer _sendStatsTimer; | 128 VCMProcessTimer _sendStatsTimer; |
128 | 129 |
129 // Must be accessed on the construction thread of VideoSender. | 130 // Must be accessed on the construction thread of VideoSender. |
130 VideoCodec current_codec_; | 131 VideoCodec current_codec_; |
131 rtc::ThreadChecker main_thread_; | 132 rtc::ThreadChecker main_thread_; |
132 | 133 |
133 VCMQMSettingsCallback* const qm_settings_callback_; | 134 VCMQMSettingsCallback* const qm_settings_callback_; |
134 VCMProtectionCallback* protection_callback_; | 135 VCMProtectionCallback* protection_callback_; |
| 136 |
| 137 rtc::CriticalSection params_lock_; |
| 138 struct EncoderParameters { |
| 139 uint32_t target_bitrate; |
| 140 uint8_t loss_rate; |
| 141 int64_t rtt; |
| 142 uint32_t input_frame_rate; |
| 143 bool updated; |
| 144 } encoder_params_ GUARDED_BY(params_lock_); |
135 }; | 145 }; |
136 | 146 |
137 class VideoReceiver { | 147 class VideoReceiver { |
138 public: | 148 public: |
139 typedef VideoCodingModule::ReceiverRobustness ReceiverRobustness; | 149 typedef VideoCodingModule::ReceiverRobustness ReceiverRobustness; |
140 | 150 |
141 VideoReceiver(Clock* clock, EventFactory* event_factory); | 151 VideoReceiver(Clock* clock, EventFactory* event_factory); |
142 ~VideoReceiver(); | 152 ~VideoReceiver(); |
143 | 153 |
144 int32_t RegisterReceiveCodec(const VideoCodec* receiveCodec, | 154 int32_t RegisterReceiveCodec(const VideoCodec* receiveCodec, |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
231 | 241 |
232 VCMCodecDataBase _codecDataBase GUARDED_BY(_receiveCritSect); | 242 VCMCodecDataBase _codecDataBase GUARDED_BY(_receiveCritSect); |
233 VCMProcessTimer _receiveStatsTimer; | 243 VCMProcessTimer _receiveStatsTimer; |
234 VCMProcessTimer _retransmissionTimer; | 244 VCMProcessTimer _retransmissionTimer; |
235 VCMProcessTimer _keyRequestTimer; | 245 VCMProcessTimer _keyRequestTimer; |
236 }; | 246 }; |
237 | 247 |
238 } // namespace vcm | 248 } // namespace vcm |
239 } // namespace webrtc | 249 } // namespace webrtc |
240 #endif // WEBRTC_MODULES_VIDEO_CODING_VIDEO_CODING_IMPL_H_ | 250 #endif // WEBRTC_MODULES_VIDEO_CODING_VIDEO_CODING_IMPL_H_ |
OLD | NEW |