Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(182)

Side by Side Diff: webrtc/modules/rtp_rtcp/source/rtp_sender_video.cc

Issue 2812913002: Reland of Add content type information to encoded images and corresponding rtp extension header (Closed)
Patch Set: Fix indent Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 }
327 } 333 }
328 334
329 // FEC settings. 335 // FEC settings.
330 const FecProtectionParams& fec_params = 336 const FecProtectionParams& fec_params =
331 frame_type == kVideoFrameKey ? key_fec_params_ : delta_fec_params_; 337 frame_type == kVideoFrameKey ? key_fec_params_ : delta_fec_params_;
332 if (flexfec_enabled()) 338 if (flexfec_enabled())
333 flexfec_sender_->SetFecParameters(fec_params); 339 flexfec_sender_->SetFecParameters(fec_params);
334 if (ulpfec_enabled()) 340 if (ulpfec_enabled())
335 ulpfec_generator_.SetFecParameters(fec_params); 341 ulpfec_generator_.SetFecParameters(fec_params);
336 342
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 rtc::CritScope cs(&crit_); 423 rtc::CritScope cs(&crit_);
418 return retransmission_settings_; 424 return retransmission_settings_;
419 } 425 }
420 426
421 void RTPSenderVideo::SetSelectiveRetransmissions(uint8_t settings) { 427 void RTPSenderVideo::SetSelectiveRetransmissions(uint8_t settings) {
422 rtc::CritScope cs(&crit_); 428 rtc::CritScope cs(&crit_);
423 retransmission_settings_ = settings; 429 retransmission_settings_ = settings;
424 } 430 }
425 431
426 } // namespace webrtc 432 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_rtcp_impl_unittest.cc ('k') | webrtc/modules/rtp_rtcp/source/rtp_utility.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698