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

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

Issue 2996153002: Reland of Add a flags field to video timing extension. (Closed)
Patch Set: Added test Created 3 years, 4 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 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 84
85 rtp_header->type.Video.is_first_packet_in_frame = is_first_packet; 85 rtp_header->type.Video.is_first_packet_in_frame = is_first_packet;
86 RtpDepacketizer::ParsedPayload parsed_payload; 86 RtpDepacketizer::ParsedPayload parsed_payload;
87 if (!depacketizer->Parse(&parsed_payload, payload, payload_data_length)) 87 if (!depacketizer->Parse(&parsed_payload, payload, payload_data_length))
88 return -1; 88 return -1;
89 89
90 rtp_header->frameType = parsed_payload.frame_type; 90 rtp_header->frameType = parsed_payload.frame_type;
91 rtp_header->type = parsed_payload.type; 91 rtp_header->type = parsed_payload.type;
92 rtp_header->type.Video.rotation = kVideoRotation_0; 92 rtp_header->type.Video.rotation = kVideoRotation_0;
93 rtp_header->type.Video.content_type = VideoContentType::UNSPECIFIED; 93 rtp_header->type.Video.content_type = VideoContentType::UNSPECIFIED;
94 rtp_header->type.Video.video_timing.is_timing_frame = false; 94 rtp_header->type.Video.video_timing.flags = TimingFrameFlags::kInvalid;
95 95
96 // Retrieve the video rotation information. 96 // Retrieve the video rotation information.
97 if (rtp_header->header.extension.hasVideoRotation) { 97 if (rtp_header->header.extension.hasVideoRotation) {
98 rtp_header->type.Video.rotation = 98 rtp_header->type.Video.rotation =
99 rtp_header->header.extension.videoRotation; 99 rtp_header->header.extension.videoRotation;
100 } 100 }
101 101
102 if (rtp_header->header.extension.hasVideoContentType) { 102 if (rtp_header->header.extension.hasVideoContentType) {
103 rtp_header->type.Video.content_type = 103 rtp_header->type.Video.content_type =
104 rtp_header->header.extension.videoContentType; 104 rtp_header->header.extension.videoContentType;
105 } 105 }
106 106
107 if (rtp_header->header.extension.has_video_timing) { 107 if (rtp_header->header.extension.has_video_timing) {
108 rtp_header->type.Video.video_timing = 108 rtp_header->type.Video.video_timing =
109 rtp_header->header.extension.video_timing; 109 rtp_header->header.extension.video_timing;
110 rtp_header->type.Video.video_timing.is_timing_frame = true;
111 } 110 }
112 111
113 rtp_header->type.Video.playout_delay = 112 rtp_header->type.Video.playout_delay =
114 rtp_header->header.extension.playout_delay; 113 rtp_header->header.extension.playout_delay;
115 114
116 return data_callback_->OnReceivedPayloadData(parsed_payload.payload, 115 return data_callback_->OnReceivedPayloadData(parsed_payload.payload,
117 parsed_payload.payload_length, 116 parsed_payload.payload_length,
118 rtp_header) == 0 117 rtp_header) == 0
119 ? 0 118 ? 0
120 : -1; 119 : -1;
121 } 120 }
122 121
123 RTPAliveType RTPReceiverVideo::ProcessDeadOrAlive( 122 RTPAliveType RTPReceiverVideo::ProcessDeadOrAlive(
124 uint16_t last_payload_length) const { 123 uint16_t last_payload_length) const {
125 return kRtpDead; 124 return kRtpDead;
126 } 125 }
127 126
128 int32_t RTPReceiverVideo::InvokeOnInitializeDecoder( 127 int32_t RTPReceiverVideo::InvokeOnInitializeDecoder(
129 RtpFeedback* callback, 128 RtpFeedback* callback,
130 int8_t payload_type, 129 int8_t payload_type,
131 const char payload_name[RTP_PAYLOAD_NAME_SIZE], 130 const char payload_name[RTP_PAYLOAD_NAME_SIZE],
132 const PayloadUnion& specific_payload) const { 131 const PayloadUnion& specific_payload) const {
133 // TODO(pbos): Remove as soon as audio can handle a changing payload type 132 // TODO(pbos): Remove as soon as audio can handle a changing payload type
134 // without this callback. 133 // without this callback.
135 return 0; 134 return 0;
136 } 135 }
137 136
138 } // namespace webrtc 137 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_packet_unittest.cc ('k') | webrtc/modules/rtp_rtcp/source/rtp_sender_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698