AC_SUBST(RM_CFLAGS)
AC_SUBST(RM_LIBS)
+AC_ARG_ENABLE(boost, AC_HELP_STRING([--enable-boost], [enable boost]),
+[
+ case "${enableval}" in
+ yes) BOOST_TV=yes ;;
+ no) BOOST_TV=no ;;
+ *) AC_MSG_ERROR(bad value ${enableval} for --enable-boost) ;;
+ esac
+],[BOOST_TV=no])
+if test "x$BOOST_TV" = "xyes"; then
+PKG_CHECK_MODULES(BOOST, capi-boost-tv)
+AC_SUBST(BOOST_TV_CFLAGS)
+AC_SUBST(BOOST_TV_LIBS)
+fi
+AM_CONDITIONAL([BOOST_TV], [test "x$BOOST_TV" = "xyes"])
+
PKG_CHECK_MODULES(AUL, aul)
AC_SUBST(AUL_CFLAGS)
AC_SUBST(AUL_LIBS)
Name: libmm-camcorder
Summary: Camera and recorder library
-Version: 0.10.281
+Version: 0.10.282
Release: 0
Group: Multimedia/Libraries
License: Apache-2.0
BuildRequires: pkgconfig(tv-resource-information)
BuildRequires: pkgconfig(aul)
BuildRequires: pkgconfig(resource-center-api)
+BuildRequires: pkgconfig(capi-boost-tv)
%if (("%{_vd_cfg_product_type}" != "AUDIO") && ("%{_vd_cfg_target_repository}" != "emulator"))
BuildRequires: pkgconfig(camera-conf-mgr-tv)
%endif
%if "%{tizen_profile_name}" == "tv"
--enable-rm \
--enable-product-tv \
+ --enable-boost \
%if (("%{_vd_cfg_product_type}" != "AUDIO") && ("%{_vd_cfg_target_repository}" != "emulator"))
--enable-camera-conf-mgr-tv \
%endif
libmmfcamcorder_la_SOURCES += mm_camcorder_rm.c
endif
+if BOOST_TV
+libmmfcamcorder_la_SOURCES += mm_camcorder_boost.c
+endif
+
libmmfcamcorder_la_CFLAGS = -I$(srcdir)/include \
$(GST_CFLAGS) \
$(GST_PLUGIN_BASE_CFLAGS) \
libmmfcamcorder_la_LIBADD += $(CAMERA_CONF_MGR_LIBS)
endif
+if BOOST_TV
+libmmfcamcorder_la_CFLAGS += $(BOOST_TV_CFLAGS) -D_MMCAMCORDER_CAMERA_BOOST_SUPPORT
+libmmfcamcorder_la_LIBADD += $(BOOST_TV_LIBS)
+endif
+
if PRODUCT_TV
libmmfcamcorder_la_CFLAGS += -D_MMCAMCORDER_PRODUCT_TV
endif
--- /dev/null
+/*
+ * libmm-camcorder
+ *
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: jaekyu shim <jae915@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+#ifndef __MM_CAMCORDER_BOOST_H__
+#define __MM_CAMCORDER_BOOST_H__
+
+#include <mm_types.h>
+
+/*=======================================================================================
+| GLOBAL FUNCTION PROTOTYPES |
+========================================================================================*/
+
+void _mmcamcorder_start_boosting(void);
+void _mmcamcorder_stop_boosting(void);
+
+
+
+#endif /*__MM_CAMCORDER_BOOST_H__*/
+
--- /dev/null
+/*
+ * libmm-camcorder
+ *
+ * Copyright (c) 2022 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact: jaekyu shim <jae915@samsung.com>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+ /*=======================================================================================
+| INCLUDE FILES |
+========================================================================================*/
+#ifdef _MMCAMCORDER_CAMERA_BOOST_SUPPORT
+#include <boost-api.h>
+#include "mm_camcorder_internal.h"
+#include "mm_camcorder_boost.h"
+
+
+static void __apply_thread_boosting(const boost_generic_info_t *generic_info)
+{
+ int ret = 0;
+ const char *thread_list[] = {
+ "vsrc_q-src",
+ "vsink_q-src",
+ "vsrc_s-src"
+ };
+ const int thread_list_size = sizeof(thread_list) / sizeof(char *);
+
+ pid_t pid = getpid();
+
+ for (int i = 0 ; i < thread_list_size ; i++) {
+ ret = boost_request_by_thread_name(pid, thread_list[i], (const boost_info_t *)generic_info);
+ MMCAM_LOG_INFO("apply boosting thread[%11s], event[%d], sched[%d] : ret[%d]",
+ thread_list[i], generic_info->event, generic_info->sched, ret);
+ }
+}
+
+void _mmcamcorder_start_boosting(void)
+{
+ boost_generic_info_t generic_info = {
+ .parent.framework_type = BOOST_GENERIC,
+ .event = BOOST_GENERIC_EVENT_START,
+ .group = BOOST_CGROUP_END,
+ .sched = BOOST_API_SCHED_RR,
+ .boostingTimeMs = 0
+ };
+
+ __apply_thread_boosting(&generic_info);
+}
+
+void _mmcamcorder_stop_boosting(void)
+{
+ boost_generic_info_t generic_info = {
+ .parent.framework_type = BOOST_GENERIC,
+ .event = BOOST_GENERIC_EVENT_STOP,
+ .group = BOOST_CGROUP_END,
+ .sched = BOOST_API_SCHED_OTHER,
+ .boostingTimeMs = 0
+ };
+
+ __apply_thread_boosting(&generic_info);
+}
+
+#endif /* _MMCAMCORDER_CAMERA_BOOST_SUPPORT*/
+
#include <libexif/exif-utils.h>
#include <libexif/exif-data.h>
+#ifdef _MMCAMCORDER_CAMERA_BOOST_SUPPORT
+#include "mm_camcorder_boost.h"
+#endif /* _MMCAMCORDER_CAMERA_BOOST_SUPPORT */
+
+
/*---------------------------------------------------------------------------------------
| GLOBAL VARIABLE DEFINITIONS for internal |
---------------------------------------------------------------------------------------*/
MMCAM_LOG_INFO("sound status %d", info->sound_status);
}
+
+#ifdef _MMCAMCORDER_CAMERA_BOOST_SUPPORT
+ _mmcamcorder_start_boosting();
+#endif /* _MMCAMCORDER_CAMERA_BOOST_SUPPORT */
}
cmd_error:
break;
case _MMCamcorder_CMD_PREVIEW_STOP:
ret = __mmcamcorder_image_cmd_preview_stop(handle);
+
+#ifdef _MMCAMCORDER_CAMERA_BOOST_SUPPORT
+ _mmcamcorder_stop_boosting();
+#endif /*_MMCAMCORDER_CAMERA_BOOST_SUPPORT */
+
break;
case _MMCamcorder_CMD_RECORD:
case _MMCamcorder_CMD_PAUSE: