Home
last modified time | relevance | path

Searched refs:mtp_data_header (Results 1 – 3 of 3) sorted by relevance

/frameworks/av/media/mtp/tests/
DMtpFfsHandle_test.cpp153 char buf[size + sizeof(mtp_data_header) + 1]; in TEST_F()
154 buf[size + sizeof(mtp_data_header)] = '\0'; in TEST_F()
164 EXPECT_EQ(read(bulk_in, buf, size + sizeof(mtp_data_header)), in TEST_F()
165 static_cast<long>(size + sizeof(mtp_data_header))); in TEST_F()
167 struct mtp_data_header *header = reinterpret_cast<struct mtp_data_header*>(buf); in TEST_F()
168 EXPECT_STREQ(buf + sizeof(mtp_data_header), ss.str().c_str()); in TEST_F()
169 EXPECT_EQ(header->length, static_cast<unsigned int>(size + sizeof(mtp_data_header))); in TEST_F()
182 char buf[size + sizeof(mtp_data_header) + 1]; in TEST_F()
183 buf[size + sizeof(mtp_data_header)] = '\0'; in TEST_F()
193 EXPECT_EQ(read(bulk_in, buf, size + sizeof(mtp_data_header)), in TEST_F()
[all …]
/frameworks/av/media/mtp/
DMtpFfsHandle.cpp620 file_length + sizeof(mtp_data_header)); in sendFile()
635 static_cast<uint64_t>(packet_size - sizeof(mtp_data_header)), file_length); in sendFile()
651 mtp_data_header *header = reinterpret_cast<mtp_data_header*>(data); in sendFile()
660 sizeof(mtp_data_header), init_read_len, offset)) in sendFile()
662 if (writeHandle(mBulkIn, data, sizeof(mtp_data_header) + init_read_len) == -1) return -1; in sendFile()
665 ret = init_read_len + sizeof(mtp_data_header); in sendFile()
DMtpFfsHandle.h75 struct mtp_data_header { struct