Split Treble conversion module into two sides: impl and utils.
impl is on the HAL side. utils is on the framework side.
Test: Compiles
Bug: 31399200
Change-Id: Ib88a80f406fa2b897aa7c65f5faba6cdd9d6a700
diff --git a/include/media/OMXBuffer.h b/include/media/OMXBuffer.h
index b4b9284..6f79182 100644
--- a/include/media/OMXBuffer.h
+++ b/include/media/OMXBuffer.h
@@ -36,7 +36,14 @@
::android::OMXBuffer const& l);
inline bool convertTo(::android::OMXBuffer* l,
::android::hardware::media::omx::V1_0::CodecBuffer const& t);
-}}}}}
+}
+namespace utils {
+ inline bool wrapAs(::android::hardware::media::omx::V1_0::CodecBuffer* t,
+ ::android::OMXBuffer const& l);
+ inline bool convertTo(::android::OMXBuffer* l,
+ ::android::hardware::media::omx::V1_0::CodecBuffer const& t);
+}
+}}}}
class GraphicBuffer;
class IMemory;
@@ -93,6 +100,12 @@
friend inline bool (::android::hardware::media::omx::V1_0::implementation::
convertTo)(OMXBuffer* l,
::android::hardware::media::omx::V1_0::CodecBuffer const& t);
+ friend inline bool (::android::hardware::media::omx::V1_0::utils::
+ wrapAs)(::android::hardware::media::omx::V1_0::CodecBuffer* t,
+ OMXBuffer const& l);
+ friend inline bool (::android::hardware::media::omx::V1_0::utils::
+ convertTo)(OMXBuffer* l,
+ ::android::hardware::media::omx::V1_0::CodecBuffer const& t);
enum BufferType {
kBufferTypeInvalid = 0,
diff --git a/include/media/OMXFenceParcelable.h b/include/media/OMXFenceParcelable.h
index f529301..2a8da87 100644
--- a/include/media/OMXFenceParcelable.h
+++ b/include/media/OMXFenceParcelable.h
@@ -26,12 +26,20 @@
// This is needed temporarily for the OMX HIDL transition.
namespace hardware {
struct hidl_handle;
-namespace media { namespace omx { namespace V1_0 { namespace implementation {
+namespace media { namespace omx { namespace V1_0 {
+namespace implementation {
void wrapAs(::android::OMXFenceParcelable* l,
::android::hardware::hidl_handle const& t);
bool convertTo(::android::OMXFenceParcelable* l,
::android::hardware::hidl_handle const& t);
-}}}}}
+}
+namespace utils {
+ void wrapAs(::android::OMXFenceParcelable* l,
+ ::android::hardware::hidl_handle const& t);
+ bool convertTo(::android::OMXFenceParcelable* l,
+ ::android::hardware::hidl_handle const& t);
+}
+}}}}
struct OMXFenceParcelable : public Parcelable {
OMXFenceParcelable() : mFenceFd(-1) {}
@@ -56,6 +64,12 @@
friend bool (::android::hardware::media::omx::V1_0::implementation::
convertTo)(OMXFenceParcelable* l,
::android::hardware::hidl_handle const& t);
+ friend void (::android::hardware::media::omx::V1_0::utils::
+ wrapAs)(OMXFenceParcelable* l,
+ ::android::hardware::hidl_handle const& t);
+ friend bool (::android::hardware::media::omx::V1_0::utils::
+ convertTo)(OMXFenceParcelable* l,
+ ::android::hardware::hidl_handle const& t);
};
inline status_t OMXFenceParcelable::readFromParcel(const Parcel* parcel) {