Home
last modified time | relevance | path

Searched refs:bufData (Results 1 - 25 of 29) sorted by relevance

12

/foundation/distributedhardware/distributed_hardware_fwk/av_transport/common/src/
H A Dav_trans_buffer.cpp37 auto bufData = std::make_shared<BufferData>(capacity); in CreateBufferData() local
38 data_.push_back(bufData); in CreateBufferData()
39 return bufData; in CreateBufferData()
48 auto bufData = std::make_shared<BufferData>(capacity, in WrapBufferData() local
50 bufData->SetSize(size); in WrapBufferData()
51 data_.push_back(bufData); in WrapBufferData()
52 return bufData; in WrapBufferData()
105 BufferData::BufferData(size_t capacity, std::shared_ptr<uint8_t> bufData) in BufferData() argument
106 : capacity_(capacity), size_(0), address_(std::move(bufData)) in BufferData()
/foundation/multimedia/media_foundation/engine/plugin/plugins/source/file_source/
H A Dfile_fd_source_plugin.cpp90 std::shared_ptr<Memory> bufData; in Read() local
92 bufData = buffer->AllocMemory(GetAllocator(), expectedLen); in Read()
94 bufData = buffer->GetMemory(); in Read()
97 expectedLen = std::min(bufData->GetCapacity(), expectedLen); in Read()
99 auto size = read(fd_, bufData->GetWritableAddr(expectedLen), expectedLen); in Read()
100 bufData->UpdateDataSize(size); in Read()
101 position_ += bufData->GetSize(); in Read()
102 MEDIA_LOG_DD("position_: " PUBLIC_LOG_U64 ", readSize: " PUBLIC_LOG_ZU, position_, bufData->GetSize()); in Read()
H A Dfile_source_plugin.cpp159 std::shared_ptr<Memory> bufData; in Read() local
163 bufData = buffer->AllocMemory(GetAllocator(), expectedLen); in Read()
165 bufData = buffer->GetMemory(); in Read()
168 expectedLen = std::min(bufData->GetCapacity(), expectedLen); in Read()
171 auto size = std::fread(bufData->GetWritableAddr(expectedLen), sizeof(char), expectedLen, fp_); in Read()
172 bufData->UpdateDataSize(size); in Read()
173 position_ += bufData->GetSize(); in Read()
174 MEDIA_LOG_DD("position_: " PUBLIC_LOG_U64 ", readSize: " PUBLIC_LOG_ZU, position_, bufData->GetSize()); in Read()
/foundation/multimedia/av_codec/services/media_engine/plugins/source/
H A Dfile_source_plugin.cpp176 std::shared_ptr<Memory> bufData; in Read() local
180 bufData = buffer->AllocMemory(GetAllocator(), expectedLen); in Read()
182 bufData = buffer->GetMemory(); in Read()
184 if (bufData == nullptr) { in Read()
188 expectedLen = std::min(bufData->GetCapacity(), expectedLen); in Read()
191 auto bufDataAddr = bufData->GetWritableAddr(expectedLen); in Read()
193 MEDIA_LOG_E("Read bufData GetWritableAddr fail"); in Read()
196 void* addr = bufData->GetWritableAddr(expectedLen); in Read()
201 bufData->UpdateDataSize(size); in Read()
202 position_ += bufData in Read()
[all...]
H A Dfile_fd_source_plugin.cpp174 std::shared_ptr<Memory> bufData = GetBufferPtr(buffer, expectedLen); in ReadOfflineFile() local
175 FALSE_RETURN_V_MSG_E(bufData != nullptr, Status::ERROR_NO_MEMORY, "memory is not enough"); in ReadOfflineFile()
177 expectedLen = std::min(bufData->GetCapacity(), expectedLen); in ReadOfflineFile()
180 auto size = read(fd_, bufData->GetWritableAddr(expectedLen), expectedLen); in ReadOfflineFile()
186 bufData->UpdateDataSize(size); in ReadOfflineFile()
207 std::shared_ptr<Memory> bufData = GetBufferPtr(buffer, expectedLen); in ReadOnlineFile() local
208 FALSE_RETURN_V_MSG_E(bufData != nullptr, Status::ERROR_NO_MEMORY, "memory is not enough"); in ReadOnlineFile()
210 expectedLen = std::min(bufData->GetCapacity(), expectedLen); in ReadOnlineFile()
224 size_t size = ringBuffer_->ReadBuffer(bufData->GetWritableAddr(expectedLen), expectedLen, READ_RETRY); in ReadOnlineFile()
229 bufData in ReadOnlineFile()
647 std::shared_ptr<Memory> bufData; GetBufferPtr() local
[all...]
/foundation/multimedia/media_foundation/engine/plugin/plugins/demuxer/minimp4_demuxer/
H A Dminimp4_demuxer_plugin.cpp174 auto bufData = buffer->AllocMemory(nullptr, readSize); in DoReadFromSource() local
186 MEDIA_LOG_D("bufData->GetSize() " PUBLIC_LOG_ZU, bufData->GetSize()); in DoReadFromSource()
187 if (bufData->GetSize() > 0) { in DoReadFromSource()
188 if (readSize >= bufData->GetSize()) { in DoReadFromSource()
190 const_cast<uint8_t *>(bufData->GetReadOnlyData()), bufData->GetSize()); in DoReadFromSource()
192 MEDIA_LOG_E("Error: readSize < bufData->GetSize()"); in DoReadFromSource()
195 ioContext_.offset += bufData->GetSize(); in DoReadFromSource()
196 ioDataRemainSize_ += bufData in DoReadFromSource()
445 auto bufData = buffer->AllocMemory(nullptr, sizeof(m4aCheck)); Sniff() local
[all...]
/foundation/multimedia/media_foundation/test/unittest/plugins/
H A DUtDemuxerTest1.cpp23 auto bufData = Buffer::CreateDefaultBuffer(BufferMetaType::AUDIO, bufferSize); in Sniff() local
24 if (dataSource->ReadAt(0, bufData, bufferSize) == Status::OK) { in Sniff()
25 const uint8_t* data = bufData->GetMemory()->GetReadOnlyData(); in Sniff()
/foundation/multimedia/media_foundation/engine/plugin/plugins/demuxer/aac_demuxer/
H A Daac_demuxer_plugin.cpp80 auto bufData = buffer->AllocMemory(nullptr, readSize); in DoReadFromSource() local
93 MEDIA_LOG_D("bufData->GetSize() " PUBLIC_LOG_ZU, bufData->GetSize()); in DoReadFromSource()
94 if (bufData->GetSize() > 0) { in DoReadFromSource()
95 if (readSize >= bufData->GetSize()) { in DoReadFromSource()
97 const_cast<uint8_t *>(bufData->GetReadOnlyData()), bufData->GetSize()); in DoReadFromSource()
99 MEDIA_LOG_E("Error: readSize < bufData->GetSize()"); in DoReadFromSource()
103 ioContext_.offset += bufData->GetSize(); in DoReadFromSource()
105 ioDataRemainSize_ += bufData in DoReadFromSource()
420 auto bufData = buffer->AllocMemory(nullptr, PROBE_READ_LENGTH); Sniff() local
[all...]
/foundation/multimedia/media_foundation/engine/plugin/plugins/source/video_capture/
H A Dvideo_file_capture_plugin.cpp246 std::shared_ptr<Memory> bufData; in Read() local
248 bufData = buffer->AllocMemory(GetAllocator(), expectedLen); in Read()
250 bufData = buffer->GetMemory(); in Read()
252 FALSE_RETURN_V_MSG_E(bufData != nullptr && bufData->GetMemoryType() == MemoryType::VIRTUAL_ADDR || in Read()
253 bufData->GetCapacity() > 0, Status::ERROR_NO_MEMORY, "buffer memory is invalid"); in Read()
260 FALSE_RETURN_V_MSG_E(bufData->Write(cacheFrame_, bufferSize_) == bufferSize_, in Read()
H A Dvideo_capture_plugin.cpp298 std::shared_ptr<Memory> bufData; in Read() local
300 bufData = buffer->AllocMemory(GetAllocator(), expectedLen); in Read()
302 bufData = buffer->GetMemory(); in Read()
304 if (bufData->GetMemoryType() != MemoryType::VIRTUAL_ADDR || bufData->GetCapacity() <= 0) { in Read()
317 auto writeSize = bufData->Write(static_cast<const uint8_t*>(surfaceBuffer_->GetVirAddr()), bufferSize_); in Read()
/foundation/multimedia/media_foundation/engine/plugin/plugins/source/http_lite_source/
H A Dhttp_lite_source_plugin.cpp266 std::shared_ptr<Memory> bufData; in Read() local
269 bufData = buffer->AllocMemory(GetAllocator(), expectedLen); in Read()
271 bufData = buffer->GetMemory(); in Read()
285 MEDIA_LOG_D("bufData->GetCapacity() " PUBLIC_LOG_ZU, bufData->GetCapacity()); in Read()
286 httpHandle_->HttpRead(bufData->GetWritableAddr(expectedLen), expectedLen, realReadSize, isEos); in Read()
294 bufData->UpdateDataSize(realReadSize); in Read()
297 position_, bufData->GetSize(), isEos); in Read()
/foundation/multimedia/media_foundation/engine/plugin/plugins/source/http_source/
H A Dhttp_source_plugin.cpp190 std::shared_ptr<Memory>bufData; in Read() local
192 bufData = buffer->AllocMemory(GetAllocator(), expectedLen); in Read()
194 bufData = buffer->GetMemory(); in Read()
199 bool result = downloader_->Read(bufData->GetWritableAddr(expectedLen), expectedLen, realReadSize, isEos); in Read()
200 bufData->UpdateDataSize(realReadSize); in Read()
201 MEDIA_LOG_D("Read finished, read size = " PUBLIC_LOG_ZU ", isEos " PUBLIC_LOG_D32, bufData->GetSize(), isEos); in Read()
/foundation/multimedia/media_foundation/engine/plugin/plugins/minimp3_adapter/
H A Dminimp3_demuxer_plugin.cpp101 auto bufData = buffer->AllocMemory(nullptr, readSize); in DoReadFromSource() local
108 if (bufData->GetSize() == 0 && retryTimes < 200 && ioDataRemainSize_ == 0) { // 200 in DoReadFromSource()
109 MEDIA_LOG_DD("bufData->GetSize() == 0 retryTimes = " PUBLIC_LOG_D32, retryTimes); in DoReadFromSource()
116 MEDIA_LOG_DD("bufData->GetSize() " PUBLIC_LOG "d", bufData->GetSize()); in DoReadFromSource()
117 if (bufData->GetSize() > 0) { in DoReadFromSource()
118 if (readSize < bufData->GetSize()) { in DoReadFromSource()
119 MEDIA_LOG_E("Error: ioNeedReadSize < bufData->GetSize()"); in DoReadFromSource()
123 const_cast<uint8_t *>(bufData->GetReadOnlyData()), bufData in DoReadFromSource()
678 auto bufData = buffer->AllocMemory(nullptr, PROBE_READ_LENGTH); Sniff() local
[all...]
/foundation/multimedia/av_codec/services/media_engine/plugins/source/http_source/
H A Dhttp_source_plugin.cpp268 std::shared_ptr<Memory>bufData; in Read() local
271 bufData = buffer->AllocMemory(nullptr, expectedLen); in Read()
273 bufData = buffer->GetMemory(); in Read()
276 if (bufData == nullptr) { in Read()
286 auto result = downloader_->Read(bufData->GetWritableAddr(expectedLen), readDataInfo); in Read()
289 bufData->UpdateDataSize(readDataInfo.realReadLength_); in Read()
295 PUBLIC_LOG_D32, bufData->GetSize(), readDataInfo.nextStreamId_, readDataInfo.isEos_); in Read()
/foundation/multimedia/av_codec/services/media_engine/modules/source/audio_capture/
H A Daudio_capture_module.cpp314 std::shared_ptr<AVMemory> bufData = buffer->memory_; in Read() local
315 if (bufData->GetCapacity() <= 0) { in Read()
329 size = audioCapturer_->Read(*bufData->GetAddr(), expectedLen, true); in Read()
334 TrackMaxAmplitude((int16_t *)bufData->GetAddr(), in Read()
335 static_cast<int32_t>(static_cast<uint32_t>(bufData->GetSize()) >> 1)); in Read()
/foundation/multimedia/media_foundation/engine/plugin/plugins/source/audio_capture/
H A Daudio_capture_plugin.cpp436 std::shared_ptr<Memory> bufData; in Read() local
438 bufData = buffer->AllocMemory(GetAllocator(), expectedLen); in Read()
440 bufData = buffer->GetMemory(); in Read()
442 if (bufData->GetCapacity() <= 0) { in Read()
453 size = audioCapturer_->Read(*bufData->GetWritableAddr(expectedLen), expectedLen, true); in Read()
/foundation/multimedia/media_foundation/src/plugin/
H A Dplugin_buffer.cpp22 Memory::Memory(size_t capacity, std::shared_ptr<uint8_t> bufData, size_t align, MemoryType type) in Memory() argument
24 offset(0), size(0), allocator(nullptr), addr(std::move(bufData)) in Memory()
/foundation/multimedia/media_foundation/engine/include/plugin/common/
H A Dplugin_memory.h160 * @param bufData External memory.
163 Memory(size_t capacity, std::shared_ptr<uint8_t> bufData,
/foundation/multimedia/media_foundation/interface/inner_api/plugin/
H A Dplugin_memory.h150 * @param bufData External memory.
153 Memory(size_t capacity, std::shared_ptr<uint8_t> bufData,
/foundation/distributedhardware/distributed_hardware_fwk/av_transport/common/include/
H A Dav_trans_buffer.h41 BufferData(size_t capacity, std::shared_ptr<uint8_t> bufData);
/foundation/communication/wifi/wifi/frameworks/native/src/
H A Dwifi_p2p_msg.cpp886 for (auto bufData : data) { in Bin2HexStr()
888 if (sprintf_s(buf, sizeof(buf), "%x", bufData & 0xff) < 0) { in Bin2HexStr()
903 for (auto bufData : data) { in Bin2HexStr()
905 if (sprintf_s(buf, sizeof(buf), "%x", bufData & 0xff) < 0) { in Bin2HexStr()
/foundation/distributedhardware/distributed_hardware_fwk/av_transport/av_trans_engine/plugin/plugins/av_trans_input/dsoftbus_input/
H A Ddsoftbus_input_plugin.cpp290 auto bufData = buffer->GetMemory(); in CreateBuffer() local
291 if (bufData == nullptr) { in CreateBuffer()
295 auto writeSize = bufData->Write(reinterpret_cast<const uint8_t *>(data->buf), data->bufLen, 0); in CreateBuffer()
/foundation/multimedia/media_foundation/engine/plugin/plugins/demuxer/wav_demuxer/
H A Dwav_demuxer_plugin.cpp217 auto bufData = buffer->AllocMemory(nullptr, PROBE_READ_LENGTH); in Sniff() local
223 if (WavSniff(bufData->GetReadOnlyData())) { in Sniff()
/foundation/distributedhardware/distributed_hardware_fwk/av_transport/av_trans_engine/plugin/plugins/av_trans_input/dsoftbus_input_audio/
H A Ddsoftbus_input_audio_plugin.cpp273 auto bufData = buffer->GetMemory(); in CreateBuffer() local
275 auto writeSize = bufData->Write(reinterpret_cast<const uint8_t *>(data->buf), data->bufLen, 0); in CreateBuffer()
/foundation/multimedia/media_foundation/engine/plugin/plugins/ffmpeg_adapter/demuxer/
H A Dffmpeg_demuxer_plugin.cpp538 auto bufData = buffer->WrapMemory(buf, bufSize, 0); in AVReadPacket() local
540 MEDIA_LOG_DD("AVReadPacket read data size = " PUBLIC_LOG_D32, static_cast<int>(bufData->GetSize())); in AVReadPacket()
628 auto bufData = bufferInfo->WrapMemory(buff.data(), bufferSize, bufferSize); in Sniff() local
630 if (bufData && dataSource->ReadAt(0, bufferInfo, bufferSize) == Status::OK) { in Sniff()

Completed in 25 milliseconds

12