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

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

Issue 2453143003: Delete method FrameObject::GetBitstream. (Closed)
Patch Set: Created 4 years, 1 month 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 15 matching lines...) Expand all
26 uint16_t first_seq_num, 26 uint16_t first_seq_num,
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 int64_t received_time) 30 int64_t received_time)
31 : packet_buffer_(packet_buffer), 31 : packet_buffer_(packet_buffer),
32 first_seq_num_(first_seq_num), 32 first_seq_num_(first_seq_num),
33 last_seq_num_(last_seq_num), 33 last_seq_num_(last_seq_num),
34 received_time_(received_time), 34 received_time_(received_time),
35 times_nacked_(times_nacked) { 35 times_nacked_(times_nacked) {
36 size = frame_size;
37 VCMPacket* packet = packet_buffer_->GetPacket(first_seq_num); 36 VCMPacket* packet = packet_buffer_->GetPacket(first_seq_num);
38 if (packet) { 37 if (packet) {
39 // TODO(philipel): Remove when encoded image is replaced by FrameObject. 38 // TODO(philipel): Remove when encoded image is replaced by FrameObject.
40 // VCMEncodedFrame members 39 // VCMEncodedFrame members
41 CopyCodecSpecific(&packet->video_header); 40 CopyCodecSpecific(&packet->video_header);
42 _completeFrame = true; 41 _completeFrame = true;
43 _payloadType = packet->payloadType; 42 _payloadType = packet->payloadType;
44 _timeStamp = packet->timestamp; 43 _timeStamp = packet->timestamp;
45 ntp_time_ms_ = packet->ntp_time_ms_; 44 ntp_time_ms_ = packet->ntp_time_ms_;
46 _buffer = new uint8_t[frame_size](); 45 _buffer = new uint8_t[frame_size]();
47 _size = frame_size; 46 _size = frame_size;
48 _length = frame_size; 47 _length = frame_size;
49 _frameType = packet->frameType; 48 _frameType = packet->frameType;
50 GetBitstream(_buffer); 49 packet_buffer_->GetBitstream(*this, _buffer);
51 50
52 // RtpFrameObject members 51 // RtpFrameObject members
53 frame_type_ = packet->frameType; 52 frame_type_ = packet->frameType;
54 codec_type_ = packet->codec; 53 codec_type_ = packet->codec;
55 54
56 // FrameObject members 55 // FrameObject members
57 timestamp = packet->timestamp; 56 timestamp = packet->timestamp;
58 } 57 }
59 } 58 }
60 59
(...skipping 14 matching lines...) Expand all
75 } 74 }
76 75
77 FrameType RtpFrameObject::frame_type() const { 76 FrameType RtpFrameObject::frame_type() const {
78 return frame_type_; 77 return frame_type_;
79 } 78 }
80 79
81 VideoCodecType RtpFrameObject::codec_type() const { 80 VideoCodecType RtpFrameObject::codec_type() const {
82 return codec_type_; 81 return codec_type_;
83 } 82 }
84 83
85 bool RtpFrameObject::GetBitstream(uint8_t* destination) const {
86 return packet_buffer_->GetBitstream(*this, destination);
87 }
88
89 uint32_t RtpFrameObject::Timestamp() const { 84 uint32_t RtpFrameObject::Timestamp() const {
90 return timestamp_; 85 return timestamp_;
91 } 86 }
92 87
93 int64_t RtpFrameObject::ReceivedTime() const { 88 int64_t RtpFrameObject::ReceivedTime() const {
94 return received_time_; 89 return received_time_;
95 } 90 }
96 91
97 int64_t RtpFrameObject::RenderTime() const { 92 int64_t RtpFrameObject::RenderTime() const {
98 return _renderTimeMs; 93 return _renderTimeMs;
99 } 94 }
100 95
101 RTPVideoTypeHeader* RtpFrameObject::GetCodecHeader() const { 96 RTPVideoTypeHeader* RtpFrameObject::GetCodecHeader() const {
102 VCMPacket* packet = packet_buffer_->GetPacket(first_seq_num_); 97 VCMPacket* packet = packet_buffer_->GetPacket(first_seq_num_);
103 if (!packet) 98 if (!packet)
104 return nullptr; 99 return nullptr;
105 return &packet->video_header.codecHeader; 100 return &packet->video_header.codecHeader;
106 } 101 }
107 102
108 } // namespace video_coding 103 } // namespace video_coding
109 } // namespace webrtc 104 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/video_coding/frame_object.h ('k') | webrtc/modules/video_coding/video_packet_buffer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698