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

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

Issue 2990463002: [EXPERIMENTAL] Generic stereo codec with index header sending merged frames
Patch Set: Created 3 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 19 matching lines...) Expand all
30 size_t max_buffer_size, 30 size_t max_buffer_size,
31 OnReceivedFrameCallback* received_frame_callback) { 31 OnReceivedFrameCallback* received_frame_callback) {
32 return rtc::scoped_refptr<PacketBuffer>(new PacketBuffer( 32 return rtc::scoped_refptr<PacketBuffer>(new PacketBuffer(
33 clock, start_buffer_size, max_buffer_size, received_frame_callback)); 33 clock, start_buffer_size, max_buffer_size, received_frame_callback));
34 } 34 }
35 35
36 PacketBuffer::PacketBuffer(Clock* clock, 36 PacketBuffer::PacketBuffer(Clock* clock,
37 size_t start_buffer_size, 37 size_t start_buffer_size,
38 size_t max_buffer_size, 38 size_t max_buffer_size,
39 OnReceivedFrameCallback* received_frame_callback) 39 OnReceivedFrameCallback* received_frame_callback)
40 : clock_(clock), 40 : size_(start_buffer_size),
41 size_(start_buffer_size), 41 clock_(clock),
42 max_size_(max_buffer_size), 42 max_size_(max_buffer_size),
43 first_seq_num_(0), 43 first_seq_num_(0),
44 first_packet_received_(false), 44 first_packet_received_(false),
45 is_cleared_to_first_seq_num_(false), 45 is_cleared_to_first_seq_num_(false),
46 data_buffer_(start_buffer_size), 46 data_buffer_(start_buffer_size),
47 sequence_buffer_(start_buffer_size), 47 sequence_buffer_(start_buffer_size),
48 received_frame_callback_(received_frame_callback) { 48 received_frame_callback_(received_frame_callback) {
49 RTC_DCHECK_LE(start_buffer_size, max_buffer_size); 49 RTC_DCHECK_LE(start_buffer_size, max_buffer_size);
50 // Buffer size must always be a power of 2. 50 // Buffer size must always be a power of 2.
51 RTC_DCHECK((start_buffer_size & (start_buffer_size - 1)) == 0); 51 RTC_DCHECK((start_buffer_size & (start_buffer_size - 1)) == 0);
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 missing_packets_.insert(*newest_inserted_seq_num_); 402 missing_packets_.insert(*newest_inserted_seq_num_);
403 ++*newest_inserted_seq_num_; 403 ++*newest_inserted_seq_num_;
404 } 404 }
405 } else { 405 } else {
406 missing_packets_.erase(seq_num); 406 missing_packets_.erase(seq_num);
407 } 407 }
408 } 408 }
409 409
410 } // namespace video_coding 410 } // namespace video_coding
411 } // namespace webrtc 411 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/video_coding/packet_buffer.h ('k') | webrtc/modules/video_coding/rtp_frame_reference_finder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698