Home
last modified time | relevance | path

Searched refs:ashmem_ (Results 1 – 21 of 21) sorted by relevance

/ohos5.0/foundation/ability/form_fwk/interfaces/inner_api/src/
H A Dform_ashmem.cpp25 if (ashmem_ != nullptr) { in ~FormAshmem()
26 ashmem_->CloseAshmem(); in ~FormAshmem()
45 if (ashmem_ == nullptr) { in ReadFromParcel()
48 HILOG_INFO("fd:%{public}d,size:%{public}d", ashmem_->GetAshmemFd(), ashmem_->GetAshmemSize()); in ReadFromParcel()
69 if (ashmem_ == nullptr) { in WriteToAshmem()
82 ashmem_->UnmapAshmem(); in WriteToAshmem()
87 ashmem_->UnmapAshmem(); in WriteToAshmem()
93 return ashmem_; in GetAshmem()
98 if (ashmem_ == nullptr) { in GetAshmemSize()
106 if (ashmem_ == nullptr) { in GetAshmemFd()
[all …]
/ohos5.0/foundation/multimedia/camera_framework/services/deferred_processing_service/src/base/buffer_manager/
H A Dshared_buffer.cpp45 if (ashmem_ != nullptr) { in GetSize()
46 return ashmem_->GetAshmemSize(); in GetSize()
59 auto ret = ashmem_->WriteToAshmem(address, bytes, 0); in CopyFrom()
77 int fd = ashmem_->GetAshmemFd(); in AllocateAshmemUnlocked()
79 auto ret = ashmem_->MapReadAndWriteAshmem(); in AllocateAshmemUnlocked()
86 if (ashmem_ != nullptr) { in DeallocAshmem()
87 ashmem_->UnmapAshmem(); in DeallocAshmem()
88 ashmem_->CloseAshmem(); in DeallocAshmem()
89 ashmem_ = nullptr; in DeallocAshmem()
96 if (ashmem_ != nullptr) { in GetFd()
[all …]
/ohos5.0/foundation/ability/form_fwk/test/unittest/fms_form_ashmem_test/
H A Dfms_form_ashmem_test.cpp74 form_ashmem_->ashmem_ = new (std::nothrow) Ashmem(fd, size);
75 EXPECT_TRUE(form_ashmem_->ashmem_ != nullptr);
92 EXPECT_TRUE(form_ashmem_->ashmem_ == nullptr);
106 form_ashmem_->ashmem_ = nullptr;
122 form_ashmem_->ashmem_ = nullptr;
138 form_ashmem_->ashmem_ = new (std::nothrow) Ashmem(fd, size);
140 EXPECT_TRUE(form_ashmem_->ashmem_ != nullptr);
157 EXPECT_TRUE(form_ashmem_->ashmem_ != nullptr);
198 form_ashmem_->ashmem_ = nullptr;
211 form_ashmem_->ashmem_ = nullptr;
[all …]
/ohos5.0/drivers/peripheral/distributed_audio/hdi_service/audio/v1_0/src/
H A Daudio_capture_ext_impl.cpp57 ashmem_ = OHOS::Ashmem::CreateAshmem(memory_name.c_str(), ashmemLength); in InitAshmem()
58 if (ashmem_ == nullptr) { in InitAshmem()
62 if (!ashmem_->MapReadAndWriteAshmem()) { in InitAshmem()
66 fd_ = ashmem_->GetAshmemFd(); in InitAshmem()
73 if (ashmem_ != nullptr) { in UnInitAshmem()
74 ashmem_->UnmapAshmem(); in UnInitAshmem()
75 ashmem_->CloseAshmem(); in UnInitAshmem()
76 ashmem_ = nullptr; in UnInitAshmem()
H A Daudio_render_ext_impl.cpp55 ashmem_ = OHOS::Ashmem::CreateAshmem(memory_name.c_str(), ashmemLength); in InitAshmem()
56 if (ashmem_ == nullptr) { in InitAshmem()
60 bool ret = ashmem_->MapReadAndWriteAshmem(); in InitAshmem()
65 fd_ = ashmem_->GetAshmemFd(); in InitAshmem()
72 if (ashmem_ != nullptr) { in UnInitAshmem()
73 ashmem_->UnmapAshmem(); in UnInitAshmem()
74 ashmem_->CloseAshmem(); in UnInitAshmem()
75 ashmem_ = nullptr; in UnInitAshmem()
/ohos5.0/foundation/distributedhardware/distributed_audio/services/audiomanager/managersource/src/
H A Ddspeaker_dev.cpp243 if (ashmem_ != nullptr) { in Release()
244 ashmem_->UnmapAshmem(); in Release()
245 ashmem_->CloseAshmem(); in Release()
246 ashmem_ = nullptr; in Release()
337 if (ashmem_ != nullptr) { in RefreshAshmemInfo()
341 ashmem_ = sptr<Ashmem>(new Ashmem(fd, ashmemLength)); in RefreshAshmemInfo()
346 bool mapRet = ashmem_->MapReadAndWriteAshmem(); in RefreshAshmemInfo()
358 CHECK_NULL_RETURN(ashmem_, ERR_DH_AUDIO_NULLPTR); in MmapStart()
375 while (ashmem_ != nullptr && isEnqueueRunning_.load()) { in EnqueueThread()
378 auto readData = ashmem_->ReadFromAshmem(lengthPerTrans_, readIndex_); in EnqueueThread()
H A Ddmic_dev.cpp313 if (ashmem_ != nullptr) { in Release()
314 ashmem_->UnmapAshmem(); in Release()
315 ashmem_->CloseAshmem(); in Release()
316 ashmem_ = nullptr; in Release()
400 if (ashmem_ != nullptr) { in RefreshAshmemInfo()
404 ashmem_ = sptr<Ashmem>(new Ashmem(fd, ashmemLength)); in RefreshAshmemInfo()
409 bool mapRet = ashmem_->MapReadAndWriteAshmem(); in RefreshAshmemInfo()
421 CHECK_NULL_RETURN(ashmem_, ERR_DH_AUDIO_NULLPTR); in MmapStart()
441 while (ashmem_ != nullptr && isEnqueueRunning_.load()) { in EnqueueThread()
459 … bool writeRet = ashmem_->WriteToAshmem(audioData->Data(), audioData->Size(), writeIndex_); in EnqueueThread()
/ohos5.0/foundation/communication/ipc/ipc/native/src/napi_common/include/
H A Dnapi_ashmem.h35 NAPIAshmem() : ashmem_(nullptr) {} in NAPIAshmem()
39 return ashmem_; in GetAshmem()
43 ashmem_ = ashmem; in SetAshmem()
75 sptr<Ashmem> ashmem_; variable
/ohos5.0/foundation/distributeddatamgr/data_share/frameworks/native/common/src/
H A Dshared_block.cpp32 : mName(name), ashmem_(ashmem), mSize(size), mReadOnly(readOnly), mHeader(nullptr) in SharedBlock()
38 if (ashmem_ != nullptr) { in ~SharedBlock()
39 ashmem_->UnmapAshmem(); in ~SharedBlock()
40 ashmem_->CloseAshmem(); in ~SharedBlock()
41 ashmem_ = nullptr; in ~SharedBlock()
58 mData = const_cast<void *>(ashmem_->ReadFromAshmem(sizeof(SharedBlockHeader), 0)); in Init()
113 return parcel.WriteString16(ToUtf16(mName)) && parcel.WriteAshmem(ashmem_); in WriteMessageParcel()
/ohos5.0/foundation/distributeddatamgr/data_share/frameworks/native/common/include/
H A Dshared_block.h217 if (ashmem_ == nullptr) { in GetFd()
220 return ashmem_->GetAshmemFd(); in GetFd()
255 sptr<Ashmem> ashmem_; variable
/ohos5.0/foundation/distributeddatamgr/relational_store/frameworks/native/appdatafwk/src/
H A Dshared_block.cpp38 : mName(name), ashmem_(ashmem), mSize(size), mReadOnly(readOnly), mHeader(nullptr) in SharedBlock()
44 if (ashmem_ != nullptr) { in ~SharedBlock()
45 ashmem_->UnmapAshmem(); in ~SharedBlock()
46 ashmem_->CloseAshmem(); in ~SharedBlock()
52 …mData = static_cast<uint8_t *>(const_cast<void *>(ashmem_->ReadFromAshmem(sizeof(SharedBlockHeader… in Init()
110 return parcel.WriteString16(OHOS::Str8ToStr16(mName)) && parcel.WriteAshmem(ashmem_); in WriteMessageParcel()
/ohos5.0/foundation/distributeddatamgr/relational_store/interfaces/inner_api/appdatafwk/include/
H A Dshared_block.h277 if (ashmem_ == nullptr) { in GetFd()
280 return ashmem_->GetAshmemFd(); in GetFd()
333 sptr<Ashmem> ashmem_; variable
/ohos5.0/foundation/ability/form_fwk/interfaces/inner_api/include/
H A Dform_ashmem.h43 sptr<Ashmem> ashmem_; variable
/ohos5.0/foundation/multimedia/camera_framework/services/deferred_processing_service/include/base/buffer_manager/
H A Dshared_buffer.h42 sptr<Ashmem> ashmem_ {nullptr};
/ohos5.0/foundation/communication/ipc/ipc/native/src/jni/source/
H A Dohos_rpc_message_parcel.cpp44 explicit AshmemSmartPointWrapper(const sptr<Ashmem> &ashmem) : ashmem_(ashmem) in AshmemSmartPointWrapper()
54 return ashmem_; in GetAshmem()
59 sptr<Ashmem> const ashmem_; member in OHOS::AshmemSmartPointWrapper
/ohos5.0/foundation/distributedhardware/distributed_audio/services/audiomanager/managersource/include/
H A Ddspeaker_dev.h104 sptr<Ashmem> ashmem_ = nullptr; variable
H A Ddmic_dev.h126 sptr<Ashmem> ashmem_ = nullptr; variable
/ohos5.0/drivers/peripheral/distributed_audio/hdi_service/audio/v1_0/include/
H A Daudio_capture_ext_impl.h98 OHOS::sptr<OHOS::Ashmem> ashmem_ = nullptr; variable
H A Daudio_render_ext_impl.h119 OHOS::sptr<OHOS::Ashmem> ashmem_ = nullptr; variable
/ohos5.0/foundation/distributedhardware/distributed_audio/services/audiomanager/test/unittest/sourcedevice/src/
H A Ddspeaker_dev_test.cpp400 spk_->ashmem_ = nullptr;
/ohos5.0/foundation/communication/ipc/ipc/native/src/napi_common/source/
H A Dnapi_ashmem.cpp40 NAPIAshmem::NAPIAshmem(sptr<Ashmem> &ashmem) : ashmem_(ashmem) in NAPIAshmem()