-rw-r--r-- | hwc2/common/devices/PhysicalDevice.cpp | 11 | ||||
-rw-r--r-- | hwc2/include/PhysicalDevice.h | 3 |
2 files changed, 13 insertions, 1 deletions
diff --git a/hwc2/common/devices/PhysicalDevice.cpp b/hwc2/common/devices/PhysicalDevice.cpp index fe0616b..7976b8c 100644 --- a/hwc2/common/devices/PhysicalDevice.cpp +++ b/hwc2/common/devices/PhysicalDevice.cpp @@ -26,6 +26,7 @@ #include <Utils.h> #include <HwcFenceControl.h> #include <cutils/properties.h> +#include <tvp/OmxUtil.h> #define FBIOPUT_OSD_CURSOR 0x451a @@ -56,7 +57,8 @@ PhysicalDevice::PhysicalDevice(hwc2_display_t id, Hwcomposer& hwc, DeviceControl mGE2DComposeFrameCount(0), mDirectComposeFrameCount(0), mGetInitState(false), - mInitialized(false) { + mInitialized(false), + mOmxVideoHandle(0){ CTRACE(); switch (id) { @@ -87,6 +89,10 @@ PhysicalDevice::~PhysicalDevice() { WARN_IF_NOT_DEINIT(); clearFenceList(mHwcCurReleaseFences); clearFenceList(mHwcPriorReleaseFences); + if (mOmxVideoHandle != 0) { + closeamvideo(); + mOmxVideoHandle = 0; + } } bool PhysicalDevice::initialize() { @@ -1224,6 +1230,9 @@ int32_t PhysicalDevice::validateDisplay(uint32_t* outNumTypes, continue; } #endif + if (hnd && hnd->flags & private_handle_t::PRIV_FLAGS_VIDEO_OMX) { + set_omx_pts((char*)hnd->base, &mOmxVideoHandle); + } if (videoLayer && (layer->getZ() < videoLayer->getZ())) { DTRACE("Layer covered by video layer."); diff --git a/hwc2/include/PhysicalDevice.h b/hwc2/include/PhysicalDevice.h index d3c3ab6..5f547e0 100644 --- a/hwc2/include/PhysicalDevice.h +++ b/hwc2/include/PhysicalDevice.h @@ -264,6 +264,9 @@ private: //rever the scaled displayframe, for we use the vpp scale. float mReverseScaleX; float mReverseScaleY; + + //omx handle for set omx pts + int32_t mOmxVideoHandle; }; |