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

Side by Side Diff: webrtc/modules/video_coding/frame_buffer.cc

Issue 2341713002: Use sps and pps to determine decodability of H.264 frames. (Closed)
Patch Set: . Created 4 years, 3 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
OLDNEW
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
11 #include "webrtc/modules/video_coding/frame_buffer.h" 11 #include "webrtc/modules/video_coding/frame_buffer.h"
12 12
13 #include <assert.h> 13 #include <assert.h>
14 #include <string.h> 14 #include <string.h>
15 #include <vector>
philipel 2016/09/15 12:52:46 Included in the .h file.
stefan-webrtc 2016/09/30 09:36:02 Done.
15 16
16 #include "webrtc/base/checks.h" 17 #include "webrtc/base/checks.h"
17 #include "webrtc/base/logging.h" 18 #include "webrtc/base/logging.h"
18 #include "webrtc/modules/video_coding/packet.h" 19 #include "webrtc/modules/video_coding/packet.h"
19 20
20 namespace webrtc { 21 namespace webrtc {
21 22
22 VCMFrameBuffer::VCMFrameBuffer() 23 VCMFrameBuffer::VCMFrameBuffer()
23 : _state(kStateEmpty), _nackCount(0), _latestPacketTimeMs(-1) {} 24 : _state(kStateEmpty), _nackCount(0), _latestPacketTimeMs(-1) {}
24 25
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 } 60 }
60 61
61 int VCMFrameBuffer::Tl0PicId() const { 62 int VCMFrameBuffer::Tl0PicId() const {
62 return _sessionInfo.Tl0PicId(); 63 return _sessionInfo.Tl0PicId();
63 } 64 }
64 65
65 bool VCMFrameBuffer::NonReference() const { 66 bool VCMFrameBuffer::NonReference() const {
66 return _sessionInfo.NonReference(); 67 return _sessionInfo.NonReference();
67 } 68 }
68 69
70 std::vector<NaluInfo> VCMFrameBuffer::GetNaluInfos() const {
71 return _sessionInfo.GetNaluInfos();
72 }
73
69 void VCMFrameBuffer::SetGofInfo(const GofInfoVP9& gof_info, size_t idx) { 74 void VCMFrameBuffer::SetGofInfo(const GofInfoVP9& gof_info, size_t idx) {
70 _sessionInfo.SetGofInfo(gof_info, idx); 75 _sessionInfo.SetGofInfo(gof_info, idx);
71 // TODO(asapersson): Consider adding hdr->VP9.ref_picture_id for testing. 76 // TODO(asapersson): Consider adding hdr->VP9.ref_picture_id for testing.
72 _codecSpecificInfo.codecSpecific.VP9.temporal_idx = 77 _codecSpecificInfo.codecSpecific.VP9.temporal_idx =
73 gof_info.temporal_idx[idx]; 78 gof_info.temporal_idx[idx];
74 _codecSpecificInfo.codecSpecific.VP9.temporal_up_switch = 79 _codecSpecificInfo.codecSpecific.VP9.temporal_up_switch =
75 gof_info.temporal_up_switch[idx]; 80 gof_info.temporal_up_switch[idx];
76 } 81 }
77 82
78 bool VCMFrameBuffer::IsSessionComplete() const { 83 bool VCMFrameBuffer::IsSessionComplete() const {
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 _length -= bytes_removed; 271 _length -= bytes_removed;
267 #endif 272 #endif
268 // Transfer frame information to EncodedFrame and create any codec 273 // Transfer frame information to EncodedFrame and create any codec
269 // specific information. 274 // specific information.
270 _frameType = _sessionInfo.FrameType(); 275 _frameType = _sessionInfo.FrameType();
271 _completeFrame = _sessionInfo.complete(); 276 _completeFrame = _sessionInfo.complete();
272 _missingFrame = !continuous; 277 _missingFrame = !continuous;
273 } 278 }
274 279
275 } // namespace webrtc 280 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698