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

Side by Side Diff: webrtc/modules/video_coding/frame_object.h

Issue 2937243002: Validate references of frames inserted into FrameBuffer2. (Closed)
Patch Set: to --> too Created 3 years, 6 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 | « webrtc/modules/video_coding/frame_buffer2_unittest.cc ('k') | 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) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 44
45 size_t size() { return _length; } 45 size_t size() { return _length; }
46 46
47 // The tuple (|picture_id|, |spatial_layer|) uniquely identifies a frame 47 // The tuple (|picture_id|, |spatial_layer|) uniquely identifies a frame
48 // object. For codec types that don't necessarily have picture ids they 48 // object. For codec types that don't necessarily have picture ids they
49 // have to be constructed from the header data relevant to that codec. 49 // have to be constructed from the header data relevant to that codec.
50 uint16_t picture_id; 50 uint16_t picture_id;
51 uint8_t spatial_layer; 51 uint8_t spatial_layer;
52 uint32_t timestamp; 52 uint32_t timestamp;
53 53
54 // TODO(philipel): Add simple modify/access functions to prevent adding too
55 // many |references|.
54 size_t num_references; 56 size_t num_references;
55 uint16_t references[kMaxFrameReferences]; 57 uint16_t references[kMaxFrameReferences];
56 bool inter_layer_predicted; 58 bool inter_layer_predicted;
57 }; 59 };
58 60
59 class PacketBuffer; 61 class PacketBuffer;
60 62
61 class RtpFrameObject : public FrameObject { 63 class RtpFrameObject : public FrameObject {
62 public: 64 public:
63 RtpFrameObject(PacketBuffer* packet_buffer, 65 RtpFrameObject(PacketBuffer* packet_buffer,
(...skipping 27 matching lines...) Expand all
91 93
92 // Equal to times nacked of the packet with the highet times nacked 94 // Equal to times nacked of the packet with the highet times nacked
93 // belonging to this frame. 95 // belonging to this frame.
94 int times_nacked_; 96 int times_nacked_;
95 }; 97 };
96 98
97 } // namespace video_coding 99 } // namespace video_coding
98 } // namespace webrtc 100 } // namespace webrtc
99 101
100 #endif // WEBRTC_MODULES_VIDEO_CODING_FRAME_OBJECT_H_ 102 #endif // WEBRTC_MODULES_VIDEO_CODING_FRAME_OBJECT_H_
OLDNEW
« no previous file with comments | « webrtc/modules/video_coding/frame_buffer2_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698