Loading drm/libmediadrm/Android.bp +1 −1 Original line number Diff line number Diff line Loading @@ -34,8 +34,8 @@ cc_library_shared { "libstagefright_foundation", "libutils", "android.hardware.drm@1.0", "libhidlallocatorutils", "libhidlbase", "libhidlmemory", "libhidltransport", ], Loading drm/libmediadrm/CryptoHal.cpp +6 −5 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ #include <media/stagefright/foundation/AString.h> #include <media/stagefright/foundation/hexdump.h> #include <media/stagefright/MediaErrors.h> #include <hidlmemory/FrameworkUtils.h> using ::android::hardware::drm::V1_0::BufferType; using ::android::hardware::drm::V1_0::DestinationBuffer; Loading Loading @@ -227,6 +228,9 @@ bool CryptoHal::requiresSecureDecoderComponent(const char *mime) const { * are sent by providing an offset into the heap and a buffer size. */ int32_t CryptoHal::setHeapBase(const sp<IMemoryHeap>& heap) { using ::android::hardware::fromHeap; using ::android::hardware::HidlMemory; if (heap == NULL) { ALOGE("setHeapBase(): heap is NULL"); return -1; Loading @@ -240,12 +244,9 @@ int32_t CryptoHal::setHeapBase(const sp<IMemoryHeap>& heap) { Mutex::Autolock autoLock(mLock); int32_t seqNum = mHeapSeqNum++; int fd = heap->getHeapID(); nativeHandle->data[0] = fd; auto hidlHandle = hidl_handle(nativeHandle); auto hidlMemory = hidl_memory("ashmem", hidlHandle, heap->getSize()); sp<HidlMemory> hidlMemory = fromHeap(heap); mHeapBases.add(seqNum, mNextBufferId); Return<void> hResult = mPlugin->setSharedBufferBase(hidlMemory, mNextBufferId++); Return<void> hResult = mPlugin->setSharedBufferBase(*hidlMemory, mNextBufferId++); ALOGE_IF(!hResult.isOk(), "setSharedBufferBase(): remote call failed"); return seqNum; } Loading Loading
drm/libmediadrm/Android.bp +1 −1 Original line number Diff line number Diff line Loading @@ -34,8 +34,8 @@ cc_library_shared { "libstagefright_foundation", "libutils", "android.hardware.drm@1.0", "libhidlallocatorutils", "libhidlbase", "libhidlmemory", "libhidltransport", ], Loading
drm/libmediadrm/CryptoHal.cpp +6 −5 Original line number Diff line number Diff line Loading @@ -29,6 +29,7 @@ #include <media/stagefright/foundation/AString.h> #include <media/stagefright/foundation/hexdump.h> #include <media/stagefright/MediaErrors.h> #include <hidlmemory/FrameworkUtils.h> using ::android::hardware::drm::V1_0::BufferType; using ::android::hardware::drm::V1_0::DestinationBuffer; Loading Loading @@ -227,6 +228,9 @@ bool CryptoHal::requiresSecureDecoderComponent(const char *mime) const { * are sent by providing an offset into the heap and a buffer size. */ int32_t CryptoHal::setHeapBase(const sp<IMemoryHeap>& heap) { using ::android::hardware::fromHeap; using ::android::hardware::HidlMemory; if (heap == NULL) { ALOGE("setHeapBase(): heap is NULL"); return -1; Loading @@ -240,12 +244,9 @@ int32_t CryptoHal::setHeapBase(const sp<IMemoryHeap>& heap) { Mutex::Autolock autoLock(mLock); int32_t seqNum = mHeapSeqNum++; int fd = heap->getHeapID(); nativeHandle->data[0] = fd; auto hidlHandle = hidl_handle(nativeHandle); auto hidlMemory = hidl_memory("ashmem", hidlHandle, heap->getSize()); sp<HidlMemory> hidlMemory = fromHeap(heap); mHeapBases.add(seqNum, mNextBufferId); Return<void> hResult = mPlugin->setSharedBufferBase(hidlMemory, mNextBufferId++); Return<void> hResult = mPlugin->setSharedBufferBase(*hidlMemory, mNextBufferId++); ALOGE_IF(!hResult.isOk(), "setSharedBufferBase(): remote call failed"); return seqNum; } Loading