Chromium Code Reviews| 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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 125 header->codecHeader.VP8.temporalIdx; | 125 header->codecHeader.VP8.temporalIdx; |
| 126 _codecSpecificInfo.codecSpecific.VP8.layerSync = | 126 _codecSpecificInfo.codecSpecific.VP8.layerSync = |
| 127 header->codecHeader.VP8.layerSync; | 127 header->codecHeader.VP8.layerSync; |
| 128 } | 128 } |
| 129 if (header->codecHeader.VP8.keyIdx != kNoKeyIdx) { | 129 if (header->codecHeader.VP8.keyIdx != kNoKeyIdx) { |
| 130 _codecSpecificInfo.codecSpecific.VP8.keyIdx = | 130 _codecSpecificInfo.codecSpecific.VP8.keyIdx = |
| 131 header->codecHeader.VP8.keyIdx; | 131 header->codecHeader.VP8.keyIdx; |
| 132 } | 132 } |
| 133 break; | 133 break; |
| 134 } | 134 } |
| 135 case kRtpVideoVp9: { | |
| 136 if (_codecSpecificInfo.codecType != kVideoCodecVP9) { | |
| 137 // This is the first packet for this frame. | |
| 138 _codecSpecificInfo.codecSpecific.VP9.pictureId = -1; | |
| 139 _codecSpecificInfo.codecSpecific.VP9.temporalIdx = 0; | |
| 140 _codecSpecificInfo.codecSpecific.VP9.spatialIdx = 0; | |
| 141 _codecSpecificInfo.codecSpecific.VP9.gofIdx = 0; | |
| 142 _codecSpecificInfo.codecSpecific.VP9.interLayerPredicted = false; | |
| 143 _codecSpecificInfo.codecSpecific.VP9.tl0PicIdx = -1; | |
| 144 _codecSpecificInfo.codecType = kVideoCodecVP9; | |
| 145 } | |
| 146 _codecSpecificInfo.codecSpecific.VP9.interPicPredicted = | |
| 147 header->codecHeader.VP9.interPicPredicted; | |
| 148 _codecSpecificInfo.codecSpecific.VP9.flexibleMode = | |
| 149 header->codecHeader.VP9.flexibleMode; | |
| 150 _codecSpecificInfo.codecSpecific.VP9.beginningOfFrame = | |
| 151 header->codecHeader.VP9.beginningOfFrame; | |
| 152 _codecSpecificInfo.codecSpecific.VP9.endOfFrame = | |
| 153 header->codecHeader.VP9.endOfFrame; | |
| 154 _codecSpecificInfo.codecSpecific.VP9.ssDataAvailable = | |
| 155 header->codecHeader.VP9.ssDataAvailable; | |
| 156 if (header->codecHeader.VP9.pictureId != kNoPictureId) { | |
| 157 _codecSpecificInfo.codecSpecific.VP9.pictureId = | |
| 158 header->codecHeader.VP9.pictureId; | |
| 159 } | |
| 160 if (header->codecHeader.VP9.tl0PicIdx != kNoTl0PicIdx) { | |
| 161 _codecSpecificInfo.codecSpecific.VP9.tl0PicIdx = | |
| 162 header->codecHeader.VP9.tl0PicIdx; | |
| 163 } | |
| 164 if (header->codecHeader.VP9.temporalIdx != kNoTemporalIdx) { | |
| 165 _codecSpecificInfo.codecSpecific.VP9.temporalIdx = | |
| 166 header->codecHeader.VP9.temporalIdx; | |
| 167 _codecSpecificInfo.codecSpecific.VP9.temporalUpSwitch = | |
| 168 header->codecHeader.VP9.temporalUpSwitch; | |
| 169 } | |
| 170 if (header->codecHeader.VP9.spatialIdx != kNoSpatialIdx) { | |
| 171 _codecSpecificInfo.codecSpecific.VP9.spatialIdx = | |
| 172 header->codecHeader.VP9.spatialIdx; | |
| 173 _codecSpecificInfo.codecSpecific.VP9.interLayerPredicted = | |
| 174 header->codecHeader.VP9.interLayerPredicted; | |
| 175 } | |
| 176 if (header->codecHeader.VP9.gofIdx != kNoGofIdx) { | |
| 177 _codecSpecificInfo.codecSpecific.VP9.gofIdx = | |
| 178 header->codecHeader.VP9.gofIdx; | |
| 179 } | |
| 180 if (header->codecHeader.VP9.ssDataAvailable) { | |
| 181 _codecSpecificInfo.codecSpecific.VP9.numSpatialLayers = | |
| 182 header->codecHeader.VP9.numSpatialLayers; | |
| 183 _codecSpecificInfo.codecSpecific.VP9.spatialLayerResolutionPresent = | |
| 184 header->codecHeader.VP9.spatialLayerResolutionPresent; | |
| 185 if (header->codecHeader.VP9.spatialLayerResolutionPresent) { | |
| 186 for (uint8_t s = 0; s < header->codecHeader.VP9.numSpatialLayers; | |
|
stefan-webrtc
2015/07/09 14:49:00
Index i instead of s
åsapersson
2015/07/29 12:10:12
Done.
| |
| 187 s++) { | |
|
stefan-webrtc
2015/07/09 14:49:00
++i
åsapersson
2015/07/29 12:10:13
Done.
| |
| 188 _codecSpecificInfo.codecSpecific.VP9.width[s] = | |
| 189 header->codecHeader.VP9.width[s]; | |
| 190 _codecSpecificInfo.codecSpecific.VP9.height[s] = | |
| 191 header->codecHeader.VP9.height[s]; | |
| 192 } | |
| 193 } | |
| 194 _codecSpecificInfo.codecSpecific.VP9.gof.CopyGofInfoVP9( | |
| 195 header->codecHeader.VP9.gof); | |
| 196 } | |
| 197 break; | |
| 198 } | |
| 135 case kRtpVideoH264: { | 199 case kRtpVideoH264: { |
| 136 _codecSpecificInfo.codecType = kVideoCodecH264; | 200 _codecSpecificInfo.codecType = kVideoCodecH264; |
| 137 break; | 201 break; |
| 138 } | 202 } |
| 139 default: { | 203 default: { |
| 140 _codecSpecificInfo.codecType = kVideoCodecUnknown; | 204 _codecSpecificInfo.codecType = kVideoCodecUnknown; |
| 141 break; | 205 break; |
| 142 } | 206 } |
| 143 } | 207 } |
| 144 } | 208 } |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 195 const std::vector<webrtc::FrameType>& frame_types, | 259 const std::vector<webrtc::FrameType>& frame_types, |
| 196 std::vector<VideoFrameType>* video_frame_types) { | 260 std::vector<VideoFrameType>* video_frame_types) { |
| 197 assert(video_frame_types); | 261 assert(video_frame_types); |
| 198 video_frame_types->reserve(frame_types.size()); | 262 video_frame_types->reserve(frame_types.size()); |
| 199 for (size_t i = 0; i < frame_types.size(); ++i) { | 263 for (size_t i = 0; i < frame_types.size(); ++i) { |
| 200 (*video_frame_types)[i] = ConvertFrameType(frame_types[i]); | 264 (*video_frame_types)[i] = ConvertFrameType(frame_types[i]); |
| 201 } | 265 } |
| 202 } | 266 } |
| 203 | 267 |
| 204 } | 268 } |
| OLD | NEW |