#define media_content_gettid() syscall(__NR_gettid)
-#define media_content_retv_if(expr, val) do { \
+#define content_retv_if(expr, val) do { \
if (expr) { \
LOGE(FONT_COLOR_RED"[%ld]"FONT_COLOR_RESET, media_content_gettid()); \
return (val); \
} \
} while (0)
-#define media_content_retvm_if(expr, val, fmt, arg...) do { \
+#define content_retvm_if(expr, val, fmt, arg...) do { \
if (expr) { \
LOGE(FONT_COLOR_RED"[%ld]"fmt""FONT_COLOR_RESET, media_content_gettid(), ##arg); \
return (val); \
} \
} while (0)
-#define media_content_warn(fmt, arg...) do { \
+#define content_warn(fmt, arg...) do { \
LOGW(FONT_COLOR_GREEN"[%ld]"fmt""FONT_COLOR_RESET, media_content_gettid(), ##arg); \
} while (0)
-#define media_content_debug(fmt, arg...) do { \
+#define content_debug(fmt, arg...) do { \
LOGD(FONT_COLOR_RESET"[%ld]"fmt"", media_content_gettid(), ##arg); \
} while (0)
-#define media_content_info(fmt, arg...) do { \
+#define content_info(fmt, arg...) do { \
LOGI(FONT_COLOR_GREEN"[%ld]"fmt""FONT_COLOR_RESET, media_content_gettid(), ##arg); \
} while (0)
-#define media_content_error(fmt, arg...) do { \
+#define content_error(fmt, arg...) do { \
LOGE(FONT_COLOR_RED"[%ld]"fmt""FONT_COLOR_RESET, media_content_gettid(), ##arg); \
} while (0)
-#define media_content_debug_func() do { \
- LOGD(FONT_COLOR_RESET"[%ld]", media_content_gettid()); \
- } while (0)
-
-#define media_content_sec_debug(fmt, arg...) do { \
+#define content_sec_debug(fmt, arg...) do { \
SECURE_LOGD(FONT_COLOR_CYAN"[%ld]"fmt""FONT_COLOR_RESET, media_content_gettid(), ##arg); \
} while (0)
-#define media_content_sec_warn(fmt, arg...) do { \
- SECURE_LOGW(FONT_COLOR_RED"[%ld]"fmt""FONT_COLOR_RESET, media_content_gettid(), ##arg); \
- } while (0)
-
-#define media_content_sec_error(fmt, arg...) do { \
+#define content_sec_error(fmt, arg...) do { \
SECURE_LOGE(FONT_COLOR_RED"[%ld]"fmt""FONT_COLOR_RESET, media_content_gettid(), ##arg); \
} while (0)
#define ERR_BUF_LENGTH 256
-#define media_content_stderror(fmt) do { \
+#define content_stderror(fmt) do { \
char media_content_stderror_buf[ERR_BUF_LENGTH] = {0, }; \
strerror_r(errno, media_content_stderror_buf, ERR_BUF_LENGTH); \
LOGE(FONT_COLOR_RED fmt" : STANDARD ERROR [%s]"FONT_COLOR_RESET, media_content_stderror_buf); \
#define media_content_gettid() syscall(__NR_gettid)
-#define media_content_retv_if(expr, val) do { \
+#define content_retv_if(expr, val) do { \
if (expr) { \
LOGE(FONT_COLOR_RED"[%ld]"FONT_COLOR_RESET, media_content_gettid()); \
return (val); \
} \
} while (0)
-#define media_content_retvm_if(expr, val, fmt, arg...) do { \
+#define content_retvm_if(expr, val, fmt, arg...) do { \
if (expr) { \
LOGE(FONT_COLOR_RED"[%ld]"fmt""FONT_COLOR_RESET, media_content_gettid(), ##arg); \
return (val); \
} \
} while (0)
-#define media_content_warn(fmt, arg...) do { \
+#define content_warn(fmt, arg...) do { \
LOGW(FONT_COLOR_GREEN"[%ld]"fmt""FONT_COLOR_RESET, media_content_gettid(), ##arg); \
} while (0)
-#define media_content_debug(fmt, arg...) do { \
+#define content_debug(fmt, arg...) do { \
LOGD(FONT_COLOR_RESET"[%ld]"fmt"", media_content_gettid(), ##arg); \
} while (0)
-#define media_content_info(fmt, arg...) do { \
+#define content_info(fmt, arg...) do { \
LOGI(FONT_COLOR_GREEN"[%ld]"fmt""FONT_COLOR_RESET, media_content_gettid(), ##arg); \
} while (0)
-#define media_content_error(fmt, arg...) do { \
+#define content_error(fmt, arg...) do { \
LOGE(FONT_COLOR_RED"[%ld]"fmt""FONT_COLOR_RESET, media_content_gettid(), ##arg); \
} while (0)
-#define media_content_debug_func() do { \
+#define content_debug_func() do { \
LOGD(FONT_COLOR_RESET"[%ld]", media_content_gettid()); \
} while (0)
-#define media_content_sec_debug(fmt, arg...) do { \
+#define content_sec_debug(fmt, arg...) do { \
SECURE_LOGD(FONT_COLOR_CYAN"[%ld]"fmt""FONT_COLOR_RESET, media_content_gettid(), ##arg); \
} while (0)
-#define media_content_sec_warn(fmt, arg...) do { \
+#define content_sec_warn(fmt, arg...) do { \
SECURE_LOGW(FONT_COLOR_RED"[%ld]"fmt""FONT_COLOR_RESET, media_content_gettid(), ##arg); \
} while (0)
-#define media_content_sec_error(fmt, arg...) do { \
+#define content_sec_error(fmt, arg...) do { \
SECURE_LOGE(FONT_COLOR_RED"[%ld]"fmt""FONT_COLOR_RESET, media_content_gettid(), ##arg); \
} while (0)
#define ERR_BUF_LENGTH 256
-#define media_content_stderror(fmt) do { \
+#define content_stderror(fmt) do { \
char media_content_stderror_buf[ERR_BUF_LENGTH] = {0, }; \
strerror_r(errno, media_content_stderror_buf, ERR_BUF_LENGTH); \
LOGE(FONT_COLOR_RED fmt" : STANDARD ERROR [%s]"FONT_COLOR_RESET, media_content_stderror_buf); \
int audio_meta_destroy(audio_meta_h audio)
{
audio_meta_s *_audio = (audio_meta_s*)audio;
- media_content_retvm_if(_audio == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Audio handle is null");
+ content_retvm_if(_audio == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Audio handle is null");
SAFE_FREE(_audio->media_id);
SAFE_FREE(_audio->album);
int audio_meta_clone(audio_meta_h *dst, audio_meta_h src)
{
audio_meta_s *_src = (audio_meta_s*)src;
- media_content_retvm_if(_src == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Source handle is null");
+ content_retvm_if(_src == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Source handle is null");
audio_meta_s *_dst = (audio_meta_s*)calloc(1, sizeof(audio_meta_s));
- media_content_retvm_if(_dst == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+ content_retvm_if(_dst == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
_dst->media_id = g_strdup(_src->media_id);
_dst->album = g_strdup(_src->album);
int audio_meta_get_media_id(audio_meta_h audio, char **media_id)
{
audio_meta_s *_audio = (audio_meta_s*)audio;
- media_content_retvm_if(!_audio || !media_id, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
+ content_retvm_if(!_audio || !media_id, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
*media_id = g_strdup(_audio->media_id);
int audio_meta_get_album(audio_meta_h audio, char **album)
{
audio_meta_s *_audio = (audio_meta_s*)audio;
- media_content_retvm_if(!_audio || !album, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
+ content_retvm_if(!_audio || !album, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
/*album can be empty string*/
*album = g_strdup(_audio->album);
int audio_meta_get_artist(audio_meta_h audio, char **artist)
{
audio_meta_s *_audio = (audio_meta_s*)audio;
- media_content_retvm_if(!_audio || !artist, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
+ content_retvm_if(!_audio || !artist, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
/*artist can be empty string*/
*artist = g_strdup(_audio->artist);
int audio_meta_get_album_artist(audio_meta_h audio, char **album_artist)
{
audio_meta_s *_audio = (audio_meta_s*)audio;
- media_content_retvm_if(!_audio || !album_artist, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
+ content_retvm_if(!_audio || !album_artist, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
/*album_artist can be empty string*/
*album_artist = g_strdup(_audio->album_artist);
int audio_meta_get_genre(audio_meta_h audio, char **genre)
{
audio_meta_s *_audio = (audio_meta_s*)audio;
- media_content_retvm_if(!_audio || !genre, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
+ content_retvm_if(!_audio || !genre, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
/*genre can be empty string*/
*genre = g_strdup(_audio->genre);
int audio_meta_get_composer(audio_meta_h audio, char **composer)
{
audio_meta_s *_audio = (audio_meta_s*)audio;
- media_content_retvm_if(!_audio || !composer, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
+ content_retvm_if(!_audio || !composer, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
/*composer can be empty string*/
*composer = g_strdup(_audio->composer);
int audio_meta_get_year(audio_meta_h audio, char **year)
{
audio_meta_s *_audio = (audio_meta_s*)audio;
- media_content_retvm_if(!_audio || !year, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
+ content_retvm_if(!_audio || !year, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
/*year can be empty string*/
*year = g_strdup(_audio->year);
int audio_meta_get_recorded_date(audio_meta_h audio, char **recorded_date)
{
audio_meta_s *_audio = (audio_meta_s*)audio;
- media_content_retvm_if(!_audio || !recorded_date, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
+ content_retvm_if(!_audio || !recorded_date, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
*recorded_date = g_strdup(_audio->recorded_date);
int audio_meta_get_copyright(audio_meta_h audio, char **copyright)
{
audio_meta_s *_audio = (audio_meta_s*)audio;
- media_content_retvm_if(!_audio || !copyright, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
+ content_retvm_if(!_audio || !copyright, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
/*copyright can be empty string*/
*copyright = g_strdup(_audio->copyright);
int audio_meta_get_track_num(audio_meta_h audio, char **track_num)
{
audio_meta_s *_audio = (audio_meta_s*)audio;
- media_content_retvm_if(!_audio || !track_num, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
+ content_retvm_if(!_audio || !track_num, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
/*track_num can be empty string*/
*track_num = g_strdup(_audio->track_num);
int audio_meta_get_bit_rate(audio_meta_h audio, int *bit_rate)
{
audio_meta_s *_audio = (audio_meta_s*)audio;
- media_content_retvm_if(!_audio || !bit_rate, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
+ content_retvm_if(!_audio || !bit_rate, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
*bit_rate = _audio->bitrate;
int audio_meta_get_bitpersample(audio_meta_h audio, int *bitpersample)
{
audio_meta_s *_audio = (audio_meta_s*)audio;
- media_content_retvm_if(!_audio || !bitpersample, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
+ content_retvm_if(!_audio || !bitpersample, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
*bitpersample = _audio->bitpersample;
int audio_meta_get_sample_rate(audio_meta_h audio, int *sample_rate)
{
audio_meta_s *_audio = (audio_meta_s*)audio;
- media_content_retvm_if(!_audio || !sample_rate, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
+ content_retvm_if(!_audio || !sample_rate, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
*sample_rate = _audio->samplerate;
int audio_meta_get_channel(audio_meta_h audio, int *channel)
{
audio_meta_s *_audio = (audio_meta_s*)audio;
- media_content_retvm_if(!_audio || !channel, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
+ content_retvm_if(!_audio || !channel, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
*channel = _audio->channel;
int audio_meta_get_duration(audio_meta_h audio, int *duration)
{
audio_meta_s *_audio = (audio_meta_s*)audio;
- media_content_retvm_if(!_audio || !duration, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
+ content_retvm_if(!_audio || !duration, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
*duration = _audio->duration;
#ifdef TIZEN_FEATURE_COMPATIBILITY
int audio_meta_get_played_time(audio_meta_h audio, time_t* played_time)
{
- media_content_warn("DEPRECATION WARNING: audio_meta_get_played_time() is removed from 5.5.");
+ content_warn("DEPRECATION WARNING: audio_meta_get_played_time() is removed from 5.5.");
return MEDIA_CONTENT_ERROR_NONE;
}
int audio_meta_get_played_count(audio_meta_h audio, int *played_count)
{
- media_content_warn("DEPRECATION WARNING: audio_meta_get_played_count() is removed from 5.5.");
+ content_warn("DEPRECATION WARNING: audio_meta_get_played_count() is removed from 5.5.");
return MEDIA_CONTENT_ERROR_NONE;
}
int audio_meta_set_played_count(audio_meta_h audio, int played_count)
{
- media_content_warn("DEPRECATION WARNING: audio_meta_set_played_count() is removed from 5.5.");
+ content_warn("DEPRECATION WARNING: audio_meta_set_played_count() is removed from 5.5.");
return MEDIA_CONTENT_ERROR_NONE;
}
int audio_meta_set_played_time(audio_meta_h audio, time_t played_time)
{
- media_content_warn("DEPRECATION WARNING: audio_meta_set_played_time() is removed from 5.5.");
+ content_warn("DEPRECATION WARNING: audio_meta_set_played_time() is removed from 5.5.");
return MEDIA_CONTENT_ERROR_NONE;
}
int audio_meta_update_to_db(audio_meta_h audio)
{
- media_content_warn("DEPRECATION WARNING: audio_meta_update_to_db() is removed from 5.5.");
+ content_warn("DEPRECATION WARNING: audio_meta_update_to_db() is removed from 5.5.");
return MEDIA_CONTENT_ERROR_NONE;
}
sqlite3_stmt *stmt = NULL;
int item_count = 0;
- media_content_retvm_if(!STRING_VALID(media_id), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid media_id");
+ content_retvm_if(!STRING_VALID(media_id), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid media_id");
query_str = sqlite3_mprintf(SELECT_MEDIA_COUNT_FROM_MEDIA_BY_ID, media_id);
ret = _content_get_result(query_str, &stmt);
SQLITE3_SAFE_FREE(query_str);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
if (sqlite3_step(stmt) == SQLITE_ROW)
item_count = (int)sqlite3_column_int(stmt, 0);
SQLITE3_FINALIZE(stmt);
- media_content_retvm_if(item_count == 0, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid media_id");
+ content_retvm_if(item_count == 0, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid media_id");
return MEDIA_CONTENT_ERROR_NONE;
}
{
int ret = MEDIA_CONTENT_ERROR_NONE;
char *sql = NULL;
- media_content_retvm_if(!STRING_VALID(media_id), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
+ content_retvm_if(!STRING_VALID(media_id), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
sql = sqlite3_mprintf(INSERT_BOOKMARK_TO_BOOKMARK, media_id, time, thumbnail_path, MEDIA_CONTENT_EMPTY_STRING);
ret = _content_query_sql(sql);
{
int ret = MEDIA_CONTENT_ERROR_NONE;
char *query_str = NULL;
- media_content_retvm_if(bookmark_id < 0, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
+ content_retvm_if(bookmark_id < 0, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
query_str = sqlite3_mprintf(DELETE_BOOKMARK_FROM_BOOKMARK, bookmark_id);
ret = _content_query_sql(query_str);
int media_bookmark_get_bookmark_count_from_db(filter_h filter, int *bookmark_count)
{
- media_content_retvm_if(!bookmark_count, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
+ content_retvm_if(!bookmark_count, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
return _media_db_get_group_count(filter, MEDIA_GROUP_BOOKMARK, bookmark_count);
}
int media_bookmark_foreach_bookmark_from_db(filter_h filter, media_bookmark_cb callback, void *user_data)
{
- media_content_retvm_if(!callback, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid paramter");
+ content_retvm_if(!callback, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid paramter");
return _media_db_get_bookmark(NULL, filter, callback, user_data);
}
int media_bookmark_destroy(media_bookmark_h bookmark)
{
media_bookmark_s *_bookmark = (media_bookmark_s *)bookmark;
- media_content_retvm_if(!_bookmark, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid paramter");
+ content_retvm_if(!_bookmark, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid paramter");
SAFE_FREE(_bookmark->media_id);
SAFE_FREE(_bookmark->thumbnail_path);
int media_bookmark_clone(media_bookmark_h *dst, media_bookmark_h src)
{
media_bookmark_s *_src = (media_bookmark_s *)src;
- media_content_retvm_if(!_src, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid source");
+ content_retvm_if(!_src, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid source");
media_bookmark_s *_dst = (media_bookmark_s *)calloc(1, sizeof(media_bookmark_s));
- media_content_retvm_if(!_dst, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+ content_retvm_if(!_dst, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
_dst->bookmark_id = _src->bookmark_id;
_dst->media_id = g_strdup(_src->media_id);
int media_bookmark_get_bookmark_id(media_bookmark_h bookmark, int *bookmark_id)
{
media_bookmark_s *_bookmark = (media_bookmark_s *)bookmark;
- media_content_retvm_if(!_bookmark || !bookmark_id, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
+ content_retvm_if(!_bookmark || !bookmark_id, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
*bookmark_id = _bookmark->bookmark_id;
int media_bookmark_get_marked_time(media_bookmark_h bookmark, time_t* marked_time)
{
media_bookmark_s *_bookmark = (media_bookmark_s *)bookmark;
- media_content_retvm_if(!_bookmark || !marked_time, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
+ content_retvm_if(!_bookmark || !marked_time, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
*marked_time = _bookmark->marked_time;
int media_bookmark_get_thumbnail_path(media_bookmark_h bookmark, char **path)
{
media_bookmark_s *_bookmark = (media_bookmark_s *)bookmark;
- media_content_retvm_if(!_bookmark || !path, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
+ content_retvm_if(!_bookmark || !path, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
*path = g_strdup(_bookmark->thumbnail_path);
int media_bookmark_get_name(media_bookmark_h bookmark, char **name)
{
media_bookmark_s *_bookmark = (media_bookmark_s *)bookmark;
- media_content_retvm_if(!_bookmark || !name, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
+ content_retvm_if(!_bookmark || !name, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
*name = g_strdup(_bookmark->name);
int media_bookmark_set_name(media_bookmark_h bookmark, const char *name)
{
media_bookmark_s *_bookmark = (media_bookmark_s *)bookmark;
- media_content_retvm_if(!_bookmark, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
+ content_retvm_if(!_bookmark, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
_bookmark->name = g_strdup(STRING_VALID(name) ? name : MEDIA_CONTENT_EMPTY_STRING);
int ret = MEDIA_CONTENT_ERROR_NONE;
media_bookmark_s *_bookmark = (media_bookmark_s *)bookmark;
char *sql = NULL;
- media_content_retvm_if(!_bookmark, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
+ content_retvm_if(!_bookmark, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
sql = sqlite3_mprintf(UPDATE_BOOKMARK_FROM_BOOKMARK, _bookmark->name, _bookmark->bookmark_id);
ret = _content_query_sql(sql);
{
int ret = MEDIA_CONTENT_ERROR_NONE;
- media_content_retvm_if(!STRING_VALID(media_id), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid media_id");
- media_content_retvm_if(!bookmark, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid bookmark");
+ content_retvm_if(!STRING_VALID(media_id), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid media_id");
+ content_retvm_if(!bookmark, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid bookmark");
ret = __media_bookmark_check_media_id(media_id);
- media_content_retvm_if(ret != MEDIA_CONTENT_ERROR_NONE, ret, "Not exist media_id");
+ content_retvm_if(ret != MEDIA_CONTENT_ERROR_NONE, ret, "Not exist media_id");
media_bookmark_s *_bookmark = (media_bookmark_s *)calloc(1, sizeof(media_bookmark_s));
- media_content_retvm_if(!_bookmark, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+ content_retvm_if(!_bookmark, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
_bookmark->media_id = g_strdup(media_id);
_bookmark->bookmark_id = -1;
int media_bookmark_set_thumbnail_path(media_bookmark_h bookmark, const char *path)
{
media_bookmark_s *_bookmark = (media_bookmark_s *)bookmark;
- media_content_retvm_if(!_bookmark, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid bookmark");
+ content_retvm_if(!_bookmark, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid bookmark");
_bookmark->thumbnail_path = g_strdup(path);
sqlite3_stmt *stmt = NULL;
int bookmark_id = -1;
- media_content_retvm_if(!_bookmark, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid bookmark");
- media_content_retvm_if(_bookmark->bookmark_id != -1, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid bookmark");
+ content_retvm_if(!_bookmark, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid bookmark");
+ content_retvm_if(_bookmark->bookmark_id != -1, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid bookmark");
sql = sqlite3_mprintf(INSERT_BOOKMARK_TO_BOOKMARK,
_bookmark->media_id, _bookmark->marked_time, _bookmark->thumbnail_path, _bookmark->name);
ret = _content_query_sql(sql);
SQLITE3_SAFE_FREE(sql);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
sql = sqlite3_mprintf(SELECT_BOOKMARK_ID_FROM_BOOKMARK, _bookmark->media_id, _bookmark->marked_time);
ret = _content_get_result(sql, &stmt);
SQLITE3_SAFE_FREE(sql);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
if (sqlite3_step(stmt) == SQLITE_ROW)
bookmark_id = sqlite3_column_int(stmt, 0);
int ret = MEDIA_CONTENT_ERROR_NONE;
char *query = NULL;
- media_content_retvm_if(!STRING_VALID(select_query), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid select_query");
+ content_retvm_if(!STRING_VALID(select_query), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid select_query");
/* If 'option_query' is NULL, 'condition_query' is also NULL. */
if (option_query) {
{
int err = MEDIA_CONTENT_ERROR_NONE;
- media_content_retvm_if(_content_get_db_handle() == NULL, MEDIA_CONTENT_ERROR_DB_FAILED, "database is not connected");
- media_content_retvm_if(!STRING_VALID(query), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid query");
+ content_retvm_if(_content_get_db_handle() == NULL, MEDIA_CONTENT_ERROR_DB_FAILED, "database is not connected");
+ content_retvm_if(!STRING_VALID(query), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid query");
- media_content_sec_debug("Query[%s]", query);
+ content_sec_debug("Query[%s]", query);
err = sqlite3_prepare_v2(_content_get_db_handle(), query, strlen(query), stmt, NULL);
if (err != SQLITE_OK) {
- media_content_error("Failed to sqlite3_prepare_v2[%s]", sqlite3_errmsg(_content_get_db_handle()));
+ content_error("Failed to sqlite3_prepare_v2[%s]", sqlite3_errmsg(_content_get_db_handle()));
if (err == SQLITE_BUSY)
return MEDIA_CONTENT_ERROR_DB_BUSY;
else if (err == SQLITE_PERM)
char query[MAX_QUERY_SIZE] = {0, };
memset(query, '\0', sizeof(query));
- media_content_retvm_if(_content_get_db_handle() == NULL, MEDIA_CONTENT_ERROR_DB_FAILED, "database is not connected");
- media_content_retvm_if(!STRING_VALID(select_query1), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid select_query1");
- media_content_retvm_if(!STRING_VALID(select_query2), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid select_query2");
+ content_retvm_if(_content_get_db_handle() == NULL, MEDIA_CONTENT_ERROR_DB_FAILED, "database is not connected");
+ content_retvm_if(!STRING_VALID(select_query1), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid select_query1");
+ content_retvm_if(!STRING_VALID(select_query2), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid select_query2");
if (!STRING_VALID(condition_query1))
condition_query1 = (char *)" ";
} else if (len >= sizeof(query)) {
query[MAX_QUERY_SIZE -1] = '\0';
} else {
- media_content_error("snprintf failed");
+ content_error("snprintf failed");
return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
- media_content_sec_debug("Query : [%s]", query);
+ content_sec_debug("Query : [%s]", query);
err = sqlite3_prepare_v2(_content_get_db_handle(), query, strlen(query), stmt, NULL);
if (err != SQLITE_OK) {
- media_content_error("DB_FAILED(0x%08x) fail to sqlite3_prepare(), %s", MEDIA_CONTENT_ERROR_DB_FAILED, sqlite3_errmsg(_content_get_db_handle()));
+ content_error("DB_FAILED(0x%08x) fail to sqlite3_prepare(), %s", MEDIA_CONTENT_ERROR_DB_FAILED, sqlite3_errmsg(_content_get_db_handle()));
if (err == SQLITE_BUSY) {
- media_content_error(" BUSY ERROR");
+ content_error(" BUSY ERROR");
return MEDIA_CONTENT_ERROR_DB_BUSY;
} else if (err == SQLITE_PERM) {
- media_content_error("PERMISSION EROR");
+ content_error("PERMISSION EROR");
return MEDIA_CONTENT_ERROR_PERMISSION_DENIED;
} else {
- media_content_error("OTHER ERROR");
+ content_error("OTHER ERROR");
return MEDIA_CONTENT_ERROR_DB_FAILED;
}
}
if (internal_error == MS_MEDIA_ERR_NONE)
return MEDIA_CONTENT_ERROR_NONE;
- media_content_error("MS Error[%d]", internal_error);
+ content_error("MS Error[%d]", internal_error);
switch (internal_error) {
case MS_MEDIA_ERR_INVALID_PARAMETER:
int ret = MEDIA_CONTENT_ERROR_NONE;
g_mutex_lock(&db_mutex);
- media_content_info("ref count : %d", ref_count);
+ content_info("ref count : %d", ref_count);
if (ref_count == 0) {
if (db_handle == NULL) {
if (ret == MEDIA_CONTENT_ERROR_NONE)
ref_count++;
} else {
- media_content_error("Wrong DB Connection status");
+ content_error("Wrong DB Connection status");
ret = MEDIA_CONTENT_ERROR_DB_FAILED;
}
} else {
if (db_handle != NULL) {
ref_count++;
} else {
- media_content_error("Wrong DB Handle status");
+ content_error("Wrong DB Handle status");
ret = MEDIA_CONTENT_ERROR_DB_FAILED;
}
}
- media_content_info("ref count changed to: %d", ref_count);
+ content_info("ref count changed to: %d", ref_count);
g_mutex_unlock(&db_mutex);
return ret;
int media_content_connect_with_uid(uid_t uid)
{
- media_content_sec_debug("media_content_connect_with_uid [%d]", uid);
+ content_sec_debug("media_content_connect_with_uid [%d]", uid);
content_g_uid = uid;
return media_content_connect();
int media_content_disconnect(void)
{
g_mutex_lock(&db_mutex);
- media_content_debug("ref count : %d", ref_count);
+ content_debug("ref count : %d", ref_count);
if (db_handle && ref_count > 0) {
if (--ref_count == 0) {
db_handle = NULL;
}
} else {
- media_content_error("Database is not connected");
+ content_error("Database is not connected");
g_mutex_unlock(&db_mutex);
return MEDIA_CONTENT_ERROR_DB_FAILED;
}
g_mutex_unlock(&db_mutex);
- media_content_info("ref count changed to: %d", ref_count);
+ content_info("ref count changed to: %d", ref_count);
return MEDIA_CONTENT_ERROR_NONE;
}
char storage_id[MEDIA_CONTENT_UUID_SIZE+1] = {0,};
char repl_path[MAX_PATH_LEN] = {0,};
- media_content_retvm_if(!STRING_VALID(path), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid path");
+ content_retvm_if(!STRING_VALID(path), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid path");
- media_content_sec_debug("Path : %s", path);
+ content_sec_debug("Path : %s", path);
memset(repl_path, 0, sizeof(repl_path));
ret = _media_content_replace_path(path, repl_path);
- media_content_retvm_if(!STRING_VALID(repl_path), MEDIA_CONTENT_ERROR_INVALID_OPERATION, "path replacement failed");
+ content_retvm_if(!STRING_VALID(repl_path), MEDIA_CONTENT_ERROR_INVALID_OPERATION, "path replacement failed");
ret = _media_util_check_ignore_file(repl_path, &ignore_file);
- media_content_retvm_if(ignore_file == TRUE, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid path");
+ content_retvm_if(ignore_file == TRUE, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid path");
memset(storage_id, 0x00, sizeof(storage_id));
ret = media_svc_get_storage_id(_content_get_db_handle(), repl_path, storage_id, _content_get_uid());
if (ret != MS_MEDIA_ERR_NONE) {
- media_content_error("media_svc_get_storage_id failed : %d", ret);
+ content_error("media_svc_get_storage_id failed : %d", ret);
return _content_error_capi(ret);
}
ret = _media_util_check_ignore_dir(folder_path, &ignore_dir);
g_free(folder_path);
- media_content_retvm_if(ignore_dir == TRUE, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid folder path");
+ content_retvm_if(ignore_dir == TRUE, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid folder path");
/* check feature */
- media_content_retvm_if(!_media_util_check_support_media_type(repl_path), MEDIA_CONTENT_ERROR_NOT_SUPPORTED, "Unsupported media type");
+ content_retvm_if(!_media_util_check_support_media_type(repl_path), MEDIA_CONTENT_ERROR_NOT_SUPPORTED, "Unsupported media type");
ms_user_storage_type_e storage_type;
ret = ms_user_get_storage_type(_content_get_uid(), repl_path, &storage_type);
if (ret != MS_MEDIA_ERR_NONE) {
- media_content_sec_error("ms_user_get_storage_type failed : %d (%s)", ret, repl_path);
+ content_sec_error("ms_user_get_storage_type failed : %d (%s)", ret, repl_path);
return _content_error_capi(ret);
}
ret = media_svc_check_item_exist_by_path(_content_get_db_handle(), storage_id, repl_path);
/* Refresh */
ret = media_svc_refresh_item(_content_get_db_handle(), false, storage_id, storage_type, repl_path, _content_get_uid());
if (ret != MS_MEDIA_ERR_NONE) {
- media_content_error("media_svc_refresh_item failed : %d", ret);
+ content_error("media_svc_refresh_item failed : %d", ret);
return _content_error_capi(ret);
}
ret = media_svc_insert_item_immediately(_content_get_db_handle(), storage_id, storage_type, repl_path, _content_get_uid());
if (ret != MS_MEDIA_ERR_NONE) {
if (ret == MS_MEDIA_ERR_DB_CONSTRAINT_FAIL) {
- media_content_sec_error("This item is already inserted. This may be normal operation because other process already did this (%s)", repl_path);
+ content_sec_error("This item is already inserted. This may be normal operation because other process already did this (%s)", repl_path);
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_sec_error("media_svc_insert_item_immediately failed : %d (%s)", ret, repl_path);
+ content_sec_error("media_svc_insert_item_immediately failed : %d (%s)", ret, repl_path);
}
return _content_error_capi(ret);
}
} else {
- media_content_error("media_svc_check_item_exist_by_path failed : %d", ret);
+ content_error("media_svc_check_item_exist_by_path failed : %d", ret);
return _content_error_capi(ret);
}
} else if (check_file == MEDIA_CONTENT_ERROR_PERMISSION_DENIED) {
- media_content_error("You have no permission for this file %d", ret);
+ content_error("You have no permission for this file %d", ret);
return MEDIA_CONTENT_ERROR_PERMISSION_DENIED;
} else {
/* This means this path has to be deleted */
- media_content_debug("This path doesn't exists in file system... So now start to delete it from DB");
+ content_debug("This path doesn't exists in file system... So now start to delete it from DB");
ret = media_svc_delete_item_by_path(_content_get_db_handle(), storage_id, repl_path, _content_get_uid());
if (ret != MS_MEDIA_ERR_NONE) {
if (ret == MS_MEDIA_ERR_DB_NO_RECORD) {
- media_content_error("Does not exist in media DB also... So, this is an invalid parameter");
+ content_error("Does not exist in media DB also... So, this is an invalid parameter");
return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
- media_content_error("media_svc_delete_item_by_path failed : %d", ret);
+ content_error("media_svc_delete_item_by_path failed : %d", ret);
return _content_error_capi(ret);
}
}
result->request_type != MEDIA_REQUEST_SCAN_PARTIAL &&
result->request_type != MEDIA_RECURSIVE_START) {
if (cb_data && cb_data->callback) {
- media_content_debug("begin:User callback is being called now, result=%d", err);
+ content_debug("begin:User callback is being called now, result=%d", err);
cb_data->callback(err, cb_data->user_data);
- media_content_debug("end:User callback is being called now, result=%d", err);
+ content_debug("end:User callback is being called now, result=%d", err);
}
SAFE_FREE(cb_data);
}
#else
if (cb_data && cb_data->callback) {
- media_content_debug("User callback is being called now");
+ content_debug("User callback is being called now");
cb_data->callback(err, cb_data->user_data);
}
media_content_scan_cb_data_v2 *cb_data = user_data;
media_content_complete_phase_e complete_phase = -1;
if (!cb_data)
- media_content_debug("cb_data is NULL");
+ content_debug("cb_data is NULL");
err = _content_error_capi(result->result);
- media_content_debug("result is %d", err);
+ content_debug("result is %d", err);
if (result->request_type == MEDIA_REQUEST_SCAN_PARTIAL)
complete_phase = MEDIA_CONTENT_SCAN_PARTIAL_COMPLETE;
if (cb_data && cb_data->callback)
cb_data->callback(err, complete_phase, cb_data->user_data);
else
- media_content_debug("run error");
+ content_debug("run error");
if ((result->request_type != MEDIA_REQUEST_SCAN_COMPLETE) &&
(result->request_type != MEDIA_REQUEST_SCAN_PARTIAL) &&
char repl_path[MAX_PATH_LEN] = {0, };
ms_user_storage_type_e storage_type = MS_USER_STORAGE_INTERNAL;
- media_content_retvm_if(!STRING_VALID(path), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid path");
+ content_retvm_if(!STRING_VALID(path), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid path");
memset(repl_path, 0, sizeof(repl_path));
ret = _media_content_replace_path(path, repl_path);
- media_content_retvm_if(!STRING_VALID(repl_path), MEDIA_CONTENT_ERROR_INVALID_OPERATION, "path replacement failed");
+ content_retvm_if(!STRING_VALID(repl_path), MEDIA_CONTENT_ERROR_INVALID_OPERATION, "path replacement failed");
memset(storage_id, 0x00, sizeof(storage_id));
ret = _media_content_check_dir(repl_path);
- media_content_retvm_if(ret == MEDIA_CONTENT_ERROR_PERMISSION_DENIED, ret, "Permission Denied");
+ content_retvm_if(ret == MEDIA_CONTENT_ERROR_PERMISSION_DENIED, ret, "Permission Denied");
if (ret == MEDIA_CONTENT_ERROR_NONE) {
/* If directory exist check that's ignore directory or not*/
ret = _media_util_check_ignore_dir(repl_path, &ignore_dir);
- media_content_retvm_if((ignore_dir == TRUE || ret != MEDIA_CONTENT_ERROR_NONE), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid folder path");
+ content_retvm_if((ignore_dir == TRUE || ret != MEDIA_CONTENT_ERROR_NONE), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid folder path");
} else {
/* This means this folder has to be deleted */
/* Or, it is real invalid path.. check storage type */
ret = ms_user_get_storage_type(_content_get_uid(), repl_path, &storage_type);
if (ret != MS_MEDIA_ERR_NONE) {
- media_content_sec_error("ms_user_get_storage_type failed : %d (%s)", ret, repl_path);
+ content_sec_error("ms_user_get_storage_type failed : %d (%s)", ret, repl_path);
return _content_error_capi(ret);
}
- media_content_debug("This path doesn't exists in file system... So will be deleted it from DB");
+ content_debug("This path doesn't exists in file system... So will be deleted it from DB");
}
ret = media_svc_get_storage_id(_content_get_db_handle(), repl_path, storage_id, _content_get_uid());
if (ret != MS_MEDIA_ERR_NONE) {
- media_content_error("media_svc_get_storage_id failed : %d", ret);
+ content_error("media_svc_get_storage_id failed : %d", ret);
return _content_error_capi(ret);
}
media_content_scan_cb_data *cb_data = NULL;
cb_data = (media_content_scan_cb_data *)malloc(sizeof(media_content_scan_cb_data));
- media_content_retvm_if(cb_data == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+ content_retvm_if(cb_data == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
cb_data->callback = callback;
cb_data->user_data = user_data;
ret = media_directory_scanning_async(repl_path, storage_id, is_recursive, _media_content_scan_cb, cb_data, _content_get_uid());
if (ret != MS_MEDIA_ERR_NONE) {
- media_content_error("media_directory_scanning_async failed : %d", ret);
+ content_error("media_directory_scanning_async failed : %d", ret);
SAFE_FREE(cb_data);
}
bool ignore_dir = FALSE;
char storage_id[MEDIA_CONTENT_UUID_SIZE+1] = {0, };
- media_content_retvm_if(!STRING_VALID(path), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid path");
+ content_retvm_if(!STRING_VALID(path), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid path");
memset(storage_id, 0x00, sizeof(storage_id));
ret = _media_util_check_ignore_dir(path, &ignore_dir);
- media_content_retvm_if(ignore_dir, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid folder path");
+ content_retvm_if(ignore_dir, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid folder path");
ret = _media_content_check_dir(path);
- media_content_retvm_if(ret == MEDIA_CONTENT_ERROR_PERMISSION_DENIED, ret, "Permission Denied");
- media_content_retvm_if(ret == MEDIA_CONTENT_ERROR_INVALID_PARAMETER, ret, "invalid path[%s]", path);
+ content_retvm_if(ret == MEDIA_CONTENT_ERROR_PERMISSION_DENIED, ret, "Permission Denied");
+ content_retvm_if(ret == MEDIA_CONTENT_ERROR_INVALID_PARAMETER, ret, "invalid path[%s]", path);
media_content_scan_cb_data_v2* cb_data = NULL;
cb_data = (media_content_scan_cb_data_v2*)malloc(sizeof(media_content_scan_cb_data_v2));
- media_content_retvm_if(cb_data == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+ content_retvm_if(cb_data == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
cb_data->callback = callback;
cb_data->user_data = user_data;
ret = media_directory_scanning_async(path, storage_id, is_recursive, _media_content_scan_cb_v2, cb_data, _content_get_uid());
if (ret != MS_MEDIA_ERR_NONE)
- media_content_error("media_directory_scanning_async failed : %d", ret);
+ content_error("media_directory_scanning_async failed : %d", ret);
return _content_error_capi(ret);
}
int ret = MEDIA_CONTENT_ERROR_NONE;
char repl_path[MAX_PATH_LEN] = {0, };
- media_content_retvm_if(!STRING_VALID(path), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid path");
+ content_retvm_if(!STRING_VALID(path), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid path");
memset(repl_path, 0, sizeof(repl_path));
ret = _media_content_replace_path(path, repl_path);
- media_content_retvm_if(!STRING_VALID(repl_path), MEDIA_CONTENT_ERROR_INVALID_OPERATION, "path replacement failed");
+ content_retvm_if(!STRING_VALID(repl_path), MEDIA_CONTENT_ERROR_INVALID_OPERATION, "path replacement failed");
ret = media_directory_scanning_cancel(repl_path, _content_get_uid());
if (ret != MS_MEDIA_ERR_NONE)
- media_content_error("media_directory_scanning_async failed : %d", ret);
+ content_error("media_directory_scanning_async failed : %d", ret);
return _content_error_capi(ret);
}
int ret = MEDIA_CONTENT_ERROR_NONE;
media_noti_cb_s *noti_info = NULL;
- media_content_retvm_if(noti_handle == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "handle is NULL");
- media_content_retvm_if(callback == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "callback is NULL");
+ content_retvm_if(noti_handle == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "handle is NULL");
+ content_retvm_if(callback == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "callback is NULL");
noti_info = (media_noti_cb_s *)calloc(1, sizeof(media_noti_cb_s));
- media_content_retvm_if(noti_info == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "Failed to create noti info");
+ content_retvm_if(noti_info == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "Failed to create noti info");
noti_info->update_noti_cb = callback;
noti_info->user_data = user_data;
#ifdef TIZEN_FEATURE_COMPATIBILITY
int media_content_set_db_updated_cb(media_content_db_update_cb callback, void *user_data)
{
- media_content_warn("DEPRECATION WARNING: media_content_set_db_updated_cb() is removed from 5.0.");
+ content_warn("DEPRECATION WARNING: media_content_set_db_updated_cb() is removed from 5.0.");
return MEDIA_CONTENT_ERROR_NONE;
}
int ret = MEDIA_CONTENT_ERROR_NONE;
filter_s *_filter = (filter_s *)filter;
- media_content_retv_if(!_filter, MEDIA_CONTENT_ERROR_NONE);
+ content_retv_if(!_filter, MEDIA_CONTENT_ERROR_NONE);
if (STRING_VALID(_filter->condition)) {
ret = _media_filter_build_condition(_filter->is_full_condition, _filter->condition, _filter->condition_collate_type, condition_query);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
}
ret = _media_filter_build_option(filter, option_query);
break;
default:
- media_content_error("Invalid group type [%d]", group_type);
+ content_error("Invalid group type [%d]", group_type);
return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
g_free(select_query);
g_free(condition_query);
g_free(option_query);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
if (sqlite3_step(stmt) == SQLITE_ROW)
*group_count = sqlite3_column_int(stmt, 0);
snprintf(select_query, sizeof(select_query), SELECT_UHD_GROUP_COUNT, __media_db_get_group_name(group));
}
ret = __media_db_make_query(filter, &condition_query, &option_query);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
if (option_query) {
tmp_option = g_strconcat(option_query, ")", NULL);
ret = _content_query_prepare(select_query, condition_query, option_query, &stmt);
SAFE_FREE(condition_query);
SAFE_FREE(option_query);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
if (sqlite3_step(stmt) == SQLITE_ROW)
*group_count = sqlite3_column_int(stmt, 0);
snprintf(select_query, sizeof(select_query), SELECT_UHD_GROUP_LIST, __media_db_get_group_name(group));
}
ret = __media_db_make_query(filter, &condition_query, &option_query);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
ret = _content_query_prepare(select_query, condition_query, option_query, &stmt);
SAFE_FREE(condition_query);
SAFE_FREE(option_query);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
while (sqlite3_step(stmt) == SQLITE_ROW) {
name = g_strdup((const char *)sqlite3_column_text(stmt, 0));
const char* group_name = __media_db_get_group_name(group);
if (!STRING_VALID(group_name)) {
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
}
if (group < MEDIA_PVR_GROUP_DURATION) { /*media content*/
}
ret = __media_db_make_query(filter, &condition_query, &option_query);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
if (STRING_VALID(option_query))
snprintf(group_query, sizeof(group_query), "GROUP BY %s %s", group_name, option_query);
ret = _content_query_prepare(select_query, condition_query, group_query, &stmt);
SAFE_FREE(condition_query);
SAFE_FREE(option_query);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
while (sqlite3_step(stmt) == SQLITE_ROW) {
if (STRING_VALID((const char *)sqlite3_column_text(stmt, 0)))
break;
default:
- media_content_error("Invalid group type [%d]", group_type);
+ content_error("Invalid group type [%d]", group_type);
return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
g_free(select_query);
g_free(condition_query);
g_free(option_query);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
if (sqlite3_step(stmt) == SQLITE_ROW)
*group_count = sqlite3_column_int(stmt, 0);
g_free(select_query);
g_free(condition_query);
g_free(option_query);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
if (sqlite3_step(stmt) == SQLITE_ROW)
*group_count = sqlite3_column_int(stmt, 0);
g_free(select_query);
g_free(condition_query);
g_free(option_query);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
while (sqlite3_step(stmt) == SQLITE_ROW) {
name = g_strdup((const char *)sqlite3_column_text(stmt, 0));
snprintf(select_query, sizeof(select_query), SELECT_ALBUM_LIST);
#endif
ret = __media_db_make_query(filter, &condition_query, &option_query);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
ret = _content_query_prepare(select_query, condition_query, option_query, &stmt);
SAFE_FREE(condition_query);
SAFE_FREE(option_query);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
while (sqlite3_step(stmt) == SQLITE_ROW) {
media_album_s *album = (media_album_s*)calloc(1, sizeof(media_album_s));
if (album == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
SQLITE3_FINALIZE(stmt);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
snprintf(select_query, sizeof(select_query), SELECT_FOLDER_LIST);
#endif
ret = __media_db_make_query(filter, &condition_query, &option_query);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
ret = _content_query_prepare(select_query, condition_query, option_query, &stmt);
SAFE_FREE(condition_query);
SAFE_FREE(option_query);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
while (sqlite3_step(stmt) == SQLITE_ROW) {
media_folder_s *_folder = (media_folder_s*)calloc(1, sizeof(media_folder_s));
if (_folder == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
SQLITE3_FINALIZE(stmt);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
sqlite3_stmt *stmt = NULL;
ret = __media_db_make_query(filter, &condition_query, &option_query);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
ret = _content_query_prepare(SELECT_PLAYLIST_LIST, condition_query, option_query, &stmt);
SAFE_FREE(condition_query);
SAFE_FREE(option_query);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
while (sqlite3_step(stmt) == SQLITE_ROW) {
media_playlist_s *_playlist = (media_playlist_s*)calloc(1, sizeof(media_playlist_s));
if (_playlist == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
SQLITE3_FINALIZE(stmt);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
g_free(select_query);
g_free(condition_query);
g_free(option_query);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
while (sqlite3_step(stmt) == SQLITE_ROW) {
int playlist_member_id = 0;
media_info_s *_media = (media_info_s*)calloc(1, sizeof(media_info_s));
if (_media == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
SQLITE3_FINALIZE(stmt);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
g_free(select_query);
g_free(condition_query);
g_free(option_query);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
while (sqlite3_step(stmt) == SQLITE_ROW) {
media_tag_s *_tag = (media_tag_s*)calloc(1, sizeof(media_tag_s));
if (_tag == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
SQLITE3_FINALIZE(stmt);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
#endif
ret = __media_db_make_query(filter, &condition_query, &option_query);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
ret = _content_query_prepare(select_query, condition_query, option_query, &stmt);
SAFE_FREE(condition_query);
SAFE_FREE(option_query);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
while (sqlite3_step(stmt) == SQLITE_ROW) {
media_bookmark_s *bookmark = (media_bookmark_s*)calloc(1, sizeof(media_bookmark_s));
if (bookmark == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
SQLITE3_FINALIZE(stmt);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
}
#endif
ret = __media_db_make_query(filter, &condition_query, &option_query);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
ret = _content_query_prepare(select_query, condition_query, option_query, &stmt);
SAFE_FREE(condition_query);
SAFE_FREE(option_query);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
while (sqlite3_step(stmt) == SQLITE_ROW) {
media_face_s *face = (media_face_s*)calloc(1, sizeof(media_face_s));
if (face == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
SQLITE3_FINALIZE(stmt);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
break;
default:
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
ret = __media_db_make_query(filter, &condition_query, &option_query);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
ret = _content_query_prepare(select_query, condition_query, option_query, &stmt);
SAFE_FREE(condition_query);
SAFE_FREE(option_query);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
if (sqlite3_step(stmt) == SQLITE_ROW)
*item_count = sqlite3_column_int(stmt, 0);
break;
#endif
default:
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
ret = __media_db_make_query(filter, &condition_query, &option_query);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
if (need_bracket) {
tmp_option = g_strconcat(option_query, ")", NULL);
ret = _content_query_prepare(select_query, condition_query, option_query, &stmt);
SAFE_FREE(condition_query);
SAFE_FREE(option_query);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
if (sqlite3_step(stmt) == SQLITE_ROW)
*item_count = sqlite3_column_int(stmt, 0);
break;
default:
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
ret = __media_db_make_query(filter, &condition_query, &option_query);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
ret = _content_query_prepare(select_query, condition_query, option_query, &stmt);
SAFE_FREE(condition_query);
SAFE_FREE(option_query);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
while (sqlite3_step(stmt) == SQLITE_ROW) {
media_info_s *item = (media_info_s*)calloc(1, sizeof(media_info_s));
if (item == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
SQLITE3_FINALIZE(stmt);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
break;
default:
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
ret = __media_db_make_query(filter, &condition_query, &option_query);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
ret = _content_query_prepare(select_query, condition_query, option_query, &stmt);
SAFE_FREE(condition_query);
SAFE_FREE(option_query);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
while (sqlite3_step(stmt) == SQLITE_ROW) {
media_info_s *item = (media_info_s*)calloc(1, sizeof(media_info_s));
if (item == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
SQLITE3_FINALIZE(stmt);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
if (ret != MEDIA_CONTENT_ERROR_NONE) {
SAFE_FREE(condition_query1);
SAFE_FREE(option_query1);
- media_content_error("create select_query1 failed");
+ content_error("create select_query1 failed");
return ret;
}
SAFE_FREE(option_query1);
SAFE_FREE(condition_query2);
SAFE_FREE(option_query2);
- media_content_error("create select_query2 failed");
+ content_error("create select_query2 failed");
return ret;
}
SAFE_FREE(option_query1);
SAFE_FREE(condition_query2);
SAFE_FREE(option_query2);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
while (sqlite3_step(stmt) == SQLITE_ROW) {
media_info_s *item = (media_info_s*)calloc(1, sizeof(media_info_s));
if (item == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
SQLITE3_FINALIZE(stmt);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
}
#endif
ret = __media_db_make_query(filter, &condition_query, &option_query);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
/* If 'filter' is not NULL, 'option_query' must be created. */
if (option_query) {
ret = _content_query_prepare(select_query, condition_query, option_query, &stmt);
SAFE_FREE(condition_query);
SAFE_FREE(option_query);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
if (sqlite3_step(stmt) == SQLITE_ROW)
*item_count = sqlite3_column_int(stmt, 0);
}
#endif
ret = __media_db_make_query(filter, &condition_query, &option_query);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
ret = _content_query_prepare(select_query, condition_query, option_query, &stmt);
SAFE_FREE(condition_query);
SAFE_FREE(option_query);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
while (sqlite3_step(stmt) == SQLITE_ROW) {
media_info_s *item = (media_info_s*)calloc(1, sizeof(media_info_s));
if (item == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
SQLITE3_FINALIZE(stmt);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
sqlite3_stmt *stmt = NULL;
ret = __media_db_make_query(filter, &condition_query, &option_query);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
ret = _content_query_prepare(SELECT_STORAGE_LIST, condition_query, option_query, &stmt);
SAFE_FREE(condition_query);
SAFE_FREE(option_query);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
while (sqlite3_step(stmt) == SQLITE_ROW) {
media_storage_s *_storage = (media_storage_s*)calloc(1, sizeof(media_storage_s));
if (_storage == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
SQLITE3_FINALIZE(stmt);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
ret = _content_get_result(select_query, &stmt);
SQLITE3_SAFE_FREE(select_query);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
if (sqlite3_step(stmt) == SQLITE_ROW) {
*storage_id = g_strdup((const char *)sqlite3_column_text(stmt, 0));
} else {
- media_content_error("Invalid media_id[%s]", media_id);
+ content_error("Invalid media_id[%s]", media_id);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
}
ret = __media_db_make_query(filter, &condition_query, &option_query);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
ret = _content_query_prepare(select_query, condition_query, option_query, &stmt);
SAFE_FREE(condition_query);
SAFE_FREE(option_query);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
while (sqlite3_step(stmt) == SQLITE_ROW) {
media_pvr_s *item = (media_pvr_s*)calloc(1, sizeof(media_pvr_s));
if (item == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
SQLITE3_FINALIZE(stmt);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
SAFE_STRLCAT(select_query, SELECT_PVR_LIST, sizeof(select_query));
ret = __media_db_make_query(filter, &condition_query, &option_query);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
ret = _content_query_prepare(select_query, condition_query, option_query, &stmt);
SAFE_FREE(condition_query);
SAFE_FREE(option_query);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
while (sqlite3_step(stmt) == SQLITE_ROW) {
media_pvr_s *_pvr = (media_pvr_s*)calloc(1, sizeof(media_pvr_s));
if (_pvr == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
SQLITE3_FINALIZE(stmt);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
SAFE_STRLCAT(select_query, SELECT_UHD_LIST, sizeof(select_query));
ret = __media_db_make_query(filter, &condition_query, &option_query);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
ret = _content_query_prepare(select_query, condition_query, option_query, &stmt);
SAFE_FREE(condition_query);
SAFE_FREE(option_query);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
while (sqlite3_step(stmt) == SQLITE_ROW) {
media_uhd_s *_uhd = (media_uhd_s*)calloc(1, sizeof(media_uhd_s));
if (_uhd == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
SQLITE3_FINALIZE(stmt);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
sqlite3_stmt *stmt = NULL;
int item_count = 0;
- media_content_retvm_if(!STRING_VALID(media_id), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid media_id");
+ content_retvm_if(!STRING_VALID(media_id), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid media_id");
/* Get image count */
query_str = sqlite3_mprintf(SELECT_IMAGE_COUNT_FROM_MEDIA_BY_ID, media_id);
ret = _content_get_result(query_str, &stmt);
SQLITE3_SAFE_FREE(query_str);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
if (sqlite3_step(stmt) == SQLITE_ROW)
item_count = (int)sqlite3_column_int(stmt, 0);
SQLITE3_FINALIZE(stmt);
- media_content_retvm_if(item_count == 0, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid media_id");
+ content_retvm_if(item_count == 0, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid media_id");
return MEDIA_CONTENT_ERROR_NONE;
}
{
media_face_s *_face = (media_face_s*)face;
- media_content_retvm_if(face == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid handle");
+ content_retvm_if(face == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid handle");
SAFE_FREE(_face->media_id);
SAFE_FREE(_face->face_tag);
{
media_face_s *_src = (media_face_s*)src;
- media_content_retvm_if(src == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid src handle");
+ content_retvm_if(src == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid src handle");
media_face_s *_dst = (media_face_s *)calloc(1, sizeof(media_face_s));
- media_content_retvm_if(_dst == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+ content_retvm_if(_dst == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
if (STRING_VALID(_src->media_id)) {
_dst->media_id = strdup(_src->media_id);
if (_dst->media_id == NULL) {
media_face_destroy((media_face_h)_dst);
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
}
_dst->face_tag = strdup(_src->face_tag);
if (_dst->face_tag == NULL) {
media_face_destroy((media_face_h)_dst);
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
}
{
media_face_s* _face = (media_face_s*)face;
- media_content_retvm_if(face == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid handle");
+ content_retvm_if(face == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid handle");
if (_face->face_id > 0) {
__media_face_convert_itoa(_face->face_id, face_id);
- media_content_retvm_if(*face_id == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "Out of memory");
+ content_retvm_if(*face_id == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "Out of memory");
} else {
*face_id = NULL;
}
{
media_face_s* _face = (media_face_s*)face;
- media_content_retvm_if(face == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid handle");
+ content_retvm_if(face == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid handle");
if (STRING_VALID(_face->media_id)) {
*media_id = strdup(_face->media_id);
- media_content_retvm_if(*media_id == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "Out of memory");
+ content_retvm_if(*media_id == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "Out of memory");
} else {
*media_id = NULL;
}
{
media_face_s* _face = (media_face_s*)face;
- media_content_retvm_if(face == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid handle");
- media_content_retvm_if(!(rect_x && rect_y && rect_w && rect_h), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid rect");
+ content_retvm_if(face == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid handle");
+ content_retvm_if(!(rect_x && rect_y && rect_w && rect_h), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid rect");
*rect_x = _face->face_rect_x;
*rect_y = _face->face_rect_y;
{
media_face_s* _face = (media_face_s*)face;
- media_content_retvm_if(face == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid handle");
- media_content_retvm_if(orientation == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid orientation");
+ content_retvm_if(face == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid handle");
+ content_retvm_if(orientation == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid orientation");
*orientation = _face->orientation;
{
media_face_s* _face = (media_face_s*)face;
- media_content_retvm_if(face == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid handle");
+ content_retvm_if(face == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid handle");
if (STRING_VALID(_face->face_tag)) {
*tag = strdup(_face->face_tag);
- media_content_retvm_if(*tag == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "Out of memory");
+ content_retvm_if(*tag == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "Out of memory");
} else {
*tag = NULL;
}
{
int ret = MEDIA_CONTENT_ERROR_NONE;
- media_content_retvm_if(!STRING_VALID(media_id), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid media_id");
- media_content_retvm_if(face == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid handle");
+ content_retvm_if(!STRING_VALID(media_id), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid media_id");
+ content_retvm_if(face == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid handle");
ret = __media_face_check_media_id(media_id);
- media_content_retvm_if(ret != MEDIA_CONTENT_ERROR_NONE, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "media_id does not exist or is not an image");
+ content_retvm_if(ret != MEDIA_CONTENT_ERROR_NONE, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "media_id does not exist or is not an image");
media_face_s* _face = calloc(1, sizeof(media_face_s));
- media_content_retvm_if(_face == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "Out of memory");
+ content_retvm_if(_face == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "Out of memory");
_face->media_id = strdup(media_id);
{
media_face_s* _face = (media_face_s*)face;
- media_content_retvm_if(face == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid handle");
- media_content_retvm_if(rect_w == 0, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid rect_w");
- media_content_retvm_if(rect_h == 0, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid rect_h");
+ content_retvm_if(face == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid handle");
+ content_retvm_if(rect_w == 0, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid rect_w");
+ content_retvm_if(rect_h == 0, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid rect_h");
_face->face_rect_x = rect_x;
_face->face_rect_y = rect_y;
{
media_face_s* _face = (media_face_s*)face;
- media_content_retvm_if(face == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid handle");
+ content_retvm_if(face == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid handle");
_face->orientation = orientation;
{
media_face_s* _face = (media_face_s*)face;
- media_content_retvm_if(face == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid handle");
+ content_retvm_if(face == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid handle");
if (STRING_VALID(tag))
_face->face_tag = strdup(tag);
media_face_s* _face = (media_face_s*)face;
- media_content_retvm_if(face == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid handle");
- media_content_retvm_if(_face->media_id == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid media_id");
- media_content_retvm_if(_face->face_rect_w == 0, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid rect_w");
- media_content_retvm_if(_face->face_rect_h == 0, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid rect_h");
+ content_retvm_if(face == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid handle");
+ content_retvm_if(_face->media_id == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid media_id");
+ content_retvm_if(_face->face_rect_w == 0, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid rect_w");
+ content_retvm_if(_face->face_rect_h == 0, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid rect_h");
query_str = sqlite3_mprintf(INSERT_FACE_TO_FACE, _face->media_id, _face->face_rect_x, _face->face_rect_y, _face->face_rect_w, _face->face_rect_h, _face->orientation, _face->face_tag);
query_str = sqlite3_mprintf(SELECT_FACE_ID, _face->media_id, _face->face_rect_x, _face->face_rect_y, _face->face_rect_w, _face->face_rect_h, _face->orientation);
ret = _content_get_result(query_str, &stmt);
SQLITE3_SAFE_FREE(query_str);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
if (sqlite3_step(stmt) == SQLITE_ROW)
_face->face_id = (int)sqlite3_column_int(stmt, 0);
media_face_s* _face = (media_face_s*)face;
- media_content_retvm_if(face == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid handle");
- media_content_retvm_if(_face->face_id == 0, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid face_id");
- media_content_retvm_if(_face->media_id == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid media_id");
- media_content_retvm_if(_face->face_rect_w == 0, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid rect_w");
- media_content_retvm_if(_face->face_rect_h == 0, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid rect_h");
+ content_retvm_if(face == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid handle");
+ content_retvm_if(_face->face_id == 0, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid face_id");
+ content_retvm_if(_face->media_id == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid media_id");
+ content_retvm_if(_face->face_rect_w == 0, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid rect_w");
+ content_retvm_if(_face->face_rect_h == 0, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid rect_h");
query_str = sqlite3_mprintf(UPDATE_FACE_TO_FACE, _face->face_rect_x, _face->face_rect_y, _face->face_rect_w, _face->face_rect_h, _face->orientation, _face->face_tag, _face->face_id);
{
char *end = NULL;
errno = 0;
- media_content_retvm_if(buffer == NULL || si == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid parameter");
+ content_retvm_if(buffer == NULL || si == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid parameter");
const long sl = strtol(buffer, &end, 10);
- media_content_retvm_if(end == buffer, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "not a decimal number");
- media_content_retvm_if('\0' != *end, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "extra characters at end of input: %s", end);
- media_content_retvm_if((LONG_MIN == sl || LONG_MAX == sl) && (ERANGE == errno), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "out of range of type long");
- media_content_retvm_if(sl > INT_MAX, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "greater than INT_MAX");
- media_content_retvm_if(sl < INT_MIN, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "less than INT_MIN");
+ content_retvm_if(end == buffer, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "not a decimal number");
+ content_retvm_if('\0' != *end, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "extra characters at end of input: %s", end);
+ content_retvm_if((LONG_MIN == sl || LONG_MAX == sl) && (ERANGE == errno), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "out of range of type long");
+ content_retvm_if(sl > INT_MAX, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "greater than INT_MAX");
+ content_retvm_if(sl < INT_MIN, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "less than INT_MIN");
*si = (int)sl;
int ret = MEDIA_CONTENT_ERROR_NONE;
char *query_str = NULL;
int query_face_id = 0;
- media_content_retvm_if(!STRING_VALID(face_id), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid face_id");
+ content_retvm_if(!STRING_VALID(face_id), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid face_id");
ret = __media_face_safe_atoi(face_id, &query_face_id);
- media_content_retvm_if(ret != MEDIA_CONTENT_ERROR_NONE, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid face_id");
+ content_retvm_if(ret != MEDIA_CONTENT_ERROR_NONE, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid face_id");
/*Update modified_time to 0.. It will restore the deleted face when media_info_start_face_detection() is called */
query_str = sqlite3_mprintf(UPDATE_MEDIA_INFO_IN_FACE_SCAN_LIST, query_face_id);
ret = _content_query_sql(query_str);
SQLITE3_SAFE_FREE(query_str);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
query_str = sqlite3_mprintf(DELETE_FACE_FROM_FACE, query_face_id);
ret = _content_query_sql(query_str);
int ret = MEDIA_CONTENT_ERROR_NONE;
if (face_count == NULL) {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
{
int ret = MEDIA_CONTENT_ERROR_NONE;
- media_content_retvm_if(callback == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid paramter");
+ content_retvm_if(callback == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid paramter");
ret = _media_db_get_face(NULL, filter, callback, user_data);
if (pinyin_support) {
/*Check Language Setting*/
lang = vconf_get_str(VCONFKEY_LANGSET);
- media_content_retvm_if(lang == NULL, ret, "Fail to get string of language set");
+ content_retvm_if(lang == NULL, ret, "Fail to get string of language set");
if ((strncmp(china, lang, strlen(china)) == 0) ||
(strncmp(hongkong, lang, strlen(hongkong)) == 0)) {
int _media_filter_build_condition(bool is_full, const char *condition, media_content_collation_e collate_type, char **result)
{
- media_content_retvm_if(!result, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid result");
- media_content_retvm_if(!STRING_VALID(condition), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid condition");
- media_content_retvm_if(!__check_collate_type(collate_type), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid collate_type");
+ content_retvm_if(!result, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid result");
+ content_retvm_if(!STRING_VALID(condition), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid condition");
+ content_retvm_if(!__check_collate_type(collate_type), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid collate_type");
if (is_full)
*result = g_strdup_printf("(%s)", condition);
else
*result = g_strdup_printf("(%s%s)", condition, __get_collate_str(collate_type));
- media_content_sec_debug("Condition : %s", *result);
+ content_sec_debug("Condition : %s", *result);
return MEDIA_CONTENT_ERROR_NONE;
}
{
filter_s *_filter = (filter_s *)filter;
- media_content_retvm_if(!_filter, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid filter");
- media_content_retvm_if(!result, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid result");
+ content_retvm_if(!_filter, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid filter");
+ content_retvm_if(!result, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid result");
if (!STRING_VALID(_filter->order_keyword)) {
*result = g_strdup_printf(" LIMIT %d, %d", _filter->offset, _filter->count);
{
int ret = MEDIA_CONTENT_ERROR_NONE;
- media_content_retvm_if(filter == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid filter");
+ content_retvm_if(filter == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid filter");
filter_s *_filter = (filter_s *)calloc(1, sizeof(filter_s));
- media_content_retvm_if(_filter == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+ content_retvm_if(_filter == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
_filter->storage_id = NULL;
_filter->condition = NULL;
int media_filter_destroy(filter_h filter)
{
filter_s *_filter = (filter_s *)filter;
- media_content_retvm_if(!_filter, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid filter");
+ content_retvm_if(!_filter, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid filter");
SAFE_FREE(_filter->storage_id);
SAFE_FREE(_filter->condition);
int media_filter_set_offset(filter_h filter, int offset, int count)
{
filter_s *_filter = (filter_s *)filter;
- media_content_retvm_if(!_filter, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid filter");
+ content_retvm_if(!_filter, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid filter");
_filter->offset = offset;
_filter->count = count;
{
int ret = MEDIA_CONTENT_ERROR_NONE;
filter_s *_filter = (filter_s *)filter;
- media_content_retvm_if(!_filter, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid filter");
- media_content_retvm_if(!STRING_VALID(condition), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid condition");
- media_content_retvm_if(!__check_collate_type(collate_type), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid collate_type");
+ content_retvm_if(!_filter, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid filter");
+ content_retvm_if(!STRING_VALID(condition), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid condition");
+ content_retvm_if(!__check_collate_type(collate_type), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid collate_type");
_filter->is_full_condition = false;
SAFE_FREE(_filter->condition);
Therefore, use 'MEDIA_CONTENT_ERROR_OUT_OF_MEMORY' temporarily.
It will be modified after removing _media_content_replace_path_in_condition() function.
*/
- media_content_retvm_if(_filter->condition == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "Fail to set condition");
+ content_retvm_if(_filter->condition == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "Fail to set condition");
- media_content_sec_debug("Condition string : %s", _filter->condition);
+ content_sec_debug("Condition string : %s", _filter->condition);
_filter->condition_collate_type = collate_type;
int media_filter_set_order(filter_h filter, media_content_order_e order_type, const char *order_keyword, media_content_collation_e collate_type)
{
filter_s *_filter = (filter_s *)filter;
- media_content_retvm_if(!_filter, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid filter");
- media_content_retvm_if(!STRING_VALID(order_keyword), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid order_keyword");
- media_content_retvm_if(!__check_order_type(order_type), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid order_type");
- media_content_retvm_if(!__check_collate_type(collate_type), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid collate_type");
+ content_retvm_if(!_filter, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid filter");
+ content_retvm_if(!STRING_VALID(order_keyword), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid order_keyword");
+ content_retvm_if(!__check_order_type(order_type), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid order_type");
+ content_retvm_if(!__check_collate_type(collate_type), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid collate_type");
_filter->is_full_order = false;
SAFE_FREE(_filter->order_keyword);
int media_filter_set_storage(filter_h filter, const char *storage_id)
{
- media_content_warn("DEPRECATION WARNING: media_filter_set_storage() is deprecated and will be removed from next release. Use media_filter_set_condition() with MEDIA_PATH keyword instead.");
+ content_warn("DEPRECATION WARNING: media_filter_set_storage() is deprecated and will be removed from next release. Use media_filter_set_condition() with MEDIA_PATH keyword instead.");
filter_s *_filter = (filter_s *)filter;
- media_content_retvm_if(!_filter || !STRING_VALID(storage_id), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
+ content_retvm_if(!_filter || !STRING_VALID(storage_id), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
SAFE_FREE(_filter->storage_id);
_filter->storage_id = g_strdup(storage_id);
- media_content_sec_debug("storage_id : %s", _filter->storage_id);
+ content_sec_debug("storage_id : %s", _filter->storage_id);
return MEDIA_CONTENT_ERROR_NONE;
}
int media_filter_get_offset(filter_h filter, int *offset, int *count)
{
filter_s *_filter = (filter_s *)filter;
- media_content_retvm_if(!_filter || !offset || !count, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
+ content_retvm_if(!_filter || !offset || !count, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
*offset = _filter->offset;
*count = _filter->count;
int media_filter_get_condition(filter_h filter, char **condition, media_content_collation_e *collate_type)
{
filter_s *_filter = (filter_s *)filter;
- media_content_retvm_if(!_filter, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid _filter");
- media_content_retvm_if(!condition, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid condition");
- media_content_retvm_if(!collate_type, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid collate_type");
+ content_retvm_if(!_filter, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid _filter");
+ content_retvm_if(!condition, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid condition");
+ content_retvm_if(!collate_type, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid collate_type");
if (!_filter->is_full_condition)
*condition = g_strdup(_filter->condition);
int media_filter_get_order(filter_h filter, media_content_order_e *order_type, char **order_keyword, media_content_collation_e *collate_type)
{
filter_s *_filter = (filter_s *)filter;
- media_content_retvm_if(!_filter || !order_type, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
- media_content_retvm_if(!order_keyword || !collate_type, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
+ content_retvm_if(!_filter || !order_type, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
+ content_retvm_if(!order_keyword || !collate_type, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
if (!_filter->is_full_order)
*order_keyword = g_strdup(_filter->order_keyword);
int media_filter_get_storage(filter_h filter, char **storage_id)
{
- media_content_warn("DEPRECATION WARNING: media_filter_get_storage() is deprecated and will be removed from next release.");
+ content_warn("DEPRECATION WARNING: media_filter_get_storage() is deprecated and will be removed from next release.");
filter_s *_filter = (filter_s *)filter;
- media_content_retvm_if(!_filter || !storage_id, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
+ content_retvm_if(!_filter || !storage_id, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
*storage_id = g_strdup(_filter->storage_id);
int media_filter_set_condition_v2(filter_h filter, const char *condition)
{
filter_s *_filter = (filter_s *)filter;
- media_content_retvm_if(!_filter || !STRING_VALID(condition), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
+ content_retvm_if(!_filter || !STRING_VALID(condition), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
_filter->is_full_condition = true;
SAFE_FREE(_filter->condition);
It will be modified after removing _media_content_replace_path_in_condition() function.
*/
_filter->condition = _media_content_replace_path_in_condition(condition);
- media_content_retvm_if(_filter->condition == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "Fail to set condition");
+ content_retvm_if(_filter->condition == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "Fail to set condition");
- media_content_sec_debug("Condition string : %s", _filter->condition);
+ content_sec_debug("Condition string : %s", _filter->condition);
return MEDIA_CONTENT_ERROR_NONE;
}
int media_filter_get_condition_v2(filter_h filter, char **condition)
{
filter_s *_filter = (filter_s *)filter;
- media_content_retvm_if(!_filter || !condition, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
+ content_retvm_if(!_filter || !condition, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
if (_filter->is_full_condition)
*condition = g_strdup(_filter->condition);
int media_filter_set_order_v2(filter_h filter, const char *order)
{
filter_s *_filter = (filter_s *)filter;
- media_content_retvm_if(!_filter || !STRING_VALID(order), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
+ content_retvm_if(!_filter || !STRING_VALID(order), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
_filter->is_full_order = true;
SAFE_FREE(_filter->order_keyword);
int media_filter_get_order_v2(filter_h filter, char **order)
{
filter_s *_filter = (filter_s *)filter;
- media_content_retvm_if(!_filter || !order, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
+ content_retvm_if(!_filter || !order, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
if (_filter->is_full_order)
*order = g_strdup(_filter->order_keyword);
int ret = MEDIA_CONTENT_ERROR_NONE;
if (!folder_count) {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
#ifdef _USE_TVPD_MODE
int ret = MEDIA_CONTENT_ERROR_NONE;
if (callback == NULL) {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
#endif
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
#endif
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if ((callback != NULL) && STRING_VALID(folder_id)) {
ret = _media_db_get_group_item_by_union_select(folder_id, filter1, filter2, callback, user_data);
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
SAFE_FREE(_folder);
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if (_src != NULL) {
media_folder_s *_dst = (media_folder_s*)calloc(1, sizeof(media_folder_s));
- media_content_retvm_if(_dst == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+ content_retvm_if(_dst == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
if (STRING_VALID(_src->folder_id)) {
_dst->folder_id = strdup(_src->folder_id);
if (_dst->folder_id == NULL) {
SAFE_FREE(_dst);
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
}
if (STRING_VALID(_src->name)) {
_dst->name = strdup(_src->name);
if (_dst->name == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
media_folder_destroy((media_folder_h)_dst);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
if (STRING_VALID(_src->path)) {
_dst->path = strdup(_src->path);
if (_dst->path == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
media_folder_destroy((media_folder_h)_dst);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
if (STRING_VALID(_src->storage_uuid)) {
_dst->storage_uuid = strdup(_src->storage_uuid);
if (_dst->storage_uuid == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
media_folder_destroy((media_folder_h)_dst);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if (_folder) {
if (STRING_VALID(_folder->folder_id)) {
*folder_id = strdup(_folder->folder_id);
- media_content_retvm_if(*folder_id == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+ content_retvm_if(*folder_id == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
} else {
*folder_id = NULL;
}
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if (_folder) {
if (STRING_VALID(_folder->path)) {
*path = strdup(_folder->path);
- media_content_retvm_if(*path == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+ content_retvm_if(*path == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
} else {
*path = NULL;
}
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if (_folder) {
if (STRING_VALID(_folder->name)) {
*name = strdup(_folder->name);
- media_content_retvm_if(*name == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+ content_retvm_if(*name == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
} else {
*name = NULL;
}
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
int media_folder_get_storage_type(media_folder_h folder, media_content_storage_e* storage_type)
{
int ret = MEDIA_CONTENT_ERROR_NONE;
- media_content_warn("DEPRECATION WARNING: media_folder_get_storage_type() is deprecated and will be removed from next release. Use storage_get_type_dev() instead.");
+ content_warn("DEPRECATION WARNING: media_folder_get_storage_type() is deprecated and will be removed from next release. Use storage_get_type_dev() instead.");
media_folder_s *_folder = (media_folder_s*)folder;
if (_folder) {
*storage_type = _folder->storage_type;
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
int media_folder_get_storage_id(media_folder_h folder, char **storage_id)
{
int ret = MEDIA_CONTENT_ERROR_NONE;
- media_content_warn("DEPRECATION WARNING: media_folder_get_storage_id() is deprecated and will be removed from next release.");
+ content_warn("DEPRECATION WARNING: media_folder_get_storage_id() is deprecated and will be removed from next release.");
media_folder_s *_folder = (media_folder_s*)folder;
if (_folder) {
if (STRING_VALID(_folder->storage_uuid)) {
*storage_id = strdup(_folder->storage_uuid);
- media_content_retvm_if(*storage_id == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+ content_retvm_if(*storage_id == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
} else {
*storage_id = NULL;
}
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
media_folder_s *_folder = NULL;
if (!STRING_VALID(folder_id)) {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
snprintf(select_query, sizeof(select_query), SELECT_FOLDER_FROM_FOLDER, folder_id);
ret = _content_get_result(select_query, &stmt);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
if (sqlite3_step(stmt) == SQLITE_ROW) {
_folder = (media_folder_s*)calloc(1, sizeof(media_folder_s));
if (_folder == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
SQLITE3_FINALIZE(stmt);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
int media_folder_update_to_db(media_folder_h folder)
{
int ret = MEDIA_CONTENT_ERROR_NONE;
- media_content_warn("DEPRECATION WARNING: media_folder_update_to_db() is deprecated and will be removed from next release.");
+ content_warn("DEPRECATION WARNING: media_folder_update_to_db() is deprecated and will be removed from next release.");
media_folder_s *_folder = (media_folder_s*)folder;
char repl_path[MAX_PATH_LEN] = {0, };
if ((_folder == NULL) || (_folder->folder_id == NULL)) {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
int media_folder_set_name(media_folder_h folder, const char *name)
{
int ret = MEDIA_CONTENT_ERROR_NONE;
- media_content_warn("DEPRECATION WARNING: media_folder_set_name() is deprecated and will be removed from next release.");
+ content_warn("DEPRECATION WARNING: media_folder_set_name() is deprecated and will be removed from next release.");
media_folder_s *_folder = (media_folder_s*)folder;
if (_folder != NULL && STRING_VALID(name) && name[0] != '.') {
memset(repl_path, 0, sizeof(repl_path));
ret = _media_content_replace_path(_folder->path, repl_path);
- media_content_retvm_if(!STRING_VALID(repl_path), MEDIA_CONTENT_ERROR_INVALID_OPERATION, "path replacement failed");
+ content_retvm_if(!STRING_VALID(repl_path), MEDIA_CONTENT_ERROR_INVALID_OPERATION, "path replacement failed");
folder_path = g_path_get_dirname(repl_path);
- media_content_sec_debug("Existed Folder Path : %s", repl_path);
+ content_sec_debug("Existed Folder Path : %s", repl_path);
snprintf(new_folder_path, sizeof(new_folder_path), "%s/%s", folder_path, name);
- media_content_sec_debug("New Path : %s", new_folder_path);
+ content_sec_debug("New Path : %s", new_folder_path);
SAFE_FREE(g_src_path);
g_src_path = strdup(repl_path);
SAFE_FREE(folder_path);
_folder->path = strdup(new_folder_path);
- media_content_retvm_if(_folder->path == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+ content_retvm_if(_folder->path == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
_folder->name = strdup(name);
- media_content_retvm_if(_folder->name == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+ content_retvm_if(_folder->name == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
char storage_id[MEDIA_CONTENT_UUID_SIZE+1] = {0, };
bool ignore_dir = FALSE;
- media_content_retvm_if(!STRING_VALID(path), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid path");
+ content_retvm_if(!STRING_VALID(path), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid path");
memset(repl_path, 0, sizeof(repl_path));
ret = _media_content_replace_path(path, repl_path);
- media_content_retvm_if(!STRING_VALID(repl_path), MEDIA_CONTENT_ERROR_INVALID_OPERATION, "path replacement failed");
+ content_retvm_if(!STRING_VALID(repl_path), MEDIA_CONTENT_ERROR_INVALID_OPERATION, "path replacement failed");
ret = _media_util_check_ignore_dir(repl_path, &ignore_dir);
- media_content_retvm_if(ignore_dir, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid folder path");
+ content_retvm_if(ignore_dir, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid folder path");
ret = _media_content_check_dir(repl_path);
- media_content_retvm_if(ret == MEDIA_CONTENT_ERROR_PERMISSION_DENIED, ret, "Permission Denied");
- media_content_retvm_if(ret == MEDIA_CONTENT_ERROR_INVALID_PARAMETER, ret, "invalid path[%s]", path);
+ content_retvm_if(ret == MEDIA_CONTENT_ERROR_PERMISSION_DENIED, ret, "Permission Denied");
+ content_retvm_if(ret == MEDIA_CONTENT_ERROR_INVALID_PARAMETER, ret, "invalid path[%s]", path);
ret = media_svc_get_storage_id(_content_get_db_handle(), repl_path, storage_id, _content_get_uid());
if (ret != MS_MEDIA_ERR_NONE) {
- media_content_error("media_svc_get_storage_id failed : %d", ret);
+ content_error("media_svc_get_storage_id failed : %d", ret);
return _content_error_capi(ret);
}
ret = media_svc_check_folder_exist_by_path(_content_get_db_handle(), storage_id, repl_path);
if (ret == MS_MEDIA_ERR_DB_NO_RECORD) {
- media_content_sec_debug("media_svc_check_folder_exist_by_path : no record : %s", repl_path);
+ content_sec_debug("media_svc_check_folder_exist_by_path : no record : %s", repl_path);
ms_user_storage_type_e storage_type = MS_USER_STORAGE_INTERNAL;
ret = ms_user_get_storage_type(_content_get_uid(), repl_path, &storage_type);
if (ret != MS_MEDIA_ERR_NONE) {
- media_content_sec_error("ms_user_get_storage_type failed : %d", ret);
+ content_sec_error("ms_user_get_storage_type failed : %d", ret);
return _content_error_capi(ret);
}
ret = media_svc_insert_folder(_content_get_db_handle(), storage_id, storage_type, repl_path, _content_get_uid());
if (ret != MS_MEDIA_ERR_NONE) {
if (ret == MS_MEDIA_ERR_DB_CONSTRAINT_FAIL) {
- media_content_sec_error("This item is already inserted. This may be normal operation because other process already did this (%s)", repl_path);
+ content_sec_error("This item is already inserted. This may be normal operation because other process already did this (%s)", repl_path);
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_sec_error("media_svc_insert_folder failed : %d (%s)", ret, repl_path);
+ content_sec_error("media_svc_insert_folder failed : %d (%s)", ret, repl_path);
}
return _content_error_capi(ret);
ret = media_svc_set_folder_scan_status(storage_id, repl_path, MEDIA_DIR_SCAN_DONE, _content_get_uid());
if (ret != MS_MEDIA_ERR_NONE) {
- media_content_sec_error("ms_set_folder_scan_status failed : %d", ret);
+ content_sec_error("ms_set_folder_scan_status failed : %d", ret);
return _content_error_capi(ret);
}
} else if (ret != MS_MEDIA_ERR_NONE) {
- media_content_sec_error("media_svc_check_folder_exist_by_path failed : %d (%s)", ret, repl_path);
+ content_sec_error("media_svc_check_folder_exist_by_path failed : %d (%s)", ret, repl_path);
return _content_error_capi(ret);
}
if (STRING_VALID(storage_uuid) && STRING_VALID(path)) {
ret = media_svc_get_folder_scan_status(_content_get_db_handle(), storage_uuid, path, &status);
if (ret != MS_MEDIA_ERR_NONE) {
- media_content_error("media_svc_get_folder_scan_status failed");
+ content_error("media_svc_get_folder_scan_status failed");
ret = _content_error_capi(ret);
} else {
*scan_status = status;
}
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if (STRING_VALID(path)) {
ret = media_svc_set_folder_validity(FALSE, storage_uuid, path, 0, TRUE, _content_get_uid());
if (ret != MS_MEDIA_ERR_NONE) {
- media_content_error("set folder validity failed");
+ content_error("set folder validity failed");
ret = _content_error_capi(ret);
return ret;
}
ret = media_svc_set_folder_scan_status(storage_uuid, path, MEDIA_DIR_SCAN_NONE, _content_get_uid());
if (ret != MS_MEDIA_ERR_NONE) {
- media_content_error("media_folder_reset_scan_status failed");
+ content_error("media_folder_reset_scan_status failed");
ret = _content_error_capi(ret);
}
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if (album_count != NULL)
ret = _media_db_get_group_count(filter, MEDIA_GROUP_ALBUM, album_count);
else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
int ret = MEDIA_CONTENT_ERROR_NONE;
if (callback == NULL) {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if ((album_id > 0) && (media_count != NULL))
ret = _media_db_get_group_item_count_by_id(album_id, filter, MEDIA_GROUP_ALBUM, media_count);
else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if ((album_id > 0) && (callback != NULL))
ret = _media_db_get_group_item_by_id(album_id, filter, callback, user_data, MEDIA_GROUP_ALBUM);
else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
sqlite3_stmt *stmt = NULL;
char select_query[DEFAULT_QUERY_SIZE] = {0, };
- media_content_retvm_if(album_id <= 0, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid album_id [%d]", album_id);
- media_content_retvm_if(album == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid album");
+ content_retvm_if(album_id <= 0, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid album_id [%d]", album_id);
+ content_retvm_if(album == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid album");
memset(select_query, 0x00, sizeof(select_query));
snprintf(select_query, sizeof(select_query), SELECT_ALBUM_FROM_ALBUM, album_id);
ret = _content_get_result(select_query, &stmt);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
if (sqlite3_step(stmt) == SQLITE_ROW) {
media_album_s *_album = (media_album_s*)calloc(1, sizeof(media_album_s));
if (_album == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
SQLITE3_FINALIZE(stmt);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if (_src != NULL) {
media_album_s *_dst = (media_album_s*)calloc(1, sizeof(media_album_s));
- media_content_retvm_if(_dst == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+ content_retvm_if(_dst == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
_dst->album_id = _src->album_id;
if (_src->name != NULL) {
_dst->name = g_strdup(_src->name);
if (_dst->name == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
media_album_destroy((media_album_h)_dst);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
if (_src->artist != NULL) {
_dst->artist = g_strdup(_src->artist);
if (_dst->artist == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
media_album_destroy((media_album_h)_dst);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
if (_src->album_art_path != NULL) {
_dst->album_art_path = g_strdup(_src->album_art_path);
if (_dst->album_art_path == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
media_album_destroy((media_album_h)_dst);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
*album_id = _album->album_id;
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if (_album) {
if (_album->name != NULL) {
*name = g_strdup(_album->name);
- media_content_retvm_if(*name == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+ content_retvm_if(*name == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
} else {
*name = NULL;
}
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if (_album) {
if (_album->artist != NULL) {
*artist = g_strdup(_album->artist);
- media_content_retvm_if(*artist == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+ content_retvm_if(*artist == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
} else {
*artist = NULL;
}
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if (_album) {
if (_album->album_art_path != NULL) {
*album_art = g_strdup(_album->album_art_path);
- media_content_retvm_if(*album_art == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+ content_retvm_if(*album_art == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
} else {
*album_art = NULL;
}
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
#else
if ((group < MEDIA_CONTENT_GROUP_DISPLAY_NAME) || (group >= MEDIA_CONTENT_GROUP_MAX) || (group_count == NULL)) {
#endif
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
} else {
ret = _media_db_get_media_group_count(group, filter, group_count);
int ret = MEDIA_CONTENT_ERROR_NONE;
if ((callback == NULL) || (group < MEDIA_CONTENT_GROUP_DISPLAY_NAME) || (group >= MEDIA_GROUP_MAX)) {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
} else {
ret = _media_db_get_media_group_and_count(group, filter, callback, user_data);
#else
if ((callback == NULL) || (group < MEDIA_CONTENT_GROUP_DISPLAY_NAME) || (group >= MEDIA_CONTENT_GROUP_MAX)) {
#endif
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
} else {
ret = _media_db_get_media_group(group, filter, callback, user_data);
#else
if ((media_count == NULL) || (group < MEDIA_CONTENT_GROUP_DISPLAY_NAME) || (group >= MEDIA_CONTENT_GROUP_MAX)) {
#endif
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
} else {
ret = _media_db_get_media_group_item_count(group_name, filter, group, media_count);
#else
if ((callback == NULL) || (group < MEDIA_CONTENT_GROUP_DISPLAY_NAME) || (group >= MEDIA_CONTENT_GROUP_MAX)) {
#endif
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
} else {
ret = _media_db_get_media_group_item(group_name, filter, group, callback, user_data);
int image_meta_destroy(image_meta_h image)
{
image_meta_s *_image = (image_meta_s*)image;
- media_content_retvm_if(_image == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Image handle is null");
+ content_retvm_if(_image == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Image handle is null");
SAFE_FREE(_image->media_id);
SAFE_FREE(_image->date_taken);
int image_meta_clone(image_meta_h *dst, image_meta_h src)
{
image_meta_s *_src = (image_meta_s*)src;
- media_content_retvm_if(!_src, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Source handle is null");
+ content_retvm_if(!_src, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Source handle is null");
image_meta_s *_dst = (image_meta_s*)calloc(1, sizeof(image_meta_s));
- media_content_retvm_if(!_dst, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+ content_retvm_if(!_dst, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
_dst->media_id = g_strdup(_src->media_id);
_dst->date_taken = g_strdup(_src->date_taken);
int image_meta_get_media_id(image_meta_h image, char **media_id)
{
image_meta_s *_image = (image_meta_s*)image;
- media_content_retvm_if(!_image || !media_id, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
+ content_retvm_if(!_image || !media_id, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
*media_id = g_strdup(_image->media_id);
int image_meta_get_width(image_meta_h image, int *width)
{
image_meta_s *_image = (image_meta_s*)image;
- media_content_retvm_if(!_image || !width, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
+ content_retvm_if(!_image || !width, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
*width = _image->width;
int image_meta_get_height(image_meta_h image, int *height)
{
image_meta_s *_image = (image_meta_s*)image;
- media_content_retvm_if(!_image || !height, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
+ content_retvm_if(!_image || !height, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
*height = _image->height;
int image_meta_get_orientation(image_meta_h image, media_content_orientation_e* orientation)
{
image_meta_s *_image = (image_meta_s*)image;
- media_content_retvm_if(!_image || !orientation, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
+ content_retvm_if(!_image || !orientation, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
*orientation = _image->orientation;
int image_meta_get_date_taken(image_meta_h image, char **date_taken)
{
image_meta_s *_image = (image_meta_s*)image;
- media_content_retvm_if(!_image || !date_taken, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
+ content_retvm_if(!_image || !date_taken, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
*date_taken = g_strdup(_image->date_taken);
int image_meta_get_exposure_time(image_meta_h image, char **exposure_time)
{
image_meta_s *_image = (image_meta_s*)image;
- media_content_retvm_if(!_image || !exposure_time, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
+ content_retvm_if(!_image || !exposure_time, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
*exposure_time = g_strdup(_image->exposure_time);
int image_meta_get_fnumber(image_meta_h image, double *fnumber)
{
image_meta_s *_image = (image_meta_s*)image;
- media_content_retvm_if(!_image || !fnumber, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
+ content_retvm_if(!_image || !fnumber, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
*fnumber = _image->fnumber;
int image_meta_get_iso(image_meta_h image, int *iso)
{
image_meta_s *_image = (image_meta_s*)image;
- media_content_retvm_if(!_image || !iso, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
+ content_retvm_if(!_image || !iso, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
*iso = _image->iso;
int image_meta_get_model(image_meta_h image, char **model)
{
image_meta_s *_image = (image_meta_s*)image;
- media_content_retvm_if(!_image || !model, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
+ content_retvm_if(!_image || !model, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
*model = g_strdup(_image->model);
int image_meta_set_orientation(image_meta_h image, media_content_orientation_e orientation)
{
- media_content_warn("DEPRECATION WARNING: image_meta_set_orientation() is deprecated and will be removed from next release.");
+ content_warn("DEPRECATION WARNING: image_meta_set_orientation() is deprecated and will be removed from next release.");
image_meta_s *_image = (image_meta_s*)image;
- media_content_retvm_if(!_image, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
- media_content_retvm_if(orientation < MEDIA_CONTENT_ORIENTATION_NOT_AVAILABLE || orientation > MEDIA_CONTENT_ORIENTATION_ROT_270, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid orientation");
+ content_retvm_if(!_image, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
+ content_retvm_if(orientation < MEDIA_CONTENT_ORIENTATION_NOT_AVAILABLE || orientation > MEDIA_CONTENT_ORIENTATION_ROT_270, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid orientation");
_image->orientation = orientation;
int image_meta_update_to_db(image_meta_h image)
{
int ret = MEDIA_CONTENT_ERROR_NONE;
- media_content_warn("DEPRECATION WARNING: image_meta_update_to_db() is deprecated and will be removed from next release.");
+ content_warn("DEPRECATION WARNING: image_meta_update_to_db() is deprecated and will be removed from next release.");
image_meta_s *_image = (image_meta_s*)image;
char *sql = NULL;
- media_content_retvm_if(!_image || !STRING_VALID(_image->media_id), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
+ content_retvm_if(!_image || !STRING_VALID(_image->media_id), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
#ifdef _USE_TVPD_MODE
char *storage_id = NULL;
ret = _media_db_get_storage_id_by_media_id(_image->media_id, &storage_id);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
sql = sqlite3_mprintf(UPDATE_IMAGE_META_FROM_MEDIA, storage_id, _image->orientation, _image->media_id);
SAFE_FREE(storage_id);
#else
sqlite3_stmt *stmt = NULL;
char *select_query = NULL;
- media_content_retvm_if(!STRING_VALID(media_id), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid media_id");
+ content_retvm_if(!STRING_VALID(media_id), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid media_id");
select_query = sqlite3_mprintf(SELECT_MEDIA_PATH_BY_ID, media_id);
ret = _content_get_result(select_query, &stmt);
SQLITE3_SAFE_FREE(select_query);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
if (sqlite3_step(stmt) == SQLITE_ROW) {
*path = g_strdup((const char *)sqlite3_column_text(stmt, 0));
} else {
- media_content_error("There's no media with this ID : %s", media_id);
+ content_error("There's no media with this ID : %s", media_id);
*path = NULL;
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
ret = _content_error_capi(result->result);
if (_cb_data->insert_completed_cb) {
- media_content_debug("User callback is being called now");
+ content_debug("User callback is being called now");
_cb_data->insert_completed_cb(ret, _cb_data->user_data);
}
if (STRING_VALID(_cb_data->insert_list_path)) {
if (unlink(_cb_data->insert_list_path) < 0)
- media_content_stderror("failed to delete");
+ content_stderror("failed to delete");
SAFE_FREE(_cb_data->insert_list_path);
}
}
media->thumbnail_path = g_strdup(MEDIA_CONTENT_EMPTY_STRING);
}
- media_content_debug("error [%d], thumbnail_path [%s]", error, path);
+ content_debug("error [%d], thumbnail_path [%s]", error, path);
error_value = _content_error_capi(error);
if (_thumb_cb->thumbnail_completed_cb)
_thumb_cb->thumbnail_completed_cb(error_value, path, _thumb_cb->user_data);
const int nRetVal = system_info_get_platform_bool("http://tizen.org/feature/vision.face_recognition", &isFaceRecognitionSupported);
if (nRetVal != SYSTEM_INFO_ERROR_NONE) {
- media_content_debug("SYSTEM_INFO_ERROR: vision.face_recognition [%d]", nRetVal);
+ content_debug("SYSTEM_INFO_ERROR: vision.face_recognition [%d]", nRetVal);
return false;
}
media_face_cb_s *_face_cb = (media_face_cb_s *)user_data;
if (_face_cb != NULL) {
- media_content_debug("error [%d], face_count [%d]", error, face_count);
+ content_debug("error [%d], face_count [%d]", error, face_count);
error_value = _content_error_capi(error);
if (_face_cb->face_completed_cb)
_face_cb->face_completed_cb(error_value, face_count, _face_cb->user_data);
memset(list_path, 0x00, sizeof(list_path));
continue;
} else {
- media_content_debug("The request file list path : %s", list_path);
+ content_debug("The request file list path : %s", list_path);
break;
}
}
if (idx == BATCH_REQUEST_MAX) {
- media_content_error("Too many batch request for one thread");
+ content_error("Too many batch request for one thread");
return MEDIA_CONTENT_ERROR_DB_BUSY;
}
fp = fopen(list_path, "w");
if (fp == NULL) {
- media_content_error("failed to open file : [%s]", list_path);
- media_content_stderror("failed to open file");
+ content_error("failed to open file : [%s]", list_path);
+ content_stderror("failed to open file");
return MEDIA_CONTENT_ERROR_INVALID_OPERATION;
}
if (ret != MEDIA_CONTENT_ERROR_NONE) {
fclose(fp);
if (unlink(list_path) < 0)
- media_content_stderror("failed to delete");
+ content_stderror("failed to delete");
return ret;
}
if (!_media_util_check_support_media_type(path_array[idx])) {
fclose(fp);
if (unlink(list_path) < 0)
- media_content_stderror("failed to delete");
+ content_stderror("failed to delete");
return MEDIA_CONTENT_ERROR_NOT_SUPPORTED;
}
nwrites = fwrite(path_array[idx], 1, size, fp);
if (nwrites != size) {
- media_content_stderror("failed to write");
+ content_stderror("failed to write");
fclose(fp);
if (unlink(list_path) < 0)
- media_content_stderror("failed to delete");
+ content_stderror("failed to delete");
return MEDIA_CONTENT_ERROR_INVALID_OPERATION;
}
nwrites = fwrite("\n", 1, 1, fp);
if (nwrites != 1) {
- media_content_stderror("failed to write");
+ content_stderror("failed to write");
fclose(fp);
if (unlink(list_path) < 0)
- media_content_stderror("failed to delete");
+ content_stderror("failed to delete");
return MEDIA_CONTENT_ERROR_INVALID_OPERATION;
}
} else {
- media_content_error("path[%d] is invalid string", idx);
+ content_error("path[%d] is invalid string", idx);
}
}
fclose(fp);
media_insert_cb_s *_cb_data = (media_insert_cb_s *)calloc(1, sizeof(media_insert_cb_s));
- media_content_retvm_if(_cb_data == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+ content_retvm_if(_cb_data == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
_cb_data->insert_completed_cb = completed_cb;
_cb_data->user_data = user_data;
ret = media_files_register(list_path, __media_info_insert_completed_cb, _cb_data, _content_get_uid());
if (ret != MEDIA_CONTENT_ERROR_NONE) {
- media_content_error("media_files_register failed : %d", ret);
+ content_error("media_files_register failed : %d", ret);
if (unlink(list_path) < 0)
- media_content_stderror("failed to delete");
+ content_stderror("failed to delete");
return _content_error_capi(ret);
}
char *folder_path = NULL;
int ret = MEDIA_CONTENT_ERROR_NONE;
- media_content_retvm_if(!STRING_VALID(path), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid path");
+ content_retvm_if(!STRING_VALID(path), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid path");
ret = _media_util_check_ignore_file(path, &ignore);
- media_content_retvm_if(ignore == TRUE, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid ignore path");
+ content_retvm_if(ignore == TRUE, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid ignore path");
ret = _media_util_check_file_exist(path);
- media_content_retvm_if(ret != MEDIA_CONTENT_ERROR_NONE, ret, "invalid path");
+ content_retvm_if(ret != MEDIA_CONTENT_ERROR_NONE, ret, "invalid path");
folder_path = g_path_get_dirname(path);
ret = _media_util_check_ignore_dir(folder_path, &ignore);
g_free(folder_path);
- media_content_retvm_if(ignore == TRUE, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid folder path");
+ content_retvm_if(ignore == TRUE, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid folder path");
return MEDIA_CONTENT_ERROR_NONE;
}
char *select_query = NULL;
media_info_s *_media = (media_info_s*)media;
- media_content_retvm_if(_media == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid media");
+ content_retvm_if(_media == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid media");
select_query = sqlite3_mprintf(SELECT_MEDIA_BY_PATH, storage_id, path);
ret = _content_get_result(select_query, &stmt);
SQLITE3_SAFE_FREE(select_query);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
if (sqlite3_step(stmt) == SQLITE_ROW) {
_media_info_item_get_detail(stmt, (media_info_h)_media);
} else {
- media_content_sec_error("No media : path[%s] storage id[%s]", path, storage_id);
+ content_sec_error("No media : path[%s] storage id[%s]", path, storage_id);
ret = MEDIA_CONTENT_ERROR_DB_FAILED;
}
char *select_query = NULL;
media_info_s *_media = (media_info_s*)media;
- media_content_retvm_if(_media == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid media");
+ content_retvm_if(_media == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid media");
select_query = sqlite3_mprintf(SELECT_MEDIA_BY_PATH, path);
ret = _content_get_result(select_query, &stmt);
SQLITE3_SAFE_FREE(select_query);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
if (sqlite3_step(stmt) == SQLITE_ROW) {
_media_info_item_get_detail(stmt, (media_info_h)_media);
} else {
- media_content_sec_error("No media : path[%s]", path);
+ content_sec_error("No media : path[%s]", path);
ret = MEDIA_CONTENT_ERROR_DB_FAILED;
}
ms_user_storage_type_e storage_type = MS_USER_STORAGE_INTERNAL;
int modified_time = 0;
- media_content_retvm_if(!STRING_VALID(path), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid path");
- media_content_retvm_if(info == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid info");
+ content_retvm_if(!STRING_VALID(path), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid path");
+ content_retvm_if(info == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid info");
memset(repl_path, 0, sizeof(repl_path));
ret = _media_content_replace_path(path, repl_path);
- media_content_retvm_if(!STRING_VALID(repl_path), MEDIA_CONTENT_ERROR_INVALID_OPERATION, "path replacement failed");
+ content_retvm_if(!STRING_VALID(repl_path), MEDIA_CONTENT_ERROR_INVALID_OPERATION, "path replacement failed");
ret = __media_info_check_file_validity(repl_path);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
memset(storage_id, 0x00, sizeof(storage_id));
ret = media_svc_get_storage_id(_content_get_db_handle(), repl_path, storage_id, _content_get_uid());
if (ret != MS_MEDIA_ERR_NONE) {
- media_content_error("media_svc_get_storage_id failed : %d", ret);
+ content_error("media_svc_get_storage_id failed : %d", ret);
return _content_error_capi(ret);
}
ret = ms_user_get_storage_type(_content_get_uid(), repl_path, &storage_type);
if (ret != MS_MEDIA_ERR_NONE) {
- media_content_sec_error("ms_user_get_storage_type failed : %d", ret);
+ content_sec_error("ms_user_get_storage_type failed : %d", ret);
return _content_error_capi(ret);
}
if (modified_time != _media_util_get_file_time(repl_path)) {
ret = media_svc_refresh_item(_content_get_db_handle(), false, storage_id, storage_type, repl_path, _content_get_uid());
if (ret != MS_MEDIA_ERR_NONE) {
- media_content_error("media_svc_refresh_item failed : %d", ret);
+ content_error("media_svc_refresh_item failed : %d", ret);
return _content_error_capi(ret);
}
}
} else if (ret == MS_MEDIA_ERR_DB_NO_RECORD) {
- media_content_sec_debug("media_svc_check_item_exist_by_path : no record : %s", repl_path);
- media_content_retvm_if(!_media_util_check_support_media_type(repl_path), MEDIA_CONTENT_ERROR_NOT_SUPPORTED, "Unsupported media type");
+ content_sec_debug("media_svc_check_item_exist_by_path : no record : %s", repl_path);
+ content_retvm_if(!_media_util_check_support_media_type(repl_path), MEDIA_CONTENT_ERROR_NOT_SUPPORTED, "Unsupported media type");
ret = media_svc_insert_item_immediately(_content_get_db_handle(), storage_id, storage_type, repl_path, _content_get_uid());
if (ret != MS_MEDIA_ERR_NONE) {
if (ret == MS_MEDIA_ERR_DB_CONSTRAINT_FAIL) {
- media_content_sec_error("This item is already inserted. This may be normal operation because other process already did this (%s)", repl_path);
+ content_sec_error("This item is already inserted. This may be normal operation because other process already did this (%s)", repl_path);
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_sec_error("media_svc_insert_item_immediately failed : %d (%s)", ret, repl_path);
+ content_sec_error("media_svc_insert_item_immediately failed : %d (%s)", ret, repl_path);
}
return _content_error_capi(ret);
}
} else {
- media_content_sec_error("media_svc_get_modified_time failed : %d (%s)", ret, repl_path);
+ content_sec_error("media_svc_get_modified_time failed : %d (%s)", ret, repl_path);
return _content_error_capi(ret);
}
media_info_s *_media = (media_info_s*)calloc(1, sizeof(media_info_s));
- media_content_retvm_if(_media == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+ content_retvm_if(_media == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
#ifdef _USE_TVPD_MODE
if (STRING_VALID(storage_id))
ret = _media_info_get_media_info_from_db(repl_path, storage_id, (media_info_h)_media);
int ret = MS_MEDIA_ERR_NONE;
char repl_path[MAX_PATH_LEN] = {0, };
- media_content_retvm_if(path_array == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid path_array");
- media_content_retvm_if(array_length <= 0, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid array_length");
+ content_retvm_if(path_array == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid path_array");
+ content_retvm_if(array_length <= 0, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid array_length");
repl_path_array = calloc(1, sizeof(char *) * array_length);
- media_content_retvm_if(repl_path_array == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+ content_retvm_if(repl_path_array == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
for (idx = 0; idx < array_length; idx++) {
if (STRING_VALID(path_array[idx])) {
_media_content_replace_path(path_array[idx], repl_path);
repl_path_array[idx] = strndup(repl_path, strlen(repl_path));
} else {
- media_content_error("path[%d] is invalid string", idx);
+ content_error("path[%d] is invalid string", idx);
}
}
{
char storage_id[MEDIA_CONTENT_UUID_SIZE+1] = {0,};
int ret = MEDIA_CONTENT_ERROR_NONE;
- media_content_retvm_if(!STRING_VALID(path), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid path");
- media_content_retvm_if(media == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid info");
+ content_retvm_if(!STRING_VALID(path), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid path");
+ content_retvm_if(media == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid info");
memset(storage_id, 0x00, sizeof(storage_id));
ret = media_svc_get_storage_id(_content_get_db_handle(), path, storage_id, tzplatform_getuid(TZ_USER_NAME));
if (ret != MS_MEDIA_ERR_NONE) {
- media_content_error("media_svc_get_storage_id failed : %d", ret);
+ content_error("media_svc_get_storage_id failed : %d", ret);
return _content_error_capi(ret);
}
media_info_s *_media = (media_info_s*)calloc(1, sizeof(media_info_s));
- media_content_retvm_if(_media == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+ content_retvm_if(_media == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
ret = _media_info_get_media_info_from_db(path, storage_id, (media_info_h)_media);
*media = (media_info_h)_media;
int ret = MEDIA_CONTENT_ERROR_NONE;
char *path = NULL;
char *storage_id = NULL;
- media_content_warn("DEPRECATION WARNING: media_info_delete_from_db() is deprecated and will be removed from next release. Use media_content_scan_file() instead.");
+ content_warn("DEPRECATION WARNING: media_info_delete_from_db() is deprecated and will be removed from next release. Use media_content_scan_file() instead.");
if (!STRING_VALID(media_id)) {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
ret = __media_info_get_media_path_by_id_from_db(media_id, &path);
if (ret != MEDIA_CONTENT_ERROR_NONE) {
- media_content_error("__media_info_get_media_path_by_id_from_db failed : %d", ret);
+ content_error("__media_info_get_media_path_by_id_from_db failed : %d", ret);
SAFE_FREE(path);
return ret;
}
ret = _media_db_get_storage_id_by_media_id(media_id, &storage_id);
if (ret != MEDIA_CONTENT_ERROR_NONE) {
- media_content_error("_media_db_get_storage_id_by_media_id failed : %d", ret);
+ content_error("_media_db_get_storage_id_by_media_id failed : %d", ret);
SAFE_FREE(path);
return ret;
}
int media_info_destroy(media_info_h media)
{
media_info_s *_media = (media_info_s*)media;
- media_content_retvm_if(_media == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Handle is null");
+ content_retvm_if(_media == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Handle is null");
SAFE_FREE(_media->media_id);
SAFE_FREE(_media->file_path);
int media_info_clone(media_info_h *dst, media_info_h src)
{
media_info_s *_src = (media_info_s*)src;
- media_content_retvm_if(_src == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Source handle is null");
+ content_retvm_if(_src == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Source handle is null");
media_info_s *_dst = (media_info_s*)calloc(1, sizeof(media_info_s));
- media_content_retvm_if(_dst == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+ content_retvm_if(_dst == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
if (_src->media_id) {
_dst->media_id = g_strdup(_src->media_id);
int ret = MEDIA_CONTENT_ERROR_NONE;
if (media_count == NULL) {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
return ret;
{
int ret = MEDIA_CONTENT_ERROR_NONE;
- media_content_retvm_if(callback == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid callback");
+ content_retvm_if(callback == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid callback");
ret = _media_db_get_group_item(NULL, filter, callback, user_data, MEDIA_GROUP_NONE);
if (STRING_VALID(media_id) && tag_count) {
ret = _media_db_get_group_item_count(media_id, filter, MEDIA_GROUP_TAG_BY_MEDIA_ID, tag_count);
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if ((callback != NULL) && STRING_VALID(media_id)) {
ret = _media_db_get_tag(media_id, filter, callback, user_data);
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if (STRING_VALID(media_id) && bookmark_count) {
ret = _media_db_get_group_item_count(media_id, filter, MEDIA_GROUP_BOOKMARK_BY_MEDIA_ID, bookmark_count);
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if ((callback != NULL) && STRING_VALID(media_id)) {
ret = _media_db_get_bookmark(media_id, filter, callback, user_data);
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if (STRING_VALID(media_id) && face_count) {
ret = _media_db_get_group_item_count(media_id, filter, MEDIA_GROUP_FACE_BY_MEDIA_ID, face_count);
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if ((callback != NULL) && STRING_VALID(media_id)) {
ret = _media_db_get_face(media_id, filter, callback, user_data);
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
media_info_s *_media = (media_info_s*)media;
- media_content_retvm_if(_media == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid media");
- media_content_retvm_if(_media->media_type != MEDIA_CONTENT_TYPE_IMAGE, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid media_type");
- media_content_retvm_if(_media->image_meta == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid image_meta");
+ content_retvm_if(_media == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid media");
+ content_retvm_if(_media->media_type != MEDIA_CONTENT_TYPE_IMAGE, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid media_type");
+ content_retvm_if(_media->image_meta == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid image_meta");
image_meta_s *_image = (image_meta_s*)calloc(1, sizeof(image_meta_s));
- media_content_retvm_if(_image == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+ content_retvm_if(_image == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
_image->media_id = g_strdup(_media->media_id);
_image->width = _media->image_meta->width;
media_info_s *_media = (media_info_s*)media;
- media_content_retvm_if(_media == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid media");
- media_content_retvm_if(_media->media_type != MEDIA_CONTENT_TYPE_VIDEO, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid media_type");
- media_content_retvm_if(_media->video_meta == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid video_meta");
+ content_retvm_if(_media == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid media");
+ content_retvm_if(_media->media_type != MEDIA_CONTENT_TYPE_VIDEO, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid media_type");
+ content_retvm_if(_media->video_meta == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid video_meta");
video_meta_s *_video = (video_meta_s*)calloc(1, sizeof(video_meta_s));
- media_content_retvm_if(_video == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+ content_retvm_if(_video == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
_video->media_id = g_strdup(_media->media_id);
_video->album = g_strdup(_media->video_meta->album);
media_info_s *_media = (media_info_s*)media;
- media_content_retvm_if(_media == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid media");
- media_content_retvm_if(_media->media_type != MEDIA_CONTENT_TYPE_MUSIC && _media->media_type != MEDIA_CONTENT_TYPE_SOUND, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid media_type");
- media_content_retvm_if(_media->audio_meta == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid audio_meta");
+ content_retvm_if(_media == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid media");
+ content_retvm_if(_media->media_type != MEDIA_CONTENT_TYPE_MUSIC && _media->media_type != MEDIA_CONTENT_TYPE_SOUND, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid media_type");
+ content_retvm_if(_media->audio_meta == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid audio_meta");
audio_meta_s *_audio = (audio_meta_s*)calloc(1, sizeof(audio_meta_s));
- media_content_retvm_if(_audio == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+ content_retvm_if(_audio == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
_audio->media_id = g_strdup(_media->media_id);
_audio->album = g_strdup(_media->audio_meta->album);
if (_media && media_id) {
if (STRING_VALID(_media->media_id)) {
*media_id = strdup(_media->media_id);
- media_content_retvm_if(*media_id == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+ content_retvm_if(*media_id == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
} else {
*media_id = NULL;
}
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if (_media && path) {
if (STRING_VALID(_media->file_path)) {
*path = strdup(_media->file_path);
- media_content_retvm_if(*path == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+ content_retvm_if(*path == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
} else {
*path = NULL;
}
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if (_media && name) {
if (_media->display_name != NULL) {
*name = g_strdup(_media->display_name);
- media_content_retvm_if(*name == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+ content_retvm_if(*name == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
} else {
*name = NULL;
}
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
*type = _media->media_type;
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if (_media && mime_type) {
if (STRING_VALID(_media->mime_type)) {
*mime_type = strdup(_media->mime_type);
- media_content_retvm_if(*mime_type == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+ content_retvm_if(*mime_type == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
} else {
*mime_type = NULL;
}
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
*size = _media->size;
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
*added_time = _media->added_time;
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
*time = _media->modified_time;
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
*time = _media->timeline;
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if (_media && path) {
if (_media->thumbnail_path != NULL) {
*path = g_strdup(_media->thumbnail_path);
- media_content_retvm_if(*path == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+ content_retvm_if(*path == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
} else {
*path = NULL;
}
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if (_media && title) { /*title can be empty string*/
if (_media->title != NULL) {
*title = g_strdup(_media->title);
- media_content_retvm_if(*title == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+ content_retvm_if(*title == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
} else {
*title = NULL;
}
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if (_media && description) {
if (_media->description != NULL) { /*description can be empty string*/
*description = g_strdup(_media->description);
- media_content_retvm_if(*description == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+ content_retvm_if(*description == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
} else {
*description = NULL;
}
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
*longitude = _media->longitude;
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
*latitude = _media->latitude;
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
*altitude = _media->altitude;
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
*rating = _media->rating;
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
*favorite = _media->favourite;
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
int media_info_get_storage_id(media_info_h media, char **storage_id)
{
int ret = MEDIA_CONTENT_ERROR_NONE;
- media_content_warn("DEPRECATION WARNING: media_info_get_storage_id() is deprecated and will be removed from next release.");
+ content_warn("DEPRECATION WARNING: media_info_get_storage_id() is deprecated and will be removed from next release.");
media_info_s *_media = (media_info_s*)media;
if (_media && storage_id) {
if (STRING_VALID(_media->storage_uuid)) {
*storage_id = strdup(_media->storage_uuid);
- media_content_retvm_if(*storage_id == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+ content_retvm_if(*storage_id == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
} else {
*storage_id = NULL;
ret = MEDIA_CONTENT_ERROR_DB_FAILED;
}
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
*is_drm = _media->is_drm;
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
*is_360 = _media->is_360;
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
int media_info_get_storage_type(media_info_h media, media_content_storage_e *storage_type)
{
int ret = MEDIA_CONTENT_ERROR_NONE;
- media_content_warn("DEPRECATION WARNING: media_info_get_storage_type() is deprecated and will be removed from next release. Use storage_get_type_dev() instead.");
+ content_warn("DEPRECATION WARNING: media_info_get_storage_type() is deprecated and will be removed from next release. Use storage_get_type_dev() instead.");
media_info_s *_media = (media_info_s*)media;
if (_media && storage_type) {
*storage_type = _media->storage_type;
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
SAFE_FREE(_media->contact);
if (STRING_VALID(contact)) {
_media->contact = strdup(contact);
- media_content_retvm_if(_media->contact == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+ content_retvm_if(_media->contact == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
} else {
_media->contact = NULL;
}
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
SAFE_FREE(_media->app_data);
if (STRING_VALID(app_data)) {
_media->app_data = strdup(app_data);
- media_content_retvm_if(_media->app_data == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+ content_retvm_if(_media->app_data == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
} else {
_media->app_data = NULL;
}
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
int media_info_insert_to_db_with_contact_data(const char *path, const char* contact, const char* app_data, media_info_h *info)
{
int ret = media_info_insert_to_db(path, info);
- media_content_retvm_if(ret != MEDIA_CONTENT_ERROR_NONE, ret, "media_info_insert_to_db [%s] failed", path);
+ content_retvm_if(ret != MEDIA_CONTENT_ERROR_NONE, ret, "media_info_insert_to_db [%s] failed", path);
ret = media_info_set_contact(*info, contact);
if (ret != MEDIA_CONTENT_ERROR_NONE) {
- media_content_error("media_info_set_contact [%s] failed", contact);
+ content_error("media_info_set_contact [%s] failed", contact);
media_info_s* _media_info = (media_info_s*)*info;
ret = media_info_delete_from_db(_media_info->media_id);
- media_content_retvm_if(ret != MEDIA_CONTENT_ERROR_NONE, ret, "media_info_delete_from_db [%s] failed", _media_info->media_id);
+ content_retvm_if(ret != MEDIA_CONTENT_ERROR_NONE, ret, "media_info_delete_from_db [%s] failed", _media_info->media_id);
media_info_destroy(*info);
return ret;
ret = media_info_set_app_data(*info, app_data);
if (ret != MEDIA_CONTENT_ERROR_NONE) {
- media_content_error("media_info_set_app_data [%s] failed", app_data);
+ content_error("media_info_set_app_data [%s] failed", app_data);
media_info_s* _media_info = (media_info_s*)*info;
ret = media_info_delete_from_db(_media_info->media_id);
- media_content_retvm_if(ret != MEDIA_CONTENT_ERROR_NONE, ret, "media_info_delete_from_db [%s] failed", _media_info->media_id);
+ content_retvm_if(ret != MEDIA_CONTENT_ERROR_NONE, ret, "media_info_delete_from_db [%s] failed", _media_info->media_id);
media_info_destroy(*info);
return ret;
ret = media_info_update_to_db(*info);
if (ret != MEDIA_CONTENT_ERROR_NONE) {
- media_content_error("media_info_update_to_db [] failed");
+ content_error("media_info_update_to_db [] failed");
media_info_s* _media_info = (media_info_s*)*info;
ret = media_info_delete_from_db(_media_info->media_id);
- media_content_retvm_if(ret != MEDIA_CONTENT_ERROR_NONE, ret, "media_info_delete_from_db [%s] failed", _media_info->media_id);
+ content_retvm_if(ret != MEDIA_CONTENT_ERROR_NONE, ret, "media_info_delete_from_db [%s] failed", _media_info->media_id);
media_info_destroy(*info);
return ret;
char *storage_id = NULL;
if (!STRING_VALID(media_id)) {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
ret = __media_info_get_media_path_by_id_from_db(media_id, &path);
if (ret != MEDIA_CONTENT_ERROR_NONE) {
- media_content_error("__media_info_get_media_path_by_id_from_db failed : %d", ret);
+ content_error("__media_info_get_media_path_by_id_from_db failed : %d", ret);
SAFE_FREE(path);
return ret;
}
ret = _media_db_get_storage_id_by_media_id(media_id, &storage_id);
if (ret != MEDIA_CONTENT_ERROR_NONE) {
- media_content_error("_media_db_get_storage_id_by_media_id failed : %d", ret);
+ content_error("_media_db_get_storage_id_by_media_id failed : %d", ret);
SAFE_FREE(path);
return ret;
}
ret = media_svc_delete_item_by_path(_content_get_db_handle(), storage_id, path, tzplatform_getuid(TZ_USER_NAME));
SAFE_FREE(storage_id);
if (ret != MEDIA_CONTENT_ERROR_NONE) {
- media_content_error("remove from DB failed : %d", ret);
+ content_error("remove from DB failed : %d", ret);
SAFE_FREE(path);
return ret;
}
if (STRING_VALID(_media->contact)) {
*contact = strdup(_media->contact);
if (*contact == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
} else {
}
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if (STRING_VALID(_media->app_data)) {
*app_data = strdup(_media->app_data);
if (*app_data == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
} else {
}
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
*played_count = _media->played_count;
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if (_media) {
_media->played_count = played_count;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if ((_media != NULL) && (played_position >= 0)) {
_media->played_position = played_position;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
*played_position = _media->played_position;
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
time(¤t_time);
_media->played_time = current_time;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
*played_time = _media->played_time;
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
*extract_flag = _media->extract_flag;
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
*stitched_info = (_media->stitched_info & 0xFFFF0000) >> 16;
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
*stitched_info = _media->stitched_info & 0x0000FFFF;
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if (STRING_VALID(_media->modified_month)) {
*modified_month = strdup(_media->modified_month);
if (*modified_month == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
} else {
}
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
sqlite3_stmt *stmt = NULL;
if (!STRING_VALID(media_id) || (media == NULL)) {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
char *storage_id = NULL;
ret = _media_db_get_storage_id_by_media_id(media_id, &storage_id);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
snprintf(select_query, sizeof(select_query), SELECT_MEDIA_FROM_MEDIA, storage_id, media_id);
SAFE_FREE(storage_id);
#else
snprintf(select_query, sizeof(select_query), SELECT_MEDIA_FROM_MEDIA, media_id);
#endif
ret = _content_get_result(select_query, &stmt);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
media_info_s *_media = NULL;
_media = (media_info_s*)calloc(1, sizeof(media_info_s));
if (_media == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
SQLITE3_FINALIZE(stmt);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
else
_media->favourite = 0;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if (ret == MEDIA_CONTENT_ERROR_NONE) {
/* Send notification for this update */
- media_content_debug("Update is successfull. Send notification for this");
+ content_debug("Update is successfull. Send notification for this");
if (_media->file_path && _media->mime_type)
media_svc_publish_noti(MS_MEDIA_ITEM_UPDATE, _media->file_path, _media->media_type, _media->media_id, _media->mime_type);
else
- media_content_error("Can't Send Noti : path or mime type is NULL");
+ content_error("Can't Send Noti : path or mime type is NULL");
}
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
int ret = MEDIA_CONTENT_ERROR_NONE;
char repl_path[MAX_PATH_LEN] = {0, };
- media_content_retvm_if(media == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid media");
- media_content_retvm_if(!STRING_VALID(dst_path), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid dst_path");
+ content_retvm_if(media == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid media");
+ content_retvm_if(!STRING_VALID(dst_path), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid dst_path");
memset(repl_path, 0, sizeof(repl_path));
ret = _media_content_replace_path(dst_path, repl_path);
- media_content_retvm_if(!STRING_VALID(repl_path), MEDIA_CONTENT_ERROR_INVALID_OPERATION, "path replacement failed");
+ content_retvm_if(!STRING_VALID(repl_path), MEDIA_CONTENT_ERROR_INVALID_OPERATION, "path replacement failed");
media_info_s *_media = (media_info_s*)media;
}
/* If the two paths are the same, do nothing */
- media_content_retvm_if(g_strcmp0(repl_path, _media->file_path) == 0, MEDIA_CONTENT_ERROR_NONE, "Same path");
+ content_retvm_if(g_strcmp0(repl_path, _media->file_path) == 0, MEDIA_CONTENT_ERROR_NONE, "Same path");
ret = __media_info_check_file_validity(repl_path);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
ret = media_svc_move_item(_content_get_db_handle(), _media->file_path, repl_path, _media->media_id, _media->media_type, _media->mime_type, _content_get_uid());
return _content_error_capi(ret);
int media_info_create_thumbnail(media_info_h media, media_thumbnail_completed_cb callback, void *user_data)
{
int ret = MEDIA_CONTENT_ERROR_NONE;
- media_content_warn("DEPRECATION WARNING: media_info_create_thumbnail() is deprecated and will be removed from next release. Use media_info_generate_thumbnail() instead.");
+ content_warn("DEPRECATION WARNING: media_info_create_thumbnail() is deprecated and will be removed from next release. Use media_info_generate_thumbnail() instead.");
static unsigned int req_id = 0;
media_info_s *_media = (media_info_s*)media;
if (_media != NULL && STRING_VALID(_media->media_id) && STRING_VALID(_media->file_path)) {
media_thumbnail_cb_s *_thumb_cb = (media_thumbnail_cb_s*)calloc(1, sizeof(media_thumbnail_cb_s));
- media_content_retvm_if(_thumb_cb == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+ content_retvm_if(_thumb_cb == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
req_id++;
_media->request_id = req_id;
ret = thumbnail_request_from_db_async(_media->request_id, _media->file_path, (ThumbFunc)__media_info_thumbnail_completed_cb, (void *)_thumb_cb, _content_get_uid());
ret = _content_error_capi(ret);
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if (_media->thumbnail_path == NULL)
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
int media_info_cancel_thumbnail(media_info_h media)
{
int ret = MEDIA_CONTENT_ERROR_NONE;
- media_content_warn("DEPRECATION WARNING: media_info_cancel_thumbnail() is deprecated and will be removed from next release.");
+ content_warn("DEPRECATION WARNING: media_info_cancel_thumbnail() is deprecated and will be removed from next release.");
media_info_s *_media = (media_info_s*)media;
if (_media != NULL && STRING_VALID(_media->media_id) && _media->request_id > 0) {
ret = thumbnail_request_cancel_media(_media->request_id);
ret = _content_error_capi(ret);
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
media_info_s *_media = (media_info_s*)media;
if (!__media_info_isFaceRecognition_feature_supported()) {
- media_content_error("NOT_SUPPORTED(0x%08x)", MEDIA_CONTENT_ERROR_NOT_SUPPORTED);
+ content_error("NOT_SUPPORTED(0x%08x)", MEDIA_CONTENT_ERROR_NOT_SUPPORTED);
return MEDIA_CONTENT_ERROR_NOT_SUPPORTED;
}
if (_media != NULL && STRING_VALID(_media->media_id) && STRING_VALID(_media->file_path)) {
if (g_strcmp0(_media->mime_type, "image/jpeg") != 0 && g_strcmp0(_media->mime_type, "image/png") != 0 && g_strcmp0(_media->mime_type, "image/bmp") != 0) {
- media_content_error("Unsupported mime type");
+ content_error("Unsupported mime type");
return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
media_face_cb_s *_face_cb = (media_face_cb_s*)calloc(1, sizeof(media_face_cb_s));
- media_content_retvm_if(_face_cb == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+ content_retvm_if(_face_cb == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
req_id++;
_media->face_request_id = req_id;
ret = dcm_request_extract_face_async(_media->face_request_id, _media->file_path, (FaceFunc)__media_info_face_completed_cb, (void *)_face_cb, _content_get_uid());
ret = _content_error_capi(ret);
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
media_info_s *_media = (media_info_s*)media;
if (!__media_info_isFaceRecognition_feature_supported()) {
- media_content_error("NOT_SUPPORTED(0x%08x)", MEDIA_CONTENT_ERROR_NOT_SUPPORTED);
+ content_error("NOT_SUPPORTED(0x%08x)", MEDIA_CONTENT_ERROR_NOT_SUPPORTED);
return MEDIA_CONTENT_ERROR_NOT_SUPPORTED;
}
ret = dcm_request_cancel_face(_media->face_request_id);
ret = _content_error_capi(ret);
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
int media_info_set_description(media_info_h media, const char *description)
{
int ret = MEDIA_CONTENT_ERROR_NONE;
- media_content_warn("DEPRECATION WARNING: media_info_set_description() is deprecated and will be removed from next release.");
+ content_warn("DEPRECATION WARNING: media_info_set_description() is deprecated and will be removed from next release.");
media_info_s *_media = (media_info_s*)media;
if (_media != NULL) {
if (STRING_VALID(description)) {
_media->description = strdup(description);
- media_content_retvm_if(_media->description == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+ content_retvm_if(_media->description == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
} else {
_media->description = NULL;
}
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
int media_info_set_longitude(media_info_h media, double longitude)
{
int ret = MEDIA_CONTENT_ERROR_NONE;
- media_content_warn("DEPRECATION WARNING: media_info_set_longitude() is deprecated and will be removed from next release.");
+ content_warn("DEPRECATION WARNING: media_info_set_longitude() is deprecated and will be removed from next release.");
media_info_s *_media = (media_info_s*)media;
if (_media != NULL) {
_media->longitude = longitude;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
int media_info_set_latitude(media_info_h media, double latitude)
{
int ret = MEDIA_CONTENT_ERROR_NONE;
- media_content_warn("DEPRECATION WARNING: media_info_set_latitude() is deprecated and will be removed from next release.");
+ content_warn("DEPRECATION WARNING: media_info_set_latitude() is deprecated and will be removed from next release.");
media_info_s *_media = (media_info_s*)media;
if (_media != NULL) {
_media->latitude = latitude;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
int media_info_set_rating(media_info_h media, int rating)
{
int ret = MEDIA_CONTENT_ERROR_NONE;
- media_content_warn("DEPRECATION WARNING: media_info_set_rating() is deprecated and will be removed from next release.");
+ content_warn("DEPRECATION WARNING: media_info_set_rating() is deprecated and will be removed from next release.");
media_info_s *_media = (media_info_s*)media;
if (_media != NULL) {
_media->rating = rating;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
#ifdef TIZEN_FEATURE_COMPATIBILITY
int media_info_set_added_time(media_info_h media, time_t added_time)
{
- media_content_warn("DEPRECATION WARNING: media_info_set_added_time() is removed from 5.5.");
+ content_warn("DEPRECATION WARNING: media_info_set_added_time() is removed from 5.5.");
return MEDIA_CONTENT_ERROR_NONE;
}
int media_info_delete_batch_from_db(filter_h filter)
{
- media_content_warn("DEPRECATION WARNING: media_info_delete_batch_from_db() is removed from 5.5.");
+ content_warn("DEPRECATION WARNING: media_info_delete_batch_from_db() is removed from 5.5.");
return MEDIA_CONTENT_ERROR_NONE;
}
int media_info_create(const char *path, media_info_h *media)
{
- media_content_warn("DEPRECATION WARNING: media_info_create() is removed from 5.5.");
+ content_warn("DEPRECATION WARNING: media_info_create() is removed from 5.5.");
return MEDIA_CONTENT_ERROR_NONE;
}
int media_info_refresh_metadata_to_db(const char *media_id)
{
- media_content_warn("DEPRECATION WARNING: media_info_refresh_metadata_to_db() is removed from 5.5.");
+ content_warn("DEPRECATION WARNING: media_info_refresh_metadata_to_db() is removed from 5.5.");
return MEDIA_CONTENT_ERROR_NONE;
}
int media_info_set_display_name(media_info_h media, const char *display_name)
{
- media_content_warn("DEPRECATION WARNING: media_info_set_display_name() is removed from 5.5.");
+ content_warn("DEPRECATION WARNING: media_info_set_display_name() is removed from 5.5.");
return MEDIA_CONTENT_ERROR_NONE;
}
list_cnt = g_list_length(playlist->item_list);
- media_content_debug("list_cnt : [%d]", list_cnt);
+ content_debug("list_cnt : [%d]", list_cnt);
for (idx = 0; idx < list_cnt; idx++) {
item = (media_playlist_item_s*)g_list_nth_data(playlist->item_list, idx);
ret = _content_query_sql(query_str);
SQLITE3_SAFE_FREE(query_str);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
select_query = sqlite3_mprintf(SELECT_PLAYLIST_ID_FROM_PLAYLIST, playlist_name);
ret = _content_get_result(select_query, &stmt);
SQLITE3_SAFE_FREE(select_query);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
if (sqlite3_step(stmt) == SQLITE_ROW)
*playlist_id = (int)sqlite3_column_int(stmt, 0);
/* get the max play_order */
ret = _content_get_result(select_query, &stmt);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
if (sqlite3_step(stmt) == SQLITE_ROW)
play_order = (int)sqlite3_column_int(stmt, 0);
char **media_id = (char**)user_data;
ret = media_info_get_media_id(media, media_id);
- media_content_retvm_if(ret != MEDIA_CONTENT_ERROR_NONE, FALSE, "media_info_get_media_id fail");
+ content_retvm_if(ret != MEDIA_CONTENT_ERROR_NONE, FALSE, "media_info_get_media_id fail");
return TRUE;
}
char *path = NULL;
ret = media_info_get_file_path(media, &path);
- media_content_retvm_if(ret != MEDIA_CONTENT_ERROR_NONE, FALSE, "media_info_get_file_path fail");
+ content_retvm_if(ret != MEDIA_CONTENT_ERROR_NONE, FALSE, "media_info_get_file_path fail");
*list = g_list_append(*list, path);
FILE *fp = NULL;
fp = fopen(playlist_path, "wb");
- media_content_retvm_if(fp == NULL, MEDIA_CONTENT_ERROR_INVALID_OPERATION, "fopen fail");
+ content_retvm_if(fp == NULL, MEDIA_CONTENT_ERROR_INVALID_OPERATION, "fopen fail");
fputs("", fp); /* remove previous playlist */
FILE *fp = NULL;
fp = fopen(playlist_path, "a"); /* append only */
- media_content_retvm_if(fp == NULL, MEDIA_CONTENT_ERROR_INVALID_OPERATION, "fopen fail");
+ content_retvm_if(fp == NULL, MEDIA_CONTENT_ERROR_INVALID_OPERATION, "fopen fail");
fputs(path, fp);
*item_list = NULL; *item_count = 0;
fp = fopen(playlist_path, "rb");
- media_content_retvm_if(fp == NULL, MEDIA_CONTENT_ERROR_INVALID_OPERATION, "fopen fail");
+ content_retvm_if(fp == NULL, MEDIA_CONTENT_ERROR_INVALID_OPERATION, "fopen fail");
if (fseek(fp, 0, SEEK_END) < 0) {
- media_content_stderror("fseek failed");
+ content_stderror("fseek failed");
fclose(fp);
return MEDIA_CONTENT_ERROR_INVALID_OPERATION;
}
file_size = ftell(fp);
if (file_size == 0) {
- media_content_debug("file is empty.");
+ content_debug("file is empty.");
fclose(fp);
return MEDIA_CONTENT_ERROR_NONE;
}
if (fseek(fp, 0, SEEK_SET) < 0) {
- media_content_stderror("fseek failed");
+ content_stderror("fseek failed");
fclose(fp);
return MEDIA_CONTENT_ERROR_INVALID_OPERATION;
}
if (*item_list == NULL) {
fclose(fp);
SAFE_FREE(*item_list);
- media_content_error("Out of Memory");
+ content_error("Out of Memory");
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
memset(tmp_str, 0, sizeof(tmp_str));
char **tmp_ptr = calloc(current_max_size, sizeof(char*));
if (tmp_ptr == NULL) {
__media_playlist_destroy_import_item(*item_list, current_index);
- media_content_error("Out of Memory");
+ content_error("Out of Memory");
fclose(fp);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
(*item_list)[current_index] = malloc(tmp_str_len + 1);
if ((*item_list)[current_index] == NULL) {
__media_playlist_destroy_import_item(*item_list, current_index);
- media_content_error("Out of Memory");
+ content_error("Out of Memory");
fclose(fp);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
int playlist_id = 0;
if (!STRING_VALID(name)) {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
media_playlist_s *_playlist = (media_playlist_s*)calloc(1, sizeof(media_playlist_s));
- media_content_retvm_if(_playlist == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+ content_retvm_if(_playlist == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
ret = __media_playlist_insert_playlist_record(name, &playlist_id);
if (_playlist->name == NULL) {
SAFE_FREE(_playlist);
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
char *query_str = NULL;
if (playlist_id < 0) {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if (playlist_count != NULL) {
ret = _media_db_get_group_count(filter, MEDIA_GROUP_PLAYLIST, playlist_count);
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
int ret = MEDIA_CONTENT_ERROR_NONE;
if (callback == NULL) {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if ((playlist_id > 0) && (media_count != NULL)) {
ret = _media_db_get_group_item_count_by_id(playlist_id, filter, MEDIA_GROUP_PLAYLIST, media_count);
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if ((playlist_id > 0) && (callback != NULL)) {
ret = _media_db_get_playlist_item(playlist_id, filter, callback, user_data);
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if (_src != NULL) {
media_playlist_s *_dst = (media_playlist_s*)calloc(1, sizeof(media_playlist_s));
- media_content_retvm_if(_dst == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+ content_retvm_if(_dst == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
_dst->playlist_id = _src->playlist_id;
_dst->name = strdup(_src->name);
if (_dst->name == NULL) {
media_playlist_destroy((media_playlist_h)_dst);
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
}
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
snprintf(select_query, sizeof(select_query), SELECT_PLAYLIST_FROM_PLAYLIST, playlist_id);
ret = _content_get_result(select_query, &stmt);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
media_playlist_s *_playlist = NULL;
if (sqlite3_step(stmt) == SQLITE_ROW) {
_playlist = (media_playlist_s*)calloc(1, sizeof(media_playlist_s));
if (_playlist == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
SQLITE3_FINALIZE(stmt);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
*playlist = (media_playlist_h)_playlist;
} else {
- media_content_error("Nonexistent playlist id[%d]", playlist_id);
+ content_error("Nonexistent playlist id[%d]", playlist_id);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
SQLITE3_FINALIZE(stmt);
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if ((_playlist != NULL) && (playlist_id != NULL)) {
*playlist_id = _playlist->playlist_id;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if (_playlist) {
if (STRING_VALID(_playlist->name)) {
*name = strdup(_playlist->name);
- media_content_retvm_if(*name == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+ content_retvm_if(*name == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
} else {
*name = NULL;
}
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if (_playlist) {
if (STRING_VALID(_playlist->thumbnail_path)) {
*path = strdup(_playlist->thumbnail_path);
- media_content_retvm_if(*path == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+ content_retvm_if(*path == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
} else {
*path = NULL;
}
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
char select_query[DEFAULT_QUERY_SIZE] = {0, };
if ((_playlist == NULL) || (playlist_member_id < 0) || (play_order == NULL)) {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
snprintf(select_query, sizeof(select_query), SELECT_PLAY_ORDER_FROM_PLAYLIST_VIEW, playlist_id, playlist_member_id);
ret = _content_get_result(select_query, &stmt);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
if (sqlite3_step(stmt) == SQLITE_ROW)
*play_order = (int)sqlite3_column_int(stmt, 0);
SAFE_FREE(_playlist->name);
media_playlist_item_s *item = (media_playlist_item_s*)calloc(1, sizeof(media_playlist_item_s));
- media_content_retvm_if(item == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+ content_retvm_if(item == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
item->playlist_name = strdup(playlist_name);
item->function = MEDIA_PLAYLIST_UPDATE_PLAYLIST_NAME;
if (item->playlist_name == NULL) {
SAFE_FREE(item);
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
if (_playlist->name == NULL) {
SAFE_FREE(item->playlist_name);
SAFE_FREE(item);
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
__media_playlist_item_add(_playlist, item);
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
SAFE_FREE(_playlist->thumbnail_path);
media_playlist_item_s *item = (media_playlist_item_s*)calloc(1, sizeof(media_playlist_item_s));
- media_content_retvm_if(item == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+ content_retvm_if(item == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
item->thumbnail_path = g_strdup(path);
item->function = MEDIA_PLAYLIST_UPDATE_THUMBNAIL_PATH;
if (item->thumbnail_path == NULL) {
SAFE_FREE(item);
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
if (_playlist->thumbnail_path == NULL) {
SAFE_FREE(item->thumbnail_path);
SAFE_FREE(item);
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
__media_playlist_item_add(_playlist, item);
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if ((_playlist != NULL) && (playlist_member_id > 0) && (play_order >= 0)) {
media_playlist_item_s *item = (media_playlist_item_s*)calloc(1, sizeof(media_playlist_item_s));
- media_content_retvm_if(item == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+ content_retvm_if(item == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
item->playlist_member_id = playlist_member_id;
item->function = MEDIA_PLAYLIST_UPDATE_PLAY_ORDER;
__media_playlist_item_add(_playlist, item);
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if (_playlist != NULL && STRING_VALID(media_id)) {
media_playlist_item_s *item = (media_playlist_item_s*)calloc(1, sizeof(media_playlist_item_s));
- media_content_retvm_if(item == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+ content_retvm_if(item == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
item->media_id = strdup(media_id);
item->function = MEDIA_PLAYLIST_ADD;
if (item->media_id == NULL) {
SAFE_FREE(item);
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
__media_playlist_item_add(_playlist, item);
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if ((_playlist != NULL) && (playlist_member_id > 0)) {
media_playlist_item_s *item = (media_playlist_item_s*)calloc(1, sizeof(media_playlist_item_s));
- media_content_retvm_if(item == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+ content_retvm_if(item == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
item->playlist_member_id = playlist_member_id;
item->function = MEDIA_PLAYLIST_REMOVE;
__media_playlist_item_add(_playlist, item);
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
media_playlist_item_s *_playlist_item = NULL;
if (_playlist == NULL) {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if (_playlist->item_list != NULL) {
length = g_list_length(_playlist->item_list);
} else {
- media_content_debug("operation list length is 0");
+ content_debug("operation list length is 0");
return MEDIA_CONTENT_ERROR_NONE;
}
}
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("Failed some operation[%d]", _playlist_item->function);
+ content_error("Failed some operation[%d]", _playlist_item->function);
}
}
int idx;
char repl_path[MAX_PATH_LEN] = {0, };
- media_content_retvm_if(!STRING_VALID(path), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid path");
- media_content_retvm_if(!STRING_VALID(playlist_name), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid playlist_name");
+ content_retvm_if(!STRING_VALID(path), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid path");
+ content_retvm_if(!STRING_VALID(playlist_name), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid playlist_name");
memset(repl_path, 0, sizeof(repl_path));
ret = _media_content_replace_path(path, repl_path);
- media_content_retvm_if(!STRING_VALID(repl_path), MEDIA_CONTENT_ERROR_INVALID_OPERATION, "path replacement failed");
+ content_retvm_if(!STRING_VALID(repl_path), MEDIA_CONTENT_ERROR_INVALID_OPERATION, "path replacement failed");
ret = media_playlist_insert_to_db(playlist_name, playlist);
- media_content_retvm_if(ret != MEDIA_CONTENT_ERROR_NONE, ret, "media_playlist_insert_to_db fail");
+ content_retvm_if(ret != MEDIA_CONTENT_ERROR_NONE, ret, "media_playlist_insert_to_db fail");
ret = __media_playlist_import_item_from_file(repl_path, &import_item_list, &import_item_count);
if (ret != MEDIA_CONTENT_ERROR_NONE) {
__media_playlist_destroy_import_item(import_item_list, import_item_count);
- media_content_error("Fail to get playlist from file");
+ content_error("Fail to get playlist from file");
return ret;
}
if (import_item_count == 0)
- media_content_debug("The playlist from file is empty");
+ content_debug("The playlist from file is empty");
for (idx = 0; idx < import_item_count; idx++) {
filter_h filter = NULL;
if (ret != MEDIA_CONTENT_ERROR_NONE) {
__media_playlist_destroy_import_item(import_item_list, import_item_count);
media_filter_destroy(filter);
- media_content_error("error media_filter_create");
+ content_error("error media_filter_create");
return ret;
}
condition = sqlite3_mprintf("media_path = '%q'", import_item_list[idx]);
__media_playlist_destroy_import_item(import_item_list, import_item_count);
media_filter_destroy(filter);
SQLITE3_SAFE_FREE(condition);
- media_content_error("error media_filter_set_condition");
+ content_error("error media_filter_set_condition");
return ret;
}
ret = _media_db_get_group_item(NULL, filter, __media_playlist_media_info_cb, &media_id, MEDIA_GROUP_NONE);
media_filter_destroy(filter);
SAFE_FREE(media_id);
SQLITE3_SAFE_FREE(condition);
- media_content_error("error media_info_foreach_media_from_db");
+ content_error("error media_info_foreach_media_from_db");
return ret;
}
ret = media_playlist_add_media((media_playlist_h)*playlist, media_id);
media_filter_destroy(filter);
SAFE_FREE(media_id);
SQLITE3_SAFE_FREE(condition);
- media_content_error("error media_playlist_add_media");
+ content_error("error media_playlist_add_media");
return ret;
}
media_filter_destroy(filter);
ret = media_playlist_update_to_db(*playlist);
if (ret != MEDIA_CONTENT_ERROR_NONE) {
__media_playlist_destroy_import_item(import_item_list, import_item_count);
- media_content_error("Fail to update playlist to db");
+ content_error("Fail to update playlist to db");
return ret;
}
__media_playlist_destroy_import_item(import_item_list, import_item_count);
unsigned int idx = 0;
char repl_path[MAX_PATH_LEN] = {0, };
- media_content_retvm_if(!STRING_VALID(path), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid path");
- media_content_retvm_if(_playlist == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid playlist");
- media_content_retvm_if(_playlist->playlist_id <= 0, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid playlist_id");
+ content_retvm_if(!STRING_VALID(path), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid path");
+ content_retvm_if(_playlist == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid playlist");
+ content_retvm_if(_playlist->playlist_id <= 0, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid playlist_id");
memset(repl_path, 0, sizeof(repl_path));
ret = _media_content_replace_path(path, repl_path);
- media_content_retvm_if(!STRING_VALID(repl_path), MEDIA_CONTENT_ERROR_INVALID_OPERATION, "path replacement failed");
+ content_retvm_if(!STRING_VALID(repl_path), MEDIA_CONTENT_ERROR_INVALID_OPERATION, "path replacement failed");
ret = _media_db_get_playlist_item(_playlist->playlist_id, NULL, __media_playlist_member_cb, &item_list);
- media_content_retvm_if(ret != MEDIA_CONTENT_ERROR_NONE, ret, "_media_db_get_playlist_item fail");
+ content_retvm_if(ret != MEDIA_CONTENT_ERROR_NONE, ret, "_media_db_get_playlist_item fail");
ret = __media_playlist_reset_file(repl_path);
if (ret != MEDIA_CONTENT_ERROR_NONE) {
g_list_free_full(item_list, __media_playlist_destroy_export_item);
- media_content_error("Fail to init playlist file");
+ content_error("Fail to init playlist file");
return ret;
}
ret = __media_playlist_append_to_file(repl_path, item);
if (ret != MEDIA_CONTENT_ERROR_NONE) {
g_list_free_full(item_list, __media_playlist_destroy_export_item);
- media_content_error("Fail to export paths into file");
+ content_error("Fail to export paths into file");
return ret;
}
}
{
int ret = MEDIA_CONTENT_ERROR_NONE;
- media_content_retvm_if(playlist == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid playlist");
+ content_retvm_if(playlist == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid playlist");
media_playlist_s *_playlist = (media_playlist_s*)calloc(1, sizeof(media_playlist_s));
- media_content_retvm_if(_playlist == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+ content_retvm_if(_playlist == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
_playlist->playlist_id = -1;
_playlist->name = NULL;
char select_query[DEFAULT_QUERY_SIZE] = {0, };
if ((playlist_id < 0) || (playlist_member_id < 0) || (play_order == NULL)) {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
snprintf(select_query, sizeof(select_query), SELECT_PLAY_ORDER_FROM_PLAYLIST_VIEW, playlist_id, playlist_member_id);
ret = _content_get_result(select_query, &stmt);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
if (sqlite3_step(stmt) == SQLITE_ROW)
*play_order = (int)sqlite3_column_int(stmt, 0);
media_playlist_s *_playlist = (media_playlist_s*)playlist;
int playlist_id = 0;
- media_content_retvm_if(_playlist == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid playlist");
- media_content_retvm_if(_playlist->playlist_id != -1, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid playlist insert");
+ content_retvm_if(_playlist == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid playlist");
+ content_retvm_if(_playlist->playlist_id != -1, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid playlist insert");
ret = __media_playlist_insert_playlist_record(_playlist->name, &playlist_id);
if (ret != MEDIA_CONTENT_ERROR_NONE) {
__media_playlist_item_release(_playlist);
- media_content_error("Insert playlist Fail");
+ content_error("Insert playlist Fail");
return ret;
}
{
media_playlist_s *_playlist = (media_playlist_s*)playlist;
- media_content_retvm_if(_playlist == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid playlist");
+ content_retvm_if(_playlist == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid playlist");
_playlist->playlist_id = playlist_id;
if (media_count) {
ret = _media_db_get_group_item_count(NULL, filter, MEDIA_GROUP_PVR, media_count);
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if (callback != NULL) {
ret = _media_db_get_pvr(filter, callback, user_data);
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if (_src != NULL) {
media_pvr_s *_dst = (media_pvr_s*)calloc(1, sizeof(media_pvr_s));
if (_dst == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
_dst->media_id = strdup(_src->media_id);
if (_dst->media_id == NULL) {
media_pvr_destroy((media_pvr_h)_dst);
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
}
if (STRING_VALID(_src->channel_name)) {
_dst->channel_name = strdup(_src->channel_name);
if (_dst->channel_name == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
media_pvr_destroy((media_pvr_h)_dst);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
if (STRING_VALID(_src->channel_num)) {
_dst->channel_num = strdup(_src->channel_num);
if (_dst->channel_num == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
media_pvr_destroy((media_pvr_h)_dst);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
if (STRING_VALID(_src->program_title)) {
_dst->program_title = strdup(_src->program_title);
if (_dst->program_title == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
media_pvr_destroy((media_pvr_h)_dst);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
if (STRING_VALID(_src->program_crid)) {
_dst->program_crid = strdup(_src->program_crid);
if (_dst->program_crid == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
media_pvr_destroy((media_pvr_h)_dst);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
if (STRING_VALID(_src->guidance)) {
_dst->guidance = strdup(_src->guidance);
if (_dst->guidance == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
media_pvr_destroy((media_pvr_h)_dst);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
if (STRING_VALID(_src->synopsis)) {
_dst->synopsis = strdup(_src->synopsis);
if (_dst->synopsis == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
media_pvr_destroy((media_pvr_h)_dst);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
if (STRING_VALID(_src->genre)) {
_dst->genre = strdup(_src->genre);
if (_dst->genre == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
media_pvr_destroy((media_pvr_h)_dst);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
if (STRING_VALID(_src->language)) {
_dst->language = strdup(_src->language);
if (_dst->language == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
media_pvr_destroy((media_pvr_h)_dst);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
if (STRING_VALID(_src->path)) {
_dst->path = strdup(_src->path);
if (_dst->path == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
media_pvr_destroy((media_pvr_h)_dst);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
if (STRING_VALID(_src->storage_id)) {
_dst->storage_id = strdup(_src->storage_id);
if (_dst->storage_id == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
media_pvr_destroy((media_pvr_h)_dst);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
if (STRING_VALID(_src->modified_month)) {
_dst->modified_month = strdup(_src->modified_month);
if (_dst->modified_month == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
media_pvr_destroy((media_pvr_h)_dst);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
if (STRING_VALID(_src->private_data)) {
_dst->private_data = strdup(_src->private_data);
if (_dst->private_data == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
media_pvr_destroy((media_pvr_h)_dst);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
sqlite3_stmt *stmt = NULL;
if (!STRING_VALID(media_id) || (pvr == NULL)) {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
ret = _content_get_result(select_query, &stmt);
sqlite3_free(select_query);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
media_pvr_s *_pvr = NULL;
_pvr = (media_pvr_s*)calloc(1, sizeof(media_pvr_s));
if (_pvr == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
SQLITE3_FINALIZE(stmt);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
*pvr = (media_info_h)_pvr;
} else {
- media_content_error("Nonexistent media_id[%s]", media_id);
+ content_error("Nonexistent media_id[%s]", media_id);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if (STRING_VALID(_pvr->media_id)) {
*media_id = strdup(_pvr->media_id);
if (*media_id == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
} else {
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if (STRING_VALID(_pvr->channel_name)) {
*channel_name = strdup(_pvr->channel_name);
if (*channel_name == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
} else {
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if (STRING_VALID(_pvr->channel_num)) {
*channel_num = strdup(_pvr->channel_num);
if (*channel_num == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
} else {
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if (STRING_VALID(_pvr->program_title)) {
*program_title = strdup(_pvr->program_title);
if (*program_title == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
} else {
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if (STRING_VALID(_pvr->program_crid)) {
*program_crid = strdup(_pvr->program_crid);
if (*program_crid == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
} else {
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if (STRING_VALID(_pvr->guidance)) {
*guidance = strdup(_pvr->guidance);
if (*guidance == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
} else {
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if (STRING_VALID(_pvr->synopsis)) {
*synopsis = strdup(_pvr->synopsis);
if (*synopsis == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
} else {
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if (STRING_VALID(_pvr->genre)) {
*genre = strdup(_pvr->genre);
if (*genre == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
} else {
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if (STRING_VALID(_pvr->language)) {
*language = strdup(_pvr->language);
if (*language == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
} else {
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if (STRING_VALID(_pvr->path)) {
*path = strdup(_pvr->path);
if (*path == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
} else {
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if (STRING_VALID(_pvr->storage_id)) {
*storage_id = strdup(_pvr->storage_id);
if (*storage_id == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
} else {
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
*size = _pvr->size;
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
*timezone = _pvr->timezone;
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
*ptc = _pvr->ptc;
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
*major = _pvr->major;
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
*minor = _pvr->minor;
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
*channel_type = _pvr->channel_type;
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
*program_num = _pvr->program_num;
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
*service_profile = _pvr->service_profile;
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
*duration = _pvr->duration;
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
*embargo_time = _pvr->embargo_time;
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
*expiry_time = _pvr->expiry_time;
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
*parental_rating = _pvr->parental_rating;
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
*start_time = _pvr->start_time;
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
*program_start_time = _pvr->program_start_time;
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
*end_time = _pvr->program_end_time;
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
*program_date = _pvr->program_date;
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
*timer_record = _pvr->timer_record;
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
*series_record = _pvr->series_record;
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
*hd = _pvr->hd;
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
*subtitle = _pvr->subtitle;
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
*ttx = _pvr->ttx;
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
*ad = _pvr->ad;
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
*hard_of_hearing_radio = _pvr->hard_of_hearing_radio;
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
*data_service = _pvr->data_service;
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
*content_lock = _pvr->content_lock;
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
*content_watch = _pvr->content_watch;
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
*has_audio_only = _pvr->has_audio_only;
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
*is_local_record = _pvr->is_local_record;
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
*resolution = _pvr->resolution;
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
*aspectratio = _pvr->aspectratio;
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if (STRING_VALID(_pvr->modified_month)) {
*modified_month = strdup(_pvr->modified_month);
if (*modified_month == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
} else {
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
*sports_type = _pvr->sports_type;
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
*guidance_length = _pvr->guidance_length;
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
*tvmode = _pvr->tvmode;
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
*play_count = _pvr->play_count;
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if (STRING_VALID(_pvr->private_data)) {
*private_data = strdup(_pvr->private_data);
if (*private_data == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
} else {
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
*highlight = _pvr->highlight;
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if (_pvr != NULL) {
_pvr->play_count = play_count;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
SAFE_FREE(_pvr->program_title);
_pvr->program_title = strdup(program_title);
if (_pvr->program_title == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if (_pvr != NULL) {
_pvr->content_lock = content_lock;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if (_pvr != NULL) {
_pvr->content_watch = content_watch;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if (_pvr != NULL) {
_pvr->highlight = highlight;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if (ret == MEDIA_CONTENT_ERROR_NONE)
media_svc_update_pvr_info(_content_get_db_handle(), _pvr->path, _pvr->program_title, _pvr->content_lock);
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
int ret = MEDIA_CONTENT_ERROR_NONE;
if ((callback == NULL) || (group < MEDIA_PVR_GROUP_DURATION) || (group >= MEDIA_GROUP_MAX)) {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
} else {
ret = _media_db_get_pvr_group_item(group_name, filter, group, callback, user_data);
char storage_id[MEDIA_CONTENT_UUID_SIZE+1] = {0,};
if (pvr_path == NULL) {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
} else {
/*get the storage uuid*/
ret = media_svc_get_storage_id(_content_get_db_handle(), pvr_path, storage_id, tzplatform_getuid(TZ_USER_NAME));
if (ret == MS_MEDIA_ERR_NONE) {
- media_content_error("storage uuid [%s]", storage_id);
+ content_error("storage uuid [%s]", storage_id);
update_query = sqlite3_mprintf(UPDATE_PVR_LOCAL_RECORD_PVR, is_local_record, pvr_path, storage_id);
ret = _content_query_sql(update_query);
sqlite3_free(update_query);
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
- media_content_error("pvr path[%s] error[%d]", pvr_path, ret);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("pvr path[%s] error[%d]", pvr_path, ret);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
}
int media_storage_get_storage_info_from_db(const char *storage_id, media_storage_h *storage)
{
int ret = MEDIA_CONTENT_ERROR_NONE;
- media_content_warn("DEPRECATION WARNING: media_storage_get_storage_info_from_db() is deprecated and will be removed from next release.");
+ content_warn("DEPRECATION WARNING: media_storage_get_storage_info_from_db() is deprecated and will be removed from next release.");
char select_query[DEFAULT_QUERY_SIZE] = {0, };
sqlite3_stmt *stmt = NULL;
media_storage_s *_storage = NULL;
if (!STRING_VALID(storage_id) || (storage == NULL)) {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
snprintf(select_query, sizeof(select_query), SELECT_STORAGE_INFO_FROM_STORAGE, storage_id);
ret = _content_get_result(select_query, &stmt);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
if (sqlite3_step(stmt) == SQLITE_ROW) {
_storage = (media_storage_s*)calloc(1, sizeof(media_storage_s));
if (_storage == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
SQLITE3_FINALIZE(stmt);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
*storage = (media_storage_h)_storage;
} else {
- media_content_error("Nonexistent storage id[%s]", storage_id);
+ content_error("Nonexistent storage id[%s]", storage_id);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
int media_storage_get_storage_count_from_db(filter_h filter, int *storage_count)
{
int ret = MEDIA_CONTENT_ERROR_NONE;
- media_content_warn("DEPRECATION WARNING: media_storage_get_storage_count_from_db() is deprecated and will be removed from next release.");
+ content_warn("DEPRECATION WARNING: media_storage_get_storage_count_from_db() is deprecated and will be removed from next release.");
if (storage_count) {
ret = _media_db_get_group_count(filter, MEDIA_GROUP_STORAGE, storage_count);
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
int media_storage_foreach_storage_from_db(filter_h filter, media_storage_cb callback, void *user_data)
{
int ret = MEDIA_CONTENT_ERROR_NONE;
- media_content_warn("DEPRECATION WARNING: media_storage_foreach_storage_from_db() is deprecated and will be removed from next release.");
+ content_warn("DEPRECATION WARNING: media_storage_foreach_storage_from_db() is deprecated and will be removed from next release.");
if (callback != NULL) {
#ifdef _USE_TVPD_MODE
g_mutex_unlock(_content_get_db_mutex());
#endif
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
int media_storage_get_media_count_from_db(const char *storage_id, filter_h filter, int *media_count)
{
int ret = MEDIA_CONTENT_ERROR_NONE;
- media_content_warn("DEPRECATION WARNING: media_storage_get_media_count_from_db() is deprecated and will be removed from next release.");
+ content_warn("DEPRECATION WARNING: media_storage_get_media_count_from_db() is deprecated and will be removed from next release.");
if (STRING_VALID(storage_id) && media_count) {
ret = _media_db_get_group_item_count(storage_id, filter, MEDIA_GROUP_STORAGE, media_count);
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
int media_storage_foreach_media_from_db(const char *storage_id, filter_h filter, media_info_cb callback, void *user_data)
{
int ret = MEDIA_CONTENT_ERROR_NONE;
- media_content_warn("DEPRECATION WARNING: media_storage_foreach_media_from_db() is deprecated and will be removed from next release.");
+ content_warn("DEPRECATION WARNING: media_storage_foreach_media_from_db() is deprecated and will be removed from next release.");
if ((callback != NULL) && STRING_VALID(storage_id)) {
ret = _media_db_get_group_item(storage_id, filter, callback, user_data, MEDIA_GROUP_STORAGE);
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
int media_storage_destroy(media_storage_h storage)
{
int ret = MEDIA_CONTENT_ERROR_NONE;
- media_content_warn("DEPRECATION WARNING: media_storage_destroy() is deprecated and will be removed from next release.");
+ content_warn("DEPRECATION WARNING: media_storage_destroy() is deprecated and will be removed from next release.");
media_storage_s *_storage = (media_storage_s*)storage;
if (_storage) {
SAFE_FREE(_storage->storage_id);
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
int media_storage_clone(media_storage_h *dst, media_storage_h src)
{
int ret = MEDIA_CONTENT_ERROR_NONE;
- media_content_warn("DEPRECATION WARNING: media_storage_clone() is deprecated and will be removed from next release.");
+ content_warn("DEPRECATION WARNING: media_storage_clone() is deprecated and will be removed from next release.");
media_storage_s *_src = (media_storage_s*)src;
if (_src != NULL) {
media_storage_s *_dst = (media_storage_s*)calloc(1, sizeof(media_storage_s));
- media_content_retvm_if(_dst == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+ content_retvm_if(_dst == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
if (STRING_VALID(_src->storage_id)) {
_dst->storage_id = strdup(_src->storage_id);
if (_dst->storage_id == NULL) {
media_storage_destroy((media_storage_h)_dst);
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
}
if (STRING_VALID(_src->storage_path)) {
_dst->storage_path = strdup(_src->storage_path);
if (_dst->storage_path == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
media_storage_destroy((media_storage_h)_dst);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
int media_storage_get_id(media_storage_h storage, char **storage_id)
{
int ret = MEDIA_CONTENT_ERROR_NONE;
- media_content_warn("DEPRECATION WARNING: media_storage_get_id() is deprecated and will be removed from next release.");
+ content_warn("DEPRECATION WARNING: media_storage_get_id() is deprecated and will be removed from next release.");
media_storage_s *_storage = (media_storage_s*)storage;
if (_storage && storage_id) {
if (STRING_VALID(_storage->storage_id)) {
*storage_id = strdup(_storage->storage_id);
- media_content_retvm_if(*storage_id == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+ content_retvm_if(*storage_id == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
} else {
*storage_id = NULL;
}
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
int media_storage_get_path(media_storage_h storage, char **storage_path)
{
int ret = MEDIA_CONTENT_ERROR_NONE;
- media_content_warn("DEPRECATION WARNING: media_storage_get_path() is deprecated and will be removed from next release.");
+ content_warn("DEPRECATION WARNING: media_storage_get_path() is deprecated and will be removed from next release.");
media_storage_s *_storage = (media_storage_s*)storage;
if (_storage && storage_path) {
if (STRING_VALID(_storage->storage_path)) {
*storage_path = strdup(_storage->storage_path);
- media_content_retvm_if(*storage_path == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+ content_retvm_if(*storage_path == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
} else {
*storage_path = NULL;
}
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
int media_storage_get_type(media_storage_h storage, media_content_storage_e *storage_type)
{
int ret = MEDIA_CONTENT_ERROR_NONE;
- media_content_warn("DEPRECATION WARNING: media_storage_get_type() is deprecated and will be removed from next release. Use storage_get_type_dev() instead.");
+ content_warn("DEPRECATION WARNING: media_storage_get_type() is deprecated and will be removed from next release. Use storage_get_type_dev() instead.");
media_storage_s *_storage = (media_storage_s*)storage;
if (_storage && storage_type) {
*storage_type = _storage->storage_type;
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if (STRING_VALID(storage_uuid)) {
ret = media_svc_get_storage_scan_status(_content_get_db_handle(), storage_uuid, &status);
if (ret != MS_MEDIA_ERR_NONE) {
- media_content_error("media_svc_get_storage_scan_status failed");
+ content_error("media_svc_get_storage_scan_status failed");
ret = _content_error_capi(ret);
} else {
*scan_status = status;
}
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
list_cnt = g_list_length(tag_s->item_list);
- media_content_debug("list_cnt : [%d]", list_cnt);
+ content_debug("list_cnt : [%d]", list_cnt);
for (idx = 0; idx < list_cnt; idx++) {
item = (media_tag_item_s*)g_list_nth_data(tag_s->item_list, idx);
char *select_query = NULL;
media_tag_s *_tag = (media_tag_s*)tag;
- media_content_retvm_if(_tag == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid tag");
+ content_retvm_if(_tag == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid tag");
select_query = sqlite3_mprintf(SELECT_TAG_BY_NAME, name);
ret = _content_get_result(select_query, &stmt);
SQLITE3_SAFE_FREE(select_query);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
if (sqlite3_step(stmt) == SQLITE_ROW) {
_tag->tag_id = (int)sqlite3_column_int(stmt, 0);
_tag->name = g_strdup(name);
} else {
- media_content_error("Nonexistent tag name[%s]", name);
+ content_error("Nonexistent tag name[%s]", name);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
char *query_str = NULL;
if (!STRING_VALID(tag_name)) {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if (ret == MEDIA_CONTENT_ERROR_NONE) {
media_tag_s *_tag = (media_tag_s*)calloc(1, sizeof(media_tag_s));
- media_content_retvm_if(_tag == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+ content_retvm_if(_tag == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
ret = __media_tag_get_tag_info_from_db(tag_name, (media_tag_h)_tag);
*tag = (media_tag_h)_tag;
char *query_str = NULL;
if (tag_id < 0) {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if (tag_count != NULL) {
ret = _media_db_get_group_count(filter, MEDIA_GROUP_TAG, tag_count);
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
int ret = MEDIA_CONTENT_ERROR_NONE;
if (callback == NULL) {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if ((tag_id > 0) && (media_count != NULL)) {
ret = _media_db_get_group_item_count_by_id(tag_id, filter, MEDIA_GROUP_TAG, media_count);
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
int ret = MEDIA_CONTENT_ERROR_NONE;
if (callback == NULL) {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
SAFE_FREE(_tag);
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if ((_src != NULL)) {
_dst = (media_tag_s*)calloc(1, sizeof(media_tag_s));
- media_content_retvm_if(_dst == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+ content_retvm_if(_dst == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
_dst->tag_id = _src->tag_id;
_dst->name = strdup(_src->name);
if (_dst->name == NULL) {
SAFE_FREE(_dst);
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
}
*dst = (media_tag_h)_dst;
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
*tag_id = _tag->tag_id;
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if (_tag) {
if (STRING_VALID(_tag->name)) {
*name = strdup(_tag->name);
- media_content_retvm_if(*name == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+ content_retvm_if(*name == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
} else {
*name = NULL;
}
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
char select_query[DEFAULT_QUERY_SIZE] = {0, };
if (tag_id <= 0) {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
snprintf(select_query, sizeof(select_query), SELECT_TAG_FROM_TAG, tag_id);
ret = _content_get_result(select_query, &stmt);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
media_tag_s *_tag = NULL;
_tag = (media_tag_s*)calloc(1, sizeof(media_tag_s));
if (_tag == NULL) {
SQLITE3_FINALIZE(stmt);
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
*tag = (media_tag_h)_tag;
} else {
- media_content_error("Nonexistent tag id[%d]", tag_id);
+ content_error("Nonexistent tag id[%d]", tag_id);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if ((_tag != NULL) && STRING_VALID(media_id)) {
media_tag_item_s *_item = (media_tag_item_s*)calloc(1, sizeof(media_tag_item_s));
- media_content_retvm_if(_item == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+ content_retvm_if(_item == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
_item->media_id = strdup(media_id);
_item->function = MEDIA_TAG_ADD;
if (_item->media_id == NULL) {
SAFE_FREE(_item);
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
__media_tag_item_add(_tag, _item);
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if (_tag != NULL && STRING_VALID(media_id)) {
media_tag_item_s *_item = (media_tag_item_s*)calloc(1, sizeof(media_tag_item_s));
- media_content_retvm_if(_item == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+ content_retvm_if(_item == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
_item->media_id = strdup(media_id);
_item->function = MEDIA_TAG_REMOVE;
if (_item->media_id == NULL) {
SAFE_FREE(_item);
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
__media_tag_item_add(_tag, _item);
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
SAFE_FREE(_tag->name);
media_tag_item_s *_item = (media_tag_item_s*)calloc(1, sizeof(media_tag_item_s));
- media_content_retvm_if(_item == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+ content_retvm_if(_item == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
_item->tag_name = strdup(tag_name);
_item->function = MEDIA_TAG_UPDATE_TAG_NAME;
if (_item->tag_name == NULL) {
SAFE_FREE(_item);
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
if (_tag->name == NULL) {
SAFE_FREE(_item->tag_name);
SAFE_FREE(_item);
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
__media_tag_item_add(_tag, _item);
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
media_tag_item_s *_tag_item = NULL;
if (_tag == NULL) {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if (_tag->item_list != NULL) {
length = g_list_length(_tag->item_list);
} else {
- media_content_debug("operation list length is 0");
+ content_debug("operation list length is 0");
return MEDIA_CONTENT_ERROR_NONE;
}
}
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("Failed some operation[%d]", _tag_item->function);
+ content_error("Failed some operation[%d]", _tag_item->function);
}
}
{
int ret = MEDIA_CONTENT_ERROR_NONE;
- media_content_retvm_if(tag == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid tag");
+ content_retvm_if(tag == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid tag");
media_tag_s *_tag = (media_tag_s*)calloc(1, sizeof(media_tag_s));
- media_content_retvm_if(_tag == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+ content_retvm_if(_tag == NULL, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
_tag->tag_id = -1;
_tag->name = NULL;
media_tag_h tag_1;
int tag_id = -1;
- media_content_retvm_if(_tag == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid tag");
- media_content_retvm_if(!STRING_VALID(_tag->name), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid tag name");
- media_content_retvm_if(_tag->tag_id != -1, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid tag insert");
+ content_retvm_if(_tag == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid tag");
+ content_retvm_if(!STRING_VALID(_tag->name), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid tag name");
+ content_retvm_if(_tag->tag_id != -1, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid tag insert");
ret = media_tag_insert_to_db(_tag->name, &tag_1);
if (ret != MEDIA_CONTENT_ERROR_NONE) {
- media_content_error("fail media_tag_insert_to_db");
+ content_error("fail media_tag_insert_to_db");
goto ERROR;
}
ret = media_tag_get_tag_id(tag_1, &tag_id);
if (ret != MEDIA_CONTENT_ERROR_NONE) {
- media_content_error("fail media_tag_get_tag_id");
+ content_error("fail media_tag_get_tag_id");
goto ERROR;
}
{
media_tag_s *_tag = (media_tag_s*)tag;
- media_content_retvm_if(_tag == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid tag");
- media_content_retvm_if(tag_id == -1, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid tag update");
+ content_retvm_if(_tag == NULL, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid tag");
+ content_retvm_if(tag_id == -1, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid tag update");
_tag->tag_id = tag_id;
if (media_count) {
ret = _media_db_get_group_item_count(NULL, filter, MEDIA_GROUP_UHD, media_count);
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if (callback != NULL) {
ret = _media_db_get_uhd(filter, callback, user_data);
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if (_src != NULL) {
media_uhd_s *_dst = (media_uhd_s*)calloc(1, sizeof(media_uhd_s));
if (_dst == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
_dst->media_id = strdup(_src->media_id);
if (_dst->media_id == NULL) {
media_uhd_destroy((media_uhd_h)_dst);
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
}
if (STRING_VALID(_src->storage_id)) {
_dst->storage_id = strdup(_src->storage_id);
if (_dst->storage_id == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
media_uhd_destroy((media_uhd_h)_dst);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
if (STRING_VALID(_src->path)) {
_dst->path = strdup(_src->path);
if (_dst->path == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
media_uhd_destroy((media_uhd_h)_dst);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
if (STRING_VALID(_src->content_id)) {
_dst->content_id = strdup(_src->content_id);
if (_dst->content_id == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
media_uhd_destroy((media_uhd_h)_dst);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
if (STRING_VALID(_src->content_title)) {
_dst->content_title = strdup(_src->content_title);
if (_dst->content_title == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
media_uhd_destroy((media_uhd_h)_dst);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
if (STRING_VALID(_src->release_date)) {
_dst->release_date = strdup(_src->release_date);
if (_dst->release_date == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
media_uhd_destroy((media_uhd_h)_dst);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
if (STRING_VALID(_src->file_name)) {
_dst->file_name = strdup(_src->file_name);
if (_dst->file_name == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
media_uhd_destroy((media_uhd_h)_dst);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
sqlite3_stmt *stmt = NULL;
if (!STRING_VALID(media_id) || (uhd == NULL)) {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
ret = _content_get_result(select_query, &stmt);
SQLITE3_SAFE_FREE(select_query);
- media_content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
+ content_retv_if(ret != MEDIA_CONTENT_ERROR_NONE, ret);
media_uhd_s *_uhd = NULL;
_uhd = (media_uhd_s*)calloc(1, sizeof(media_uhd_s));
if (_uhd == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
SQLITE3_FINALIZE(stmt);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
*uhd = (media_uhd_h)_uhd;
} else {
- media_content_error("Nonexistent media id[%s]", media_id);
+ content_error("Nonexistent media id[%s]", media_id);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if (STRING_VALID(_uhd->media_id)) {
*media_id = strdup(_uhd->media_id);
if (*media_id == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
} else {
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if (STRING_VALID(_uhd->storage_id)) {
*storage_id = strdup(_uhd->storage_id);
if (*storage_id == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
} else {
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if (STRING_VALID(_uhd->path)) {
*path = strdup(_uhd->path);
if (*path == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
} else {
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
*size = _uhd->size;
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if (STRING_VALID(_uhd->content_id)) {
*content_id = strdup(_uhd->content_id);
if (*content_id == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
} else {
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if (STRING_VALID(_uhd->content_title)) {
*content_title = strdup(_uhd->content_title);
if (*content_title == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
} else {
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if (STRING_VALID(_uhd->file_name)) {
*file_name = strdup(_uhd->file_name);
if (*file_name == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
} else {
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if (STRING_VALID(_uhd->release_date)) {
*release_date = strdup(_uhd->release_date);
if (*release_date == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
} else {
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
*modified_time = _uhd->modified_time;
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
*played_position = _uhd->played_position;
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
*sub_type = _uhd->sub_type;
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
*played_count = _uhd->played_count;
ret = MEDIA_CONTENT_ERROR_NONE;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if ((_uhd != NULL) && (played_position >= 0)) {
_uhd->played_position = played_position;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
SAFE_FREE(_uhd->content_title);
_uhd->content_title = strdup(content_title);
if (_uhd->content_title == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
SAFE_FREE(_uhd->release_date);
_uhd->release_date = strdup(release_date);
if (_uhd->release_date == NULL) {
- media_content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
+ content_error("OUT_OF_MEMORY(0x%08x)", MEDIA_CONTENT_ERROR_OUT_OF_MEMORY);
return MEDIA_CONTENT_ERROR_OUT_OF_MEMORY;
}
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if ((_uhd != NULL) && (sub_type >= 0)) {
_uhd->sub_type = sub_type;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
if (_uhd != NULL) {
_uhd->played_count = played_count;
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
ret = _content_query_sql(update_query);
sqlite3_free(update_query);
} else {
- media_content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
+ content_error("INVALID_PARAMETER(0x%08x)", MEDIA_CONTENT_ERROR_INVALID_PARAMETER);
ret = MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
int media_type = -1;
bool is_supported = false;
- media_content_retvm_if(!STRING_VALID(path), false, "path is empty");
+ content_retvm_if(!STRING_VALID(path), false, "path is empty");
if (MEDIA_CONTENT_OTHER_SUPPORT == -1) {
ret = system_info_get_platform_bool("http://tizen.org/feature/content.scanning.others", &is_supported);
if (ret != SYSTEM_INFO_ERROR_NONE) {
- media_content_debug("SYSTEM_INFO_ERROR: content.scanning.others [%d]", ret);
+ content_debug("SYSTEM_INFO_ERROR: content.scanning.others [%d]", ret);
return false;
}
/* If not, check media type */
if (!MEDIA_CONTENT_OTHER_SUPPORT) {
ret = media_svc_get_media_type(path, &media_type);
- media_content_retvm_if(ret != MS_MEDIA_ERR_NONE, false, "Failed to get media type");
+ content_retvm_if(ret != MS_MEDIA_ERR_NONE, false, "Failed to get media type");
if (media_type == MEDIA_CONTENT_TYPE_OTHERS)
return false;
exist = open(path, O_RDONLY);
if (exist < 0) {
if (errno == EACCES || errno == EPERM) {
- media_content_stderror("open file fail");
- media_content_sec_debug("path [%s]", path);
+ content_stderror("open file fail");
+ content_sec_debug("path [%s]", path);
return MEDIA_CONTENT_ERROR_PERMISSION_DENIED;
} else {
- media_content_stderror("open file fail");
- media_content_sec_debug("path [%s]", path);
+ content_stderror("open file fail");
+ content_sec_debug("path [%s]", path);
return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
}
memset(&statbuf, 0, sizeof(struct stat));
ret = stat(path, &statbuf);
if (ret == -1) {
- media_content_stderror("stat failed");
+ content_stderror("stat failed");
return ret;
}
int _media_util_check_ignore_file(const char *path, bool *ignore)
{
- media_content_retvm_if(!STRING_VALID(path), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid path");
+ content_retvm_if(!STRING_VALID(path), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid path");
*ignore = FALSE;
char *tmp_path = NULL;
/* Check is exist (It may be the path to the deleted file) */
if (!g_file_test(path, G_FILE_TEST_EXISTS)) {
- media_content_sec_debug("removed path[%s]", path);
+ content_sec_debug("removed path[%s]", path);
return MEDIA_CONTENT_ERROR_NONE;
}
/* Check symbolic link file */
if (g_file_test(path, G_FILE_TEST_IS_SYMLINK)) {
*ignore = TRUE;
- media_content_error("symbolic link(file)");
- media_content_sec_debug("path : %s", path);
+ content_error("symbolic link(file)");
+ content_sec_debug("path : %s", path);
return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
/* Check hidden path */
if (strstr(path, "/.") != NULL) {
*ignore = TRUE;
- media_content_error("hidden path");
- media_content_sec_debug("path : %s", path);
+ content_error("hidden path");
+ content_sec_debug("path : %s", path);
return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
#ifdef _USE_TVPD_MODE
if (g_strcmp0(tmp_path, org_path) != 0) {
*ignore = TRUE;
- media_content_error("symbolic link(directory)");
- media_content_sec_debug("path[%s] real[%s]", org_path, tmp_path);
+ content_error("symbolic link(directory)");
+ content_sec_debug("path[%s] real[%s]", org_path, tmp_path);
SAFE_FREE(tmp_path);
SAFE_FREE(org_path);
return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
snprintf(replace, MAX_PATH_LEN, "%s%s", tzplatform_getenv(TZ_USER_MEDIASHARED), tmp_path + strlen(MEDIA_SHARE_PATH));
if (g_strcmp0(replace, org_path) != 0) {
*ignore = TRUE;
- media_content_error("symbolic link(directory)");
- media_content_sec_debug("path[%s] real[%s]", org_path, tmp_path);
+ content_error("symbolic link(directory)");
+ content_sec_debug("path[%s] real[%s]", org_path, tmp_path);
SAFE_FREE(tmp_path);
SAFE_FREE(org_path);
return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
} else {
if (g_strcmp0(tmp_path, org_path) != 0) {
*ignore = TRUE;
- media_content_error("symbolic link(directory)");
- media_content_sec_debug("path[%s] real[%s]", org_path, tmp_path);
+ content_error("symbolic link(directory)");
+ content_sec_debug("path[%s] real[%s]", org_path, tmp_path);
SAFE_FREE(tmp_path);
SAFE_FREE(org_path);
return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
result = g_file_test(ignore_path, G_FILE_TEST_EXISTS);
if (result)
- media_content_error("scan ignore file exist [%s]", ignore_path);
+ content_error("scan ignore file exist [%s]", ignore_path);
SAFE_FREE(ignore_path);
int ret = MEDIA_CONTENT_ERROR_NONE;
ms_user_storage_type_e storage_type = MS_USER_STORAGE_INTERNAL;
- media_content_retvm_if(!STRING_VALID(dir_path), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid dir_path");
- media_content_sec_debug("dir_path : %s", dir_path);
+ content_retvm_if(!STRING_VALID(dir_path), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "invalid dir_path");
+ content_sec_debug("dir_path : %s", dir_path);
*ignore = false;
/*1. Check Hidden Directory*/
if (strstr(dir_path, "/.") != NULL) {
*ignore = true;
- media_content_error("hidden path");
+ content_error("hidden path");
return MEDIA_CONTENT_ERROR_NONE;
}
/*2. Check Scan Ignore Directory*/
ret = ms_user_get_storage_type(_content_get_uid(), dir_path, &storage_type);
if (ret != MS_MEDIA_ERR_NONE) {
- media_content_error("ms_user_get_storage_type failed : %d", ret);
+ content_error("ms_user_get_storage_type failed : %d", ret);
return _content_error_capi(ret);
}
dp = opendir(path);
if (dp == NULL) {
if (errno == EACCES || errno == EPERM) {
- media_content_stderror("open dir fail");
- media_content_sec_error("path [%s]", path);
+ content_stderror("open dir fail");
+ content_sec_error("path [%s]", path);
return MEDIA_CONTENT_ERROR_PERMISSION_DENIED;
} else {
- media_content_stderror("open dir fail");
- media_content_sec_error("path [%s]", path);
+ content_stderror("open dir fail");
+ content_sec_error("path [%s]", path);
return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
}
#ifdef _USE_TVPD_MODE
if (g_strcmp0(real, origin) != 0) {
- media_content_error("symbolic link(directory)");
- media_content_sec_debug("path[%s] real[%s]", origin, real);
+ content_error("symbolic link(directory)");
+ content_sec_debug("path[%s] real[%s]", origin, real);
SAFE_FREE(real);
SAFE_FREE(origin);
return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
/* If shared dirctory, it should be change path to TZ_USER_SHARE from realpath */
snprintf(result_path, MAX_PATH_LEN, "%s%s", tzplatform_getenv(TZ_USER_MEDIASHARED), real + strlen(MEDIA_SHARE_PATH));
if (g_strcmp0(result_path, origin) != 0) {
- media_content_error("symbolic link(directory)");
- media_content_sec_debug("path[%s] real[%s]", origin, real);
+ content_error("symbolic link(directory)");
+ content_sec_debug("path[%s] real[%s]", origin, real);
SAFE_FREE(real);
SAFE_FREE(origin);
return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
}
} else {
if (g_strcmp0(real, origin) != 0) {
- media_content_error("symbolic link(directory)");
- media_content_sec_debug("path[%s] real[%s]", origin, real);
+ content_error("symbolic link(directory)");
+ content_sec_debug("path[%s] real[%s]", origin, real);
SAFE_FREE(real);
SAFE_FREE(origin);
return MEDIA_CONTENT_ERROR_INVALID_PARAMETER;
if (!STRING_VALID(MEDIA_ROOT_PATH_INTERNAL_OLD) || !STRING_VALID(MEDIA_ROOT_PATH_INTERNAL))
return NULL;
- media_content_sec_debug("Old condition[%s]", condition);
+ content_sec_debug("Old condition[%s]", condition);
split_list = g_strsplit(condition, MEDIA_ROOT_PATH_INTERNAL_OLD, -1);
if (!split_list)
/* FIXME : If there are no issue reports related to this, it will be deleted in Tizen 6.5 or after. */
int _media_content_replace_path(const char *path, char *replace_path)
{
- media_content_retvm_if(!STRING_VALID(path), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid path");
+ content_retvm_if(!STRING_VALID(path), MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid path");
snprintf(replace_path, MAX_PATH_LEN, "%s", path);
#if 0
if (strncmp(path, MEDIA_ROOT_PATH_INTERNAL_OLD, strlen(MEDIA_ROOT_PATH_INTERNAL_OLD)) == 0) {
- media_content_sec_debug("Old path[%s]", path);
+ content_sec_debug("Old path[%s]", path);
snprintf(replace_path, MAX_PATH_LEN, "%s%s", MEDIA_ROOT_PATH_INTERNAL, path + strlen(MEDIA_ROOT_PATH_INTERNAL_OLD));
} else {
snprintf(replace_path, MAX_PATH_LEN, "%s", path);
bool bSupportSeniorMode = false;
if (system_info_get_value_bool(SYSTEM_INFO_KEY_GET_SENIOR_MODE_SUPPORTED, &bSupportSeniorMode) != SYSTEM_INFO_ERROR_NONE) {
- media_content_debug("Get senior mode support failed");
+ content_debug("Get senior mode support failed");
return false;
}
- /* media_content_debug("Senior mode Support : [%d]", bSupportSeniorMode); */
+ /* content_debug("Senior mode Support : [%d]", bSupportSeniorMode); */
return bSupportSeniorMode;
}
#endif
int video_meta_destroy(video_meta_h video)
{
video_meta_s *_video = (video_meta_s*)video;
- media_content_retvm_if(!_video, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Video handle is null");
+ content_retvm_if(!_video, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Video handle is null");
SAFE_FREE(_video->media_id);
SAFE_FREE(_video->album);
int video_meta_clone(video_meta_h *dst, video_meta_h src)
{
video_meta_s *_src = (video_meta_s*)src;
- media_content_retvm_if(!_src, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Source handle is null");
+ content_retvm_if(!_src, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Source handle is null");
video_meta_s *_dst = (video_meta_s*)calloc(1, sizeof(video_meta_s));
- media_content_retvm_if(!_dst, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
+ content_retvm_if(!_dst, MEDIA_CONTENT_ERROR_OUT_OF_MEMORY, "OUT_OF_MEMORY");
_dst->media_id = g_strdup(_src->media_id);
_dst->album = g_strdup(_src->album);
int video_meta_get_media_id(video_meta_h video, char **media_id)
{
video_meta_s *_video = (video_meta_s*)video;
- media_content_retvm_if(!_video || !media_id, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
+ content_retvm_if(!_video || !media_id, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
*media_id = g_strdup(_video->media_id);
int video_meta_get_album(video_meta_h video, char **album)
{
video_meta_s *_video = (video_meta_s*)video;
- media_content_retvm_if(!_video || !album, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
+ content_retvm_if(!_video || !album, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
*album = g_strdup(_video->album);
int video_meta_get_artist(video_meta_h video, char **artist)
{
video_meta_s *_video = (video_meta_s*)video;
- media_content_retvm_if(!_video || !artist, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
+ content_retvm_if(!_video || !artist, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
*artist = g_strdup(_video->artist);
int video_meta_get_album_artist(video_meta_h video, char **album_artist)
{
video_meta_s *_video = (video_meta_s*)video;
- media_content_retvm_if(!_video || !album_artist, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
+ content_retvm_if(!_video || !album_artist, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
*album_artist = g_strdup(_video->album_artist);
int video_meta_get_genre(video_meta_h video, char **genre)
{
video_meta_s *_video = (video_meta_s*)video;
- media_content_retvm_if(!_video || !genre, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
+ content_retvm_if(!_video || !genre, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
*genre = g_strdup(_video->genre);
int video_meta_get_composer(video_meta_h video, char **composer)
{
video_meta_s *_video = (video_meta_s*)video;
- media_content_retvm_if(!_video || !composer, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
+ content_retvm_if(!_video || !composer, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
*composer = g_strdup(_video->composer);
int video_meta_get_year(video_meta_h video, char **year)
{
video_meta_s *_video = (video_meta_s*)video;
- media_content_retvm_if(!_video || !year, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
+ content_retvm_if(!_video || !year, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
*year = g_strdup(_video->year);
int video_meta_get_recorded_date(video_meta_h video, char **recorded_date)
{
video_meta_s *_video = (video_meta_s*)video;
- media_content_retvm_if(!_video || !recorded_date, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
+ content_retvm_if(!_video || !recorded_date, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
*recorded_date = g_strdup(_video->recorded_date);
int video_meta_get_copyright(video_meta_h video, char **copyright)
{
video_meta_s *_video = (video_meta_s*)video;
- media_content_retvm_if(!_video || !copyright, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
+ content_retvm_if(!_video || !copyright, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
*copyright = g_strdup(_video->copyright);
int video_meta_get_track_num(video_meta_h video, char **track_num)
{
video_meta_s *_video = (video_meta_s*)video;
- media_content_retvm_if(!_video || !track_num, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
+ content_retvm_if(!_video || !track_num, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
*track_num = g_strdup(_video->track_num);
int video_meta_get_bit_rate(video_meta_h video, int *bit_rate)
{
video_meta_s *_video = (video_meta_s*)video;
- media_content_retvm_if(!_video || !bit_rate, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
+ content_retvm_if(!_video || !bit_rate, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
*bit_rate = _video->bitrate;
int video_meta_get_duration(video_meta_h video, int *duration)
{
video_meta_s *_video = (video_meta_s*)video;
- media_content_retvm_if(!_video || !duration, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
+ content_retvm_if(!_video || !duration, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
*duration = _video->duration;
int video_meta_get_width(video_meta_h video, int *width)
{
video_meta_s *_video = (video_meta_s*)video;
- media_content_retvm_if(!_video || !width, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
+ content_retvm_if(!_video || !width, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
*width = _video->width;
int video_meta_get_height(video_meta_h video, int *height)
{
video_meta_s *_video = (video_meta_s*)video;
- media_content_retvm_if(!_video || !height, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
+ content_retvm_if(!_video || !height, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
*height = _video->height;
int video_meta_get_rotation(video_meta_h video, int *rotation)
{
video_meta_s *_video = (video_meta_s*)video;
- media_content_retvm_if(!_video || !rotation, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
+ content_retvm_if(!_video || !rotation, MEDIA_CONTENT_ERROR_INVALID_PARAMETER, "Invalid parameter");
*rotation = _video->rotation;
int i_value = 0;
int ret = MEDIA_CONTENT_ERROR_NONE;
- media_content_debug("=== audio meta ===");
+ content_debug("=== audio meta ===");
ret = audio_meta_get_media_id(audio, &c_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error when get meta : [%d]", ret);
+ content_error("error when get meta : [%d]", ret);
if (c_value)
- media_content_debug("audio_id : [%s]", c_value);
+ content_debug("audio_id : [%s]", c_value);
SAFE_FREE(c_value);
ret = audio_meta_get_album(audio, &c_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error when get meta : [%d]", ret);
+ content_error("error when get meta : [%d]", ret);
if (c_value)
- media_content_debug("album : [%s]", c_value);
+ content_debug("album : [%s]", c_value);
SAFE_FREE(c_value);
ret = audio_meta_get_artist(audio, &c_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error when get meta : [%d]", ret);
+ content_error("error when get meta : [%d]", ret);
if (c_value)
- media_content_debug("artist : [%s]", c_value);
+ content_debug("artist : [%s]", c_value);
SAFE_FREE(c_value);
ret = audio_meta_get_album_artist(audio, &c_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error when get meta : [%d]", ret);
+ content_error("error when get meta : [%d]", ret);
if (c_value)
- media_content_debug("album_artist : [%s]", c_value);
+ content_debug("album_artist : [%s]", c_value);
SAFE_FREE(c_value);
ret = audio_meta_get_genre(audio, &c_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error when get meta : [%d]", ret);
+ content_error("error when get meta : [%d]", ret);
if (c_value)
- media_content_debug("genre : [%s]", c_value);
+ content_debug("genre : [%s]", c_value);
SAFE_FREE(c_value);
ret = audio_meta_get_composer(audio, &c_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error when get meta : [%d]", ret);
+ content_error("error when get meta : [%d]", ret);
if (c_value)
- media_content_debug("composer : [%s]", c_value);
+ content_debug("composer : [%s]", c_value);
SAFE_FREE(c_value);
ret = audio_meta_get_year(audio, &c_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error when get meta : [%d]", ret);
+ content_error("error when get meta : [%d]", ret);
if (c_value)
- media_content_debug("year : [%s]", c_value);
+ content_debug("year : [%s]", c_value);
SAFE_FREE(c_value);
ret = audio_meta_get_recorded_date(audio, &c_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error when get meta : [%d]", ret);
+ content_error("error when get meta : [%d]", ret);
if (c_value)
- media_content_debug("recorded_date : [%s]", c_value);
+ content_debug("recorded_date : [%s]", c_value);
SAFE_FREE(c_value);
ret = audio_meta_get_copyright(audio, &c_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error when get meta : [%d]", ret);
+ content_error("error when get meta : [%d]", ret);
if (c_value)
- media_content_debug("copyright : [%s]", c_value);
+ content_debug("copyright : [%s]", c_value);
SAFE_FREE(c_value);
ret = audio_meta_get_track_num(audio, &c_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error when get meta : [%d]", ret);
+ content_error("error when get meta : [%d]", ret);
if (c_value)
- media_content_debug("track_num : [%s]", c_value);
+ content_debug("track_num : [%s]", c_value);
SAFE_FREE(c_value);
ret = audio_meta_get_bit_rate(audio, &i_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error when get meta : [%d]", ret);
+ content_error("error when get meta : [%d]", ret);
else
- media_content_debug("bitrate : [%d]", i_value);
+ content_debug("bitrate : [%d]", i_value);
ret = audio_meta_get_sample_rate(audio, &i_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error when get meta : [%d]", ret);
+ content_error("error when get meta : [%d]", ret);
else
- media_content_debug("samplerate : [%d]", i_value);
+ content_debug("samplerate : [%d]", i_value);
ret = audio_meta_get_channel(audio, &i_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error when get meta : [%d]", ret);
+ content_error("error when get meta : [%d]", ret);
else
- media_content_debug("channel : [%d]", i_value);
+ content_debug("channel : [%d]", i_value);
ret = audio_meta_get_duration(audio, &i_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error when get meta : [%d]", ret);
+ content_error("error when get meta : [%d]", ret);
else
- media_content_debug("duration : [%d]", i_value);
+ content_debug("duration : [%d]", i_value);
}
int i_value = 0;
int ret = MEDIA_CONTENT_ERROR_NONE;
- media_content_debug("=== video meta ===");
+ content_debug("=== video meta ===");
ret = video_meta_get_media_id(video, &c_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error when get meta : [%d]", ret);
+ content_error("error when get meta : [%d]", ret);
if (c_value)
- media_content_debug("video_id : [%s]", c_value);
+ content_debug("video_id : [%s]", c_value);
SAFE_FREE(c_value);
ret = video_meta_get_album(video, &c_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error when get meta : [%d]", ret);
+ content_error("error when get meta : [%d]", ret);
if (c_value)
- media_content_debug("album : [%s]", c_value);
+ content_debug("album : [%s]", c_value);
SAFE_FREE(c_value);
ret = video_meta_get_artist(video, &c_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error when get meta : [%d]", ret);
+ content_error("error when get meta : [%d]", ret);
if (c_value)
- media_content_debug("artist : [%s]", c_value);
+ content_debug("artist : [%s]", c_value);
SAFE_FREE(c_value);
ret = video_meta_get_album_artist(video, &c_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error when get meta : [%d]", ret);
+ content_error("error when get meta : [%d]", ret);
if (c_value)
- media_content_debug("album_artist : [%s]", c_value);
+ content_debug("album_artist : [%s]", c_value);
SAFE_FREE(c_value);
ret = video_meta_get_genre(video, &c_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error when get meta : [%d]", ret);
+ content_error("error when get meta : [%d]", ret);
if (c_value)
- media_content_debug("genre : [%s]", c_value);
+ content_debug("genre : [%s]", c_value);
SAFE_FREE(c_value);
ret = video_meta_get_composer(video, &c_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error when get meta : [%d]", ret);
+ content_error("error when get meta : [%d]", ret);
if (c_value)
- media_content_debug("omposer : [%s]", c_value);
+ content_debug("omposer : [%s]", c_value);
SAFE_FREE(c_value);
ret = video_meta_get_year(video, &c_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error when get meta : [%d]", ret);
+ content_error("error when get meta : [%d]", ret);
if (c_value)
- media_content_debug("year : [%s]", c_value);
+ content_debug("year : [%s]", c_value);
SAFE_FREE(c_value);
ret = video_meta_get_recorded_date(video, &c_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error when get meta : [%d]", ret);
+ content_error("error when get meta : [%d]", ret);
if (c_value)
- media_content_debug("recorded_date : [%s]", c_value);
+ content_debug("recorded_date : [%s]", c_value);
SAFE_FREE(c_value);
ret = video_meta_get_copyright(video, &c_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error when get meta : [%d]", ret);
+ content_error("error when get meta : [%d]", ret);
if (c_value)
- media_content_debug("copyright : [%s]", c_value);
+ content_debug("copyright : [%s]", c_value);
SAFE_FREE(c_value);
ret = video_meta_get_track_num(video, &c_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error when get meta : [%d]", ret);
+ content_error("error when get meta : [%d]", ret);
if (c_value)
- media_content_debug("track_num : [%s]", c_value);
+ content_debug("track_num : [%s]", c_value);
SAFE_FREE(c_value);
ret = video_meta_get_bit_rate(video, &i_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error when get meta : [%d]", ret);
+ content_error("error when get meta : [%d]", ret);
else
- media_content_debug("bitrate : [%d]", i_value);
+ content_debug("bitrate : [%d]", i_value);
ret = video_meta_get_duration(video, &i_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error when get meta : [%d]", ret);
+ content_error("error when get meta : [%d]", ret);
else
- media_content_debug("duration : [%d]", i_value);
+ content_debug("duration : [%d]", i_value);
ret = video_meta_get_width(video, &i_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error when get meta : [%d]", ret);
+ content_error("error when get meta : [%d]", ret);
else
- media_content_debug("width : [%d]", i_value);
+ content_debug("width : [%d]", i_value);
ret = video_meta_get_height(video, &i_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error when get meta : [%d]", ret);
+ content_error("error when get meta : [%d]", ret);
else
- media_content_debug("height : [%d]", i_value);
+ content_debug("height : [%d]", i_value);
}
media_content_orientation_e orientation;
int ret = MEDIA_CONTENT_ERROR_NONE;
- media_content_debug("=== image meta ===");
+ content_debug("=== image meta ===");
ret = image_meta_get_width(image, &i_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error image_meta_get_width : [%d]", ret);
+ content_error("error image_meta_get_width : [%d]", ret);
else
- media_content_debug("width : [%d]", i_value);
+ content_debug("width : [%d]", i_value);
ret = image_meta_get_height(image, &i_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error image_meta_get_height : [%d]", ret);
+ content_error("error image_meta_get_height : [%d]", ret);
else
- media_content_debug("height : [%d]", i_value);
+ content_debug("height : [%d]", i_value);
ret = image_meta_get_orientation(image, &orientation);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error image_meta_get_orientation : [%d]", ret);
+ content_error("error image_meta_get_orientation : [%d]", ret);
else
- media_content_debug("orientation : [%d]", orientation);
+ content_debug("orientation : [%d]", orientation);
ret = image_meta_get_date_taken(image, &c_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error image_meta_get_date_taken : [%d]", ret);
+ content_error("error image_meta_get_date_taken : [%d]", ret);
if (c_value)
- media_content_debug("date_taken : [%s]", c_value);
+ content_debug("date_taken : [%s]", c_value);
SAFE_FREE(c_value);
}
int i_value = 0;
int ret = MEDIA_CONTENT_ERROR_NONE;
- media_content_debug("=== album meta ===");
+ content_debug("=== album meta ===");
ret = media_album_get_album_id(album, &i_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_album_get_album_id : [%d]", ret);
+ content_error("error media_album_get_album_id : [%d]", ret);
else
- media_content_debug("album_id : [%d]", i_value);
+ content_debug("album_id : [%d]", i_value);
ret = media_album_get_name(album, &c_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_album_get_name : [%d]", ret);
+ content_error("error media_album_get_name : [%d]", ret);
if (c_value)
- media_content_debug("album_name : [%s]", c_value);
+ content_debug("album_name : [%s]", c_value);
SAFE_FREE(c_value);
ret = media_album_get_artist(album, &c_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_album_get_artist : [%d]", ret);
+ content_error("error media_album_get_artist : [%d]", ret);
if (c_value)
- media_content_debug("album_artist : [%s]", c_value);
+ content_debug("album_artist : [%s]", c_value);
SAFE_FREE(c_value);
}
time_t time = 0;
int ret = MEDIA_CONTENT_ERROR_NONE;
- media_content_debug("=== bookmark meta ===");
+ content_debug("=== bookmark meta ===");
ret = media_bookmark_get_bookmark_id(bookmark, &i_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_bookmark_get_bookmark_id : [%d]", ret);
+ content_error("error media_bookmark_get_bookmark_id : [%d]", ret);
else
- media_content_debug("bookmark_id : %d", i_value);
+ content_debug("bookmark_id : %d", i_value);
ret = media_bookmark_get_thumbnail_path(bookmark, &c_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_bookmark_get_thumbnail_path : [%d]", ret);
+ content_error("error media_bookmark_get_thumbnail_path : [%d]", ret);
if (c_value)
- media_content_debug("bookmark thumbnail_path : %s", c_value);
+ content_debug("bookmark thumbnail_path : %s", c_value);
SAFE_FREE(c_value);
ret = media_bookmark_get_marked_time(bookmark, &time);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_bookmark_get_marked_time : [%d]", ret);
+ content_error("error media_bookmark_get_marked_time : [%d]", ret);
else
- media_content_debug("bookmark marked_time : %ld", time);
+ content_debug("bookmark marked_time : %ld", time);
ret = media_bookmark_get_name(bookmark, &c_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_bookmark_get_name : [%d]", ret);
+ content_error("error media_bookmark_get_name : [%d]", ret);
if (c_value)
- media_content_debug("bookmark name : %s", c_value);
+ content_debug("bookmark name : %s", c_value);
SAFE_FREE(c_value);
}
int i_value = 0;
int ret = MEDIA_CONTENT_ERROR_NONE;
- media_content_debug("=== tag meta ===");
+ content_debug("=== tag meta ===");
ret = media_tag_get_tag_id(tag, &i_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_tag_get_tag_id : [%d]", ret);
+ content_error("error media_tag_get_tag_id : [%d]", ret);
else
- media_content_debug("tag_id : %d", i_value);
+ content_debug("tag_id : %d", i_value);
ret = media_tag_get_name(tag, &c_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_tag_get_name : [%d]", ret);
+ content_error("error media_tag_get_name : [%d]", ret);
if (c_value)
- media_content_debug("tag_name : %s", c_value);
+ content_debug("tag_name : %s", c_value);
SAFE_FREE(c_value);
}
media_content_orientation_e orientation = 0;
int ret = MEDIA_CONTENT_ERROR_NONE;
- media_content_debug("=== face meta ===");
+ content_debug("=== face meta ===");
ret = media_face_get_face_id(face, &c_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_face_get_face_id : [%d]", ret);
+ content_error("error media_face_get_face_id : [%d]", ret);
if (c_value)
- media_content_debug("face_id : %s", c_value);
+ content_debug("face_id : %s", c_value);
SAFE_FREE(c_value);
ret = media_face_get_media_id(face, &c_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_face_get_media_id : [%d]", ret);
+ content_error("error media_face_get_media_id : [%d]", ret);
if (c_value)
- media_content_debug("media_id : %s", c_value);
+ content_debug("media_id : %s", c_value);
SAFE_FREE(c_value);
ret = media_face_get_face_rect(face, &rect_x, &rect_y, &rect_w, &rect_h);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_face_get_face_rect : [%d]", ret);
+ content_error("error media_face_get_face_rect : [%d]", ret);
else
- media_content_debug("face_rect x[%d] y[%d] w[%d] h[%d]", rect_x, rect_y, rect_w, rect_h);
+ content_debug("face_rect x[%d] y[%d] w[%d] h[%d]", rect_x, rect_y, rect_w, rect_h);
ret = media_face_get_orientation(face, &orientation);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_face_get_orientation : [%d]", ret);
+ content_error("error media_face_get_orientation : [%d]", ret);
else
- media_content_debug("orientation : %d", orientation);
+ content_debug("orientation : %d", orientation);
ret = media_face_get_tag(face, &c_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_face_get_tag : [%d]", ret);
+ content_error("error media_face_get_tag : [%d]", ret);
if (c_value)
- media_content_debug("tag : %s", c_value);
+ content_debug("tag : %s", c_value);
SAFE_FREE(c_value);
}
media_content_storage_e storage_type;
int ret = MEDIA_CONTENT_ERROR_NONE;
- media_content_debug("=== folder meta ===");
+ content_debug("=== folder meta ===");
ret = media_folder_get_folder_id(folder, &c_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_folder_get_folder_id : [%d]", ret);
+ content_error("error media_folder_get_folder_id : [%d]", ret);
if (c_value) {
- media_content_debug("folder_id : %s", c_value);
+ content_debug("folder_id : %s", c_value);
*folder_id = c_value;
}
ret = media_folder_get_path(folder, &c_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_folder_get_path : [%d]", ret);
+ content_error("error media_folder_get_path : [%d]", ret);
if (c_value)
- media_content_debug("folder_path : %s", c_value);
+ content_debug("folder_path : %s", c_value);
SAFE_FREE(c_value);
ret = media_folder_get_name(folder, &c_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_folder_get_name : [%d]", ret);
+ content_error("error media_folder_get_name : [%d]", ret);
if (c_value)
- media_content_debug("folder_name : %s", c_value);
+ content_debug("folder_name : %s", c_value);
SAFE_FREE(c_value);
ret = media_folder_get_storage_type(folder, &storage_type);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_folder_get_storage_type : [%d]", ret);
+ content_error("error media_folder_get_storage_type : [%d]", ret);
else
- media_content_debug("storage_type : [%d]", storage_type);
+ content_debug("storage_type : [%d]", storage_type);
ret = media_folder_get_storage_id(folder, &c_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_folder_get_storage_id : [%d]", ret);
+ content_error("error media_folder_get_storage_id : [%d]", ret);
if (c_value)
- media_content_debug("storage_id : %s", c_value);
+ content_debug("storage_id : %s", c_value);
SAFE_FREE(c_value);
}
media_content_type_e media_type = 0;
int ret = MEDIA_CONTENT_ERROR_NONE;
- media_content_debug("=== media meta ===");
+ content_debug("=== media meta ===");
ret = media_info_get_media_type(media, &media_type);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_info_get_media_type : [%d]", ret);
+ content_error("error media_info_get_media_type : [%d]", ret);
else
- media_content_debug("media_type : [%d]", media_type);
+ content_debug("media_type : [%d]", media_type);
ret = media_info_get_media_id(media, &c_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_info_get_media_id : [%d]", ret);
+ content_error("error media_info_get_media_id : [%d]", ret);
if (c_value)
- media_content_debug("media_id : [%s]", c_value);
+ content_debug("media_id : [%s]", c_value);
SAFE_FREE(c_value);
ret = media_info_get_file_path(media, &c_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_info_get_file_path : [%d]", ret);
+ content_error("error media_info_get_file_path : [%d]", ret);
if (c_value)
- media_content_debug("file_path : [%s]", c_value);
+ content_debug("file_path : [%s]", c_value);
SAFE_FREE(c_value);
ret = media_info_get_display_name(media, &c_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_info_get_display_name : [%d]", ret);
+ content_error("error media_info_get_display_name : [%d]", ret);
if (c_value)
- media_content_debug("display_name : [%s]", c_value);
+ content_debug("display_name : [%s]", c_value);
SAFE_FREE(c_value);
ret = media_info_get_mime_type(media, &c_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_info_get_mime_type : [%d]", ret);
+ content_error("error media_info_get_mime_type : [%d]", ret);
if (c_value)
- media_content_debug("mime_type : [%s]", c_value);
+ content_debug("mime_type : [%s]", c_value);
SAFE_FREE(c_value);
ret = media_info_get_thumbnail_path(media, &c_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_info_get_thumbnail_path : [%d]", ret);
+ content_error("error media_info_get_thumbnail_path : [%d]", ret);
if (c_value)
- media_content_debug("thumbnail_path : [%s]", c_value);
+ content_debug("thumbnail_path : [%s]", c_value);
SAFE_FREE(c_value);
ret = media_info_get_description(media, &c_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_info_get_description : [%d]", ret);
+ content_error("error media_info_get_description : [%d]", ret);
if (c_value)
- media_content_debug("description : [%s]", c_value);
+ content_debug("description : [%s]", c_value);
SAFE_FREE(c_value);
ret = media_info_get_size(media, &size);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_info_get_size : [%d]", ret);
+ content_error("error media_info_get_size : [%d]", ret);
else
- media_content_debug("size : [%lld]", size);
+ content_debug("size : [%lld]", size);
ret = media_info_get_added_time(media, &t_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_info_get_added_time : [%d]", ret);
+ content_error("error media_info_get_added_time : [%d]", ret);
else
- media_content_debug("added_time : [%ld]", t_value);
+ content_debug("added_time : [%ld]", t_value);
ret = media_info_get_modified_time(media, &t_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_info_get_modified_time : [%d]", ret);
+ content_error("error media_info_get_modified_time : [%d]", ret);
else
- media_content_debug("modified_time : [%ld]", t_value);
+ content_debug("modified_time : [%ld]", t_value);
ret = media_info_get_timeline(media, &t_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_info_get_timeline : [%d]", ret);
+ content_error("error media_info_get_timeline : [%d]", ret);
else
- media_content_debug("timeline : [%ld]", t_value);
+ content_debug("timeline : [%ld]", t_value);
ret = media_info_get_rating(media, &i_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_info_get_rating : [%d]", ret);
+ content_error("error media_info_get_rating : [%d]", ret);
else
- media_content_debug("rating : [%d]", i_value);
+ content_debug("rating : [%d]", i_value);
ret = media_info_get_favorite(media, &b_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_info_get_favorite : [%d]", ret);
+ content_error("error media_info_get_favorite : [%d]", ret);
else
- media_content_debug("favorite : [%d]", b_value);
+ content_debug("favorite : [%d]", b_value);
ret = media_info_is_drm(media, &b_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_info_is_drm : [%d]", ret);
+ content_error("error media_info_is_drm : [%d]", ret);
else
- media_content_debug("is_drm : [%d]", b_value);
+ content_debug("is_drm : [%d]", b_value);
ret = media_info_is_360_content(media, &b_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_info_is_360_content : [%d]", ret);
+ content_error("error media_info_is_360_content : [%d]", ret);
else
- media_content_debug("is_360 : [%d]", b_value);
+ content_debug("is_360 : [%d]", b_value);
#ifdef _USE_TVPD_MODE
ret = media_info_get_stitched_state(media, &i_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_info_get_stitched_state : [%d]", ret);
+ content_error("error media_info_get_stitched_state : [%d]", ret);
else
- media_content_debug("360 stitched : [%d]", i_value);
+ content_debug("360 stitched : [%d]", i_value);
ret = media_info_get_stitched_engine(media, &i_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_info_get_stitched_engine : [%d]", ret);
+ content_error("error media_info_get_stitched_engine : [%d]", ret);
else
- media_content_debug("360 engine : [%d]", i_value);
+ content_debug("360 engine : [%d]", i_value);
#endif
if (media_type == MEDIA_CONTENT_TYPE_MUSIC) {
ret = media_info_get_audio(media, &audio);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_info_get_audio : [%d]", ret);
+ content_error("error media_info_get_audio : [%d]", ret);
else
get_audio_meta(audio);
ret = audio_meta_destroy(audio);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error audio_meta_destroy : [%d]", ret);
+ content_error("error audio_meta_destroy : [%d]", ret);
} else if (media_type == MEDIA_CONTENT_TYPE_IMAGE) {
image_meta_h image;
ret = media_info_get_image(media, &image);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_info_get_image : [%d]", ret);
+ content_error("error media_info_get_image : [%d]", ret);
else
get_image_meta(image);
ret = image_meta_destroy(image);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error image_meta_destroy : [%d]", ret);
+ content_error("error image_meta_destroy : [%d]", ret);
} else if (media_type == MEDIA_CONTENT_TYPE_VIDEO) {
video_meta_h video;
ret = media_info_get_video(media, &video);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_info_get_video : [%d]", ret);
+ content_error("error media_info_get_video : [%d]", ret);
else
get_video_meta(video);
ret = video_meta_destroy(video);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error video_meta_destroy : [%d]", ret);
+ content_error("error video_meta_destroy : [%d]", ret);
} else {
- media_content_debug("Other Content");
+ content_debug("Other Content");
}
}
bool media_item_cb(media_info_h media, void *user_data)
{
if (!media) {
- media_content_debug("NO Item");
+ content_debug("NO Item");
return true;
}
ret = media_bookmark_clone(&new_bm, bookmark);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_bookmark_clone : [%d]", ret);
+ content_error("error media_bookmark_clone : [%d]", ret);
GList **list = (GList**)user_data;
*list = g_list_append(*list, new_bm);
char *folder_id = NULL;
media_folder_h *_folder = (media_folder_h*)user_data;
- media_content_debug("===========================");
+ content_debug("===========================");
if (folder != NULL) {
if (_folder != NULL)
media_folder_clone(_folder, folder);
if (media_folder_get_media_count_from_db(folder_id, g_filter, &item_count) != MEDIA_CONTENT_ERROR_NONE) {
SAFE_FREE(folder_id);
- media_content_error("[ERROR] media_folder_get_media_count_from_db is failed");
+ content_error("[ERROR] media_folder_get_media_count_from_db is failed");
return false;
}
if (media_folder_foreach_media_from_db(folder_id, g_filter, media_item_cb, NULL) != MEDIA_CONTENT_ERROR_NONE) {
SAFE_FREE(folder_id);
- media_content_error("[ERROR] media_folder_foreach_media_from_db is failed");
+ content_error("[ERROR] media_folder_foreach_media_from_db is failed");
return false;
}
media_playlist_h playlist_h;
char *playlist_thumbnail_path = NULL;
- media_content_debug("playlist_list_cb ======");
+ content_debug("playlist_list_cb ======");
#if 0
GList **list = (GList**)user_data;
#endif
if (playlist == NULL) {
- media_content_debug(" playlist handle is NULL");
+ content_debug(" playlist handle is NULL");
return false;
}
ret = media_playlist_get_playlist_id(playlist, &playlist_id);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_playlist_get_playlist_id : [%d]", ret);
+ content_error("error media_playlist_get_playlist_id : [%d]", ret);
- media_content_debug("playlist_id : %d", playlist_id);
+ content_debug("playlist_id : %d", playlist_id);
/* 64bit build issue */
#if 0
if (user_data != NULL)
#endif
ret = media_playlist_get_name(playlist, &playlist_name);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_playlist_get_name : [%d]", ret);
+ content_error("error media_playlist_get_name : [%d]", ret);
- media_content_debug("playlist_name : %s", playlist_name);
+ content_debug("playlist_name : %s", playlist_name);
SAFE_FREE(playlist_name);
ret = media_playlist_get_thumbnail_path(playlist, &playlist_thumbnail_path);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_playlist_get_thumbnail_path : [%d]", ret);
+ content_error("error media_playlist_get_thumbnail_path : [%d]", ret);
- media_content_debug("playlist_thumbnail_path : %s", playlist_thumbnail_path);
+ content_debug("playlist_thumbnail_path : %s", playlist_thumbnail_path);
SAFE_FREE(playlist_thumbnail_path);
ret = media_playlist_get_playlist_from_db(playlist_id, &playlist_h);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_playlist_get_playlist_from_db : [%d]", ret);
+ content_error("error media_playlist_get_playlist_from_db : [%d]", ret);
ret = media_playlist_destroy(playlist_h);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_playlist_destroy : [%d]", ret);
+ content_error("error media_playlist_destroy : [%d]", ret);
return true;
}
bool tag_list_cb(media_tag_h tag, void *user_data)
{
if (!tag) {
- media_content_debug(" tag handle is NULL");
+ content_debug(" tag handle is NULL");
return false;
}
ret = media_album_get_media_count_from_db(album_id, NULL, &media_count);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_album_get_media_count_from_db : [%d]", ret);
+ content_error("error media_album_get_media_count_from_db : [%d]", ret);
- media_content_debug("media_count : [%d]", media_count);
+ content_debug("media_count : [%d]", media_count);
ret = media_album_foreach_media_from_db(album_id, NULL, media_item_cb, NULL);
if (ret != MEDIA_CONTENT_ERROR_NONE) {
- media_content_error("error media_album_foreach_media_from_db : [%d]", ret);
+ content_error("error media_album_foreach_media_from_db : [%d]", ret);
return false;
}
} else {
- media_content_error("album item not Found!!");
+ content_error("album item not Found!!");
}
return true;
int media_count = 0;
int *idx = user_data;
- media_content_debug("group item : [%s] [%d]", group_name, *idx);
+ content_debug("group item : [%s] [%d]", group_name, *idx);
if (media_group_get_media_count_from_db(group_name, *idx, g_filter, &media_count) != MEDIA_CONTENT_ERROR_NONE)
return false;
- media_content_debug("media_count : [%d]", media_count);
+ content_debug("media_count : [%d]", media_count);
if (media_group_foreach_media_from_db(group_name, *idx, g_filter, media_item_cb, NULL) != MEDIA_CONTENT_ERROR_NONE)
return false;
bool playlist_item_cb(int playlist_member_id, media_info_h media, void *user_data)
{
- media_content_debug("playlist_member_id : [%d]", playlist_member_id);
+ content_debug("playlist_member_id : [%d]", playlist_member_id);
/* 64bit build issue */
#if 0
GList **list = (GList**)user_data;
int test_filter_create(void)
{
- media_content_debug("\n============Filter Create============\n\n");
+ content_debug("\n============Filter Create============\n\n");
int ret = MEDIA_CONTENT_ERROR_NONE;
int test_filter_destroy(void)
{
- media_content_debug("\n============Filter Create============\n\n");
+ content_debug("\n============Filter Create============\n\n");
int ret = MEDIA_CONTENT_ERROR_NONE;
{
int ret = MEDIA_CONTENT_ERROR_NONE;
- media_content_debug("\n============DB Connection Test============\n\n");
+ content_debug("\n============DB Connection Test============\n\n");
ret = media_content_connect();
if (ret == MEDIA_CONTENT_ERROR_NONE)
- media_content_debug("connection is success\n\n");
+ content_debug("connection is success\n\n");
else
- media_content_error("connection is failed\n\n");
+ content_error("connection is failed\n\n");
return ret;
}
/* First, Get folder list */
ret = media_folder_foreach_folder_from_db(filter, gallery_folder_list_cb, &folder_list);
if (ret != MEDIA_CONTENT_ERROR_NONE) {
- media_content_error("media_folder_foreach_folder_from_db failed: %d", ret);
+ content_error("media_folder_foreach_folder_from_db failed: %d", ret);
return -1;
} else {
- media_content_debug("media_folder_foreach_folder_from_db success!!");
+ content_debug("media_folder_foreach_folder_from_db success!!");
char *folder_id = NULL;
for (i = 0; i < g_list_length(folder_list); i++) {
ret = media_folder_get_media_count_from_db(folder_id, filter, &count);
SAFE_FREE(folder_id);
if (ret != MEDIA_CONTENT_ERROR_NONE) {
- media_content_error("media_folder_get_media_count_from_db failed: %d", ret);
+ content_error("media_folder_get_media_count_from_db failed: %d", ret);
return -1;
} else {
- media_content_debug("media count [%d] : %d", i, count);
+ content_debug("media count [%d] : %d", i, count);
}
}
}
media_content_order_e order_type = MEDIA_CONTENT_ORDER_DESC;
ret = media_filter_create(&filter);
if (ret != MEDIA_CONTENT_ERROR_NONE) {
- media_content_error("Fail to create filter");
+ content_error("Fail to create filter");
return ret;
}
ret = media_filter_set_condition(filter, "MEDIA_TYPE = 0", collate_type);
if (ret != MEDIA_CONTENT_ERROR_NONE) {
media_filter_destroy(filter);
- media_content_error("Fail to set condition");
+ content_error("Fail to set condition");
return ret;
}
ret = media_filter_set_order(filter, order_type, MEDIA_DISPLAY_NAME, collate_type);
if (ret != MEDIA_CONTENT_ERROR_NONE) {
media_filter_destroy(filter);
- media_content_error("Fail to set order");
+ content_error("Fail to set order");
return ret;
}
ret = media_info_foreach_media_from_db(filter, gallery_media_item_cb, &all_item_list);
if (ret != MEDIA_CONTENT_ERROR_NONE) {
- media_content_error("media_info_foreach_media_from_db failed: %d", ret);
+ content_error("media_info_foreach_media_from_db failed: %d", ret);
media_filter_destroy(filter);
return -1;
} else {
- media_content_debug("media_info_foreach_media_from_db success");
+ content_debug("media_info_foreach_media_from_db success");
for (i = 0; i < g_list_length(all_item_list); i++) {
media_handle = (media_info_h)g_list_nth_data(all_item_list, i);
/* To check performance */
gettimeofday(&end, NULL);
long time = (end.tv_sec * 1000000 + end.tv_usec) - (start.tv_sec * 1000000 + start.tv_usec);
- media_content_debug("Time : %ld\n", time);
+ content_debug("Time : %ld\n", time);
/* Third, Get item list of a folder */
GList *item_list = NULL;
SAFE_FREE(folder_id);
if (ret != MEDIA_CONTENT_ERROR_NONE) {
- media_content_error("media_folder_foreach_media_from_db failed: %d", ret);
+ content_error("media_folder_foreach_media_from_db failed: %d", ret);
return -1;
} else {
- media_content_error("media_folder_foreach_media_from_db success!");
+ content_error("media_folder_foreach_media_from_db success!");
for (j = 0; j < g_list_length(item_list); j++) {
media_handle = (media_info_h)g_list_nth_data(item_list, j);
ret = media_tag_foreach_tag_from_db(filter, gallery_tag_item_cb, &tag_list);
if (ret != MEDIA_CONTENT_ERROR_NONE) {
- media_content_error("media_tag_foreach_tag_from_db failed: %d", ret);
+ content_error("media_tag_foreach_tag_from_db failed: %d", ret);
return -1;
} else {
- media_content_error("media_tag_foreach_tag_from_db success");
+ content_error("media_tag_foreach_tag_from_db success");
for (i = 0; i < g_list_length(tag_list); i++) {
tag_handle = (media_tag_h)g_list_nth_data(tag_list, i);
get_tag_meta(tag_handle);
if (ret != MEDIA_CONTENT_ERROR_NONE) {
ret = media_tag_foreach_media_from_db(tag_id, filter, gallery_media_item_cb, &media_list_in_tag);
if (ret != MEDIA_CONTENT_ERROR_NONE) {
- media_content_error("media_tag_foreach_media_from_db failed: %d", ret);
+ content_error("media_tag_foreach_media_from_db failed: %d", ret);
return -1;
} else {
- media_content_error("media_tag_foreach_media_from_db success");
+ content_error("media_tag_foreach_media_from_db success");
unsigned int j = 0;
media_info_h tag_media_handle;
media_handle = (media_info_h)g_list_nth_data(all_item_list, i);
ret = media_info_destroy(media_handle);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("media_info_destroy failed: %d", ret);
+ content_error("media_info_destroy failed: %d", ret);
}
g_list_free(all_item_list);
media_handle = (media_info_h)g_list_nth_data(item_list, i);
ret = media_info_destroy(media_handle);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("media_info_destroy failed: %d", ret);
+ content_error("media_info_destroy failed: %d", ret);
}
g_list_free(item_list);
tag_handle = (media_tag_h)g_list_nth_data(tag_list, i);
ret = media_tag_destroy(tag_handle);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_tag_destroy : [%d]", ret);
+ content_error("error media_tag_destroy : [%d]", ret);
}
g_list_free(tag_list);
media_handle = (media_info_h)g_list_nth_data(media_list_in_tag, i);
ret = media_info_destroy(media_handle);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("media_info_destroy failed: %d", ret);
+ content_error("media_info_destroy failed: %d", ret);
}
g_list_free(media_list_in_tag);
ret = media_filter_create(&filter);
if (ret != MEDIA_CONTENT_ERROR_NONE) {
- media_content_error("Fail to create filter");
+ content_error("Fail to create filter");
return ret;
}
ret = media_filter_set_condition(filter, condition, MEDIA_CONTENT_COLLATE_LOCALIZED);
if (ret != MEDIA_CONTENT_ERROR_NONE) {
media_filter_destroy(filter);
- media_content_error("Fail to set condition");
+ content_error("Fail to set condition");
return ret;
}
ret = media_filter_set_order(filter, MEDIA_CONTENT_ORDER_ASC, MEDIA_TITLE, MEDIA_CONTENT_COLLATE_LOCALIZED);
if (ret != MEDIA_CONTENT_ERROR_NONE) {
media_filter_destroy(filter);
- media_content_error("Fail to set order");
+ content_error("Fail to set order");
return ret;
}
ret = media_info_get_media_count_from_db(filter, &media_count);
if (ret != MEDIA_CONTENT_ERROR_NONE) {
media_filter_destroy(filter);
- media_content_error("Fail to get media count");
+ content_error("Fail to get media count");
return ret;
}
- media_content_debug("media_count : [%d]", media_count);
+ content_debug("media_count : [%d]", media_count);
ret = media_info_foreach_media_from_db(filter, media_item_cb, NULL);
if (ret != MEDIA_CONTENT_ERROR_NONE) {
media_filter_destroy(filter);
- media_content_error("Fail to get media");
+ content_error("Fail to get media");
return ret;
}
int ret = MEDIA_CONTENT_ERROR_NONE;
int media_count = 0;
- media_content_debug("\n============Media info Test============\n\n");
+ content_debug("\n============Media info Test============\n\n");
test_filter_create();
ret = media_info_get_media_count_from_db(g_filter, &media_count);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("media_info_get_media_count_from_db failed: %d", ret);
+ content_error("media_info_get_media_count_from_db failed: %d", ret);
else
- media_content_debug("media_count : [%d]", media_count);
+ content_debug("media_count : [%d]", media_count);
ret = media_info_foreach_media_from_db(g_filter, media_item_cb, NULL);
if (ret == MEDIA_CONTENT_ERROR_NONE)
- media_content_debug("media_info_foreach_media_from_db is success");
+ content_debug("media_info_foreach_media_from_db is success");
else
- media_content_error("media_info_foreach_media_from_db is failed");
+ content_error("media_info_foreach_media_from_db is failed");
test_filter_destroy();
int ret = MEDIA_CONTENT_ERROR_NONE;
int bookmark_count = 0;
- media_content_debug("\n============Media info Test 2============\n\n");
+ content_debug("\n============Media info Test 2============\n\n");
test_filter_create();
media_info_get_bookmark_count_from_db(test_video_id, g_filter_g, &bookmark_count);
- media_content_debug("bookmark_count : [%d]", bookmark_count);
+ content_debug("bookmark_count : [%d]", bookmark_count);
ret = media_info_foreach_bookmark_from_db(test_video_id, g_filter_g, bookmarks_cb, NULL);
#endif
/* Tag */
ret = media_info_get_tag_count_from_db(test_audio_id, g_filter_g, &bookmark_count);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("media_info_get_tag_count_from_db failed: %d", ret);
+ content_error("media_info_get_tag_count_from_db failed: %d", ret);
else
- media_content_debug("tag_count : [%d]", bookmark_count);
+ content_debug("tag_count : [%d]", bookmark_count);
ret = media_info_foreach_tag_from_db(test_audio_id, g_filter_g, tag_list_cb, NULL);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("media_info_foreach_tag_from_db failed: %d", ret);
+ content_error("media_info_foreach_tag_from_db failed: %d", ret);
test_filter_destroy();
char *folder_id = NULL;
int count = 0;
- media_content_debug("\n============Folder Test============\n\n");
+ content_debug("\n============Folder Test============\n\n");
test_filter_create();
ret = media_filter_create(&filter);
if (ret != MEDIA_CONTENT_ERROR_NONE) {
- media_content_error("[ERROR] media_folder_filter_create is failed");
+ content_error("[ERROR] media_folder_filter_create is failed");
return ret;
}
media_filter_set_storage(filter, "cfbf3d2c-71c5-4611-bccc-7cbac890146e");
ret = media_folder_get_folder_count_from_db(filter, &count);
- media_content_debug("Folder count : [%d]", count);
+ content_debug("Folder count : [%d]", count);
ret = media_folder_foreach_folder_from_db(filter, folder_list_cb, &folder);
if (ret != MEDIA_CONTENT_ERROR_NONE) {
test_filter_destroy();
media_filter_destroy(filter);
- media_content_error("[ERROR] media_info_filter_create is failed");
+ content_error("[ERROR] media_info_filter_create is failed");
return ret;
}
ret = media_folder_foreach_media_from_db(folder_id, m_filter, media_item_cb, NULL);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("[ERROR] media_folder_foreach_media_from_db is failed, error code : %d", ret);
+ content_error("[ERROR] media_folder_foreach_media_from_db is failed, error code : %d", ret);
media_filter_destroy(filter);
media_filter_destroy(m_filter);
filter_h filter = NULL;
filter_h m_filter = NULL;
- media_content_debug("\n============Playlist Test============\n\n");
+ content_debug("\n============Playlist Test============\n\n");
/* Filter for playlist */
/* Get Playlist Count*/
ret = media_playlist_get_playlist_count_from_db(filter, &playlist_count);
if (ret == 0)
- media_content_debug("playlist_count [%d]", playlist_count);
+ content_debug("playlist_count [%d]", playlist_count);
/* Get Playlist*/
GList *playlist_id_list = NULL;
playlist_id_2 = (int)g_list_nth_data(playlist_id_list, 1);
playlist_id_3 = (int)g_list_nth_data(playlist_id_list, 2);
#endif
- media_content_debug("playlist_id_1 [%d]", playlist_id_1);
- media_content_debug("playlist_id_2 [%d]", playlist_id_2);
- media_content_debug("playlist_id_3 [%d]", playlist_id_3);
+ content_debug("playlist_id_1 [%d]", playlist_id_1);
+ content_debug("playlist_id_2 [%d]", playlist_id_2);
+ content_debug("playlist_id_3 [%d]", playlist_id_3);
/* Export and import playlist */
media_playlist_export_to_file(playlist_3, tzplatform_mkpath(TZ_USER_MUSIC, "playlist.m3u"));
/* Get media count */
media_playlist_get_media_count_from_db(playlist_id_1, m_filter, &media_count);
- media_content_debug("playlist_1_media_count [%d]", media_count);
+ content_debug("playlist_1_media_count [%d]", media_count);
media_playlist_get_media_count_from_db(playlist_id_2, m_filter, &media_count);
- media_content_debug("playlist_2_media_count [%d]", media_count);
+ content_debug("playlist_2_media_count [%d]", media_count);
media_playlist_get_media_count_from_db(playlist_id_3, m_filter, &media_count);
- media_content_debug("playlist_3_media_count [%d]", media_count);
+ content_debug("playlist_3_media_count [%d]", media_count);
/* Get media of playlist */
GList *playlist_member_id_list = NULL;
playlist_member_id_2_1 = (int)g_list_nth_data(playlist_member_id_list_1, 0);
playlist_member_id_2_2 = (int)g_list_nth_data(playlist_member_id_list_1, 1);
#endif
- media_content_debug("playlist_member_id_1_1 [%d]", playlist_member_id_1_1);
- media_content_debug("playlist_member_id_1_2 [%d]", playlist_member_id_1_2);
- media_content_debug("playlist_member_id_1_3 [%d]", playlist_member_id_1_3);
- media_content_debug("playlist_member_id_2_1 [%d]", playlist_member_id_2_1);
- media_content_debug("playlist_member_id_2_2 [%d]", playlist_member_id_2_2);
+ content_debug("playlist_member_id_1_1 [%d]", playlist_member_id_1_1);
+ content_debug("playlist_member_id_1_2 [%d]", playlist_member_id_1_2);
+ content_debug("playlist_member_id_1_3 [%d]", playlist_member_id_1_3);
+ content_debug("playlist_member_id_2_1 [%d]", playlist_member_id_2_1);
+ content_debug("playlist_member_id_2_2 [%d]", playlist_member_id_2_2);
media_playlist_get_play_order(playlist_1, playlist_member_id_1_1, &order_1);
media_playlist_get_play_order(playlist_1, playlist_member_id_1_2, &order_2);
media_playlist_get_play_order(playlist_1, playlist_member_id_1_3, &order_3);
media_playlist_get_play_order(playlist_2, playlist_member_id_2_1, &order_4);
media_playlist_get_play_order(playlist_2, playlist_member_id_2_2, &order_5);
- media_content_debug("order_1 [%d] order_2 [%d] order_3 [%d] order_4 [%d] order_5 [%d]", order_1, order_2, order_3, order_4, order_5);
+ content_debug("order_1 [%d] order_2 [%d] order_3 [%d] order_4 [%d] order_5 [%d]", order_1, order_2, order_3, order_4, order_5);
/* Update Playlist */
media_playlist_remove_media(playlist_2, playlist_member_id_2_1);
const char *playlist_thumb_path = tzplatform_mkpath(TZ_USER_IMAGES, "Default.jpg");
int playlist_id = 0;
- media_content_debug("\n============Playlist Test V2============\n\n");
+ content_debug("\n============Playlist Test V2============\n\n");
ret = media_playlist_create(&playlist_1);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_playlist_create : [%d]", ret);
+ content_error("error media_playlist_create : [%d]", ret);
ret = media_playlist_set_name(playlist_1, playlist_name_1);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_playlist_set_name : [%d]", ret);
+ content_error("error media_playlist_set_name : [%d]", ret);
ret = media_playlist_set_thumbnail_path(playlist_1, playlist_thumb_path);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_playlist_set_thumbnail_path : [%d]", ret);
+ content_error("error media_playlist_set_thumbnail_path : [%d]", ret);
ret = media_playlist_insert_to_db_v2(playlist_1);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_playlist_insert_to_db_v2 : [%d]", ret);
+ content_error("error media_playlist_insert_to_db_v2 : [%d]", ret);
ret = media_playlist_set_name(playlist_1, "myPlaylist_3");
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_playlist_set_name : [%d]", ret);
+ content_error("error media_playlist_set_name : [%d]", ret);
ret = media_playlist_get_playlist_id(playlist_1, &playlist_id);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_playlist_get_playlist_id : [%d]", ret);
+ content_error("error media_playlist_get_playlist_id : [%d]", ret);
ret = media_playlist_update_to_db_v2(playlist_id, playlist_1);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_playlist_update_to_db_v2 : [%d]", ret);
+ content_error("error media_playlist_update_to_db_v2 : [%d]", ret);
ret = media_playlist_destroy(playlist_1);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_playlist_destroy : [%d]", ret);
+ content_error("error media_playlist_destroy : [%d]", ret);
return ret;
}
int media_count = 0;
filter_h filter;
- media_content_debug("\n============Tag Test============\n\n");
+ content_debug("\n============Tag Test============\n\n");
const char *g_condition = "TAG_NAME like \"%%my%%\"";
/* Create Tag */
ret = media_tag_insert_to_db(tag_name_1, &tag_1);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_tag_insert_to_db : [%d]", ret);
+ content_error("error media_tag_insert_to_db : [%d]", ret);
ret = media_tag_insert_to_db(tag_name_2, &tag_2);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_tag_insert_to_db : [%d]", ret);
+ content_error("error media_tag_insert_to_db : [%d]", ret);
ret = media_tag_insert_to_db(tag_name_3, &tag_3);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_tag_insert_to_db : [%d]", ret);
+ content_error("error media_tag_insert_to_db : [%d]", ret);
/* Add media to Tag */
ret = media_tag_add_media(tag_1, test_audio_id);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_tag_add_media : [%d]", ret);
+ content_error("error media_tag_add_media : [%d]", ret);
ret = media_tag_add_media(tag_1, test_video_id);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_tag_add_media : [%d]", ret);
+ content_error("error media_tag_add_media : [%d]", ret);
ret = media_tag_update_to_db(tag_1);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_tag_update_to_db : [%d]", ret);
+ content_error("error media_tag_update_to_db : [%d]", ret);
ret = media_tag_add_media(tag_2, test_audio_id);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_tag_add_media : [%d]", ret);
+ content_error("error media_tag_add_media : [%d]", ret);
ret = media_tag_update_to_db(tag_2);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_tag_update_to_db : [%d]", ret);
+ content_error("error media_tag_update_to_db : [%d]", ret);
/* Get Tag Count*/
ret = media_tag_get_tag_count_from_db(filter, &tag_count);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_tag_get_tag_count_from_db : [%d]", ret);
+ content_error("error media_tag_get_tag_count_from_db : [%d]", ret);
else
- media_content_debug("tag_count [%d]", tag_count);
+ content_debug("tag_count [%d]", tag_count);
/* Get Tag*/
ret = media_tag_foreach_tag_from_db(filter, tag_list_cb, NULL);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_tag_foreach_tag_from_db : [%d]", ret);
+ content_error("error media_tag_foreach_tag_from_db : [%d]", ret);
/* Get Tag id*/
ret = media_tag_get_tag_id(tag_1, &tag_id_1);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_tag_get_tag_id : [%d]", ret);
+ content_error("error media_tag_get_tag_id : [%d]", ret);
else
- media_content_debug("tag_id_1 [%d]", tag_id_1);
+ content_debug("tag_id_1 [%d]", tag_id_1);
ret = media_tag_get_tag_id(tag_2, &tag_id_2);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_tag_get_tag_id : [%d]", ret);
+ content_error("error media_tag_get_tag_id : [%d]", ret);
else
- media_content_debug("tag_id_2 [%d]", tag_id_2);
+ content_debug("tag_id_2 [%d]", tag_id_2);
ret = media_tag_get_tag_id(tag_3, &tag_id_3);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_tag_get_tag_id : [%d]", ret);
+ content_error("error media_tag_get_tag_id : [%d]", ret);
else
- media_content_debug("tag_id_3 [%d]", tag_id_3);
+ content_debug("tag_id_3 [%d]", tag_id_3);
/* Get media count */
ret = media_tag_get_media_count_from_db(tag_id_1, NULL, &media_count);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_tag_get_media_count_from_db : [%d]", ret);
+ content_error("error media_tag_get_media_count_from_db : [%d]", ret);
else
- media_content_debug("tag_1_media_count [%d]", media_count);
+ content_debug("tag_1_media_count [%d]", media_count);
ret = media_tag_get_media_count_from_db(tag_id_2, NULL, &media_count);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_tag_get_media_count_from_db : [%d]", ret);
+ content_error("error media_tag_get_media_count_from_db : [%d]", ret);
else
- media_content_debug("tag_2_media_count [%d]", media_count);
+ content_debug("tag_2_media_count [%d]", media_count);
/* Get media of Tag */
ret = media_tag_foreach_media_from_db(tag_id_1, NULL, media_item_cb, NULL);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_tag_foreach_media_from_db : [%d]", ret);
+ content_error("error media_tag_foreach_media_from_db : [%d]", ret);
ret = media_tag_foreach_media_from_db(tag_id_2, NULL, media_item_cb, NULL);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_tag_foreach_media_from_db : [%d]", ret);
+ content_error("error media_tag_foreach_media_from_db : [%d]", ret);
/* Update Tag */
ret = media_tag_add_media(tag_2, test_video_id);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_tag_add_media : [%d]", ret);
+ content_error("error media_tag_add_media : [%d]", ret);
ret = media_tag_set_name(tag_2, "test_tag");
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_tag_set_name : [%d]", ret);
+ content_error("error media_tag_set_name : [%d]", ret);
ret = media_tag_update_to_db(tag_2);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_tag_update_to_db : [%d]", ret);
+ content_error("error media_tag_update_to_db : [%d]", ret);
/* Get Updated Tag*/
ret = media_tag_foreach_tag_from_db(filter, tag_list_cb, NULL);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_tag_foreach_tag_from_db : [%d]", ret);
+ content_error("error media_tag_foreach_tag_from_db : [%d]", ret);
/* deletes the tag */
ret = media_tag_delete_from_db(tag_id_1);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_tag_delete_from_db : [%d]", ret);
+ content_error("error media_tag_delete_from_db : [%d]", ret);
ret = media_tag_delete_from_db(tag_id_2);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_tag_delete_from_db : [%d]", ret);
+ content_error("error media_tag_delete_from_db : [%d]", ret);
ret = media_tag_destroy(tag_1);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_tag_destroy : [%d]", ret);
+ content_error("error media_tag_destroy : [%d]", ret);
ret = media_tag_destroy(tag_2);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_tag_destroy : [%d]", ret);
+ content_error("error media_tag_destroy : [%d]", ret);
ret = media_tag_destroy(tag_3);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_tag_destroy : [%d]", ret);
+ content_error("error media_tag_destroy : [%d]", ret);
ret = media_filter_destroy(filter);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_filter_destroy : [%d]", ret);
+ content_error("error media_filter_destroy : [%d]", ret);
return ret;
}
const char *tag_name_1 = "myTag_1";
int tag_id = -1;
- media_content_debug("\n============Tag Test V2============\n\n");
+ content_debug("\n============Tag Test V2============\n\n");
/* Create Tag */
ret = media_tag_create(&tag_1);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_tag_create : [%d]", ret);
+ content_error("error media_tag_create : [%d]", ret);
ret = media_tag_set_name(tag_1, tag_name_1);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_tag_set_name : [%d]", ret);
+ content_error("error media_tag_set_name : [%d]", ret);
/* Add media to Tag */
ret = media_tag_add_media(tag_1, test_audio_id);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_tag_add_media : [%d]", ret);
+ content_error("error media_tag_add_media : [%d]", ret);
ret = media_tag_add_media(tag_1, test_video_id);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_tag_add_media : [%d]", ret);
+ content_error("error media_tag_add_media : [%d]", ret);
ret = media_tag_insert_to_db_v2(tag_1);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_tag_insert_to_db_v2 : [%d]", ret);
+ content_error("error media_tag_insert_to_db_v2 : [%d]", ret);
#if 1
ret = media_tag_get_tag_id(tag_1, &tag_id);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_tag_get_tag_id : [%d]", ret);
+ content_error("error media_tag_get_tag_id : [%d]", ret);
ret = media_tag_remove_media(tag_1, test_video_id);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_tag_add_media : [%d]", ret);
+ content_error("error media_tag_add_media : [%d]", ret);
ret = media_tag_update_to_db_v2(tag_id, tag_1);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_tag_update_to_db_v2 : [%d]", ret);
+ content_error("error media_tag_update_to_db_v2 : [%d]", ret);
#endif
ret = media_tag_destroy(tag_1);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_tag_destroy : [%d]", ret);
+ content_error("error media_tag_destroy : [%d]", ret);
return ret;
}
GList *all_item_list = NULL;
int idx = 0;
- media_content_debug("\n============Bookmark Test============\n\n");
+ content_debug("\n============Bookmark Test============\n\n");
const char *g_condition = "BOOKMARK_MARKED_TIME > 300";
ret = media_filter_create(&filter);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_filter_create : [%d]", ret);
+ content_error("error media_filter_create : [%d]", ret);
ret = media_filter_set_condition(filter, g_condition, MEDIA_CONTENT_COLLATE_DEFAULT);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_filter_set_condition : [%d]", ret);
+ content_error("error media_filter_set_condition : [%d]", ret);
ret = media_filter_set_order(filter, MEDIA_CONTENT_ORDER_DESC, BOOKMARK_MARKED_TIME, MEDIA_CONTENT_COLLATE_DEFAULT);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_filter_set_order : [%d]", ret);
+ content_error("error media_filter_set_order : [%d]", ret);
/* insert bookmark to video */
const char *thumbnail_path1 = tzplatform_mkpath(TZ_USER_VIDEOS, "teat11.jpg");
ret = media_bookmark_insert_to_db(test_video_id, 400, thumbnail_path1);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_bookmark_insert_to_db : [%d]", ret);
+ content_error("error media_bookmark_insert_to_db : [%d]", ret);
ret = media_bookmark_insert_to_db(test_video_id, 600, thumbnail_path1);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_bookmark_insert_to_db : [%d]", ret);
+ content_error("error media_bookmark_insert_to_db : [%d]", ret);
ret = media_bookmark_get_bookmark_count_from_db(filter, &bookmark_count);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_bookmark_get_bookmark_count_from_db : [%d]", ret);
+ content_error("error media_bookmark_get_bookmark_count_from_db : [%d]", ret);
else
- media_content_debug("bookmark_count = [%d]", bookmark_count);
+ content_debug("bookmark_count = [%d]", bookmark_count);
ret = media_info_foreach_bookmark_from_db(test_video_id, NULL, bookmarks_cb, &all_item_list);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_info_foreach_bookmark_from_db : [%d]", ret);
+ content_error("error media_info_foreach_bookmark_from_db : [%d]", ret);
for (idx = 0; idx < g_list_length(all_item_list); idx++) {
media_bookmark_h bookmark_handle;
ret = media_bookmark_set_name(bookmark_handle, "test 1");
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_bookmark_set_name : [%d]", ret);
+ content_error("error media_bookmark_set_name : [%d]", ret);
ret = media_bookmark_update_to_db(bookmark_handle);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_bookmark_update_to_db : [%d]", ret);
+ content_error("error media_bookmark_update_to_db : [%d]", ret);
}
ret = media_info_foreach_bookmark_from_db(test_video_id, NULL, bookmarks_cb, NULL);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_info_foreach_bookmark_from_db : [%d]", ret);
+ content_error("error media_info_foreach_bookmark_from_db : [%d]", ret);
ret = media_filter_destroy(filter);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_filter_destroy : [%d]", ret);
+ content_error("error media_filter_destroy : [%d]", ret);
return ret;
}
int test_bookmark_operation_v2(void)
{
- media_content_debug("\n============Bookmark Test V2============\n\n");
+ content_debug("\n============Bookmark Test V2============\n\n");
int ret = MEDIA_CONTENT_ERROR_NONE;
media_bookmark_h bookmark = NULL;
ret = media_bookmark_create(test_video_id, 400, &bookmark);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_bookmark_create : [%d]", ret);
+ content_error("error media_bookmark_create : [%d]", ret);
ret = media_bookmark_set_name(bookmark, "test bookmark");
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_bookmark_set_name : [%d]", ret);
+ content_error("error media_bookmark_set_name : [%d]", ret);
ret = media_bookmark_set_thumbnail_path(bookmark, thumbnail_path1);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_bookmark_set_thumbnail_path : [%d]", ret);
+ content_error("error media_bookmark_set_thumbnail_path : [%d]", ret);
ret = media_bookmark_insert_to_db_v2(bookmark);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_bookmark_insert_to_db_v2 : [%d]", ret);
+ content_error("error media_bookmark_insert_to_db_v2 : [%d]", ret);
ret = media_bookmark_set_name(bookmark, "test bookmark 2");
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_bookmark_set_name : [%d]", ret);
+ content_error("error media_bookmark_set_name : [%d]", ret);
ret = media_bookmark_update_to_db(bookmark);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_bookmark_update_to_db : [%d]", ret);
+ content_error("error media_bookmark_update_to_db : [%d]", ret);
ret = media_bookmark_destroy(bookmark);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_bookmark_destroy : [%d]", ret);
+ content_error("error media_bookmark_destroy : [%d]", ret);
return ret;
}
int test_album_list(void)
{
- media_content_debug("\n============Album Test============\n\n");
+ content_debug("\n============Album Test============\n\n");
int ret = MEDIA_CONTENT_ERROR_NONE;
int album_count = 0;
ret = media_filter_create(&filter);
if (ret != MEDIA_CONTENT_ERROR_NONE) {
- media_content_error("Fail to create filter");
+ content_error("Fail to create filter");
return ret;
}
ret = media_filter_set_condition(filter, condition, MEDIA_CONTENT_COLLATE_DEFAULT);
if (ret != MEDIA_CONTENT_ERROR_NONE) {
media_filter_destroy(filter);
- media_content_error("Fail to set condition");
+ content_error("Fail to set condition");
return ret;
}
ret = media_filter_set_order(filter, MEDIA_CONTENT_ORDER_ASC, MEDIA_ALBUM, MEDIA_CONTENT_COLLATE_NOCASE);
if (ret != MEDIA_CONTENT_ERROR_NONE) {
media_filter_destroy(filter);
- media_content_error("Fail to set order");
+ content_error("Fail to set order");
return ret;
}
media_filter_destroy(filter);
return ret;
} else {
- media_content_debug("album_count [%d]", album_count);
+ content_debug("album_count [%d]", album_count);
}
ret = media_album_foreach_album_from_db(filter, album_list_cb, NULL);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_album_foreach_album_from_db : [%d]", ret);
+ content_error("error media_album_foreach_album_from_db : [%d]", ret);
ret = media_filter_destroy(filter);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("error media_filter_destroy : [%d]", ret);
+ content_error("error media_filter_destroy : [%d]", ret);
return ret;
}
int test_group_operation(void)
{
- media_content_debug("\n============Group Test============\n\n");
+ content_debug("\n============Group Test============\n\n");
int ret = MEDIA_CONTENT_ERROR_NONE;
int group_count = 0;
ret = test_filter_create();
if (ret != MEDIA_CONTENT_ERROR_NONE) {
- media_content_error("[error(0x%08x)", ret);
+ content_error("[error(0x%08x)", ret);
return ret;
}
ret = media_group_get_group_count_from_db(g_filter, idx, &group_count);
if (ret != MEDIA_CONTENT_ERROR_NONE) {
test_filter_destroy();
- media_content_error("media_group_get_group_count_from_db fail. ret=[%d] idx=[%d]", ret, idx);
+ content_error("media_group_get_group_count_from_db fail. ret=[%d] idx=[%d]", ret, idx);
return ret;
} else {
- media_content_debug("[%2d]group_count [%d]", idx, group_count);
+ content_debug("[%2d]group_count [%d]", idx, group_count);
}
ret = media_group_foreach_group_from_db(g_filter, idx, group_list_cb, &idx);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("media_group_foreach_group_from_db failed: %d", ret);
+ content_error("media_group_foreach_group_from_db failed: %d", ret);
}
ret = test_filter_destroy();
/* Get all item list */
ret = media_info_foreach_media_from_db(NULL, gallery_media_item_cb, &all_item_list);
if (ret != MEDIA_CONTENT_ERROR_NONE) {
- media_content_error("media_info_foreach_media_from_db failed: %d", ret);
+ content_error("media_info_foreach_media_from_db failed: %d", ret);
return -1;
} else {
- media_content_debug("media_info_foreach_media_from_db success");
+ content_debug("media_info_foreach_media_from_db success");
for (i = 0; i < g_list_length(all_item_list); i++) {
media_handle = (media_info_h)g_list_nth_data(all_item_list, i);
char *path = NULL;
#endif
media_info_h media_item = NULL;
- media_content_debug("\n============DB Insert Test============\n\n");
+ content_debug("\n============DB Insert Test============\n\n");
ret = media_info_insert_to_db(path, &media_item);
if ((ret == MEDIA_CONTENT_ERROR_NONE) && (media_item != NULL)) {
- media_content_debug("Insertion is success");
+ content_debug("Insertion is success");
} else {
- media_content_error("Insertion is failed");
+ content_error("Insertion is failed");
ret = media_info_destroy(media_item);
return ret;
}
ret = media_info_get_media_id(media_item, &media_id);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("media_info_get_media_id failed: %d", ret);
+ content_error("media_info_get_media_id failed: %d", ret);
else
- media_content_debug("Media ID: %s", media_id);
+ content_debug("Media ID: %s", media_id);
SAFE_FREE(media_id);
ret = media_info_update_to_db(media_item);
if (ret == MEDIA_CONTENT_ERROR_NONE)
- media_content_debug("media_info_update_to_db is success");
+ content_debug("media_info_update_to_db is success");
else
- media_content_error("media_info_update_to_db is failed");
+ content_error("media_info_update_to_db is failed");
ret = media_info_destroy(media_item);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("media_info_destroy failed: %d", ret);
+ content_error("media_info_destroy failed: %d", ret);
return ret;
}
ret = media_info_get_media_from_db(move_media_id, &move_media);
if (ret == MEDIA_CONTENT_ERROR_NONE)
- media_content_debug("media_info_get_media_from_db success");
+ content_debug("media_info_get_media_from_db success");
else
- media_content_error("media_info_get_media_from_db failed: %d", ret);
+ content_error("media_info_get_media_from_db failed: %d", ret);
- media_content_debug("\n============DB Move Test============\n\n");
+ content_debug("\n============DB Move Test============\n\n");
if (move_media) {
ret = media_info_move_to_db(move_media, dst_path);
if (ret == MEDIA_CONTENT_ERROR_NONE)
- media_content_debug("Move is success");
+ content_debug("Move is success");
else
- media_content_error("Move is failed");
+ content_error("Move is failed");
ret = media_info_destroy(move_media);
} else {
- media_content_debug("There is no item : %s", move_media_id);
+ content_debug("There is no item : %s", move_media_id);
}
return ret;
int ret = MEDIA_CONTENT_ERROR_NONE;
g_cnt++;
- media_content_debug("=================[%d][%d]", g_media_cnt, g_cnt);
- media_content_debug("error_code [%d]", error);
- media_content_debug("thumbnail_path [%s]", path);
+ content_debug("=================[%d][%d]", g_media_cnt, g_cnt);
+ content_debug("error_code [%d]", error);
+ content_debug("thumbnail_path [%s]", path);
if (user_data != NULL) {
media_info_h media = (media_info_h)user_data;
ret = media_info_get_thumbnail_path(media, &thumbnail_path);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("media_info_get_thumbnail_path failed: %d", ret);
+ content_error("media_info_get_thumbnail_path failed: %d", ret);
else
- media_content_debug("thumbnail_path get from media[%s]", thumbnail_path);
+ content_debug("thumbnail_path get from media[%s]", thumbnail_path);
SAFE_FREE(thumbnail_path);
ret = media_info_destroy(media);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("media_info_destroy failed: %d", ret);
+ content_error("media_info_destroy failed: %d", ret);
}
if (g_cnt == g_media_cnt)
int ret = MEDIA_CONTENT_ERROR_NONE;
if (media == NULL) {
- media_content_debug("NO Item");
+ content_debug("NO Item");
return true;
}
ret = media_info_get_media_id(media, &media_id);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("media_info_get_media_id failed: %d", ret);
+ content_error("media_info_get_media_id failed: %d", ret);
else
- media_content_debug("media_id : [%s]", media_id);
+ content_debug("media_id : [%s]", media_id);
ret = media_info_clone(&dst, media);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("media_info_clone failed: %d", ret);
+ content_error("media_info_clone failed: %d", ret);
else {
ret = media_info_create_thumbnail(dst, thumbnail_completed_cb, dst);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("media_info_create_thumbnail failed: %d", ret);
+ content_error("media_info_create_thumbnail failed: %d", ret);
}
/* fix prevent: Resource leak */
g_cnt++;
if (media == NULL) {
- media_content_debug("NO Item");
+ content_debug("NO Item");
return true;
}
ret = media_info_get_media_id(media, &media_id);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("media_info_get_media_id failed: %d", ret);
+ content_error("media_info_get_media_id failed: %d", ret);
else
- media_content_debug("media_id : [%s]", media_id);
+ content_debug("media_id : [%s]", media_id);
ret = media_info_clone(&dst, media);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("media_info_clone failed: %d", ret);
+ content_error("media_info_clone failed: %d", ret);
ret = media_info_cancel_thumbnail(dst);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("media_info_cancel_thumbnail failed: %d", ret);
+ content_error("media_info_cancel_thumbnail failed: %d", ret);
ret = media_info_destroy(dst);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("media_info_destroy failed: %d", ret);
+ content_error("media_info_destroy failed: %d", ret);
if (g_cnt == g_media_cnt)
g_main_loop_quit(g_loop);
ret = media_info_foreach_media_from_db(g_filter, thumbnail_create_cb, NULL);
if (ret == MEDIA_CONTENT_ERROR_NONE)
- media_content_debug("media_info_foreach_media_from_db is success");
+ content_debug("media_info_foreach_media_from_db is success");
else
- media_content_error("media_info_foreach_media_from_db is failed");
+ content_error("media_info_foreach_media_from_db is failed");
return false;
}
ret = media_info_foreach_media_from_db(g_filter, thumbnail_cancel_cb, NULL);
if (ret == MEDIA_CONTENT_ERROR_NONE)
- media_content_debug("media_info_foreach_media_from_db is success");
+ content_debug("media_info_foreach_media_from_db is success");
else
- media_content_error("media_info_foreach_media_from_db is failed");
+ content_error("media_info_foreach_media_from_db is failed");
return false;
}
ret = media_info_get_media_count_from_db(g_filter, &g_media_cnt);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("media_info_get_media_count_from_db failed: %d", ret);
+ content_error("media_info_get_media_count_from_db failed: %d", ret);
else
- media_content_debug("media_count : [%d]", g_media_cnt);
+ content_debug("media_count : [%d]", g_media_cnt);
g_loop = g_main_loop_new(NULL, FALSE);
context = g_main_loop_get_context(g_loop);
int ret = MEDIA_CONTENT_ERROR_NONE;
g_cnt++;
- media_content_debug("=================[%d][%d]", g_media_cnt, g_cnt);
- media_content_debug("error_code [%d]", error);
- media_content_debug("face_count [%d]", count);
+ content_debug("=================[%d][%d]", g_media_cnt, g_cnt);
+ content_debug("error_code [%d]", error);
+ content_debug("face_count [%d]", count);
if (count == 0) {
- media_content_debug("No faces are detected!");
+ content_debug("No faces are detected!");
} else if (user_data != NULL) {
media_info_h media = (media_info_h)user_data;
char *media_id = NULL;
ret = media_info_get_media_id(media, &media_id);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("media_info_get_media_id failed: %d", ret);
+ content_error("media_info_get_media_id failed: %d", ret);
if (media_id != NULL) {
ret = media_info_foreach_face_from_db(media_id, NULL, face_cb, NULL);
SAFE_FREE(media_id);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("media_info_foreach_face_from_db failed: %d", ret);
+ content_error("media_info_foreach_face_from_db failed: %d", ret);
}
ret = media_info_destroy(media);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("media_info_destroy failed: %d", ret);
+ content_error("media_info_destroy failed: %d", ret);
}
if (g_cnt == g_media_cnt)
int ret = MEDIA_CONTENT_ERROR_NONE;
if (media == NULL) {
- media_content_debug("NO Item");
+ content_debug("NO Item");
return true;
}
ret = media_info_get_media_id(media, &media_id);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("media_info_get_media_id failed: %d", ret);
+ content_error("media_info_get_media_id failed: %d", ret);
else
- media_content_debug("media_id : [%s]", media_id);
+ content_debug("media_id : [%s]", media_id);
ret = media_info_clone(&dst, media);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("media_info_clone failed: %d", ret);
+ content_error("media_info_clone failed: %d", ret);
GList **list = (GList**)user_data;
*list = g_list_append(*list, dst);
g_cnt++;
if (media == NULL) {
- media_content_debug("NO Item");
+ content_debug("NO Item");
return true;
}
ret = media_info_get_media_id(media, &media_id);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("media_info_get_media_id failed: %d", ret);
+ content_error("media_info_get_media_id failed: %d", ret);
else
- media_content_debug("media_id : [%s]", media_id);
+ content_debug("media_id : [%s]", media_id);
ret = media_info_clone(&dst, media);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("media_info_clone failed: %d", ret);
+ content_error("media_info_clone failed: %d", ret);
ret = media_info_cancel_face_detection(dst);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("media_info_cancel_face_detection failed: %d", ret);
+ content_error("media_info_cancel_face_detection failed: %d", ret);
ret = media_info_destroy(dst);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("media_info_destroy failed: %d", ret);
+ content_error("media_info_destroy failed: %d", ret);
if (g_cnt == g_media_cnt)
g_main_loop_quit(g_loop);
ret = media_info_foreach_media_from_db(g_filter, start_face_detection_cb, &all_item_list);
if (ret == MEDIA_CONTENT_ERROR_NONE)
- media_content_debug("media_info_foreach_media_from_db is success");
+ content_debug("media_info_foreach_media_from_db is success");
else
- media_content_error("media_info_foreach_media_from_db is failed");
+ content_error("media_info_foreach_media_from_db is failed");
for (idx = 0; idx < g_list_length(all_item_list); idx++) {
media_info_h media_handle = NULL;
ret = media_info_start_face_detection(media_handle, face_detection_complete_cb, NULL);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("media_info_start_face_detection failed: %d", ret);
+ content_error("media_info_start_face_detection failed: %d", ret);
}
ret = media_info_foreach_media_from_db(g_filter, cancel_face_detection_cb, NULL);
if (ret == MEDIA_CONTENT_ERROR_NONE)
- media_content_debug("media_info_foreach_media_from_db is success");
+ content_debug("media_info_foreach_media_from_db is success");
else
- media_content_error("media_info_foreach_media_from_db is failed");
+ content_error("media_info_foreach_media_from_db is failed");
return false;
}
ret = media_info_get_media_count_from_db(g_filter, &g_media_cnt);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("media_info_get_media_count_from_db failed: %d", ret);
+ content_error("media_info_get_media_count_from_db failed: %d", ret);
else
- media_content_debug("media_count : [%d]", g_media_cnt);
+ content_debug("media_count : [%d]", g_media_cnt);
if (g_media_cnt == 0)
goto END;
int test_disconnect_database(void)
{
int ret = MEDIA_CONTENT_ERROR_NONE;
- media_content_debug("\n============DB Disconnection Test============\n\n");
+ content_debug("\n============DB Disconnection Test============\n\n");
ret = media_content_disconnect();
if (ret == MEDIA_CONTENT_ERROR_NONE)
- media_content_debug("disconnection is success");
+ content_debug("disconnection is success");
else
- media_content_error("disconnection is failed");
+ content_error("disconnection is failed");
return ret;
}
ret = media_info_get_media_from_db("71b19196-5b38-4ab1-ab34-bfe05c369614", &media);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("media_info_get_media_from_db failed: %d", ret);
+ content_error("media_info_get_media_from_db failed: %d", ret);
ret = media_info_set_favorite(media, TRUE);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("media_info_set_favorite failed: %d", ret);
+ content_error("media_info_set_favorite failed: %d", ret);
ret = media_info_update_to_db(media);
if (ret == MEDIA_CONTENT_ERROR_NONE)
- media_content_debug("media_info_update_to_db is success");
+ content_debug("media_info_update_to_db is success");
else
- media_content_error("media_info_update_to_db is failed");
+ content_error("media_info_update_to_db is failed");
if (media != NULL)
media_info_destroy(media);
/*get the updated value*/
ret = media_info_get_media_from_db("71b19196-5b38-4ab1-ab34-bfe05c369614", &media);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("media_info_get_media_from_db failed: %d", ret);
+ content_error("media_info_get_media_from_db failed: %d", ret);
ret = media_info_get_favorite(media, &favorite);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("media_info_get_favorite failed: %d", ret);
+ content_error("media_info_get_favorite failed: %d", ret);
else
- media_content_debug("favorite [%d]", favorite);
+ content_debug("favorite [%d]", favorite);
ret = media_info_destroy(media);
ret = media_info_get_media_type(media, &media_type);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("media_info_get_media_type failed: %d", ret);
+ content_error("media_info_get_media_type failed: %d", ret);
ret = media_info_get_size(media, &file_size);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("media_info_get_size failed: %d", ret);
+ content_error("media_info_get_size failed: %d", ret);
ret = media_info_get_mime_type(media, &mime_type);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("media_info_get_mime_type failed: %d", ret);
+ content_error("media_info_get_mime_type failed: %d", ret);
if (media_type == MEDIA_CONTENT_TYPE_IMAGE)
g_total_photo_size += file_size;
else
g_total_voice_memo_size += file_size;
} else
- media_content_debug("invalid media_type");
+ content_debug("invalid media_type");
SAFE_FREE(mime_type);
int DFT_test(void)
{
int ret = MEDIA_CONTENT_ERROR_NONE;
- media_content_debug("\n============DFT_test============\n\n");
+ content_debug("\n============DFT_test============\n\n");
filter_h filter = NULL;
int media_cnt = 0;
ret = media_filter_create(&filter);
/*Internal Memory*/
- media_content_debug("[Internal Memory]\n");
+ content_debug("[Internal Memory]\n");
/*1. Photo ============================================================*/
ret = media_filter_set_condition(filter, "MEDIA_STORAGE_TYPE=0 AND MEDIA_TYPE=0", MEDIA_CONTENT_COLLATE_DEFAULT);
/*Get Photo Count*/
ret = media_info_get_media_count_from_db(filter, &media_cnt);
- media_content_debug("Photo count = [%d]\n", media_cnt);
+ content_debug("Photo count = [%d]\n", media_cnt);
/*Get Photo Size*/
ret = media_info_foreach_media_from_db(filter, dft_cb, NULL);
- media_content_debug("Photo size = [%d]\n", g_total_photo_size);
+ content_debug("Photo size = [%d]\n", g_total_photo_size);
/*2. Video ============================================================*/
ret = media_filter_set_condition(filter, "MEDIA_STORAGE_TYPE=0 AND MEDIA_TYPE=1", MEDIA_CONTENT_COLLATE_DEFAULT);
/*Get Video Count*/
ret = media_info_get_media_count_from_db(filter, &media_cnt);
- media_content_debug("Video count = [%d]\n", media_cnt);
+ content_debug("Video count = [%d]\n", media_cnt);
/*Get Video Size*/
ret = media_info_foreach_media_from_db(filter, dft_cb, NULL);
- media_content_debug("Video size = [%d]\n", g_total_video_size);
+ content_debug("Video size = [%d]\n", g_total_video_size);
/*3. MP3 ============================================================*/
ret = media_filter_set_condition(filter, "MEDIA_STORAGE_TYPE=0 AND MEDIA_TYPE=3 AND MEDIA_MIME_TYPE=\"audio/mpeg\"", MEDIA_CONTENT_COLLATE_DEFAULT);
/*Get MP3 Count*/
ret = media_info_get_media_count_from_db(filter, &media_cnt);
- media_content_debug("MP3 count = [%d]\n", media_cnt);
+ content_debug("MP3 count = [%d]\n", media_cnt);
/*Get MP3 Size*/
ret = media_info_foreach_media_from_db(filter, dft_cb, NULL);
- media_content_debug("MP3 size = [%d]\n", g_total_mp3_size);
+ content_debug("MP3 size = [%d]\n", g_total_mp3_size);
/*4. Voice Memo ============================================================*/
ret = media_filter_set_condition(filter, "MEDIA_STORAGE_TYPE=0 AND (MEDIA_MIME_TYPE=\"audio/AMR\" OR MEDIA_MIME_TYPE=\"audio/mp4\")", MEDIA_CONTENT_COLLATE_DEFAULT);
/*Get Voice Memo Count*/
ret = media_info_get_media_count_from_db(filter, &media_cnt);
- media_content_debug("Voice Memo count = [%d]\n", media_cnt);
+ content_debug("Voice Memo count = [%d]\n", media_cnt);
/*Get Voice Memo Size*/
ret = media_info_foreach_media_from_db(filter, dft_cb, NULL);
- media_content_debug("Voice Memo size = [%d]\n", g_total_voice_memo_size);
+ content_debug("Voice Memo size = [%d]\n", g_total_voice_memo_size);
g_total_photo_size = 0;
g_total_video_size = 0;
g_total_voice_memo_size = 0;
/*External Memory*/
- media_content_debug("\n[External Memory]\n");
+ content_debug("\n[External Memory]\n");
/*1. Photo ============================================================*/
ret = media_filter_set_condition(filter, "MEDIA_STORAGE_TYPE=1 AND MEDIA_TYPE=0", MEDIA_CONTENT_COLLATE_DEFAULT);
/*Get Photo Count*/
ret = media_info_get_media_count_from_db(filter, &media_cnt);
- media_content_debug("Photo count = [%d]\n", media_cnt);
+ content_debug("Photo count = [%d]\n", media_cnt);
/*Get Photo Size*/
ret = media_info_foreach_media_from_db(filter, dft_cb, NULL);
- media_content_debug("Photo size = [%d]\n", g_total_photo_size);
+ content_debug("Photo size = [%d]\n", g_total_photo_size);
/*2. Video ============================================================*/
ret = media_filter_set_condition(filter, "MEDIA_STORAGE_TYPE=1 AND MEDIA_TYPE=1", MEDIA_CONTENT_COLLATE_DEFAULT);
/*Get Video Count*/
ret = media_info_get_media_count_from_db(filter, &media_cnt);
- media_content_debug("Video count = [%d]\n", media_cnt);
+ content_debug("Video count = [%d]\n", media_cnt);
/*Get Video Size*/
ret = media_info_foreach_media_from_db(filter, dft_cb, NULL);
- media_content_debug("Video size = [%d]\n", g_total_video_size);
+ content_debug("Video size = [%d]\n", g_total_video_size);
/*3. MP3 ============================================================*/
ret = media_filter_set_condition(filter, "MEDIA_STORAGE_TYPE=1 AND MEDIA_TYPE=3 AND MEDIA_MIME_TYPE=\"audio/mpeg\"", MEDIA_CONTENT_COLLATE_DEFAULT);
/*Get MP3 Count*/
ret = media_info_get_media_count_from_db(filter, &media_cnt);
- media_content_debug("MP3 count = [%d]\n", media_cnt);
+ content_debug("MP3 count = [%d]\n", media_cnt);
/*Get MP3 Size*/
ret = media_info_foreach_media_from_db(filter, dft_cb, NULL);
- media_content_debug("MP3 size = [%d]\n", g_total_mp3_size);
+ content_debug("MP3 size = [%d]\n", g_total_mp3_size);
/*4. Voice Memo ============================================================*/
ret = media_filter_set_condition(filter, "MEDIA_STORAGE_TYPE=1 AND (MEDIA_MIME_TYPE=\"audio/AMR\" OR MEDIA_MIME_TYPE=\"audio/mp4\")", MEDIA_CONTENT_COLLATE_DEFAULT);
/*Get Voice Memo Count*/
ret = media_info_get_media_count_from_db(filter, &media_cnt);
- media_content_debug("Voice Memo count = [%d]\n", media_cnt);
+ content_debug("Voice Memo count = [%d]\n", media_cnt);
/*Get Voice Memo Size*/
ret = media_info_foreach_media_from_db(filter, dft_cb, NULL);
- media_content_debug("Voice Memo size = [%d]\n", g_total_voice_memo_size);
+ content_debug("Voice Memo size = [%d]\n", g_total_voice_memo_size);
ret = media_filter_destroy(filter);
return ret;
void insert_batch_cb(media_content_error_e error, void * user_data)
{
- media_content_debug("media_info_insert_batch_to_db completed!\n");
+ content_debug("media_info_insert_batch_to_db completed!\n");
}
int test_batch_operations()
for (i = 0; i < 10; i++) {
file_list[i] = g_strdup_printf("%s%d.jpg", tzplatform_mkpath(TZ_USER_CONTENT, "test/image"), i+1);
- media_content_debug("File : %s\n", file_list[i]);
+ content_debug("File : %s\n", file_list[i]);
}
ret = media_info_insert_batch_to_db((const char **)file_list, 10, insert_batch_cb, NULL);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("media_info_insert_batch_to_db failed : %d\n", ret);
+ content_error("media_info_insert_batch_to_db failed : %d\n", ret);
for (i = 0; i < 10; i++)
g_free(file_list[i]);
void _scan_cb(media_content_error_e err, void *user_data)
{
- media_content_debug("scan callback is called : %d\n", err);
+ content_debug("scan callback is called : %d\n", err);
g_main_loop_quit(g_loop);
return;
const char *file_path = tzplatform_mkpath(TZ_USER_CONTENT, "test/image1.jpg");
ret = media_content_scan_file(file_path);
if (ret != MEDIA_CONTENT_ERROR_NONE) {
- media_content_error("Fail to media_content_scan_file : %d", ret);
+ content_error("Fail to media_content_scan_file : %d", ret);
return ret;
}
ret = media_content_scan_folder(dir_path, TRUE, _scan_cb, NULL);
if (ret != MEDIA_CONTENT_ERROR_NONE) {
- media_content_error("Fail to test_scan_dir_start : %d", ret);
+ content_error("Fail to test_scan_dir_start : %d", ret);
return ret;
}
ret = media_content_cancel_scan_folder(dir_path);
if (ret == MEDIA_CONTENT_ERROR_NONE)
- media_content_debug("media_content_cancel_scan_folder is success");
+ content_debug("media_content_cancel_scan_folder is success");
else
- media_content_error("media_content_cancel_scan_folder is failed");
+ content_error("media_content_cancel_scan_folder is failed");
return false;
}
void *user_data)
{
if (error == 0)
- media_content_debug("noti success! : %d\n", error);
+ content_debug("noti success! : %d\n", error);
else
- media_content_debug("error occured! : %d\n", error);
+ content_debug("error occured! : %d\n", error);
- media_content_debug("Noti from PID(%d)\n", pid);
+ content_debug("Noti from PID(%d)\n", pid);
if (update_item == MEDIA_ITEM_FILE)
- media_content_debug("Noti item : MEDIA_ITEM_FILE\n");
+ content_debug("Noti item : MEDIA_ITEM_FILE\n");
else if (update_item == MEDIA_ITEM_DIRECTORY)
- media_content_debug("Noti item : MEDIA_ITEM_DIRECTORY\n");
+ content_debug("Noti item : MEDIA_ITEM_DIRECTORY\n");
if (update_type == MEDIA_CONTENT_INSERT)
- media_content_debug("Noti type : MEDIA_CONTENT_INSERT\n");
+ content_debug("Noti type : MEDIA_CONTENT_INSERT\n");
else if (update_type == MEDIA_CONTENT_DELETE)
- media_content_debug("Noti type : MEDIA_CONTENT_DELETE\n");
+ content_debug("Noti type : MEDIA_CONTENT_DELETE\n");
else if (update_type == MEDIA_CONTENT_UPDATE)
- media_content_debug("Noti type : MEDIA_CONTENT_UPDATE\n");
+ content_debug("Noti type : MEDIA_CONTENT_UPDATE\n");
- media_content_debug("content type : %d\n", media_type);
+ content_debug("content type : %d\n", media_type);
if (path)
- media_content_debug("path : %s\n", path);
+ content_debug("path : %s\n", path);
else
- media_content_debug("path not\n");
+ content_debug("path not\n");
if (uuid)
- media_content_debug("uuid : %s\n", uuid);
+ content_debug("uuid : %s\n", uuid);
else
- media_content_debug("uuid not\n");
+ content_debug("uuid not\n");
if (mime_type)
- media_content_debug("mime_type : %s\n", mime_type);
+ content_debug("mime_type : %s\n", mime_type);
else
- media_content_debug("mime not\n");
+ content_debug("mime not\n");
- if (user_data) media_content_debug("String : %s\n", (char *)user_data);
+ if (user_data) content_debug("String : %s\n", (char *)user_data);
return;
}
void *user_data)
{
if (error == 0)
- media_content_debug("noti_2 success! : %d\n", error);
+ content_debug("noti_2 success! : %d\n", error);
else
- media_content_debug("error occured! : %d\n", error);
+ content_debug("error occured! : %d\n", error);
- media_content_debug("Noti_2 from PID(%d)\n", pid);
+ content_debug("Noti_2 from PID(%d)\n", pid);
g_main_loop_quit(g_loop);
return;
ret = media_info_insert_to_db(path, &media_item);
if (ret != MEDIA_CONTENT_ERROR_NONE) {
- media_content_error("media_info_insert_to_db failed : %d", ret);
+ content_error("media_info_insert_to_db failed : %d", ret);
media_info_destroy(media_item);
return FALSE;
}
- media_content_debug("media_info_insert_to_db success");
+ content_debug("media_info_insert_to_db success");
media_content_remove_db_updated_cb(noti_h);
/* media_info_update_to_db */
ret = media_info_update_to_db(media_item);
if (ret != MEDIA_CONTENT_ERROR_NONE) {
- media_content_error("media_info_update_to_db failed : %d\n", ret);
+ content_error("media_info_update_to_db failed : %d\n", ret);
media_info_destroy(media_item);
return ret;
}
int i = 0;
ret = media_filter_create(&filter);
- media_content_retvm_if(ret != MEDIA_CONTENT_ERROR_NONE, ret, "fail media_filter_create");
+ content_retvm_if(ret != MEDIA_CONTENT_ERROR_NONE, ret, "fail media_filter_create");
ret = media_filter_set_condition(filter, "MEDIA_TYPE = 0", MEDIA_CONTENT_COLLATE_DEFAULT);
if (ret != MEDIA_CONTENT_ERROR_NONE) {
media_filter_destroy(filter);
- media_content_error("Fail to set condition");
+ content_error("Fail to set condition");
return ret;
}
ret = media_info_foreach_media_from_db(filter, gallery_media_item_cb, &all_item_list);
if (ret != MEDIA_CONTENT_ERROR_NONE) {
- media_content_error("media_info_foreach_media_from_db failed: %d", ret);
+ content_error("media_info_foreach_media_from_db failed: %d", ret);
media_filter_destroy(filter);
return ret;
}
ret = media_info_get_media_id(media_handle, &media_id);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("media_info_get_media_id failed: %d", ret);
+ content_error("media_info_get_media_id failed: %d", ret);
ret = media_info_get_face_count_from_db(media_id, filter, &face_count);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("media_info_get_face_count_from_db failed: %d", ret);
+ content_error("media_info_get_face_count_from_db failed: %d", ret);
- media_content_error("media_id [%s] face_count [%d]", media_id, face_count);
+ content_error("media_id [%s] face_count [%d]", media_id, face_count);
ret = media_info_foreach_face_from_db(media_id, filter, media_face_test_cb, NULL);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("media_info_foreach_face_from_db failed: %d", ret);
+ content_error("media_info_foreach_face_from_db failed: %d", ret);
media_info_destroy(media_handle);
}
char *face_tag = "test_face_tag";
ret = media_face_create(media_id, &face);
- media_content_retvm_if(ret != MEDIA_CONTENT_ERROR_NONE, ret, "fail media_face_create");
+ content_retvm_if(ret != MEDIA_CONTENT_ERROR_NONE, ret, "fail media_face_create");
ret = media_face_set_face_rect(face, 10, 12, 50, 100);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("media_face_set_face_rect failed: %d", ret);
+ content_error("media_face_set_face_rect failed: %d", ret);
ret = media_face_set_orientation(face, 5);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("media_face_set_orientation failed: %d", ret);
+ content_error("media_face_set_orientation failed: %d", ret);
ret = media_face_set_tag(face, face_tag);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("media_face_set_tag failed: %d", ret);
+ content_error("media_face_set_tag failed: %d", ret);
ret = media_face_insert_to_db(face);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("media_face_insert_to_db failed: %d", ret);
+ content_error("media_face_insert_to_db failed: %d", ret);
ret = media_face_destroy(face);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("media_face_destroy failed: %d", ret);
+ content_error("media_face_destroy failed: %d", ret);
/* Update Test */
GList *all_item_list = NULL;
filter_h filter = NULL;
ret = media_filter_create(&filter);
- media_content_retvm_if(ret != MEDIA_CONTENT_ERROR_NONE, ret, "fail media_filter_create");
+ content_retvm_if(ret != MEDIA_CONTENT_ERROR_NONE, ret, "fail media_filter_create");
ret = media_filter_set_condition(filter, "MEDIA_FACE_TAG IS NOT NULL", MEDIA_CONTENT_COLLATE_DEFAULT);
if (ret != MEDIA_CONTENT_ERROR_NONE) {
media_filter_destroy(filter);
- media_content_error("Fail to set condition");
+ content_error("Fail to set condition");
return ret;
}
ret = media_face_set_face_rect(face_handle, 20, 22, 70, 70);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("media_face_set_face_rect failed: %d", ret);
+ content_error("media_face_set_face_rect failed: %d", ret);
ret = media_face_set_orientation(face_handle, 3);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("media_face_set_orientation failed: %d", ret);
+ content_error("media_face_set_orientation failed: %d", ret);
ret = media_face_set_tag(face_handle, NULL);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("media_face_set_tag failed: %d", ret);
+ content_error("media_face_set_tag failed: %d", ret);
ret = media_face_update_to_db(face_handle);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("media_face_update_to_db failed: %d", ret);
+ content_error("media_face_update_to_db failed: %d", ret);
media_face_destroy(face_handle);
}
int test_tv_filter_create(void)
{
- media_content_debug("\n============Filter Create============\n\n");
+ content_debug("\n============Filter Create============\n\n");
int ret = MEDIA_CONTENT_ERROR_NONE;
int test_tv_filter_destroy(void)
{
- media_content_debug("\n============Filter Destroy============\n\n");
+ content_debug("\n============Filter Destroy============\n\n");
int ret = MEDIA_CONTENT_ERROR_NONE;
unsigned long long l_value = 0;
if (pvr == NULL) {
- media_content_debug("NO Item");
+ content_debug("NO Item");
return true;
}
ret = media_pvr_get_media_id(pvr, &c_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("Fail to media_pvr_get_media_id");
- media_content_debug("media_id [%s]", c_value);
+ content_error("Fail to media_pvr_get_media_id");
+ content_debug("media_id [%s]", c_value);
SAFE_FREE(c_value);
ret = media_pvr_get_channel_name(pvr, &c_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("Fail to media_pvr_get_channel_name");
- media_content_debug("channel_name [%s]", c_value);
+ content_error("Fail to media_pvr_get_channel_name");
+ content_debug("channel_name [%s]", c_value);
SAFE_FREE(c_value);
ret = media_pvr_get_program_title(pvr, &c_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("Fail to media_pvr_get_program_title");
- media_content_debug("program_title [%s]", c_value);
+ content_error("Fail to media_pvr_get_program_title");
+ content_debug("program_title [%s]", c_value);
SAFE_FREE(c_value);
ret = media_pvr_get_program_crid(pvr, &c_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("Fail to media_pvr_get_program_crid");
- media_content_debug("program_crid [%s]", c_value);
+ content_error("Fail to media_pvr_get_program_crid");
+ content_debug("program_crid [%s]", c_value);
SAFE_FREE(c_value);
ret = media_pvr_get_guidance(pvr, &c_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("Fail to media_pvr_get_guidance");
- media_content_debug("guidance [%s]", c_value);
+ content_error("Fail to media_pvr_get_guidance");
+ content_debug("guidance [%s]", c_value);
SAFE_FREE(c_value);
ret = media_pvr_get_synopsis(pvr, &c_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("Fail to media_pvr_get_synopsis");
- media_content_debug("synopsis [%s]", c_value);
+ content_error("Fail to media_pvr_get_synopsis");
+ content_debug("synopsis [%s]", c_value);
SAFE_FREE(c_value);
ret = media_pvr_get_genre(pvr, &c_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("Fail to media_pvr_get_synopsis");
- media_content_debug("genre [%s]", c_value);
+ content_error("Fail to media_pvr_get_synopsis");
+ content_debug("genre [%s]", c_value);
SAFE_FREE(c_value);
ret = media_pvr_get_language(pvr, &c_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("Fail to media_pvr_get_language");
- media_content_debug("language [%s]", c_value);
+ content_error("Fail to media_pvr_get_language");
+ content_debug("language [%s]", c_value);
SAFE_FREE(c_value);
ret = media_pvr_get_path(pvr, &c_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("Fail to media_pvr_get_path");
- media_content_debug("path [%s]", c_value);
+ content_error("Fail to media_pvr_get_path");
+ content_debug("path [%s]", c_value);
SAFE_FREE(c_value);
ret = media_pvr_get_storage_id(pvr, &c_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("Fail to media_pvr_get_storage_id");
- media_content_debug("storage_id [%s]", c_value);
+ content_error("Fail to media_pvr_get_storage_id");
+ content_debug("storage_id [%s]", c_value);
SAFE_FREE(c_value);
ret = media_pvr_get_size(pvr, &l_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("Fail to media_pvr_get_size");
- media_content_debug("size [%lld]", l_value);
+ content_error("Fail to media_pvr_get_size");
+ content_debug("size [%lld]", l_value);
ret = media_pvr_get_timezone(pvr, &i_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("Fail to media_pvr_get_timezone");
- media_content_debug("timezone [%d]", i_value);
+ content_error("Fail to media_pvr_get_timezone");
+ content_debug("timezone [%d]", i_value);
ret = media_pvr_get_ptc(pvr, &i_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("Fail to media_pvr_get_ptc");
- media_content_debug("ptc [%d]", i_value);
+ content_error("Fail to media_pvr_get_ptc");
+ content_debug("ptc [%d]", i_value);
ret = media_pvr_get_major(pvr, &i_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("Fail to media_pvr_get_major");
- media_content_debug("[%d]", i_value);
+ content_error("Fail to media_pvr_get_major");
+ content_debug("[%d]", i_value);
ret = media_pvr_get_minor(pvr, &i_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("Fail to media_pvr_get_minor");
- media_content_debug("minor [%d]", i_value);
+ content_error("Fail to media_pvr_get_minor");
+ content_debug("minor [%d]", i_value);
ret = media_pvr_get_channel_type(pvr, &i_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("Fail to media_pvr_get_channel_type");
- media_content_debug("channel_type [%d]", i_value);
+ content_error("Fail to media_pvr_get_channel_type");
+ content_debug("channel_type [%d]", i_value);
ret = media_pvr_get_program_num(pvr, &i_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("Fail to media_pvr_get_program_num");
- media_content_debug("program_num [%d]", i_value);
+ content_error("Fail to media_pvr_get_program_num");
+ content_debug("program_num [%d]", i_value);
unsigned int ui_value = 0;
ret = media_pvr_get_service_profile(pvr, &ui_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("Fail to media_pvr_get_service_profile");
- media_content_debug("service_profile [%u]", ui_value);
+ content_error("Fail to media_pvr_get_service_profile");
+ content_debug("service_profile [%u]", ui_value);
ret = media_pvr_get_duration(pvr, &i_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("Fail to media_pvr_get_duration");
- media_content_debug("duration [%d]", i_value);
+ content_error("Fail to media_pvr_get_duration");
+ content_debug("duration [%d]", i_value);
ret = media_pvr_get_embargo_time(pvr, &i_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("Fail to media_pvr_get_embargo_time");
- media_content_debug("embargo_time [%d]", i_value);
+ content_error("Fail to media_pvr_get_embargo_time");
+ content_debug("embargo_time [%d]", i_value);
ret = media_pvr_get_expiry_time(pvr, &i_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("Fail to media_pvr_get_expiry_time");
- media_content_debug("expiry_time [%d]", i_value);
+ content_error("Fail to media_pvr_get_expiry_time");
+ content_debug("expiry_time [%d]", i_value);
ret = media_pvr_get_parental_rating(pvr, &i_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("Fail to media_pvr_get_parental_rating");
- media_content_debug("parental_rating [%d]", i_value);
+ content_error("Fail to media_pvr_get_parental_rating");
+ content_debug("parental_rating [%d]", i_value);
ret = media_pvr_get_start_time(pvr, &i_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("Fail to media_pvr_get_start_time");
- media_content_debug("start_time [%d]", i_value);
+ content_error("Fail to media_pvr_get_start_time");
+ content_debug("start_time [%d]", i_value);
ret = media_pvr_get_program_start_time(pvr, &i_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("Fail to media_pvr_get_program_start_time");
- media_content_debug("program_start_time [%d]", i_value);
+ content_error("Fail to media_pvr_get_program_start_time");
+ content_debug("program_start_time [%d]", i_value);
ret = media_pvr_get_program_end_time(pvr, &i_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("Fail to media_pvr_get_program_end_time");
- media_content_debug("program_end_time [%d]", i_value);
+ content_error("Fail to media_pvr_get_program_end_time");
+ content_debug("program_end_time [%d]", i_value);
ret = media_pvr_get_program_date(pvr, &i_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("Fail to media_pvr_get_program_date");
- media_content_debug("program_date [%d]", i_value);
+ content_error("Fail to media_pvr_get_program_date");
+ content_debug("program_date [%d]", i_value);
ret = media_pvr_get_timer_record(pvr, &b_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("Fail to media_pvr_get_timer_record");
- media_content_debug("timer_record [%d]", b_value);
+ content_error("Fail to media_pvr_get_timer_record");
+ content_debug("timer_record [%d]", b_value);
ret = media_pvr_get_series_record(pvr, &b_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("Fail to media_pvr_get_series_record");
- media_content_debug("series_record [%d]", b_value);
+ content_error("Fail to media_pvr_get_series_record");
+ content_debug("series_record [%d]", b_value);
ret = media_pvr_get_hd(pvr, &i_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("Fail to media_pvr_get_hd");
- media_content_debug("hd [%d]", i_value);
+ content_error("Fail to media_pvr_get_hd");
+ content_debug("hd [%d]", i_value);
ret = media_pvr_get_subtitle(pvr, &b_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("Fail to media_pvr_get_subtitle");
- media_content_debug("subtitle [%d]", b_value);
+ content_error("Fail to media_pvr_get_subtitle");
+ content_debug("subtitle [%d]", b_value);
ret = media_pvr_get_ttx(pvr, &b_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("Fail to media_pvr_get_ttx");
- media_content_debug("ttx [%d]", b_value);
+ content_error("Fail to media_pvr_get_ttx");
+ content_debug("ttx [%d]", b_value);
ret = media_pvr_get_ad(pvr, &b_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("Fail to media_pvr_get_ad");
- media_content_debug("ad [%d]", b_value);
+ content_error("Fail to media_pvr_get_ad");
+ content_debug("ad [%d]", b_value);
ret = media_pvr_get_hard_of_hearing_radio(pvr, &b_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("Fail to media_pvr_get_hard_of_hearing_radio");
- media_content_debug("hard_of_hearing_radio [%d]", b_value);
+ content_error("Fail to media_pvr_get_hard_of_hearing_radio");
+ content_debug("hard_of_hearing_radio [%d]", b_value);
ret = media_pvr_get_data_service(pvr, &b_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("Fail to media_pvr_get_data_service");
- media_content_debug("data_service [%d]", b_value);
+ content_error("Fail to media_pvr_get_data_service");
+ content_debug("data_service [%d]", b_value);
ret = media_pvr_get_content_lock(pvr, &b_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("Fail to media_pvr_get_content_lock");
- media_content_debug("content_lock [%d]", b_value);
+ content_error("Fail to media_pvr_get_content_lock");
+ content_debug("content_lock [%d]", b_value);
ret = media_pvr_get_content_watch(pvr, &b_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("Fail to media_pvr_get_content_watch");
- media_content_debug("content_watch [%d]", b_value);
+ content_error("Fail to media_pvr_get_content_watch");
+ content_debug("content_watch [%d]", b_value);
ret = media_pvr_get_has_audio_only(pvr, &b_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("Fail to media_pvr_get_has_audio_only");
- media_content_debug("has_audio_only [%d]", b_value);
+ content_error("Fail to media_pvr_get_has_audio_only");
+ content_debug("has_audio_only [%d]", b_value);
ret = media_pvr_get_is_local_record(pvr, &b_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("Fail to media_pvr_get_is_local_record");
- media_content_debug("is_local_record [%d]", b_value);
+ content_error("Fail to media_pvr_get_is_local_record");
+ content_debug("is_local_record [%d]", b_value);
ret = media_pvr_get_resolution(pvr, (media_pvr_resolution_e*)&i_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("Fail to media_pvr_get_resolution");
- media_content_debug("resolution [%d]", i_value);
+ content_error("Fail to media_pvr_get_resolution");
+ content_debug("resolution [%d]", i_value);
ret = media_pvr_get_aspectratio(pvr, (media_pvr_aspectratio_e*)&i_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("Fail to media_pvr_get_aspectratio");
- media_content_debug("aspectratio [%d]", i_value);
+ content_error("Fail to media_pvr_get_aspectratio");
+ content_debug("aspectratio [%d]", i_value);
ret = media_pvr_get_highlight(pvr, &b_value);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("Fail to media_pvr_get_highlight");
- media_content_debug("highlight [%d]", b_value);
+ content_error("Fail to media_pvr_get_highlight");
+ content_debug("highlight [%d]", b_value);
return TRUE;
int ret = MEDIA_CONTENT_ERROR_NONE;
int media_count = 0;
- media_content_debug("\n============PVR Test============\n\n");
+ content_debug("\n============PVR Test============\n\n");
test_tv_filter_create();
ret = media_pvr_get_media_count_from_db(g_tv_filter, &media_count);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("media_pvr_get_media_count_from_db failed: %d", ret);
+ content_error("media_pvr_get_media_count_from_db failed: %d", ret);
else
- media_content_debug("media_count : [%d]", media_count);
+ content_debug("media_count : [%d]", media_count);
ret = media_pvr_foreach_media_from_db(g_tv_filter, pvr_item_cb, NULL);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("media_pvr_foreach_media_from_db is failed");
+ content_error("media_pvr_foreach_media_from_db is failed");
test_tv_filter_destroy();
ret = media_pvr_get_pvr_from_db("ff9b5a9a-a7b4-47f4-8255-84e007e25f13", &pvr);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("media_pvr_get_pvr_from_db failed: %d", ret);
+ content_error("media_pvr_get_pvr_from_db failed: %d", ret);
ret = media_pvr_set_content_lock(pvr, TRUE);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("Fail to media_pvr_set_content_lock");
+ content_error("Fail to media_pvr_set_content_lock");
ret = media_pvr_set_content_watch(pvr, TRUE);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("Fail to media_pvr_set_content_watch");
+ content_error("Fail to media_pvr_set_content_watch");
ret = media_pvr_set_program_title(pvr, "TEST TITLE");
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("Fail to media_pvr_set_program_title");
+ content_error("Fail to media_pvr_set_program_title");
ret = media_pvr_set_highlight(pvr, TRUE);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("Fail to media_pvr_set_highlight");
+ content_error("Fail to media_pvr_set_highlight");
ret = media_pvr_update_to_db(pvr);
if (ret != MEDIA_CONTENT_ERROR_NONE)
- media_content_error("Fail to media_pvr_update_to_db");
+ content_error("Fail to media_pvr_update_to_db");
if (pvr != NULL)
media_pvr_destroy(pvr);
{
int ret = MEDIA_CONTENT_ERROR_NONE;
- media_content_debug("--- content manager test start ---\n\n");
+ content_debug("--- content manager test start ---\n\n");
ret = test_connect_database();
if (ret != MEDIA_CONTENT_ERROR_NONE)
if (ret != MEDIA_CONTENT_ERROR_NONE)
return ret;
- media_content_debug("--- content manager test end ---\n");
+ content_debug("--- content manager test end ---\n");
return ret;
}