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

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: 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
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 CopyCodecSpecific(&packet->video_header);
39 _completeFrame = true;
40 _payloadType = packet->payloadType;
41 _timeStamp = packet->timestamp;
42 ntp_time_ms_ = packet->ntp_time_ms_;
43 _buffer = new uint8_t[frame_size]();
44 _size = frame_size;
45 _length = frame_size;
46 _frameType = packet->frameType;
47 GetBitstream(_buffer);
48
37 frame_type_ = packet->frameType; 49 frame_type_ = packet->frameType;
38 codec_type_ = packet->codec; 50 codec_type_ = packet->codec;
51 timestamp = packet->timestamp;
stefan-webrtc 2016/06/29 16:43:23 Could you add a comment before each block of assig
philipel 2016/06/30 09:34:15 Done.
39 } 52 }
40 } 53 }
41 54
42 RtpFrameObject::~RtpFrameObject() { 55 RtpFrameObject::~RtpFrameObject() {
43 packet_buffer_->ReturnFrame(this); 56 packet_buffer_->ReturnFrame(this);
44 } 57 }
45 58
46 uint16_t RtpFrameObject::first_seq_num() const { 59 uint16_t RtpFrameObject::first_seq_num() const {
47 return first_seq_num_; 60 return first_seq_num_;
48 } 61 }
(...skipping 20 matching lines...) Expand all
69 82
70 RTPVideoTypeHeader* RtpFrameObject::GetCodecHeader() const { 83 RTPVideoTypeHeader* RtpFrameObject::GetCodecHeader() const {
71 VCMPacket* packet = packet_buffer_->GetPacket(first_seq_num_); 84 VCMPacket* packet = packet_buffer_->GetPacket(first_seq_num_);
72 if (!packet) 85 if (!packet)
73 return nullptr; 86 return nullptr;
74 return &packet->video_header.codecHeader; 87 return &packet->video_header.codecHeader;
75 } 88 }
76 89
77 } // namespace video_coding 90 } // namespace video_coding
78 } // namespace webrtc 91 } // namespace webrtc
OLDNEW
« webrtc/modules/video_coding/frame_object.h ('K') | « 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