Use bufferpool@2.0
Use bufferpool2.0 instead of bufferpool 1.0 from CCodec
Change-Id: I842b6723e83eb537f2b2eea0f30a1f36f2b17fa9
diff --git a/media/codec2/vndk/Android.bp b/media/codec2/vndk/Android.bp
index 0eb90be..e0b1355 100644
--- a/media/codec2/vndk/Android.bp
+++ b/media/codec2/vndk/Android.bp
@@ -35,7 +35,7 @@
export_shared_lib_headers: [
"libbase",
- "android.hardware.media.bufferpool@1.0",
+ "android.hardware.media.bufferpool@2.0",
],
local_include_dirs: [
@@ -51,7 +51,7 @@
"android.hardware.graphics.allocator@2.0",
"android.hardware.graphics.bufferqueue@1.0",
"android.hardware.graphics.mapper@2.0",
- "android.hardware.media.bufferpool@1.0",
+ "android.hardware.media.bufferpool@2.0",
"libbase",
"libbinder",
"libcutils",
@@ -63,7 +63,7 @@
"liblog",
"libstagefright_bufferqueue_helper",
"libstagefright_foundation",
- "libstagefright_bufferpool@1.0",
+ "libstagefright_bufferpool@2.0",
"libui",
"libutils",
],
diff --git a/media/codec2/vndk/C2Buffer.cpp b/media/codec2/vndk/C2Buffer.cpp
index 47366ca..710b536 100644
--- a/media/codec2/vndk/C2Buffer.cpp
+++ b/media/codec2/vndk/C2Buffer.cpp
@@ -33,12 +33,12 @@
using android::C2AllocatorGralloc;
using android::C2AllocatorIon;
using android::hardware::media::bufferpool::BufferPoolData;
-using android::hardware::media::bufferpool::V1_0::ResultStatus;
-using android::hardware::media::bufferpool::V1_0::implementation::BufferPoolAllocation;
-using android::hardware::media::bufferpool::V1_0::implementation::BufferPoolAllocator;
-using android::hardware::media::bufferpool::V1_0::implementation::ClientManager;
-using android::hardware::media::bufferpool::V1_0::implementation::ConnectionId;
-using android::hardware::media::bufferpool::V1_0::implementation::INVALID_CONNECTIONID;
+using android::hardware::media::bufferpool::V2_0::ResultStatus;
+using android::hardware::media::bufferpool::V2_0::implementation::BufferPoolAllocation;
+using android::hardware::media::bufferpool::V2_0::implementation::BufferPoolAllocator;
+using android::hardware::media::bufferpool::V2_0::implementation::ClientManager;
+using android::hardware::media::bufferpool::V2_0::implementation::ConnectionId;
+using android::hardware::media::bufferpool::V2_0::implementation::INVALID_CONNECTIONID;
// This anonymous namespace contains the helper classes that allow our implementation to create
// block/buffer objects.
diff --git a/media/codec2/vndk/include/C2BufferPriv.h b/media/codec2/vndk/include/C2BufferPriv.h
index d0b9152..be5f69c 100644
--- a/media/codec2/vndk/include/C2BufferPriv.h
+++ b/media/codec2/vndk/include/C2BufferPriv.h
@@ -20,7 +20,7 @@
#include <functional>
#include <C2Buffer.h>
-#include <android/hardware/media/bufferpool/1.0/IAccessor.h>
+#include <android/hardware/media/bufferpool/2.0/IAccessor.h>
class C2BasicLinearBlockPool : public C2BlockPool {
public:
@@ -112,7 +112,7 @@
* \return true IAcessor is writen successfully.
* \return false IAccessor is not written.
*/
- bool getAccessor(android::sp<android::hardware::media::bufferpool::V1_0::IAccessor> *accessor);
+ bool getAccessor(android::sp<android::hardware::media::bufferpool::V2_0::IAccessor> *accessor);
private:
const std::shared_ptr<C2Allocator> mAllocator;