| 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 } | 83 } |
| 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::kDefault; |
| 93 | 94 |
| 94 // Retrieve the video rotation information. | 95 // Retrieve the video rotation information. |
| 95 if (rtp_header->header.extension.hasVideoRotation) { | 96 if (rtp_header->header.extension.hasVideoRotation) { |
| 96 rtp_header->type.Video.rotation = | 97 rtp_header->type.Video.rotation = |
| 97 rtp_header->header.extension.videoRotation; | 98 rtp_header->header.extension.videoRotation; |
| 98 } | 99 } |
| 99 | 100 |
| 101 if (rtp_header->header.extension.hasVideoContentType) { |
| 102 rtp_header->type.Video.content_type = |
| 103 rtp_header->header.extension.videoContentType; |
| 104 } |
| 105 |
| 100 rtp_header->type.Video.playout_delay = | 106 rtp_header->type.Video.playout_delay = |
| 101 rtp_header->header.extension.playout_delay; | 107 rtp_header->header.extension.playout_delay; |
| 102 | 108 |
| 103 return data_callback_->OnReceivedPayloadData(parsed_payload.payload, | 109 return data_callback_->OnReceivedPayloadData(parsed_payload.payload, |
| 104 parsed_payload.payload_length, | 110 parsed_payload.payload_length, |
| 105 rtp_header) == 0 | 111 rtp_header) == 0 |
| 106 ? 0 | 112 ? 0 |
| 107 : -1; | 113 : -1; |
| 108 } | 114 } |
| 109 | 115 |
| 110 RTPAliveType RTPReceiverVideo::ProcessDeadOrAlive( | 116 RTPAliveType RTPReceiverVideo::ProcessDeadOrAlive( |
| 111 uint16_t last_payload_length) const { | 117 uint16_t last_payload_length) const { |
| 112 return kRtpDead; | 118 return kRtpDead; |
| 113 } | 119 } |
| 114 | 120 |
| 115 int32_t RTPReceiverVideo::InvokeOnInitializeDecoder( | 121 int32_t RTPReceiverVideo::InvokeOnInitializeDecoder( |
| 116 RtpFeedback* callback, | 122 RtpFeedback* callback, |
| 117 int8_t payload_type, | 123 int8_t payload_type, |
| 118 const char payload_name[RTP_PAYLOAD_NAME_SIZE], | 124 const char payload_name[RTP_PAYLOAD_NAME_SIZE], |
| 119 const PayloadUnion& specific_payload) const { | 125 const PayloadUnion& specific_payload) const { |
| 120 // TODO(pbos): Remove as soon as audio can handle a changing payload type | 126 // TODO(pbos): Remove as soon as audio can handle a changing payload type |
| 121 // without this callback. | 127 // without this callback. |
| 122 return 0; | 128 return 0; |
| 123 } | 129 } |
| 124 | 130 |
| 125 } // namespace webrtc | 131 } // namespace webrtc |
| OLD | NEW |