BuildRequires: pkgconfig(murphy-resource)
BuildRequires: pkgconfig(murphy-glib)
BuildRequires: pkgconfig(ttrace)
+BuildRequires: pkgconfig(libtzplatform-config)
%description
Camera and recorder function supported library.
%build
%if %{with wayland}
-export CFLAGS+=" -DHAVE_WAYLAND"
+export CFLAGS+=" -DHAVE_WAYLAND -DGST_USE_UNSTABLE_API"
%endif
-export CFLAGS+=" -D_LARGEFILE64_SOURCE"
+export CFLAGS+=" -D_LARGEFILE64_SOURCE -DSYSCONFDIR=\\\"%{_sysconfdir}\\\" -DTZ_SYS_ETC=\\\"%{TZ_SYS_ETC}\\\""
./autogen.sh
%configure \
%if %{with wayland}
make %{?jobs:-j%jobs}
%install
-mkdir -p %{buildroot}/usr/share/license
-cp LICENSE.APLv2 %{buildroot}/usr/share/license/%{name}
+mkdir -p %{buildroot}%{_datadir}/license
+cp LICENSE.APLv2 %{buildroot}%{_datadir}/license/%{name}
%make_install
%defattr(-,root,root,-)
%{_bindir}/*
%{_libdir}/*.so.*
-/usr/share/sounds/mm-camcorder/*
+%{_datadir}/sounds/mm-camcorder/*
%{_datadir}/license/%{name}
%files devel
/*-----------------------------------------------------------------------
| MACRO DEFINITIONS: |
-----------------------------------------------------------------------*/
-#define CONFIGURE_PATH "/usr/etc"
-#define CONFIGURE_PATH_RETRY "/opt/etc"
/*-----------------------------------------------------------------------
| GLOBAL VARIABLE DEFINITIONS |
{
int ret = MM_ERROR_NONE;
FILE *fd = NULL;
- char *conf_path = NULL;
+ char conf_path[60] = {'\0',};
_mmcam_dbg_log("Opening...[%s]", ConfFile);
mmf_return_val_if_fail(ConfFile, FALSE);
- conf_path = (char *)malloc(strlen(ConfFile) + strlen(CONFIGURE_PATH) + 3);
- if (conf_path == NULL) {
- _mmcam_dbg_err("malloc failed.");
- return MM_ERROR_CAMCORDER_LOW_MEMORY;
- }
-
- snprintf(conf_path, strlen(ConfFile) + strlen(CONFIGURE_PATH) + 2, "%s/%s", CONFIGURE_PATH, ConfFile);
+ snprintf(conf_path, sizeof(conf_path), "%s/multimedia/%s", SYSCONFDIR, ConfFile);
_mmcam_dbg_log("Try open Configure File[%s]", conf_path);
fd = fopen(conf_path, "r");
if (fd == NULL) {
_mmcam_dbg_warn("File open failed.[%s] retry...", conf_path);
- snprintf(conf_path, strlen(ConfFile) + strlen(CONFIGURE_PATH_RETRY) + 2, "%s/%s", CONFIGURE_PATH_RETRY, ConfFile);
+
+ snprintf(conf_path, sizeof(conf_path), "%s/multimedia/%s", TZ_SYS_ETC, ConfFile);
_mmcam_dbg_log("Try open Configure File[%s]", conf_path);
fd = fopen(conf_path, "r");
if (fd == NULL) {
}
}
- if (conf_path != NULL) {
- free(conf_path);
- conf_path = NULL;
- }
-
_mmcam_dbg_log("Leave...");
return ret;
}
if (sc->info_image->preview_format == MM_PIXEL_FORMAT_ENCODED_H264) {
- gst_element_venc_name = strdup("capsfilter");
+ gst_element_venc_name = "capsfilter";
} else {
_mmcamcorder_conf_get_value_element_name(VideoencElement, &gst_element_venc_name);
}
if (use_venc_queue) {
_MMCAMCORDER_ENCODEBIN_ELMGET(sc, _MMCAMCORDER_ENCSINK_VENC_QUE, "use-venc-queue", err);
}
-
- if (sc->info_image->preview_format == MM_PIXEL_FORMAT_ENCODED_H264) {
- free(gst_element_venc_name);
- gst_element_venc_name = NULL;
- }
}
if (sc->audio_disable == FALSE &&
thumb.data = malloc(ed->size);
memcpy(thumb.data,ed->data,ed->size);
thumb.length = ed->size;
- #if 0
- {
- FILE *fp = NULL;
- fp = fopen ("/opt/usr/media/thumbnail_test.jpg", "a+");
- fwrite (thumb.data, 1, thumb.length, fp);
- fclose (fp);
- }
- #endif
thumb.format = MM_PIXEL_FORMAT_ENCODED;
thumb.width = atoi(width);
thumb.height = atoi(height);