Merge f224e84f9afe214ff859792fa70bc2be1c1c1e18 on remote branch

Change-Id: Ie51a6940f2f4865690f56235a4df93cd52d27361
diff --git a/Makefile.am b/Makefile.am
index 213e646..ad6f33f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,10 +2,6 @@
 #
 ACLOCAL_AMFLAGS = -I m4
 
-BUILD_COMPONENTS := mm-core libplatformconfig
-
-if BUILD_MM_VIDEO
-BUILD_COMPONENTS += mm-video-v4l2
-endif
+BUILD_COMPONENTS := mm-core
 
 SUBDIRS := $(BUILD_COMPONENTS)
diff --git a/configure.ac b/configure.ac
index ca569e5..1a37aa7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -99,7 +99,7 @@
 AC_ARG_ENABLE([build-mm-video],
         AC_HELP_STRING([--enable-build-mm-video],
                 [Enable conditional compile for build mm video [default=no]]),
-        [build_mm_video="${enableval}"])
+        [build_mm_video="no"])
 
 AC_ARG_WITH([sanitized-headers],
         [AS_HELP_STRING([--with-sanitized-headers=DIR],[location of the sanitized Linux kernel headers])],
@@ -194,11 +194,5 @@
 AC_CONFIG_FILES([ \
         Makefile \
         mm-core/Makefile \
-        libc2dcolorconvert/Makefile \
-        libplatformconfig/Makefile \
-        mm-video-v4l2/Makefile \
-        mm-video-v4l2/vidc/Makefile \
-        mm-video-v4l2/vidc/venc/Makefile \
-        mm-video-v4l2/vidc/vdec/Makefile \
         ])
 AC_OUTPUT
diff --git a/mm-core/Android.mk b/mm-core/Android.mk
index e0aed81..2c6f83e 100644
--- a/mm-core/Android.mk
+++ b/mm-core/Android.mk
@@ -61,7 +61,7 @@
 
 LOCAL_SRC_FILES         := src/common/omx_core_cmp.cpp
 LOCAL_SRC_FILES         += src/common/qc_omx_core.c
-ifneq (,$(filter lito bengal kona lahaina holi $(MSMSTEPPE),$(TARGET_BOARD_PLATFORM)))
+ifneq (,$(filter lito kona lahaina holi $(MSMSTEPPE),$(TARGET_BOARD_PLATFORM)))
 LOCAL_SRC_FILES         += src/registry_table_android.c
 else
 LOCAL_SRC_FILES         += src/default/qc_registry_table_android.c
@@ -102,7 +102,7 @@
 
 LOCAL_SRC_FILES         := src/common/omx_core_cmp.cpp
 LOCAL_SRC_FILES         += src/common/qc_omx_core.c
-ifneq (,$(filter lito bengal kona lahaina holi $(MSMSTEPPE),$(TARGET_BOARD_PLATFORM)))
+ifneq (,$(filter lito kona lahaina holi $(MSMSTEPPE),$(TARGET_BOARD_PLATFORM)))
 LOCAL_SRC_FILES         += src/$(MM_CORE_TARGET)/registry_table.c
 else
 LOCAL_SRC_FILES         += src/$(MM_CORE_TARGET)/default/qc_registry_table.c
diff --git a/mm-core/Makefile.am b/mm-core/Makefile.am
index 1c8582b..8183926 100644
--- a/mm-core/Makefile.am
+++ b/mm-core/Makefile.am
@@ -9,7 +9,7 @@
 #AM_CFLAGS += -fPIC
 
 AM_CPPFLAGS = -D__packed__=
-AM_CPPFLAGS += -D_ANDROID_
+#AM_CPPFLAGS += -D_ANDROID_
 AM_CPPFLAGS += -D_ENABLE_QC_MSG_LOG_
 #AM_CPPFLAGS += -g -O3
 #AM_CPPFLAGS += -O0 -fno-inline -fno-short-enums
@@ -17,6 +17,7 @@
 AM_CPPFLAGS += -I$(top_srcdir)/mm-core/src/common/
 AM_CPPFLAGS += "-Dstrlcpy=g_strlcpy"
 AM_CPPFLAGS += "-Dstrlcat=g_strlcat"
+AM_CPPFLAGS += -DVIDC_STUB_HAL
 
 h_sources  =inc/OMX_Audio.h
 h_sources +=inc/OMX_Component.h
@@ -65,7 +66,7 @@
 libOmxCore_la_SOURCES = $(c_sources)
 libOmxCore_la_CFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) -fPIC
 libOmxCore_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) -fPIC
-libOmxCore_la_LDFLAGS = -ldl -lrt -lpthread -lglib-2.0 -lcutils
+libOmxCore_la_LDFLAGS = -ldl -lrt -lpthread -lcutils
 libOmxCore_la_LDFLAGS += -shared -avoid-version
 
 
@@ -78,6 +79,6 @@
 libmm_omxcore_la_SOURCES = $(c1_sources)
 libmm_omxcore_la_CFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) -fPIC
 libmm_omxcore_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) -fPIC
-libmm_omxcore_la_LDFLAGS = -ldl -lrt -lpthread -lglib-2.0 -lcutils
+libmm_omxcore_la_LDFLAGS = -ldl -lrt -lpthread -lcutils
 libmm_omxcore_la_LDFLAGS += -shared -avoid-version
 
diff --git a/mm-core/src/common/qc_omx_core.c b/mm-core/src/common/qc_omx_core.c
index cdce12d..c0f639c 100644
--- a/mm-core/src/common/qc_omx_core.c
+++ b/mm-core/src/common/qc_omx_core.c
@@ -24,6 +24,40 @@
 WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
 OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
 ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+Changes from Qualcomm Innovation Center are provided under the following license:
+
+Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted (subject to the limitations in the
+disclaimer below) provided that the following conditions are met:
+
+ * Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+
+ * Redistributions in binary form must reproduce the above
+   copyright notice, this list of conditions and the following
+   disclaimer in the documentation and/or other materials provided
+   with the distribution.
+
+ * Neither the name of Qualcomm Innovation Center, Inc. nor the names of its
+   contributors may be used to endorse or promote products derived
+   from this software without specific prior written permission.
+
+NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE
+GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT
+HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 --------------------------------------------------------------------------*/
 /*============================================================================
                             O p e n M A X   w r a p p e r s
@@ -42,6 +76,7 @@
 #include <sys/stat.h>
 #include <unistd.h>
 #include <string.h>
+#include <stdbool.h>
 #include <stdio.h>
 #include <pthread.h>
 
diff --git a/product.mk b/product.mk
index 26408e4..3a7a1dd 100644
--- a/product.mk
+++ b/product.mk
@@ -13,7 +13,7 @@
 #---------------------------------------------------------------------------------------------------
 # TODO(PC): Override ccodec selection option back to defult (4).
 #           QSSI is forcing this to '1'. Must be reverted
-ifeq ($(call is-board-platform-in-list, bengal neo parrot taro lahaina holi), true)
+ifeq ($(call is-board-platform-in-list, crow bengal neo parrot taro lahaina holi kona), true)
     $(warning "Default Codec2.0 Enabled")
     PRODUCT_PROPERTY_OVERRIDES += debug.stagefright.ccodec=4
 endif