| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2014 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 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 if (nal_type == kSps) { | 94 if (nal_type == kSps) { |
| 95 H264SpsParser parser(nalu_start, nalu_length); | 95 H264SpsParser parser(nalu_start, nalu_length); |
| 96 if (parser.Parse()) { | 96 if (parser.Parse()) { |
| 97 parsed_payload->type.Video.width = parser.width(); | 97 parsed_payload->type.Video.width = parser.width(); |
| 98 parsed_payload->type.Video.height = parser.height(); | 98 parsed_payload->type.Video.height = parser.height(); |
| 99 } | 99 } |
| 100 } | 100 } |
| 101 switch (nal_type) { | 101 switch (nal_type) { |
| 102 case kSps: | 102 case kSps: |
| 103 case kPps: | 103 case kPps: |
| 104 case kSei: |
| 104 case kIdr: | 105 case kIdr: |
| 105 parsed_payload->frame_type = kVideoFrameKey; | 106 parsed_payload->frame_type = kVideoFrameKey; |
| 106 break; | 107 break; |
| 107 default: | 108 default: |
| 108 parsed_payload->frame_type = kVideoFrameDelta; | 109 parsed_payload->frame_type = kVideoFrameDelta; |
| 109 break; | 110 break; |
| 110 } | 111 } |
| 111 return true; | 112 return true; |
| 112 } | 113 } |
| 113 | 114 |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 365 // will depacketize the STAP-A into NAL units later. | 366 // will depacketize the STAP-A into NAL units later. |
| 366 if (!ParseSingleNalu(parsed_payload, payload_data, payload_data_length)) | 367 if (!ParseSingleNalu(parsed_payload, payload_data, payload_data_length)) |
| 367 return false; | 368 return false; |
| 368 } | 369 } |
| 369 | 370 |
| 370 parsed_payload->payload = payload_data + offset; | 371 parsed_payload->payload = payload_data + offset; |
| 371 parsed_payload->payload_length = payload_data_length - offset; | 372 parsed_payload->payload_length = payload_data_length - offset; |
| 372 return true; | 373 return true; |
| 373 } | 374 } |
| 374 } // namespace webrtc | 375 } // namespace webrtc |
| OLD | NEW |