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 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
317 // (e.g. a P-Frame) only if the current value is different from the previous | 317 // (e.g. a P-Frame) only if the current value is different from the previous |
318 // value sent. | 318 // value sent. |
319 if (video_header) { | 319 if (video_header) { |
320 // Set rotation when key frame or when changed (to follow standard). | 320 // Set rotation when key frame or when changed (to follow standard). |
321 // Or when different from 0 (to follow current receiver implementation). | 321 // Or when different from 0 (to follow current receiver implementation). |
322 VideoRotation current_rotation = video_header->rotation; | 322 VideoRotation current_rotation = video_header->rotation; |
323 if (frame_type == kVideoFrameKey || current_rotation != last_rotation_ || | 323 if (frame_type == kVideoFrameKey || current_rotation != last_rotation_ || |
324 current_rotation != kVideoRotation_0) | 324 current_rotation != kVideoRotation_0) |
325 rtp_header->SetExtension<VideoOrientation>(current_rotation); | 325 rtp_header->SetExtension<VideoOrientation>(current_rotation); |
326 last_rotation_ = current_rotation; | 326 last_rotation_ = current_rotation; |
327 // Report content type only for key frames. | |
328 if (frame_type == kVideoFrameKey && | |
329 video_header->content_type != VideoContentType::kUnspecified) | |
tommi
2017/04/10 10:59:18
use {}
ilnik
2017/04/10 12:47:42
Done.
| |
330 rtp_header->SetExtension<VideoContentTypeExtension>( | |
331 video_header->content_type); | |
327 } | 332 } |
328 | 333 |
329 // FEC settings. | 334 // FEC settings. |
330 const FecProtectionParams& fec_params = | 335 const FecProtectionParams& fec_params = |
331 frame_type == kVideoFrameKey ? key_fec_params_ : delta_fec_params_; | 336 frame_type == kVideoFrameKey ? key_fec_params_ : delta_fec_params_; |
332 if (flexfec_enabled()) | 337 if (flexfec_enabled()) |
333 flexfec_sender_->SetFecParameters(fec_params); | 338 flexfec_sender_->SetFecParameters(fec_params); |
334 if (ulpfec_enabled()) | 339 if (ulpfec_enabled()) |
335 ulpfec_generator_.SetFecParameters(fec_params); | 340 ulpfec_generator_.SetFecParameters(fec_params); |
336 | 341 |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
417 rtc::CritScope cs(&crit_); | 422 rtc::CritScope cs(&crit_); |
418 return retransmission_settings_; | 423 return retransmission_settings_; |
419 } | 424 } |
420 | 425 |
421 void RTPSenderVideo::SetSelectiveRetransmissions(uint8_t settings) { | 426 void RTPSenderVideo::SetSelectiveRetransmissions(uint8_t settings) { |
422 rtc::CritScope cs(&crit_); | 427 rtc::CritScope cs(&crit_); |
423 retransmission_settings_ = settings; | 428 retransmission_settings_ = settings; |
424 } | 429 } |
425 | 430 |
426 } // namespace webrtc | 431 } // namespace webrtc |
OLD | NEW |