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

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

Issue 2772033002: Add content type information to encoded images and corresponding rtp extension header (Closed)
Patch Set: Rebase 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::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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698