summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt6
-rw-r--r--capi-content-media-content.pc.in2
-rw-r--r--debian/changelog8
-rw-r--r--packaging/capi-content-media-content.spec16
-rw-r--r--src/media_audio.c32
-rw-r--r--src/media_info.c2
-rw-r--r--src/media_tag.c3
-rw-r--r--src/media_video.c3
-rwxr-xr-xtest/CMakeLists.txt4
9 files changed, 63 insertions, 13 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 700b6e8..9f98683 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -10,6 +10,7 @@ SET(INC_DIR include)
INCLUDE_DIRECTORIES(${INC_DIR})
SET(dependents "dlog libmedia-service drm-service aul capi-base-common")
+SET(pc_dependents "dlog capi-base-common")
INCLUDE(FindPkgConfig)
pkg_check_modules(${fw_name} REQUIRED ${dependents})
@@ -50,12 +51,11 @@ INSTALL(
)
SET(PC_NAME ${fw_name})
-SET(PC_REQUIRED ${dependents})
+SET(PC_REQUIRED ${pc_dependents})
SET(PC_LDFLAGS -l${fw_name})
-SET(PC_CFLAGS -I\${includedir}/content)
CONFIGURE_FILE(
- capi-content-media-content.pc.in
+ ${fw_name}.pc.in
${CMAKE_CURRENT_SOURCE_DIR}/${fw_name}.pc
@ONLY
)
diff --git a/capi-content-media-content.pc.in b/capi-content-media-content.pc.in
index 7f9c91f..69956a2 100644
--- a/capi-content-media-content.pc.in
+++ b/capi-content-media-content.pc.in
@@ -11,5 +11,5 @@ Description: @PACKAGE_DESCRIPTION@
Version: @VERSION@
Requires: @PC_REQUIRED@
Libs: -L${libdir} @PC_LDFLAGS@
-Cflags: -I${includedir} @PC_CFLAGS@
+Cflags: -I${includedir}
diff --git a/debian/changelog b/debian/changelog
index 1b3af7d..81dc473 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+capi-content-media-content (0.1.0-19) unstable; urgency=low
+
+ * update for Tizen1.0
+ * Git: api/media-content
+ * Tag: capi-content-media-content_0.1.0-19
+
+ -- Dongyoung Kim <dydot1.kim@samsung.com> Mon, 19 Mar 2012 11:27:57 +0900
+
capi-content-media-content (0.1.0-17) unstable; urgency=low
* chagne the code to avoid conflict
diff --git a/packaging/capi-content-media-content.spec b/packaging/capi-content-media-content.spec
index cb8ac89..ba6fd86 100644
--- a/packaging/capi-content-media-content.spec
+++ b/packaging/capi-content-media-content.spec
@@ -1,16 +1,18 @@
Name: capi-content-media-content
Summary: A Media content library in SLP C API
-Version: 0.1.0
-Release: 1
+Version: 0.1.0
+Release: 19
Group: TO_BE/FILLED_IN
License: Apache-2.0
Source0: %{name}-%{version}.tar.gz
BuildRequires: cmake
BuildRequires: pkgconfig(dlog)
-BuildRequires: pkgconfig(libmedia-service)
BuildRequires: pkgconfig(drm-service)
BuildRequires: pkgconfig(aul)
BuildRequires: pkgconfig(capi-base-common)
+BuildRequires: pkgconfig(libmedia-service)
+
+
Requires(post): /sbin/ldconfig
Requires(postun): /sbin/ldconfig
@@ -29,9 +31,8 @@ Requires: %{name} = %{version}-%{release}
%build
-FULLVER=%{version}
-MAJORVER=`echo ${FULLVER} | cut -d '.' -f 1`
-cmake . -DCMAKE_INSTALL_PREFIX=/usr -DFULLVER=${FULLVER} -DMAJORVER=${MAJORVER}
+MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
+cmake . -DCMAKE_INSTALL_PREFIX=/usr -DFULLVER=%{version} -DMAJORVER=${MAJORVER}
make %{?jobs:-j%jobs}
@@ -46,10 +47,11 @@ rm -rf %{buildroot}
%files
-%{_libdir}/libcapi-content-media-content.so*
+%{_libdir}/libcapi-content-media-content.so.*
%files devel
%{_includedir}/media-content/*.h
%{_libdir}/pkgconfig/*.pc
+%{_libdir}/libcapi-content-media-content.so
diff --git a/src/media_audio.c b/src/media_audio.c
index 9ec5b4a..c4c4ba4 100644
--- a/src/media_audio.c
+++ b/src/media_audio.c
@@ -107,6 +107,38 @@ int audio_meta_clone(audio_meta_h* dst, audio_meta_h src)
_dst->size = _src->size;
_dst->category = _src->category;
+ if((_src->album != NULL) && (strlen(_src->album) > 0))
+ {
+ _dst->album = strdup(_src->album);
+ if(_dst->album == NULL)
+ {
+ audio_meta_destroy((audio_meta_h)_dst);
+ LOGE("[%s]OUT_OF_MEMORY(0x%08x)", __FUNCTION__, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
+ }
+ }
+
+ if((_src->artist != NULL) && (strlen(_src->artist) > 0))
+ {
+ _dst->artist = strdup(_src->artist);
+ if(_dst->artist == NULL)
+ {
+ audio_meta_destroy((audio_meta_h)_dst);
+ LOGE("[%s]OUT_OF_MEMORY(0x%08x)", __FUNCTION__, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
+ }
+ }
+
+ if((_src->author != NULL) && (strlen(_src->author) > 0))
+ {
+ _dst->author = strdup(_src->author);
+ if(_dst->author == NULL)
+ {
+ audio_meta_destroy((audio_meta_h)_dst);
+ LOGE("[%s]OUT_OF_MEMORY(0x%08x)", __FUNCTION__, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
+ }
+ }
if((_src->genre != NULL) && (strlen(_src->genre) > 0))
{
diff --git a/src/media_info.c b/src/media_info.c
index 7c55e88..9da7502 100644
--- a/src/media_info.c
+++ b/src/media_info.c
@@ -37,6 +37,8 @@
#define LOG_TAG "TIZEN_N_MEDIACONTENT"
+//extern MediaSvcHandle* db_handle;
+
#define SELECT_AUDIO_FROM_MEDIA "select audio_uuid,genre,album,artist,author,year,copyright,description,format,bitrate,track_num,duration,rating,played_count,last_played_time,added_time,size,category from audio_media where audio_uuid='%s' "
#define SELECT_TAG_LIST_FROM_MEDIA "select t._id, t.tag_name from (select _id, tag_name from visual_tag ORDER BY tag_name ASC ) t, ( select visual_uuid, tag_id from visual_tag_map where visual_uuid='%s' ) tm, ( select visual_uuid, folder_uuid from visual_media) m, ( select folder_uuid, lock_status from visual_folder where valid=1 ) f where tm.tag_id = t._id and m.visual_uuid = tm.visual_uuid and m.folder_uuid = f.folder_uuid and f.lock_status=0; "
diff --git a/src/media_tag.c b/src/media_tag.c
index 856ad25..e2f57c1 100644
--- a/src/media_tag.c
+++ b/src/media_tag.c
@@ -30,6 +30,9 @@
#define LOG_TAG "TIZEN_N_MEDIACONTENT"
+//extern MediaSvcHandle* db_handle;
+
+
int media_tag_foreach_tag_from_db(media_tag_filter_h filter, media_tag_cb callback,void* user_data)
{
int ret = MEDIA_CONTENT_ERROR_NONE;
diff --git a/src/media_video.c b/src/media_video.c
index bdfdc7d..e474edd 100644
--- a/src/media_video.c
+++ b/src/media_video.c
@@ -29,6 +29,9 @@
#define LOG_TAG "TIZEN_N_MEDIACONTENT"
+//extern MediaSvcHandle* db_handle;
+
+
int video_meta_destroy(video_meta_h video)
{
int ret;
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index f2e2846..fc8f5f6 100755
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -1,8 +1,8 @@
+SET(fw_name "capi-content-media-content")
SET(fw_test "${fw_name}-test")
INCLUDE(FindPkgConfig)
-pkg_check_modules(${fw_test} REQUIRED glib-2.0)
-
+pkg_check_modules(${fw_test} REQUIRED glib-2.0 dlog libmedia-service drm-service aul capi-base-common)
FOREACH(flag ${${fw_test}_CFLAGS})
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
ENDFOREACH(flag)