author | Tellen Yu <tellen.yu@amlogic.com> | 2018-01-12 01:24:03 (GMT) |
---|---|---|
committer | Tellen Yu <tellen.yu@amlogic.com> | 2018-01-12 02:48:20 (GMT) |
commit | f1c6a29a9a5b818f10b805e44fe10efa4b162af8 (patch) | |
tree | 72d6fa0af09b50bbb3cf682b95cd4426bb7b7a85 | |
parent | 9b70bd65684c52652da5def01d0d14fe6c32c031 (diff) | |
download | tv_input-f1c6a29a9a5b818f10b805e44fe10efa4b162af8.zip tv_input-f1c6a29a9a5b818f10b805e44fe10efa4b162af8.tar.gz tv_input-f1c6a29a9a5b818f10b805e44fe10efa4b162af8.tar.bz2 |
tv_input: fit for o-mr1 [4/11]
PD# 157786
bringup o-mr1 tv input
Change-Id: I942988afa5f3c92a9037804be7b532d9f58a3cf1
-rw-r--r-- | Android.mk | 35 | ||||
-rw-r--r-- | tv_input.cpp | 9 |
2 files changed, 23 insertions, 21 deletions
@@ -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 <hardware/hardware.h> -#include <hardware/aml_screen.h> +#include <aml_screen.h> #include <linux/videodev2.h> #include <android/native_window.h> /*****************************************************************************/ @@ -363,7 +363,10 @@ static int tv_input_request_capture( } src = (long *)buff_info.buffer_mem; buf = container_of(buffer, ANativeWindowBuffer, handle); - sp<GraphicBuffer> graphicBuffer(new GraphicBuffer(buf, false)); + sp<GraphicBuffer> 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; |