Home
last modified time | relevance | path

Searched refs:bytes_read (Results 1 – 25 of 47) sorted by relevance

12

/packages/modules/Bluetooth/tools/rootcanal/model/setup/
Dtest_channel_transport.cc49 ssize_t bytes_read = socket->Recv(&command_name_size, 1); in OnCommandReady() local
50 if (bytes_read != 1) { in OnCommandReady()
51 INFO("Unexpected (command_name_size) bytes_read: {} != {}, {}", bytes_read, 1, strerror(errno)); in OnCommandReady()
56 bytes_read = socket->Recv(command_name_raw.data(), command_name_size); in OnCommandReady()
57 if (bytes_read != command_name_size) { in OnCommandReady()
58 INFO("Unexpected (command_name) bytes_read: {} != {}, {}", bytes_read, command_name_size, in OnCommandReady()
71 bytes_read = socket->Recv(&num_args, 1); in OnCommandReady()
72 if (bytes_read != 1) { in OnCommandReady()
73 INFO("Unexpected (num_args) bytes_read: {} != {}, {}", bytes_read, 1, strerror(errno)); in OnCommandReady()
78 bytes_read = socket->Recv(&arg_size, 1); in OnCommandReady()
[all …]
/packages/services/Car/cpp/bugreport/
Dmain.cpp144 ssize_t bytes_read = TEMP_FAILURE_RETRY(read(fd, buffer, sizeof(buffer))); in zipFilesToFd() local
145 if (bytes_read == 0) { in zipFilesToFd()
148 if (bytes_read == -1) { in zipFilesToFd()
157 error = writer->WriteBytes(buffer, bytes_read); in zipFilesToFd()
178 ssize_t bytes_read = TEMP_FAILURE_RETRY(read(fd_in, buffer, buffer_len)); in copyTo() local
179 if (bytes_read == 0) { in copyTo()
182 if (bytes_read == -1) { in copyTo()
192 if (!android::base::WriteFully(fd_out, buffer, bytes_read)) { in copyTo()
196 return bytes_read; in copyTo()
248 ssize_t bytes_read = copyTo(s, progress_socket, buffer, sizeof(buffer)); in doBugreport() local
[all …]
/packages/modules/Bluetooth/system/gd/hal/
Dsnoop_logger_socket_thread_test.cc187 int bytes_read = -1; in TEST_F() local
196 bytes_read = a.get(); in TEST_F()
197 ASSERT_EQ(bytes_read, -1); in TEST_F()
223 int bytes_read = -1; in TEST_F() local
232 bytes_read = a.get(); in TEST_F()
234 ASSERT_EQ(bytes_read, static_cast<int>(sizeof(SnoopLoggerCommon::FileHeaderType))); in TEST_F()
235 ASSERT_EQ(0, std::memcmp(recv_buf, &SnoopLoggerCommon::kBtSnoopFileHeader, bytes_read)); in TEST_F()
265 int bytes_read = -1; in TEST_F() local
276 bytes_read = a.get(); in TEST_F()
280 ASSERT_EQ(bytes_read, static_cast<int>(sizeof(test_data))); in TEST_F()
[all …]
Dhci_hal_host_test.cc251 size_t bytes_read = 0; in read_with_retry() local
254 bytes_read_current = read(socket, data + bytes_read, length - bytes_read); in read_with_retry()
255 bytes_read += bytes_read_current; in read_with_retry()
256 } while (length > bytes_read && bytes_read_current > 0); in read_with_retry()
257 return bytes_read; in read_with_retry()
/packages/modules/Bluetooth/system/bta/hearing_aid/
Dhearing_aid_audio_source.cc78 uint32_t bytes_read = 0; in send_audio_data() local
80 bytes_read = bluetooth::audio::hearing_aid::read(p_buf, bytes_per_tick); in send_audio_data()
83 log::debug("bytes_read: {}", bytes_read); in send_audio_data()
84 if (bytes_read < bytes_per_tick) { in send_audio_data()
85 stats.media_read_total_underflow_bytes += bytes_per_tick - bytes_read; in send_audio_data()
90 std::vector<uint8_t> data(p_buf, p_buf + bytes_read); in send_audio_data()
/packages/modules/Bluetooth/tools/rootcanal/model/hci/
Dh4_parser.cc103 bool H4Parser::Consume(const uint8_t* buffer, int32_t bytes_read) { in Consume() argument
105 if (bytes_read <= 0) { in Consume()
109 if ((uint32_t)bytes_read > BytesRequested()) { in Consume()
110 FATAL("More bytes read ({}) than expected ({})!", bytes_read, bytes_to_read); in Consume()
158 packet_.insert(packet_.end(), buffer, buffer + bytes_read); in Consume()
159 bytes_wanted_ -= bytes_read; in Consume()
Dh4_data_channel_packetizer.cc70 ssize_t bytes_read = socket->Recv(buffer.data(), bytes_to_read); in OnDataReady() local
71 if (bytes_read == 0) { in OnDataReady()
77 if (bytes_read < 0) { in OnDataReady()
90 h4_parser_.Consume(buffer.data(), bytes_read); in OnDataReady()
/packages/modules/Bluetooth/system/stack/a2dp/
Da2dp_aac_encoder_linux.cc136 static bool a2dp_aac_read_feeding(uint8_t* read_buffer, uint32_t* bytes_read);
303 uint32_t bytes_read = 0; in a2dp_aac_encode_frames() local
304 if (!a2dp_aac_read_feeding(read_buffer, &bytes_read)) { in a2dp_aac_encode_frames()
319 codec_intf.encode_pcm(read_buffer, bytes_read, (uint8_t*)(p_buf + 1) + p_buf->offset, in a2dp_aac_encode_frames()
344 if (!a2dp_aac_encoder_cb.enqueue_callback(p_buf, 1, bytes_read)) { in a2dp_aac_encode_frames()
350 static bool a2dp_aac_read_feeding(uint8_t* read_buffer, uint32_t* bytes_read) { in a2dp_aac_read_feeding() argument
361 *bytes_read = nb_byte_read; in a2dp_aac_read_feeding()
Da2dp_vendor_aptx_encoder.cc315 uint32_t bytes_read = 0; in a2dp_vendor_aptx_send_frames() local
322 bytes_read = a2dp_aptx_encoder_cb.read_callback((uint8_t*)read_buffer16, expected_read_bytes); in a2dp_vendor_aptx_send_frames()
323 a2dp_aptx_encoder_cb.stats.media_read_total_actual_read_bytes += bytes_read; in a2dp_vendor_aptx_send_frames()
324 if (bytes_read < expected_read_bytes) { in a2dp_vendor_aptx_send_frames()
325 log::warn("underflow at PCM reading: read {} bytes instead of {}", bytes_read, in a2dp_vendor_aptx_send_frames()
359 a2dp_aptx_encoder_cb.enqueue_callback(p_buf, 1, bytes_read); in a2dp_vendor_aptx_send_frames()
Da2dp_vendor_aptx_hd_encoder.cc296 uint32_t bytes_read = 0; in a2dp_vendor_aptx_hd_send_frames() local
303 bytes_read = a2dp_aptx_hd_encoder_cb.read_callback((uint8_t*)read_buffer32, expected_read_bytes); in a2dp_vendor_aptx_hd_send_frames()
304 a2dp_aptx_hd_encoder_cb.stats.media_read_total_actual_read_bytes += bytes_read; in a2dp_vendor_aptx_hd_send_frames()
305 if (bytes_read < expected_read_bytes) { in a2dp_vendor_aptx_hd_send_frames()
306 log::warn("underflow at PCM reading: read {} bytes instead of {}", bytes_read, in a2dp_vendor_aptx_hd_send_frames()
340 a2dp_aptx_hd_encoder_cb.enqueue_callback(p_buf, 1, bytes_read); in a2dp_vendor_aptx_hd_send_frames()
Da2dp_vendor_opus_encoder.cc101 static bool a2dp_opus_read_feeding(uint8_t* read_buffer, uint32_t* bytes_read);
353 uint32_t bytes_read = 0; in a2dp_opus_encode_frames() local
367 bytes_read += temp_bytes_read; in a2dp_opus_encode_frames()
419 if (!a2dp_opus_encoder_cb.enqueue_callback(p_buf, done_nb_frame, bytes_read)) { in a2dp_opus_encode_frames()
429 static bool a2dp_opus_read_feeding(uint8_t* read_buffer, uint32_t* bytes_read) { in a2dp_opus_read_feeding() argument
452 *bytes_read = nb_byte_read; in a2dp_opus_read_feeding()
Da2dp_vendor_ldac_encoder.cc131 static bool a2dp_ldac_read_feeding(uint8_t* read_buffer, uint32_t* bytes_read);
432 uint32_t bytes_read = 0; in a2dp_ldac_encode_frames() local
447 bytes_read += temp_bytes_read; in a2dp_ldac_encode_frames()
500 if (!a2dp_ldac_encoder_cb.enqueue_callback(p_buf, done_nb_frame, bytes_read)) { in a2dp_ldac_encode_frames()
514 static bool a2dp_ldac_read_feeding(uint8_t* read_buffer, uint32_t* bytes_read) { in a2dp_ldac_read_feeding() argument
536 *bytes_read = nb_byte_read; in a2dp_ldac_read_feeding()
Da2dp_aac_encoder.cc112 static bool a2dp_aac_read_feeding(uint8_t* read_buffer, uint32_t* bytes_read);
547 uint32_t bytes_read = 0; in a2dp_aac_encode_frames() local
548 if (a2dp_aac_read_feeding(read_buffer, &bytes_read)) { in a2dp_aac_encode_frames()
580 total_bytes_read += bytes_read; in a2dp_aac_encode_frames()
613 static bool a2dp_aac_read_feeding(uint8_t* read_buffer, uint32_t* bytes_read) { in a2dp_aac_read_feeding() argument
624 *bytes_read = nb_byte_read; in a2dp_aac_read_feeding()
/packages/modules/Bluetooth/system/gd/rust/linux/utils/src/
Dsocket.rs344 let mut bytes_read; in read_mgmt_packet() localVariable
346 bytes_read = libc::read( in read_mgmt_packet()
353 let retry = (bytes_read == -1) in read_mgmt_packet()
362 if bytes_read == -1 { in read_mgmt_packet()
370 if bytes_read < (MGMT_PKT_HEADER_SIZE as isize) { in read_mgmt_packet()
371 debug!("read_mgmt_packet got {} bytes (not enough for header)", bytes_read); in read_mgmt_packet()
376 (bytes_read - (MGMT_PKT_HEADER_SIZE as isize)).try_into().unwrap(); in read_mgmt_packet()
/packages/modules/Bluetooth/system/audio_hal_interface/
Da2dp_encoding_host.cc293 uint32_t bytes_read = 0; in read() local
297 bytes_read = UIPC_Read(*a2dp_uipc, UIPC_CH_ID_AV_AUDIO, p_buf, len); in read()
298 total_bytes_read_ += bytes_read; in read()
302 return bytes_read; in read()
/packages/modules/Bluetooth/system/gd/os/linux_generic/
Dalarm.cc83 auto bytes_read = read(fd_, &times_invoked, sizeof(uint64_t)); in on_fire() local
86 if (bytes_read == -1) { in on_fire()
94 log::assert_that(bytes_read == static_cast<ssize_t>(sizeof(uint64_t)), in on_fire()
Drepeating_alarm.cc77 auto bytes_read = read(fd_, &times_invoked, sizeof(uint64_t)); in on_fire() local
80 log::assert_that(bytes_read == static_cast<ssize_t>(sizeof(uint64_t)), in on_fire()
/packages/services/Car/cpp/security/vehicle_binding_util/src/
DVehicleBindingUtil.cpp128 ssize_t bytes_read; in fill() local
130 while ((bytes_read = TEMP_FAILURE_RETRY(read(fd, bufptr, size))) > 0) { in fill()
131 size -= bytes_read; in fill()
132 bufptr += bytes_read; in fill()
/packages/modules/adb/client/
Dincremental.cpp240 int bytes_read; in wait_for_installation() local
243 while ((bytes_read = adb_read(read_fd, child_stdout.data() + buf_size, in wait_for_installation()
246 fprintf(stdout, "%.*s", bytes_read, child_stdout.data() + buf_size); in wait_for_installation()
248 buf_size += bytes_read; in wait_for_installation()
Dincremental_server.cpp161 int64_t bytes_read = -1; in ReadDataBlock() local
163 bytes_read = adb_pread(fd_, buf, kBlockSize, offsetStart); in ReadDataBlock()
164 return bytes_read; in ReadDataBlock()
167 int64_t bytes_read = -1; in ReadTreeBlock() local
169 bytes_read = adb_pread(tree_fd_, buf, kBlockSize, offsetStart); in ReadTreeBlock()
170 return bytes_read; in ReadTreeBlock()
/packages/modules/Bluetooth/system/audio_hal_interface/aidl/
Dhearing_aid_software_encoding_aidl.cc126 void LogBytesRead(size_t bytes_read) override { in LogBytesRead() argument
127 if (bytes_read) { in LogBytesRead()
128 total_bytes_read_ += bytes_read; in LogBytesRead()
Dhfp_client_interface_aidl.h72 void LogBytesProcessed(size_t bytes_read);
151 void LogBytesRead(size_t bytes_read) override;
/packages/modules/Virtualization/guest/rialto/src/
Dcommunication.rs103 let bytes_read = in recv() localVariable
109 if buffer_available_bytes == 0 && bytes_read > 0 { in recv()
112 Ok(bytes_read) in recv()
/packages/modules/Bluetooth/system/audio_hal_interface/hidl/
Dhearing_aid_software_encoding_hidl.cc125 void LogBytesRead(size_t bytes_read) override { in LogBytesRead() argument
126 if (bytes_read) { in LogBytesRead()
127 total_bytes_read_ += bytes_read; in LogBytesRead()
/packages/modules/adb/tls/
Dtls_connection.cpp330 int bytes_read = in ReadFully() local
332 if (bytes_read <= 0) { in ReadFully()
336 size -= bytes_read; in ReadFully()
337 offset += bytes_read; in ReadFully()

12