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.picture_id = -1; |
| 139 _codecSpecificInfo.codecSpecific.VP9.temporal_idx = 0; |
| 140 _codecSpecificInfo.codecSpecific.VP9.spatial_idx = 0; |
| 141 _codecSpecificInfo.codecSpecific.VP9.gof_idx = 0; |
| 142 _codecSpecificInfo.codecSpecific.VP9.inter_layer_predicted = false; |
| 143 _codecSpecificInfo.codecSpecific.VP9.tl0_pic_idx = -1; |
| 144 _codecSpecificInfo.codecType = kVideoCodecVP9; |
| 145 } |
| 146 _codecSpecificInfo.codecSpecific.VP9.inter_pic_predicted = |
| 147 header->codecHeader.VP9.inter_pic_predicted; |
| 148 _codecSpecificInfo.codecSpecific.VP9.flexible_mode = |
| 149 header->codecHeader.VP9.flexible_mode; |
| 150 _codecSpecificInfo.codecSpecific.VP9.ss_data_available = |
| 151 header->codecHeader.VP9.ss_data_available; |
| 152 if (header->codecHeader.VP9.picture_id != kNoPictureId) { |
| 153 _codecSpecificInfo.codecSpecific.VP9.picture_id = |
| 154 header->codecHeader.VP9.picture_id; |
| 155 } |
| 156 if (header->codecHeader.VP9.tl0_pic_idx != kNoTl0PicIdx) { |
| 157 _codecSpecificInfo.codecSpecific.VP9.tl0_pic_idx = |
| 158 header->codecHeader.VP9.tl0_pic_idx; |
| 159 } |
| 160 if (header->codecHeader.VP9.temporal_idx != kNoTemporalIdx) { |
| 161 _codecSpecificInfo.codecSpecific.VP9.temporal_idx = |
| 162 header->codecHeader.VP9.temporal_idx; |
| 163 _codecSpecificInfo.codecSpecific.VP9.temporal_up_switch = |
| 164 header->codecHeader.VP9.temporal_up_switch; |
| 165 } |
| 166 if (header->codecHeader.VP9.spatial_idx != kNoSpatialIdx) { |
| 167 _codecSpecificInfo.codecSpecific.VP9.spatial_idx = |
| 168 header->codecHeader.VP9.spatial_idx; |
| 169 _codecSpecificInfo.codecSpecific.VP9.inter_layer_predicted = |
| 170 header->codecHeader.VP9.inter_layer_predicted; |
| 171 } |
| 172 if (header->codecHeader.VP9.gof_idx != kNoGofIdx) { |
| 173 _codecSpecificInfo.codecSpecific.VP9.gof_idx = |
| 174 header->codecHeader.VP9.gof_idx; |
| 175 } |
| 176 if (header->codecHeader.VP9.ss_data_available) { |
| 177 _codecSpecificInfo.codecSpecific.VP9.num_spatial_layers = |
| 178 header->codecHeader.VP9.num_spatial_layers; |
| 179 _codecSpecificInfo.codecSpecific.VP9 |
| 180 .spatial_layer_resolution_present = |
| 181 header->codecHeader.VP9.spatial_layer_resolution_present; |
| 182 if (header->codecHeader.VP9.spatial_layer_resolution_present) { |
| 183 for (size_t i = 0; i < header->codecHeader.VP9.num_spatial_layers; |
| 184 ++i) { |
| 185 _codecSpecificInfo.codecSpecific.VP9.width[i] = |
| 186 header->codecHeader.VP9.width[i]; |
| 187 _codecSpecificInfo.codecSpecific.VP9.height[i] = |
| 188 header->codecHeader.VP9.height[i]; |
| 189 } |
| 190 } |
| 191 _codecSpecificInfo.codecSpecific.VP9.gof.CopyGofInfoVP9( |
| 192 header->codecHeader.VP9.gof); |
| 193 } |
| 194 break; |
| 195 } |
135 case kRtpVideoH264: { | 196 case kRtpVideoH264: { |
136 _codecSpecificInfo.codecType = kVideoCodecH264; | 197 _codecSpecificInfo.codecType = kVideoCodecH264; |
137 break; | 198 break; |
138 } | 199 } |
139 default: { | 200 default: { |
140 _codecSpecificInfo.codecType = kVideoCodecUnknown; | 201 _codecSpecificInfo.codecType = kVideoCodecUnknown; |
141 break; | 202 break; |
142 } | 203 } |
143 } | 204 } |
144 } | 205 } |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
195 const std::vector<webrtc::FrameType>& frame_types, | 256 const std::vector<webrtc::FrameType>& frame_types, |
196 std::vector<VideoFrameType>* video_frame_types) { | 257 std::vector<VideoFrameType>* video_frame_types) { |
197 assert(video_frame_types); | 258 assert(video_frame_types); |
198 video_frame_types->reserve(frame_types.size()); | 259 video_frame_types->reserve(frame_types.size()); |
199 for (size_t i = 0; i < frame_types.size(); ++i) { | 260 for (size_t i = 0; i < frame_types.size(); ++i) { |
200 (*video_frame_types)[i] = ConvertFrameType(frame_types[i]); | 261 (*video_frame_types)[i] = ConvertFrameType(frame_types[i]); |
201 } | 262 } |
202 } | 263 } |
203 | 264 |
204 } | 265 } |
OLD | NEW |