Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(596)

Side by Side Diff: webrtc/modules/rtp_rtcp/source/rtp_format_h264.cc

Issue 1664733002: Add SEI to the list of packets counted as keyframe. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698