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

Side by Side Diff: webrtc/video/rtp_stream_receiver.cc

Issue 2772033002: Add content type information to encoded images and corresponding rtp extension header (Closed)
Patch Set: Fix android CE 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 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 if (!rtp_payload_registry_.GetPayloadSpecifics(last_media_payload_type, 496 if (!rtp_payload_registry_.GetPayloadSpecifics(last_media_payload_type,
497 &payload_specific)) { 497 &payload_specific)) {
498 LOG(LS_WARNING) << "Failed to get payload specifics."; 498 LOG(LS_WARNING) << "Failed to get payload specifics.";
499 return; 499 return;
500 } 500 }
501 rtp_header.type.Video.codec = payload_specific.Video.videoCodecType; 501 rtp_header.type.Video.codec = payload_specific.Video.videoCodecType;
502 rtp_header.type.Video.rotation = kVideoRotation_0; 502 rtp_header.type.Video.rotation = kVideoRotation_0;
503 if (header.extension.hasVideoRotation) { 503 if (header.extension.hasVideoRotation) {
504 rtp_header.type.Video.rotation = header.extension.videoRotation; 504 rtp_header.type.Video.rotation = header.extension.videoRotation;
505 } 505 }
506 rtp_header.type.Video.content_type = VideoContentType::kDefault;
507 if (header.extension.hasVideoContentType) {
508 rtp_header.type.Video.content_type = header.extension.videoContentType;
509 }
506 rtp_header.type.Video.playout_delay = header.extension.playout_delay; 510 rtp_header.type.Video.playout_delay = header.extension.playout_delay;
507 511
508 OnReceivedPayloadData(nullptr, 0, &rtp_header); 512 OnReceivedPayloadData(nullptr, 0, &rtp_header);
509 } 513 }
510 514
511 bool RtpStreamReceiver::DeliverRtcp(const uint8_t* rtcp_packet, 515 bool RtpStreamReceiver::DeliverRtcp(const uint8_t* rtcp_packet,
512 size_t rtcp_packet_length) { 516 size_t rtcp_packet_length) {
513 { 517 {
514 rtc::CritScope lock(&receive_cs_); 518 rtc::CritScope lock(&receive_cs_);
515 if (!receiving_) { 519 if (!receiving_) {
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
657 return; 661 return;
658 662
659 if (!sprop_decoder.DecodeSprop(sprop_base64_it->second.c_str())) 663 if (!sprop_decoder.DecodeSprop(sprop_base64_it->second.c_str()))
660 return; 664 return;
661 665
662 tracker_.InsertSpsPpsNalus(sprop_decoder.sps_nalu(), 666 tracker_.InsertSpsPpsNalus(sprop_decoder.sps_nalu(),
663 sprop_decoder.pps_nalu()); 667 sprop_decoder.pps_nalu());
664 } 668 }
665 669
666 } // namespace webrtc 670 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698