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::UNSPECIFIED) { | |
330 rtp_header->SetExtension<VideoContentTypeExtension>( | |
331 video_header->content_type); | |
332 } | |
333 } | 327 } |
334 | 328 |
335 // FEC settings. | 329 // FEC settings. |
336 const FecProtectionParams& fec_params = | 330 const FecProtectionParams& fec_params = |
337 frame_type == kVideoFrameKey ? key_fec_params_ : delta_fec_params_; | 331 frame_type == kVideoFrameKey ? key_fec_params_ : delta_fec_params_; |
338 if (flexfec_enabled()) | 332 if (flexfec_enabled()) |
339 flexfec_sender_->SetFecParameters(fec_params); | 333 flexfec_sender_->SetFecParameters(fec_params); |
340 if (ulpfec_enabled()) | 334 if (ulpfec_enabled()) |
341 ulpfec_generator_.SetFecParameters(fec_params); | 335 ulpfec_generator_.SetFecParameters(fec_params); |
342 | 336 |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
423 rtc::CritScope cs(&crit_); | 417 rtc::CritScope cs(&crit_); |
424 return retransmission_settings_; | 418 return retransmission_settings_; |
425 } | 419 } |
426 | 420 |
427 void RTPSenderVideo::SetSelectiveRetransmissions(uint8_t settings) { | 421 void RTPSenderVideo::SetSelectiveRetransmissions(uint8_t settings) { |
428 rtc::CritScope cs(&crit_); | 422 rtc::CritScope cs(&crit_); |
429 retransmission_settings_ = settings; | 423 retransmission_settings_ = settings; |
430 } | 424 } |
431 | 425 |
432 } // namespace webrtc | 426 } // namespace webrtc |
OLD | NEW |