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

Side by Side Diff: remoting/base/compound_buffer.h

Issue 1736633002: remoting: Add out-of-line copy ctors for complex classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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 | remoting/base/compound_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 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // CompoundBuffer implements a data buffer that is composed of several pieces, 5 // CompoundBuffer implements a data buffer that is composed of several pieces,
6 // each stored in a refcounted IOBuffer. It is needed for encoding/decoding 6 // each stored in a refcounted IOBuffer. It is needed for encoding/decoding
7 // video pipeline to represent data packet and minimize data copying. 7 // video pipeline to represent data packet and minimize data copying.
8 // It is particularly useful for splitting data between multiple RTP packets 8 // It is particularly useful for splitting data between multiple RTP packets
9 // and assembling them into one buffer on the receiving side. 9 // and assembling them into one buffer on the receiving side.
10 // 10 //
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 79
80 // Clears the buffer, and initializes it with the interval from |buffer| 80 // Clears the buffer, and initializes it with the interval from |buffer|
81 // starting at |start| and ending at |end|. The data itself isn't copied. 81 // starting at |start| and ending at |end|. The data itself isn't copied.
82 void CopyFrom(const CompoundBuffer& source, int start, int end); 82 void CopyFrom(const CompoundBuffer& source, int start, int end);
83 83
84 private: 84 private:
85 friend class CompoundBufferInputStream; 85 friend class CompoundBufferInputStream;
86 86
87 struct DataChunk { 87 struct DataChunk {
88 DataChunk(net::IOBuffer* buffer, const char* start, int size); 88 DataChunk(net::IOBuffer* buffer, const char* start, int size);
89 DataChunk(const DataChunk& other);
89 ~DataChunk(); 90 ~DataChunk();
90 91
91 scoped_refptr<net::IOBuffer> buffer; 92 scoped_refptr<net::IOBuffer> buffer;
92 const char* start; 93 const char* start;
93 int size; 94 int size;
94 }; 95 };
95 typedef std::deque<DataChunk> DataChunkList; 96 typedef std::deque<DataChunk> DataChunkList;
96 97
97 DataChunkList chunks_; 98 DataChunkList chunks_;
98 int total_bytes_; 99 int total_bytes_;
(...skipping 22 matching lines...) Expand all
121 122
122 size_t current_chunk_; 123 size_t current_chunk_;
123 int current_chunk_position_; 124 int current_chunk_position_;
124 int position_; 125 int position_;
125 int last_returned_size_; 126 int last_returned_size_;
126 }; 127 };
127 128
128 } // namespace remoting 129 } // namespace remoting
129 130
130 #endif // REMOTING_BASE_COMPOUND_BUFFER_H_ 131 #endif // REMOTING_BASE_COMPOUND_BUFFER_H_
OLDNEW
« no previous file with comments | « no previous file | remoting/base/compound_buffer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698