diff options
author | Jeongmo Yang <jm80.yang@samsung.com> | 2024-08-30 14:09:28 +0900 |
---|---|---|
committer | Jeongmo Yang <jm80.yang@samsung.com> | 2024-08-30 14:56:49 +0900 |
commit | e213c94a9eaca52ec7431348456968208823f266 (patch) | |
tree | eb9928233b1812d69656e5872d6eeb87c42c0061 | |
parent | 90765181ccd282fbe431b9e7bc3371877301fd5f (diff) | |
download | camera-v4l2-e213c94a9eaca52ec7431348456968208823f266.tar.gz camera-v4l2-e213c94a9eaca52ec7431348456968208823f266.tar.bz2 camera-v4l2-e213c94a9eaca52ec7431348456968208823f266.zip |
Use hal-rootstrap package
- Remove other package dependencies
- Add DLOG* macro, because hal-rootstrap does not include dlog-internal.h file.
[Version] 1.3.0
[Issue Type] Clean up
Change-Id: Ie9e0621772971036b4c129a5d7a958f74d284337
Signed-off-by: Jeongmo Yang <jm80.yang@samsung.com>
-rw-r--r-- | configure.ac | 20 | ||||
-rw-r--r-- | packaging/hal-backend-camera-v4l2.spec | 10 | ||||
-rw-r--r-- | src/Makefile.am | 10 | ||||
-rw-r--r-- | src/hal_backend_camera_v4l2.c | 18 |
4 files changed, 24 insertions, 34 deletions
diff --git a/configure.ac b/configure.ac index e7d1c06..fe7779d 100644 --- a/configure.ac +++ b/configure.ac @@ -23,23 +23,9 @@ AC_HEADER_TIME AC_PROG_GCC_TRADITIONAL AC_PROG_LIBTOOL -PKG_CHECK_MODULES(GLIB, glib-2.0) -AC_SUBST(GLIB_CFLAGS) -AC_SUBST(GLIB_LIBS) - -PKG_CHECK_MODULES(TBM, libtbm) -AC_SUBST(TBM_CFLAGS) -AC_SUBST(TBM_LIBS) - -PKG_CHECK_MODULES(DLOG, dlog) -AC_SUBST(DLOG_CFLAGS) -AC_SUBST(DLOG_LIBS) - -PKG_CHECK_MODULES(HAL_API_COMMON, hal-api-common) -AC_SUBST(HAL_API_COMMON_CFLAGS) - -PKG_CHECK_MODULES(HAL_API_CAMERA, hal-api-camera) -AC_SUBST(HAL_API_CAMERA_CFLAGS) +PKG_CHECK_MODULES(HAL_ROOTSTRAP, hal-rootstrap) +AC_SUBST(HAL_ROOTSTRAP_CFLAGS) +AC_SUBST(HAL_ROOTSTRAP_LIBS) # Checks for header files. AC_HEADER_STDC diff --git a/packaging/hal-backend-camera-v4l2.spec b/packaging/hal-backend-camera-v4l2.spec index 9e8f2ab..834440e 100644 --- a/packaging/hal-backend-camera-v4l2.spec +++ b/packaging/hal-backend-camera-v4l2.spec @@ -2,18 +2,12 @@ Name: hal-backend-camera-v4l2 Summary: Tizen Camera Hal using generic V4L2 interface -Version: 1.2.0 +Version: 1.3.0 Release: 0 Group: Multimedia/Libraries License: Apache-2.0 Source0: %{name}-%{version}.tar.gz -Requires(post): /sbin/ldconfig -Requires(postun): /sbin/ldconfig -BuildRequires: pkgconfig(glib-2.0) -BuildRequires: pkgconfig(libtbm) -BuildRequires: pkgconfig(dlog) -BuildRequires: pkgconfig(hal-api-common) -BuildRequires: pkgconfig(hal-api-camera) +BuildRequires: pkgconfig(hal-rootstrap) %description Tizen Camera Hal using generic V4L2 interface. diff --git a/src/Makefile.am b/src/Makefile.am index f8293f8..ca12085 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -8,16 +8,10 @@ libhal_backend_camera_la_SOURCES = hal_backend_camera_v4l2.c libhal_backend_camera_la_CFLAGS = \ -I$(srcdir)/include \ - $(GLIB_CFLAGS) \ - $(DLOG_CFLAGS) \ - $(HAL_API_COMMON_CFLAGS) \ - $(HAL_API_CAMERA_CFLAGS) \ - $(TBM_CFLAGS) + $(HAL_ROOTSTRAP_CFLAGS) libhal_backend_camera_la_LIBADD = \ - $(GLIB_LIBS) \ - $(DLOG_LIBS) \ - $(TBM_LIBS) + $(HAL_ROOTSTRAP_LIBS) libhal_backend_camera_la_CFLAGS += -fdata-sections -ffunction-sections -Wl,--gc-sections libhal_backend_camera_la_LDFLAGS = -Wl,--gc-sections -avoid-version diff --git a/src/hal_backend_camera_v4l2.c b/src/hal_backend_camera_v4l2.c index a72348a..e1b4b14 100644 --- a/src/hal_backend_camera_v4l2.c +++ b/src/hal_backend_camera_v4l2.c @@ -41,6 +41,22 @@ #endif /* LOG_TAG */ #define LOG_TAG "CAMERA_HAL" +#ifndef LOGV +#define LOGV(fmt, arg...) dlog_print(DLOG_VERBOSE, LOG_TAG, "%s (%d) %s : " fmt, __FILE__, __LINE__, __FUNCTION__, ##arg) +#endif +#ifndef LOGD +#define LOGD(fmt, arg...) dlog_print(DLOG_DEBUG, LOG_TAG, "%s (%d) %s : " fmt, __FILE__, __LINE__, __FUNCTION__, ##arg) +#endif +#ifndef LOGI +#define LOGI(fmt, arg...) dlog_print(DLOG_INFO, LOG_TAG, "%s (%d) %s : " fmt, __FILE__, __LINE__, __FUNCTION__, ##arg) +#endif +#ifndef LOGW +#define LOGW(fmt, arg...) dlog_print(DLOG_WARN, LOG_TAG, "%s (%d) %s : " fmt, __FILE__, __LINE__, __FUNCTION__, ##arg) +#endif +#ifndef LOGE +#define LOGE(fmt, arg...) dlog_print(DLOG_ERROR, LOG_TAG, "%s (%d) %s : " fmt, __FILE__, __LINE__, __FUNCTION__, ##arg) +#endif + #define ENV_VIRTUAL_CAMERA "VIRTUAL_CAMERA" #define VIRTUAL_CAMERA_FMT_MAX 2 #define VIRTUAL_CAMERA_RES_MAX 3 @@ -1261,7 +1277,7 @@ static int __camera_start_stream(hal_camera_handle *handle, camera_pixel_format_ PROT_READ | PROT_WRITE, MAP_SHARED, handle->device_fd, - v4l2_buf.m.offset); + (off_t)v4l2_buf.m.offset); if (buffer->planes[0].data == MAP_FAILED) { LOGE("[%d] mmap failed (errno %d)", i, errno); |