summaryrefslogtreecommitdiff
authorSky Zhou <sky.zhou@amlogic.com>2015-11-12 11:41:37 (GMT)
committer Sky Zhou <sky.zhou@amlogic.com>2015-11-12 11:44:19 (GMT)
commitbc0b3e8febd7eeb73f5631d7ae68202ccebb0c2e (patch)
tree2edf444b41aaec6933568c754667c4e6af539da6
parentbee396dbde01d38d38dd125e58acb426824f426c (diff)
downloadhwcomposer-bc0b3e8febd7eeb73f5631d7ae68202ccebb0c2e.zip
hwcomposer-bc0b3e8febd7eeb73f5631d7ae68202ccebb0c2e.tar.gz
hwcomposer-bc0b3e8febd7eeb73f5631d7ae68202ccebb0c2e.tar.bz2
PD #115176: support SIDEBAND layer compse
now SIDEBAND is used as video overlay. Change-Id: I0239b97861105e21e9b0bbe498024f37fe7ba4cf
Diffstat
-rwxr-xr-xhwcomposer.cpp25
1 files changed, 10 insertions, 15 deletions
diff --git a/hwcomposer.cpp b/hwcomposer.cpp
index 4d7ab25..3552d40 100755
--- a/hwcomposer.cpp
+++ b/hwcomposer.cpp
@@ -154,7 +154,6 @@ struct hwc_context_1_t {
display_context_t display_ctxs[MAX_SUPPORT_DISPLAYS];
};
-static int Amvideo_Handle = 0;
static pthread_cond_t hwc_cond = PTHREAD_COND_INITIALIZER;
static pthread_mutex_t hwc_mutex = PTHREAD_MUTEX_INITIALIZER;
@@ -508,6 +507,14 @@ static int hwc_prepare(struct hwc_composer_device_1 *dev,
}
#endif
+ if (l->compositionType == HWC_SIDEBAND && l->sidebandStream) {
+ //TODO: we just transact SIDEBAND to OVERLAY now;
+ HWC_LOGVA("get HWC_SIDEBAND layer, just change to overlay");
+ l->hints = HWC_HINT_CLEAR_FB;
+ l->compositionType = HWC_OVERLAY;
+ continue;
+ }
+
if (l->handle) {
private_handle_t const* hnd = reinterpret_cast<private_handle_t const*>(l->handle);
if (hnd->flags & private_handle_t::PRIV_FLAGS_OSD_VIDEO_OMX) {
@@ -623,28 +630,16 @@ static int hwc_set(struct hwc_composer_device_1 *dev,
LOG_FUNCTION_NAME
//TODO: need improve the way to set video axis.
#if WITH_LIBPLAYER_MODULE
- bool istvp = false;
for (i = 0; i < numDisplays; i++) {
CHK_SKIP_DISPLAY_FB0();
display_content = displays[i];
if (display_content) {
for (j = 0; j < display_content->numHwLayers; j++) {
hwc_layer_1_t* l = &display_content->hwLayers[j];
- if (l->handle) {
- private_handle_t const* hnd = reinterpret_cast<private_handle_t const*>(l->handle);
- if (hnd->flags & private_handle_t::PRIV_FLAGS_VIDEO_OMX) {
- set_omx_pts((char*)hnd->base, &Amvideo_Handle);
- istvp = true;
- }
- if (hnd->flags & private_handle_t::PRIV_FLAGS_VIDEO_OVERLAY) {
- hwc_overlay_compose(pdev, l);
- }
+ if (l->compositionType == HWC_OVERLAY) {
+ hwc_overlay_compose(pdev, l);
}
}
- if (istvp == false && Amvideo_Handle!=0) {
- closeamvideo();
- Amvideo_Handle = 0;
- }
}
}