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

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

Issue 1903523003: Convert Vp9 Rtp headers to frame references. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Added comments. Created 4 years, 8 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) 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
11 #include "webrtc/modules/video_coding/frame_object.h" 11 #include "webrtc/modules/video_coding/frame_object.h"
12 #include "webrtc/base/criticalsection.h" 12 #include "webrtc/base/criticalsection.h"
13 #include "webrtc/modules/video_coding/packet_buffer.h" 13 #include "webrtc/modules/video_coding/packet_buffer.h"
14 14
15 namespace webrtc { 15 namespace webrtc {
16 namespace video_coding { 16 namespace video_coding {
17 17
18 FrameObject::FrameObject() : picture_id(0),
19 spatial_layer(0),
20 num_references(0),
21 inter_layer_predicted(false) {}
22
18 RtpFrameObject::RtpFrameObject(PacketBuffer* packet_buffer, 23 RtpFrameObject::RtpFrameObject(PacketBuffer* packet_buffer,
19 uint16_t first_packet, 24 uint16_t first_packet,
20 uint16_t last_packet) 25 uint16_t last_packet)
21 : packet_buffer_(packet_buffer), 26 : packet_buffer_(packet_buffer),
22 first_packet_(first_packet), 27 first_packet_(first_packet),
23 last_packet_(last_packet) {} 28 last_packet_(last_packet) {}
24 29
25 RtpFrameObject::~RtpFrameObject() { 30 RtpFrameObject::~RtpFrameObject() {
26 packet_buffer_->ReturnFrame(this); 31 packet_buffer_->ReturnFrame(this);
27 } 32 }
28 33
29 uint16_t RtpFrameObject::first_seq_num() const { 34 uint16_t RtpFrameObject::first_seq_num() const {
30 return first_packet_; 35 return first_packet_;
31 } 36 }
32 37
33 uint16_t RtpFrameObject::last_seq_num() const { 38 uint16_t RtpFrameObject::last_seq_num() const {
34 return last_packet_; 39 return last_packet_;
35 } 40 }
36 41
37 bool RtpFrameObject::GetBitstream(uint8_t* destination) const { 42 bool RtpFrameObject::GetBitstream(uint8_t* destination) const {
38 return packet_buffer_->GetBitstream(*this, destination); 43 return packet_buffer_->GetBitstream(*this, destination);
39 } 44 }
40 45
41 } // namespace video_coding 46 } // namespace video_coding
42 } // namespace webrtc 47 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698