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

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

Issue 2110543005: FrameObject inherit from VCMEncodedFrame. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Added comments to FrameObject constructor. Created 4 years, 5 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_object.h ('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 16 matching lines...) Expand all
27 uint16_t last_seq_num, 27 uint16_t last_seq_num,
28 size_t frame_size, 28 size_t frame_size,
29 int times_nacked) 29 int times_nacked)
30 : packet_buffer_(packet_buffer), 30 : packet_buffer_(packet_buffer),
31 first_seq_num_(first_seq_num), 31 first_seq_num_(first_seq_num),
32 last_seq_num_(last_seq_num), 32 last_seq_num_(last_seq_num),
33 times_nacked_(times_nacked) { 33 times_nacked_(times_nacked) {
34 size = frame_size; 34 size = frame_size;
35 VCMPacket* packet = packet_buffer_->GetPacket(first_seq_num); 35 VCMPacket* packet = packet_buffer_->GetPacket(first_seq_num);
36 if (packet) { 36 if (packet) {
37 // TODO(philipel): Remove when encoded image is replaced by FrameObject.
38 // VCMEncodedFrame members
39 CopyCodecSpecific(&packet->video_header);
40 _completeFrame = true;
41 _payloadType = packet->payloadType;
42 _timeStamp = packet->timestamp;
43 ntp_time_ms_ = packet->ntp_time_ms_;
44 _buffer = new uint8_t[frame_size]();
45 _size = frame_size;
46 _length = frame_size;
47 _frameType = packet->frameType;
48 GetBitstream(_buffer);
49
50 // RtpFrameObject members
37 frame_type_ = packet->frameType; 51 frame_type_ = packet->frameType;
38 codec_type_ = packet->codec; 52 codec_type_ = packet->codec;
53
54 // FrameObject members
55 timestamp = packet->timestamp;
39 } 56 }
40 } 57 }
41 58
42 RtpFrameObject::~RtpFrameObject() { 59 RtpFrameObject::~RtpFrameObject() {
43 packet_buffer_->ReturnFrame(this); 60 packet_buffer_->ReturnFrame(this);
44 } 61 }
45 62
46 uint16_t RtpFrameObject::first_seq_num() const { 63 uint16_t RtpFrameObject::first_seq_num() const {
47 return first_seq_num_; 64 return first_seq_num_;
48 } 65 }
(...skipping 20 matching lines...) Expand all
69 86
70 RTPVideoTypeHeader* RtpFrameObject::GetCodecHeader() const { 87 RTPVideoTypeHeader* RtpFrameObject::GetCodecHeader() const {
71 VCMPacket* packet = packet_buffer_->GetPacket(first_seq_num_); 88 VCMPacket* packet = packet_buffer_->GetPacket(first_seq_num_);
72 if (!packet) 89 if (!packet)
73 return nullptr; 90 return nullptr;
74 return &packet->video_header.codecHeader; 91 return &packet->video_header.codecHeader;
75 } 92 }
76 93
77 } // namespace video_coding 94 } // namespace video_coding
78 } // namespace webrtc 95 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/video_coding/frame_object.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698