| 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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 | 63 |
| 64 RTC_DCHECK_GE(payload_length, rtp_header->header.paddingLength); | 64 RTC_DCHECK_GE(payload_length, rtp_header->header.paddingLength); |
| 65 const size_t payload_data_length = | 65 const size_t payload_data_length = |
| 66 payload_length - rtp_header->header.paddingLength; | 66 payload_length - rtp_header->header.paddingLength; |
| 67 | 67 |
| 68 if (payload == NULL || payload_data_length == 0) { | 68 if (payload == NULL || payload_data_length == 0) { |
| 69 return data_callback_->OnReceivedPayloadData(NULL, 0, rtp_header) == 0 ? 0 | 69 return data_callback_->OnReceivedPayloadData(NULL, 0, rtp_header) == 0 ? 0 |
| 70 : -1; | 70 : -1; |
| 71 } | 71 } |
| 72 | 72 |
| 73 if (!first_packet_received_) { |
| 74 first_packet_received_ = true; |
| 75 LOG(LS_INFO) << "Received first video RTP packet"; |
| 76 } |
| 77 |
| 73 // We are not allowed to hold a critical section when calling below functions. | 78 // We are not allowed to hold a critical section when calling below functions. |
| 74 rtc::scoped_ptr<RtpDepacketizer> depacketizer( | 79 rtc::scoped_ptr<RtpDepacketizer> depacketizer( |
| 75 RtpDepacketizer::Create(rtp_header->type.Video.codec)); | 80 RtpDepacketizer::Create(rtp_header->type.Video.codec)); |
| 76 if (depacketizer.get() == NULL) { | 81 if (depacketizer.get() == NULL) { |
| 77 LOG(LS_ERROR) << "Failed to create depacketizer."; | 82 LOG(LS_ERROR) << "Failed to create depacketizer."; |
| 78 return -1; | 83 return -1; |
| 79 } | 84 } |
| 80 | 85 |
| 81 rtp_header->type.Video.isFirstPacket = is_first_packet; | 86 rtp_header->type.Video.isFirstPacket = is_first_packet; |
| 82 RtpDepacketizer::ParsedPayload parsed_payload; | 87 RtpDepacketizer::ParsedPayload parsed_payload; |
| (...skipping 30 matching lines...) Expand all Loading... |
| 113 RtpFeedback* callback, | 118 RtpFeedback* callback, |
| 114 int8_t payload_type, | 119 int8_t payload_type, |
| 115 const char payload_name[RTP_PAYLOAD_NAME_SIZE], | 120 const char payload_name[RTP_PAYLOAD_NAME_SIZE], |
| 116 const PayloadUnion& specific_payload) const { | 121 const PayloadUnion& specific_payload) const { |
| 117 // TODO(pbos): Remove as soon as audio can handle a changing payload type | 122 // TODO(pbos): Remove as soon as audio can handle a changing payload type |
| 118 // without this callback. | 123 // without this callback. |
| 119 return 0; | 124 return 0; |
| 120 } | 125 } |
| 121 | 126 |
| 122 } // namespace webrtc | 127 } // namespace webrtc |
| OLD | NEW |