| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2011 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 |
| 11 #include "webrtc/modules/video_coding/packet.h" | 11 #include "webrtc/modules/video_coding/packet.h" |
| 12 | 12 |
| 13 #include <assert.h> | 13 #include <assert.h> |
| 14 | 14 |
| 15 #include "webrtc/base/logging.h" |
| 15 #include "webrtc/modules/include/module_common_types.h" | 16 #include "webrtc/modules/include/module_common_types.h" |
| 16 | 17 |
| 17 namespace webrtc { | 18 namespace webrtc { |
| 18 | 19 |
| 19 VCMPacket::VCMPacket() | 20 VCMPacket::VCMPacket() |
| 20 : payloadType(0), | 21 : payloadType(0), |
| 21 timestamp(0), | 22 timestamp(0), |
| 22 ntp_time_ms_(0), | 23 ntp_time_ms_(0), |
| 23 seqNum(0), | 24 seqNum(0), |
| 24 dataPtr(NULL), | 25 dataPtr(NULL), |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 completeNALU = kNaluComplete; | 127 completeNALU = kNaluComplete; |
| 127 } else if (is_first_packet_in_frame) { | 128 } else if (is_first_packet_in_frame) { |
| 128 completeNALU = kNaluStart; | 129 completeNALU = kNaluStart; |
| 129 } else if (markerBit) { | 130 } else if (markerBit) { |
| 130 completeNALU = kNaluEnd; | 131 completeNALU = kNaluEnd; |
| 131 } else { | 132 } else { |
| 132 completeNALU = kNaluIncomplete; | 133 completeNALU = kNaluIncomplete; |
| 133 } | 134 } |
| 134 codec = kVideoCodecH264; | 135 codec = kVideoCodecH264; |
| 135 return; | 136 return; |
| 137 case kRtpVideoStereo: |
| 138 if (is_first_packet_in_frame && markerBit) |
| 139 completeNALU = kNaluComplete; |
| 140 else if (is_first_packet_in_frame) |
| 141 completeNALU = kNaluStart; |
| 142 else if (markerBit) |
| 143 completeNALU = kNaluEnd; |
| 144 else |
| 145 completeNALU = kNaluIncomplete; |
| 146 |
| 147 codec = kVideoCodecStereo; |
| 148 return; |
| 136 case kRtpVideoGeneric: | 149 case kRtpVideoGeneric: |
| 137 case kRtpVideoNone: | 150 case kRtpVideoNone: |
| 138 codec = kVideoCodecUnknown; | 151 codec = kVideoCodecUnknown; |
| 139 return; | 152 return; |
| 140 } | 153 } |
| 141 } | 154 } |
| 142 | 155 |
| 143 } // namespace webrtc | 156 } // namespace webrtc |
| OLD | NEW |