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

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

Issue 2073073003: Remove some dead code from VCMJitterBuffer. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 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 | « no previous file | webrtc/modules/video_coding/jitter_buffer.cc » ('j') | 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) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 // Returns true if the jitter buffer is running. 122 // Returns true if the jitter buffer is running.
123 bool Running() const; 123 bool Running() const;
124 124
125 // Empty the jitter buffer of all its data. 125 // Empty the jitter buffer of all its data.
126 void Flush(); 126 void Flush();
127 127
128 // Get the number of received frames, by type, since the jitter buffer 128 // Get the number of received frames, by type, since the jitter buffer
129 // was started. 129 // was started.
130 FrameCounts FrameStatistics() const; 130 FrameCounts FrameStatistics() const;
131 131
132 // The number of packets discarded by the jitter buffer because the decoder
133 // won't be able to decode them.
134 int num_not_decodable_packets() const;
135
136 // Gets number of packets received. 132 // Gets number of packets received.
137 int num_packets() const; 133 int num_packets() const;
138 134
139 // Gets number of duplicated packets received. 135 // Gets number of duplicated packets received.
140 int num_duplicated_packets() const; 136 int num_duplicated_packets() const;
141 137
142 // Gets number of packets discarded by the jitter buffer. 138 // Gets number of packets discarded by the jitter buffer.
143 int num_discarded_packets() const; 139 int num_discarded_packets() const;
144 140
145 // Statistics, Calculate frame and bit rates. 141 // Statistics, Calculate frame and bit rates.
146 void IncomingRateStatistics(unsigned int* framerate, unsigned int* bitrate); 142 void IncomingRateStatistics(unsigned int* framerate, unsigned int* bitrate);
147 143
148 // Checks if the packet sequence will be complete if the next frame would be
149 // grabbed for decoding. That is, if a frame has been lost between the
150 // last decoded frame and the next, or if the next frame is missing one
151 // or more packets.
152 bool CompleteSequenceWithNextFrame();
153
154 // Wait |max_wait_time_ms| for a complete frame to arrive. 144 // Wait |max_wait_time_ms| for a complete frame to arrive.
155 // If found, a pointer to the frame is returned. Returns nullptr otherwise. 145 // If found, a pointer to the frame is returned. Returns nullptr otherwise.
156 VCMEncodedFrame* NextCompleteFrame(uint32_t max_wait_time_ms); 146 VCMEncodedFrame* NextCompleteFrame(uint32_t max_wait_time_ms);
157 147
158 // Locates a frame for decoding (even an incomplete) without delay. 148 // Locates a frame for decoding (even an incomplete) without delay.
159 // The function returns true once such a frame is found, its corresponding 149 // The function returns true once such a frame is found, its corresponding
160 // timestamp is returned. Otherwise, returns false. 150 // timestamp is returned. Otherwise, returns false.
161 bool NextMaybeIncompleteTimestamp(uint32_t* timestamp); 151 bool NextMaybeIncompleteTimestamp(uint32_t* timestamp);
162 152
163 // Extract frame corresponding to input timestamp. 153 // Extract frame corresponding to input timestamp.
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 191
202 // Returns the current NACK mode. 192 // Returns the current NACK mode.
203 VCMNackMode nack_mode() const; 193 VCMNackMode nack_mode() const;
204 194
205 // Returns a list of the sequence numbers currently missing. 195 // Returns a list of the sequence numbers currently missing.
206 std::vector<uint16_t> GetNackList(bool* request_key_frame); 196 std::vector<uint16_t> GetNackList(bool* request_key_frame);
207 197
208 // Set decode error mode - Should not be changed in the middle of the 198 // Set decode error mode - Should not be changed in the middle of the
209 // session. Changes will not influence frames already in the buffer. 199 // session. Changes will not influence frames already in the buffer.
210 void SetDecodeErrorMode(VCMDecodeErrorMode error_mode); 200 void SetDecodeErrorMode(VCMDecodeErrorMode error_mode);
211 int64_t LastDecodedTimestamp() const;
212 VCMDecodeErrorMode decode_error_mode() const { return decode_error_mode_; } 201 VCMDecodeErrorMode decode_error_mode() const { return decode_error_mode_; }
213 202
214 void RegisterStatsCallback(VCMReceiveStatisticsCallback* callback); 203 void RegisterStatsCallback(VCMReceiveStatisticsCallback* callback);
215 204
216 int64_t TimeUntilNextProcess(); 205 int64_t TimeUntilNextProcess();
217 void Process(); 206 void Process();
218 207
219 private: 208 private:
220 class SequenceNumberLessThan { 209 class SequenceNumberLessThan {
221 public: 210 public:
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 // frames. 376 // frames.
388 int frame_counter_; 377 int frame_counter_;
389 378
390 std::unique_ptr<NackModule> nack_module_; 379 std::unique_ptr<NackModule> nack_module_;
391 380
392 RTC_DISALLOW_COPY_AND_ASSIGN(VCMJitterBuffer); 381 RTC_DISALLOW_COPY_AND_ASSIGN(VCMJitterBuffer);
393 }; 382 };
394 } // namespace webrtc 383 } // namespace webrtc
395 384
396 #endif // WEBRTC_MODULES_VIDEO_CODING_JITTER_BUFFER_H_ 385 #endif // WEBRTC_MODULES_VIDEO_CODING_JITTER_BUFFER_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/video_coding/jitter_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698