| 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 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 226 } | 226 } |
| 227 } | 227 } |
| 228 | 228 |
| 229 webrtc::FrameType VCMEncodedFrame::ConvertFrameType(VideoFrameType frameType) | 229 webrtc::FrameType VCMEncodedFrame::ConvertFrameType(VideoFrameType frameType) |
| 230 { | 230 { |
| 231 switch(frameType) { | 231 switch(frameType) { |
| 232 case kKeyFrame: | 232 case kKeyFrame: |
| 233 return kVideoFrameKey; | 233 return kVideoFrameKey; |
| 234 case kDeltaFrame: | 234 case kDeltaFrame: |
| 235 return kVideoFrameDelta; | 235 return kVideoFrameDelta; |
| 236 case kSkipFrame: | |
| 237 return kFrameEmpty; | |
| 238 default: | |
| 239 return kVideoFrameDelta; | |
| 240 } | 236 } |
| 241 } | 237 } |
| 242 | 238 |
| 243 VideoFrameType VCMEncodedFrame::ConvertFrameType(webrtc::FrameType frame_type) { | 239 VideoFrameType VCMEncodedFrame::ConvertFrameType(webrtc::FrameType frame_type) { |
| 244 switch (frame_type) { | 240 switch (frame_type) { |
| 245 case kVideoFrameKey: | 241 case kVideoFrameKey: |
| 246 return kKeyFrame; | 242 return kKeyFrame; |
| 247 case kVideoFrameDelta: | 243 case kVideoFrameDelta: |
| 248 return kDeltaFrame; | 244 return kDeltaFrame; |
| 249 default: | 245 default: |
| 250 assert(false); | 246 assert(false); |
| 251 return kDeltaFrame; | 247 return kDeltaFrame; |
| 252 } | 248 } |
| 253 } | 249 } |
| 254 | 250 |
| 255 void VCMEncodedFrame::ConvertFrameTypes( | 251 void VCMEncodedFrame::ConvertFrameTypes( |
| 256 const std::vector<webrtc::FrameType>& frame_types, | 252 const std::vector<webrtc::FrameType>& frame_types, |
| 257 std::vector<VideoFrameType>* video_frame_types) { | 253 std::vector<VideoFrameType>* video_frame_types) { |
| 258 assert(video_frame_types); | 254 assert(video_frame_types); |
| 259 video_frame_types->reserve(frame_types.size()); | 255 video_frame_types->reserve(frame_types.size()); |
| 260 for (size_t i = 0; i < frame_types.size(); ++i) { | 256 for (size_t i = 0; i < frame_types.size(); ++i) { |
| 261 (*video_frame_types)[i] = ConvertFrameType(frame_types[i]); | 257 (*video_frame_types)[i] = ConvertFrameType(frame_types[i]); |
| 262 } | 258 } |
| 263 } | 259 } |
| 264 | 260 |
| 265 } | 261 } |
| OLD | NEW |