Home
last modified time | relevance | path

Searched refs:buffer_ (Results 1 – 25 of 412) sorted by relevance

12345678910>>...17

/external/chromium_org/media/base/
Dseekable_buffer_unittest.cc18 SeekableBufferTest() : buffer_(kBufferSize, kBufferSize) { in SeekableBufferTest()
42 SeekableBuffer buffer_; member in media::SeekableBufferTest
54 bool should_append = buffer_.Append(data_ + write_position, write_size); in TEST_F()
57 EXPECT_EQ(write_position - read_position, buffer_.forward_bytes()); in TEST_F()
58 EXPECT_EQ(should_append, buffer_.forward_bytes() < kBufferSize) in TEST_F()
63 int bytes_copied = buffer_.Peek(write_buffer_, copy_size); in TEST_F()
69 int bytes_read = buffer_.Read(write_buffer_, read_size); in TEST_F()
74 EXPECT_EQ(write_position - read_position, buffer_.forward_bytes()); in TEST_F()
84 bool should_append = buffer_.Append(data_ + j, kWriteSize); in TEST_F()
87 EXPECT_EQ(j + kWriteSize, buffer_.forward_bytes()); in TEST_F()
[all …]
/external/chromium_org/net/ftp/
Dftp_ctrl_response_buffer_unittest.cc16 FtpCtrlResponseBufferTest() : buffer_(net::BoundNetLog()) { in FtpCtrlResponseBufferTest()
21 return buffer_.ConsumeData(data, strlen(data)); in PushDataToBuffer()
24 net::FtpCtrlResponseBuffer buffer_; member in __anon360cc1a90111::FtpCtrlResponseBufferTest
28 EXPECT_FALSE(buffer_.ResponseAvailable()); in TEST_F()
31 EXPECT_TRUE(buffer_.ResponseAvailable()); in TEST_F()
33 net::FtpCtrlResponse response = buffer_.PopResponse(); in TEST_F()
34 EXPECT_FALSE(buffer_.ResponseAvailable()); in TEST_F()
42 EXPECT_FALSE(buffer_.ResponseAvailable()); in TEST_F()
44 EXPECT_FALSE(buffer_.ResponseAvailable()); in TEST_F()
46 EXPECT_FALSE(buffer_.ResponseAvailable()); in TEST_F()
[all …]
/external/chromium_org/ppapi/proxy/
Daudio_buffer_resource.cc20 buffer_(buffer) { in AudioBufferResource()
21 DCHECK_EQ(buffer_->header.type, MediaStreamBuffer::TYPE_AUDIO); in AudioBufferResource()
25 CHECK(!buffer_) << "An unused (or unrecycled) buffer is destroyed."; in ~AudioBufferResource()
33 if (!buffer_) { in GetTimestamp()
37 return buffer_->audio.timestamp; in GetTimestamp()
41 if (!buffer_) { in SetTimestamp()
45 buffer_->audio.timestamp = timestamp; in SetTimestamp()
49 if (!buffer_) { in GetSampleRate()
53 return buffer_->audio.sample_rate; in GetSampleRate()
57 if (!buffer_) { in GetSampleSize()
[all …]
Dvideo_frame_resource.cc19 buffer_(buffer) { in VideoFrameResource()
20 DCHECK_EQ(buffer_->header.type, MediaStreamBuffer::TYPE_VIDEO); in VideoFrameResource()
24 CHECK(!buffer_) << "An unused (or unrecycled) frame is destroyed."; in ~VideoFrameResource()
32 if (!buffer_) { in GetTimestamp()
36 return buffer_->video.timestamp; in GetTimestamp()
40 if (!buffer_) { in SetTimestamp()
44 buffer_->video.timestamp = timestamp; in SetTimestamp()
48 if (!buffer_) { in GetFormat()
52 return buffer_->video.format; in GetFormat()
56 if (!buffer_) { in GetSize()
[all …]
/external/chromium_org/third_party/webrtc/modules/rtp_rtcp/source/
Drtp_format_vp8_test_helper.cc22 buffer_(NULL), in RtpFormatVp8TestHelper()
35 delete [] buffer_; in ~RtpFormatVp8TestHelper()
50 buffer_ = new uint8_t[buffer_size_]; in Init()
79 EXPECT_TRUE(packetizer->NextPacket(buffer_, &send_bytes, &last)); in GetAllPacketsAndCheck()
130 EXPECT_BIT_EQ(buffer_[0], 6, 0); // Check reserved bit. in CheckHeader()
136 EXPECT_BIT_X_EQ(buffer_[0], 1); in CheckHeader()
142 EXPECT_BIT_X_EQ(buffer_[0], 0); in CheckHeader()
145 EXPECT_BIT_N_EQ(buffer_[0], hdr_info_->nonReference ? 1 : 0); in CheckHeader()
146 EXPECT_BIT_S_EQ(buffer_[0], frag_start ? 1 : 0); in CheckHeader()
152 EXPECT_EQ(buffer_[0] & 0x0F, buffer_[payload_start_]); in CheckHeader()
[all …]
/external/protobuf/src/google/protobuf/io/
Dcoded_stream_unittest.cc129 static uint8 buffer_[kBufferSize]; member in google::protobuf::io::__anon9912398f0111::CodedStreamTest
132 uint8 CodedStreamTest::buffer_[CodedStreamTest::kBufferSize]; member in google::protobuf::io::__anon9912398f0111::CodedStreamTest
180 memcpy(buffer_, kVarintCases_case.bytes, kVarintCases_case.size); in TEST_2D()
181 ArrayInputStream input(buffer_, sizeof(buffer_), kBlockSizes_case); in TEST_2D()
195 memcpy(buffer_, kVarintCases_case.bytes, kVarintCases_case.size); in TEST_2D()
196 ArrayInputStream input(buffer_, sizeof(buffer_), kBlockSizes_case); in TEST_2D()
214 buffer_[0] = '\0'; in TEST_1D()
215 memcpy(buffer_ + 1, kVarintCases_case.bytes, kVarintCases_case.size); in TEST_1D()
216 ArrayInputStream input(buffer_, sizeof(buffer_)); in TEST_1D()
246 memcpy(buffer_, kVarintCases_case.bytes, kVarintCases_case.size); in TEST_1D()
[all …]
Dcoded_stream.cc71 buffer_end_ = buffer_; in BackUpInputToCurrentPosition()
172 buffer_ = NULL; in Skip()
173 buffer_end_ = buffer_; in Skip()
194 *data = buffer_; in GetDirectBufferPointer()
203 memcpy(buffer, buffer_, current_buffer_size); in ReadRaw()
210 memcpy(buffer, buffer_, size); in ReadRaw()
232 buffer->append(reinterpret_cast<const char*>(buffer_), in ReadStringFallback()
240 buffer->append(reinterpret_cast<const char*>(buffer_), size); in ReadStringFallback()
253 ptr = buffer_; in ReadLittleEndian32Fallback()
270 ptr = buffer_; in ReadLittleEndian64Fallback()
[all …]
/external/chromium_org/media/cast/net/rtp/
Dframe_buffer_unittest.cc20 FrameBuffer buffer_; member in media::cast::FrameBufferTest
32 buffer_.InsertPacket(&payload_[0], payload_.size(), rtp_header_); in TEST_F()
34 EXPECT_TRUE(buffer_.AssembleEncodedFrame(&frame)); in TEST_F()
42 EXPECT_FALSE(buffer_.Complete()); in TEST_F()
44 EXPECT_FALSE(buffer_.AssembleEncodedFrame(&frame)); in TEST_F()
48 buffer_.InsertPacket(&payload_[0], payload_.size(), rtp_header_); in TEST_F()
49 EXPECT_TRUE(buffer_.Complete()); in TEST_F()
50 EXPECT_FALSE(buffer_.is_key_frame()); in TEST_F()
52 EXPECT_TRUE(buffer_.AssembleEncodedFrame(&frame)); in TEST_F()
59 buffer_.InsertPacket(&payload_[0], payload_.size(), rtp_header_); in TEST_F()
[all …]
/external/chromium_org/third_party/protobuf/src/google/protobuf/io/
Dcoded_stream_unittest.cc135 static uint8 buffer_[kBufferSize]; member in google::protobuf::io::__anon2ddb04820111::CodedStreamTest
138 uint8 CodedStreamTest::buffer_[CodedStreamTest::kBufferSize]; member in google::protobuf::io::__anon2ddb04820111::CodedStreamTest
186 memcpy(buffer_, kVarintCases_case.bytes, kVarintCases_case.size); in TEST_2D()
187 ArrayInputStream input(buffer_, sizeof(buffer_), kBlockSizes_case); in TEST_2D()
201 memcpy(buffer_, kVarintCases_case.bytes, kVarintCases_case.size); in TEST_2D()
202 ArrayInputStream input(buffer_, sizeof(buffer_), kBlockSizes_case); in TEST_2D()
247 buffer_[0] = '\0'; in TEST_1D()
248 memcpy(buffer_ + 1, kVarintCases_case.bytes, kVarintCases_case.size); in TEST_1D()
249 ArrayInputStream input(buffer_, sizeof(buffer_)); in TEST_1D()
279 memcpy(buffer_, kVarintCases_case.bytes, kVarintCases_case.size); in TEST_1D()
[all …]
/external/chromium_org/remoting/base/
Dtyped_buffer.h26 TypedBuffer() : buffer_(NULL), length_(0) { in MOVE_ONLY_TYPE_FOR_CPP_03()
30 explicit TypedBuffer(uint32 length) : buffer_(NULL), length_(length) { in TypedBuffer()
32 buffer_ = reinterpret_cast<T*>(new uint8[length_]); in TypedBuffer()
36 TypedBuffer(RValue rvalue) : buffer_(NULL), length_(0) { in TypedBuffer()
43 if (buffer_) { in ~TypedBuffer()
44 delete[] reinterpret_cast<uint8*>(buffer_); in ~TypedBuffer()
45 buffer_ = NULL; in ~TypedBuffer()
60 assert(buffer_ != NULL);
61 return *buffer_;
64 assert(buffer_ != NULL);
[all …]
/external/chromium_org/net/tools/balsa/
Dbalsa_headers_test.cc23 buffer_.reset(new BalsaBuffer); in SetUp()
28 scoped_ptr<BalsaBuffer> buffer_; member in net::BalsaBufferTest
56 ASSERT_EQ(1u, buffer_->num_blocks()); in TEST_F()
61 StringPiece sp1 = buffer_->Write(StringPiece("hello"), &index1); in TEST_F()
62 StringPiece sp2 = buffer_->Write(StringPiece(", world"), &index2); in TEST_F()
64 ASSERT_EQ(2u, buffer_->num_blocks()); in TEST_F()
70 StringPiece(buffer_->GetPtr(1), buffer_->bytes_used(1))); in TEST_F()
79 StringPiece sp1 = buffer_->Write(as, &index1); in TEST_F()
80 StringPiece sp2 = buffer_->Write(bs, &index2); in TEST_F()
81 StringPiece sp3 = buffer_->Write(cs, &index3); in TEST_F()
[all …]
/external/chromium_org/content/browser/device_sensors/
Ddata_fetcher_shared_memory_win.cc100 DeviceOrientationHardwareBuffer* const buffer) : buffer_(buffer) {} in SensorEventSinkOrientation()
116 if (buffer_) { in UpdateSharedMemoryBuffer()
117 buffer_->seqlock.WriteBegin(); in UpdateSharedMemoryBuffer()
118 buffer_->data.alpha = alpha; in UpdateSharedMemoryBuffer()
119 buffer_->data.hasAlpha = has_alpha; in UpdateSharedMemoryBuffer()
120 buffer_->data.beta = beta; in UpdateSharedMemoryBuffer()
121 buffer_->data.hasBeta = has_beta; in UpdateSharedMemoryBuffer()
122 buffer_->data.gamma = gamma; in UpdateSharedMemoryBuffer()
123 buffer_->data.hasGamma = has_gamma; in UpdateSharedMemoryBuffer()
124 buffer_->data.absolute = true; in UpdateSharedMemoryBuffer()
[all …]
/external/chromium_org/third_party/webrtc/modules/audio_coding/neteq/
Dpacket_buffer.cc49 DeleteAllPackets(&buffer_); in Flush()
62 if (buffer_.size() >= max_number_of_packets_) { in InsertPacket()
72 buffer_.rbegin(), buffer_.rend(), in InsertPacket()
74 buffer_.insert(rit.base(), packet); // Insert the packet at that position. in InsertPacket()
126 *next_timestamp = buffer_.front()->header.timestamp; in NextTimestamp()
139 for (it = buffer_.begin(); it != buffer_.end(); ++it) { in NextHigherTimestamp()
153 return const_cast<const RTPHeader*>(&(buffer_.front()->header)); in NextRtpHeader()
162 Packet* packet = buffer_.front(); in GetNextPacket()
165 buffer_.pop_front(); in GetNextPacket()
172 buffer_.front()->header.timestamp == packet->header.timestamp) { in GetNextPacket()
[all …]
/external/chromium_org/device/serial/
Ddata_source_unittest.cc44 buffer_.reset(); in TearDown()
95 buffer_ = buffer.Pass(); in OnDataReceived()
96 buffer_contents_ = std::string(buffer_->GetData(), buffer_->GetSize()); in OnDataReceived()
119 scoped_ptr<ReadOnlyBuffer> buffer_; member in device::DataSourceTest
140 ASSERT_TRUE(buffer_); in TEST_F()
142 buffer_->Done(1); in TEST_F()
148 ASSERT_TRUE(buffer_); in TEST_F()
159 ASSERT_TRUE(buffer_); in TEST_F()
161 buffer_->Done(1); in TEST_F()
165 ASSERT_TRUE(buffer_); in TEST_F()
[all …]
/external/chromium_org/v8/src/
Dregexp-macro-assembler-irregexp-inl.h24 DCHECK(pc_ <= buffer_.length()); in Emit()
25 if (pc_ + 3 >= buffer_.length()) { in Emit()
28 *reinterpret_cast<uint32_t*>(buffer_.start() + pc_) = word; in Emit()
34 DCHECK(pc_ <= buffer_.length()); in Emit16()
35 if (pc_ + 1 >= buffer_.length()) { in Emit16()
38 *reinterpret_cast<uint16_t*>(buffer_.start() + pc_) = word; in Emit16()
44 DCHECK(pc_ <= buffer_.length()); in Emit8()
45 if (pc_ == buffer_.length()) { in Emit8()
48 *reinterpret_cast<unsigned char*>(buffer_.start() + pc_) = word; in Emit8()
54 DCHECK(pc_ <= buffer_.length()); in Emit32()
[all …]
/external/chromium_org/net/spdy/
Dhpack_input_stream.cc20 buffer_(buffer), in HpackInputStream()
26 return !buffer_.empty(); in HasMoreData()
47 if ((bit_offset_ > 0) || buffer_.empty()) in PeekNextOctet()
50 *next_octet = buffer_[0]; in PeekNextOctet()
58 buffer_.remove_prefix(1); in DecodeNextOctet()
105 if (size > buffer_.size()) in DecodeNextIdentityString()
108 *str = StringPiece(buffer_.data(), size); in DecodeNextIdentityString()
109 buffer_.remove_prefix(size); in DecodeNextIdentityString()
119 if (encoded_size > buffer_.size()) in DecodeNextHuffmanString()
124 StringPiece(buffer_.data(), encoded_size)); in DecodeNextHuffmanString()
[all …]
Dspdy_pinnable_buffer_piece.cc10 : buffer_(0), length_(0) {} in SpdyPinnableBufferPiece()
15 if (!storage_ && buffer_ != NULL && length_ != 0) { in Pin()
17 std::copy(buffer_, buffer_ + length_, storage_.get()); in Pin()
18 buffer_ = storage_.get(); in Pin()
27 const char* buffer = buffer_; in Swap()
28 buffer_ = other->buffer_; in Swap()
29 other->buffer_ = buffer; in Swap()
/external/chromium_org/net/disk_cache/blockfile/
Dmapped_file_avoid_mmap_posix.cc22 buffer_ = malloc(size); in Init()
24 if (buffer_ && snapshot_ && Read(buffer_, size, 0)) { in Init()
25 memcpy(snapshot_, buffer_, size); in Init()
27 free(buffer_); in Init()
29 buffer_ = snapshot_ = 0; in Init()
34 return buffer_; in Init()
38 DCHECK(buffer_); in Flush()
40 const char* buffer_ptr = static_cast<const char*>(buffer_); in Flush()
56 if (buffer_ && snapshot_) { in ~MappedFile()
59 free(buffer_); in ~MappedFile()
/external/chromium_org/third_party/leveldatabase/src/db/
Dlog_reader.cc24 buffer_(), in Reader()
75 uint64_t physical_record_offset = end_of_buffer_offset_ - buffer_.size(); in ReadRecord()
176 end_of_buffer_offset_ - buffer_.size() - bytes >= initial_offset_) { in ReportDrop()
183 if (buffer_.size() < kHeaderSize) { in ReadPhysicalRecord()
186 buffer_.clear(); in ReadPhysicalRecord()
187 Status status = file_->Read(kBlockSize, &buffer_, backing_store_); in ReadPhysicalRecord()
188 end_of_buffer_offset_ += buffer_.size(); in ReadPhysicalRecord()
190 buffer_.clear(); in ReadPhysicalRecord()
194 } else if (buffer_.size() < kBlockSize) { in ReadPhysicalRecord()
203 buffer_.clear(); in ReadPhysicalRecord()
[all …]
/external/chromium_org/chrome/renderer/net/
Dpredictor_queue.cc13 : buffer_(new char[size + 2]), in DnsQueue()
18 buffer_[buffer_sentinel_] = '\0'; // Guard byte to help reading data. in DnsQueue()
45 0 == strncmp(source, &buffer_[readable_], unsigned_length) && in Push()
46 '\0' == buffer_[readable_ + unsigned_length]) { in Push()
73 std::memcpy(&buffer_[dest], source, space_till_wrap); in Push()
77 DCHECK(static_cast<size_t>(space_till_wrap) == strlen(&buffer_[dest])); in Push()
85 std::memcpy(&buffer_[dest], source, length); in Push()
87 buffer_[dest + length] = '\0'; // We need termination in our buffer. in Push()
89 DCHECK(static_cast<size_t>(length) == strlen(&buffer_[dest])); in Push()
108 DCHECK('\0' == buffer_[buffer_sentinel_]); in Pop()
[all …]
/external/chromium_org/third_party/leveldatabase/src/table/
Dblock_builder.cc49 buffer_.clear(); in Reset()
58 return (buffer_.size() + // Raw data buffer in CurrentSizeEstimate()
66 PutFixed32(&buffer_, restarts_[i]); in Finish()
68 PutFixed32(&buffer_, restarts_.size()); in Finish()
70 return Slice(buffer_); in Finish()
77 assert(buffer_.empty() // No values yet? in Add()
88 restarts_.push_back(buffer_.size()); in Add()
94 PutVarint32(&buffer_, shared); in Add()
95 PutVarint32(&buffer_, non_shared); in Add()
96 PutVarint32(&buffer_, value.size()); in Add()
[all …]
/external/chromium_org/net/socket/
Dsocks5_client_socket.cc64 buffer_.clear(); in Connect()
286 if (buffer_.empty()) { in DoGreetWrite()
287 buffer_ = std::string(kSOCKS5GreetWriteData, in DoGreetWrite()
293 size_t handshake_buf_len = buffer_.size() - bytes_sent_; in DoGreetWrite()
295 memcpy(handshake_buf_->data(), &buffer_.data()[bytes_sent_], in DoGreetWrite()
306 if (bytes_sent_ == buffer_.size()) { in DoGreetWriteComplete()
307 buffer_.clear(); in DoGreetWriteComplete()
334 buffer_.append(handshake_buf_->data(), result); in DoGreetReadComplete()
341 if (buffer_[0] != kSOCKS5Version) { in DoGreetReadComplete()
343 NetLog::IntegerCallback("version", buffer_[0])); in DoGreetReadComplete()
[all …]
/external/chromium_org/ppapi/native_client/src/untrusted/nacl_ppapi_util/
Dstring_buffer.cc16 buffer_ = reinterpret_cast<char *>(malloc(nbytes_)); in StringBuffer()
17 if (NULL == buffer_) { in StringBuffer()
21 buffer_[0] = '\0'; in StringBuffer()
26 buffer_[0] = '\0'; in DiscardOutput()
32 free(buffer_); in ~StringBuffer()
33 buffer_ = NULL; in ~StringBuffer()
45 insert_pt = buffer_ + insert_; in Printf()
54 new_buffer = reinterpret_cast<char *>(realloc(buffer_, 2 * nbytes_)); in Printf()
61 buffer_ = new_buffer; in Printf()
/external/chromium_org/sandbox/win/src/
Dinternal_types.h31 CountedBuffer(void* buffer, uint32 size) : size_(size), buffer_(buffer) {} in CountedBuffer()
38 return buffer_; in Buffer()
43 void* buffer_; variable
51 buffer_.vp = buffer; in IPCInt()
55 buffer_.vp = NULL; in IPCInt()
56 buffer_.i32 = i32; in IPCInt()
60 return buffer_.i32; in As32Bit()
64 return buffer_.vp; in AsVoidPtr()
71 } buffer_; variable
/external/chromium_org/chrome/installer/mini_installer/
Dmini_string.h76 buffer_[kCapacity] = L'\0'; // We always reserve 1 more than asked for. in StackString()
90 return buffer_; in get()
94 return SafeStrCopy(buffer_, kCapacity, str); in assign()
98 return SafeStrCat(buffer_, kCapacity, str); in append()
102 buffer_[0] = L'\0'; in clear()
106 return SafeStrLen(buffer_, kCapacity); in length()
111 return SearchStringI(buffer_, find); in findi()
116 return lstrcmpiW(buffer_, str); in comparei()
121 return lstrcmpW(buffer_, str); in compare()
130 buffer_[location] = L'\0'; in truncate_at()
[all …]

12345678910>>...17