Lines Matching defs:AVMemory

29 constexpr OHOS::HiviewDFX::HiLogLabel LABEL = { LOG_CORE, LOG_DOMAIN_FOUNDATION, "AVMemory" };
61 std::shared_ptr<AVMemory> AVMemory::CreateAVMemory(std::shared_ptr<AVAllocator> allocator, int32_t capacity,
65 std::shared_ptr<AVMemory> mem = nullptr;
68 mem = std::shared_ptr<AVMemory>(new AVVirtualMemory());
72 mem = std::shared_ptr<AVMemory>(new AVSurfaceMemory());
76 mem = std::shared_ptr<AVMemory>(new AVSharedMemoryExt());
80 mem = std::shared_ptr<AVMemory>(new AVHardwareMemory());
86 FALSE_RETURN_V_MSG_E(mem != nullptr, nullptr, "Create AVMemory failed, no memory");
92 FALSE_RETURN_V_MSG_E(ret == Status::OK, nullptr, "Init AVMemory failed, uid:" PUBLIC_LOG_U64, mem->uid_);
96 std::shared_ptr<AVMemory> AVMemory::CreateAVMemory(uint8_t *ptr, int32_t capacity, int32_t size)
98 std::shared_ptr<AVMemory> mem = std::shared_ptr<AVMemory>(new AVVirtualMemory());
107 std::shared_ptr<AVMemory> AVMemory::CreateAVMemory(MessageParcel &parcel, bool isSurfaceBuffer)
111 auto mem = std::shared_ptr<AVMemory>(new AVSurfaceMemory());
117 std::shared_ptr<AVMemory> mem = nullptr;
123 mem = std::shared_ptr<AVMemory>(new AVSurfaceMemory());
127 mem = std::shared_ptr<AVMemory>(new AVSharedMemoryExt());
131 mem = std::shared_ptr<AVMemory>(new AVHardwareMemory());
138 FALSE_RETURN_V_MSG_E(mem != nullptr, nullptr, "Create AVMemory failed, no memory");
143 FALSE_RETURN_V_MSG_E(ret == Status::OK, nullptr, "Init AVMemory failed, uid:" PUBLIC_LOG_U64, mem->uid_);
150 std::shared_ptr<AVMemory> AVMemory::CreateAVMemory(sptr<SurfaceBuffer> surfaceBuffer)
152 auto mem = std::shared_ptr<AVMemory>(new AVSurfaceMemory());
158 AVMemory::AVMemory() : align_(0), offset_(0), size_(0), base_(nullptr), uid_(GetUniqueId()), allocator_(nullptr)
163 AVMemory::~AVMemory()
168 Status AVMemory::Init()
173 Status AVMemory::Init(MessageParcel &parcel)
179 Status AVMemory::InitSurfaceBuffer(MessageParcel &parcel)
185 Status AVMemory::InitSurfaceBuffer(sptr<SurfaceBuffer> surfaceBuffer)
191 bool AVMemory::ReadFromMessageParcel(MessageParcel &parcel)
197 bool AVMemory::WriteToMessageParcel(MessageParcel &parcel)
203 bool AVMemory::ReadCommonFromMessageParcel(MessageParcel &parcel)
234 bool AVMemory::SkipCommonFromMessageParcel(MessageParcel &parcel)
259 bool AVMemory::WriteCommonToMessageParcel(MessageParcel &parcel)
273 MemoryType AVMemory::GetMemoryType()
278 MemoryFlag AVMemory::GetMemoryFlag()
283 int32_t AVMemory::GetCapacity()
288 int32_t AVMemory::GetSize()
293 Status AVMemory::SetSize(int32_t size)
303 int32_t AVMemory::GetOffset()
308 Status AVMemory::SetOffset(int32_t offset)
318 uint8_t *AVMemory::GetAddr()
323 int32_t AVMemory::GetFileDescriptor()
328 int32_t AVMemory::Write(const uint8_t *in, int32_t writeSize, int32_t position)
355 int32_t AVMemory::Read(uint8_t *out, int32_t readSize, int32_t position)
380 void AVMemory::Reset()
385 sptr<SurfaceBuffer> AVMemory::GetSurfaceBuffer()