author | Yao.Liu <yao.liu@amlogic.com> | 2017-10-18 03:13:37 (GMT) |
---|---|---|
committer | Yao.Liu <yao.liu@amlogic.com> | 2017-10-18 03:18:10 (GMT) |
commit | 9758c69c180d6fa6ade952b54e538a1f07aa4168 (patch) | |
tree | 7c86ceafa4ee539a2884f2fc8dff8bd349241b1e | |
parent | 7fc131712a68eb584ede11edc7e84451023b25e0 (diff) | |
download | hwcomposer-9758c69c180d6fa6ade952b54e538a1f07aa4168.zip hwcomposer-9758c69c180d6fa6ade952b54e538a1f07aa4168.tar.gz hwcomposer-9758c69c180d6fa6ade952b54e538a1f07aa4168.tar.bz2 |
hwc2: set_omx_pts for video layer
PD# NONE
Change-Id: I6ca4a19c4ee7436fcff10689a54ce1a21ac4c898
Signed-off-by: Yao.Liu <yao.liu@amlogic.com>
-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; }; |