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 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 bool is_red, | 54 bool is_red, |
55 const uint8_t* payload, | 55 const uint8_t* payload, |
56 size_t payload_length, | 56 size_t payload_length, |
57 int64_t timestamp_ms, | 57 int64_t timestamp_ms, |
58 bool is_first_packet) { | 58 bool is_first_packet) { |
59 TRACE_EVENT2(TRACE_DISABLED_BY_DEFAULT("webrtc_rtp"), "Video::ParseRtp", | 59 TRACE_EVENT2(TRACE_DISABLED_BY_DEFAULT("webrtc_rtp"), "Video::ParseRtp", |
60 "seqnum", rtp_header->header.sequenceNumber, "timestamp", | 60 "seqnum", rtp_header->header.sequenceNumber, "timestamp", |
61 rtp_header->header.timestamp); | 61 rtp_header->header.timestamp); |
62 rtp_header->type.Video.codec = specific_payload.Video.videoCodecType; | 62 rtp_header->type.Video.codec = specific_payload.Video.videoCodecType; |
63 | 63 |
64 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 // We are not allowed to hold a critical section when calling below functions. | 73 // We are not allowed to hold a critical section when calling below functions. |
74 rtc::scoped_ptr<RtpDepacketizer> depacketizer( | 74 rtc::scoped_ptr<RtpDepacketizer> depacketizer( |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 callback->OnInitializeDecoder( | 120 callback->OnInitializeDecoder( |
121 id, payload_type, payload_name, kVideoPayloadTypeFrequency, 1, 0)) { | 121 id, payload_type, payload_name, kVideoPayloadTypeFrequency, 1, 0)) { |
122 LOG(LS_ERROR) << "Failed to created decoder for payload type: " | 122 LOG(LS_ERROR) << "Failed to created decoder for payload type: " |
123 << static_cast<int>(payload_type); | 123 << static_cast<int>(payload_type); |
124 return -1; | 124 return -1; |
125 } | 125 } |
126 return 0; | 126 return 0; |
127 } | 127 } |
128 | 128 |
129 } // namespace webrtc | 129 } // namespace webrtc |
OLD | NEW |