From f1c6a29a9a5b818f10b805e44fe10efa4b162af8 Mon Sep 17 00:00:00 2001 From: Tellen Yu Date: Fri, 12 Jan 2018 01:24:03 +0000 Subject: tv_input: fit for o-mr1 [4/11] PD# 157786 bringup o-mr1 tv input Change-Id: I942988afa5f3c92a9037804be7b532d9f58a3cf1 --- diff --git a/Android.mk b/Android.mk index 1194ffc..9f8fc5b 100644 --- a/Android.mk +++ b/Android.mk @@ -9,7 +9,6 @@ include $(CLEAR_VARS) DVB_PATH := $(wildcard vendor/amlogic/dvb) LIB_TV_BINDER_PATH := vendor/amlogic/tv/frameworks/libtvbinder LIB_SQLITE_PATH := $(wildcard external/sqlite) -AM_LIBPLAYER_PATH := $(wildcard vendor/amlogic/frameworks/av/LibPlayer) ifneq (,$(wildcard hardware/amlogic/gralloc)) @@ -24,27 +23,27 @@ LOCAL_REQUIRED_MODULES := libtvbinder LOCAL_CFLAGS += -DPLATFORM_SDK_VERSION=$(PLATFORM_SDK_VERSION) -LOCAL_SRC_FILES := tv_input.cpp \ - TvPlay.cpp +LOCAL_SRC_FILES := \ + tv_input.cpp \ + TvPlay.cpp LOCAL_MODULE := tv_input.amlogic LOCAL_MODULE_TAGS := optional LOCAL_C_INCLUDES += \ - $(LIB_TV_BINDER_PATH)/include \ - $(DVB_PATH)/android/ndk/include \ - $(DVB_PATH)/include/am_adp \ - $(DVB_PATH)/include/am_mw \ - $(DVB_PATH)/include/am_ver \ - $(DVB_PATH)/android/ndk/include \ - $(LIB_SQLITE_PATH)/dist \ - $(AM_LIBPLAYER_PATH)/amadec/include \ - $(AM_LIBPLAYER_PATH)/amcodec/include \ - $(AM_LIBPLAYER_PATH)/amffmpeg \ - $(AM_LIBPLAYER_PATH)/amplayer \ - system/media/audio_effects/include \ - system/core/libion/include \ - system/core/libion/kernel-headers \ - $(GRALLOC_DIR) + $(LIB_TV_BINDER_PATH)/include \ + $(DVB_PATH)/android/ndk/include \ + $(DVB_PATH)/include/am_adp \ + $(DVB_PATH)/include/am_mw \ + $(DVB_PATH)/include/am_ver \ + $(DVB_PATH)/android/ndk/include \ + $(LIB_SQLITE_PATH)/dist \ + system/media/audio_effects/include \ + system/core/libion/include \ + system/core/libion/kernel-headers \ + hardware/amlogic/gralloc \ + hardware/amlogic/screen_source \ + frameworks/native/libs/nativewindow/include \ + $(GRALLOC_DIR) LOCAL_C_INCLUDES += hardware/amlogic/audio/libTVaudio diff --git a/tv_input.cpp b/tv_input.cpp index e2afe80..a8f7f87 100644 --- a/tv_input.cpp +++ b/tv_input.cpp @@ -35,7 +35,7 @@ #endif #include -#include +#include #include #include /*****************************************************************************/ @@ -363,7 +363,10 @@ static int tv_input_request_capture( } src = (long *)buff_info.buffer_mem; buf = container_of(buffer, ANativeWindowBuffer, handle); - sp graphicBuffer(new GraphicBuffer(buf, false)); + sp graphicBuffer(new GraphicBuffer(buf->handle, GraphicBuffer::WRAP_HANDLE, + buf->width, buf->height, + buf->format, buf->layerCount, + buf->usage, buf->stride)); graphicBuffer->lock(SCREENSOURCE_GRALLOC_USAGE, (void **)&dest); if (dest == NULL) { LOGD("Invalid Gralloc Handle"); @@ -437,7 +440,7 @@ static int tv_input_device_open(const struct hw_module_t *module, dev->device.close_stream = tv_input_close_stream; dev->device.request_capture = tv_input_request_capture; dev->device.cancel_capture = tv_input_cancel_capture; - dev->device.set_capturesurface_size = tv_input_set_capturesurface_size; + //dev->device.set_capturesurface_size = tv_input_set_capturesurface_size; *device = &dev->device.common; status = 0; -- cgit