OLD | NEW |
1 /* | 1 /* |
2 * libjingle | 2 * libjingle |
3 * Copyright 2004 Google Inc. | 3 * Copyright 2004 Google Inc. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
7 * | 7 * |
8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
260 SetFrom(&system_low_adaptation_threshhold, | 260 SetFrom(&system_low_adaptation_threshhold, |
261 change.system_low_adaptation_threshhold); | 261 change.system_low_adaptation_threshhold); |
262 SetFrom(&system_high_adaptation_threshhold, | 262 SetFrom(&system_high_adaptation_threshhold, |
263 change.system_high_adaptation_threshhold); | 263 change.system_high_adaptation_threshhold); |
264 SetFrom(&dscp, change.dscp); | 264 SetFrom(&dscp, change.dscp); |
265 SetFrom(&suspend_below_min_bitrate, change.suspend_below_min_bitrate); | 265 SetFrom(&suspend_below_min_bitrate, change.suspend_below_min_bitrate); |
266 SetFrom(&unsignalled_recv_stream_limit, | 266 SetFrom(&unsignalled_recv_stream_limit, |
267 change.unsignalled_recv_stream_limit); | 267 change.unsignalled_recv_stream_limit); |
268 SetFrom(&use_simulcast_adapter, change.use_simulcast_adapter); | 268 SetFrom(&use_simulcast_adapter, change.use_simulcast_adapter); |
269 SetFrom(&screencast_min_bitrate, change.screencast_min_bitrate); | 269 SetFrom(&screencast_min_bitrate, change.screencast_min_bitrate); |
| 270 renderer_has_time_control = change.renderer_has_time_control; |
270 } | 271 } |
271 | 272 |
272 bool operator==(const VideoOptions& o) const { | 273 bool operator==(const VideoOptions& o) const { |
273 return adapt_input_to_cpu_usage == o.adapt_input_to_cpu_usage && | 274 return adapt_input_to_cpu_usage == o.adapt_input_to_cpu_usage && |
274 adapt_cpu_with_smoothing == o.adapt_cpu_with_smoothing && | 275 adapt_cpu_with_smoothing == o.adapt_cpu_with_smoothing && |
275 video_adapt_third == o.video_adapt_third && | 276 video_adapt_third == o.video_adapt_third && |
276 video_noise_reduction == o.video_noise_reduction && | 277 video_noise_reduction == o.video_noise_reduction && |
277 video_start_bitrate == o.video_start_bitrate && | 278 video_start_bitrate == o.video_start_bitrate && |
278 cpu_overuse_detection == o.cpu_overuse_detection && | 279 cpu_overuse_detection == o.cpu_overuse_detection && |
279 cpu_underuse_threshold == o.cpu_underuse_threshold && | 280 cpu_underuse_threshold == o.cpu_underuse_threshold && |
280 cpu_overuse_threshold == o.cpu_overuse_threshold && | 281 cpu_overuse_threshold == o.cpu_overuse_threshold && |
281 cpu_underuse_encode_rsd_threshold == | 282 cpu_underuse_encode_rsd_threshold == |
282 o.cpu_underuse_encode_rsd_threshold && | 283 o.cpu_underuse_encode_rsd_threshold && |
283 cpu_overuse_encode_rsd_threshold == | 284 cpu_overuse_encode_rsd_threshold == |
284 o.cpu_overuse_encode_rsd_threshold && | 285 o.cpu_overuse_encode_rsd_threshold && |
285 cpu_overuse_encode_usage == o.cpu_overuse_encode_usage && | 286 cpu_overuse_encode_usage == o.cpu_overuse_encode_usage && |
286 conference_mode == o.conference_mode && | 287 conference_mode == o.conference_mode && |
287 process_adaptation_threshhold == o.process_adaptation_threshhold && | 288 process_adaptation_threshhold == o.process_adaptation_threshhold && |
288 system_low_adaptation_threshhold == | 289 system_low_adaptation_threshhold == |
289 o.system_low_adaptation_threshhold && | 290 o.system_low_adaptation_threshhold && |
290 system_high_adaptation_threshhold == | 291 system_high_adaptation_threshhold == |
291 o.system_high_adaptation_threshhold && | 292 o.system_high_adaptation_threshhold && |
292 dscp == o.dscp && | 293 dscp == o.dscp && |
293 suspend_below_min_bitrate == o.suspend_below_min_bitrate && | 294 suspend_below_min_bitrate == o.suspend_below_min_bitrate && |
294 unsignalled_recv_stream_limit == o.unsignalled_recv_stream_limit && | 295 unsignalled_recv_stream_limit == o.unsignalled_recv_stream_limit && |
295 use_simulcast_adapter == o.use_simulcast_adapter && | 296 use_simulcast_adapter == o.use_simulcast_adapter && |
296 screencast_min_bitrate == o.screencast_min_bitrate; | 297 screencast_min_bitrate == o.screencast_min_bitrate && |
| 298 renderer_has_time_control == o.renderer_has_time_control; |
297 } | 299 } |
298 | 300 |
299 std::string ToString() const { | 301 std::string ToString() const { |
300 std::ostringstream ost; | 302 std::ostringstream ost; |
301 ost << "VideoOptions {"; | 303 ost << "VideoOptions {"; |
302 ost << ToStringIfSet("cpu adaption", adapt_input_to_cpu_usage); | 304 ost << ToStringIfSet("cpu adaption", adapt_input_to_cpu_usage); |
303 ost << ToStringIfSet("cpu adaptation smoothing", adapt_cpu_with_smoothing); | 305 ost << ToStringIfSet("cpu adaptation smoothing", adapt_cpu_with_smoothing); |
304 ost << ToStringIfSet("video adapt third", video_adapt_third); | 306 ost << ToStringIfSet("video adapt third", video_adapt_third); |
305 ost << ToStringIfSet("noise reduction", video_noise_reduction); | 307 ost << ToStringIfSet("noise reduction", video_noise_reduction); |
306 ost << ToStringIfSet("start bitrate", video_start_bitrate); | 308 ost << ToStringIfSet("start bitrate", video_start_bitrate); |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
372 rtc::Optional<bool> dscp; | 374 rtc::Optional<bool> dscp; |
373 // Enable WebRTC suspension of video. No video frames will be sent when the | 375 // Enable WebRTC suspension of video. No video frames will be sent when the |
374 // bitrate is below the configured minimum bitrate. | 376 // bitrate is below the configured minimum bitrate. |
375 rtc::Optional<bool> suspend_below_min_bitrate; | 377 rtc::Optional<bool> suspend_below_min_bitrate; |
376 // Limit on the number of early receive channels that can be created. | 378 // Limit on the number of early receive channels that can be created. |
377 rtc::Optional<int> unsignalled_recv_stream_limit; | 379 rtc::Optional<int> unsignalled_recv_stream_limit; |
378 // Enable use of simulcast adapter. | 380 // Enable use of simulcast adapter. |
379 rtc::Optional<bool> use_simulcast_adapter; | 381 rtc::Optional<bool> use_simulcast_adapter; |
380 // Force screencast to use a minimum bitrate | 382 // Force screencast to use a minimum bitrate |
381 rtc::Optional<int> screencast_min_bitrate; | 383 rtc::Optional<int> screencast_min_bitrate; |
| 384 // Set to true if the renderer has an algorithm of frame selection. |
| 385 // If the value is true, then WebRTC will hand over a frame as soon as |
| 386 // possible without delay, and rendering smoothness is completely the duty |
| 387 // of the renderer; |
| 388 // If the value is false, then WebRTC is responsible to delay frame release |
| 389 // in order to increase rendering smoothness. |
| 390 bool renderer_has_time_control; |
382 | 391 |
383 private: | 392 private: |
384 template <typename T> | 393 template <typename T> |
385 static void SetFrom(rtc::Optional<T>* s, const rtc::Optional<T>& o) { | 394 static void SetFrom(rtc::Optional<T>* s, const rtc::Optional<T>& o) { |
386 if (o) { | 395 if (o) { |
387 *s = o; | 396 *s = o; |
388 } | 397 } |
389 } | 398 } |
390 }; | 399 }; |
391 | 400 |
(...skipping 812 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1204 // Signal when the media channel is ready to send the stream. Arguments are: | 1213 // Signal when the media channel is ready to send the stream. Arguments are: |
1205 // writable(bool) | 1214 // writable(bool) |
1206 sigslot::signal1<bool> SignalReadyToSend; | 1215 sigslot::signal1<bool> SignalReadyToSend; |
1207 // Signal for notifying that the remote side has closed the DataChannel. | 1216 // Signal for notifying that the remote side has closed the DataChannel. |
1208 sigslot::signal1<uint32_t> SignalStreamClosedRemotely; | 1217 sigslot::signal1<uint32_t> SignalStreamClosedRemotely; |
1209 }; | 1218 }; |
1210 | 1219 |
1211 } // namespace cricket | 1220 } // namespace cricket |
1212 | 1221 |
1213 #endif // TALK_MEDIA_BASE_MEDIACHANNEL_H_ | 1222 #endif // TALK_MEDIA_BASE_MEDIACHANNEL_H_ |
OLD | NEW |