Name: media-server
Summary: A server for media content management
-Version: 0.5.5
+Version: 0.5.6
Release: 0
Group: Multimedia/Service
License: Apache-2.0
int ms_genarate_uuid(char **uuid);
int ms_scan_item_batch(sqlite3 *handle, const char *storage_id, const char *path, uid_t uid);
int ms_get_extract_list(sqlite3 *handle, const char *storage_id, int scan_type, const char* path, int is_end, void *array);
-int ms_update_one_extract_item(sqlite3 *handle, const char *storage_id, void *data);
+int ms_update_one_extract_item(sqlite3 *handle, const char *storage_id, void *data, uid_t uid);
int ms_delete_invalid_items_in_folder(sqlite3 *handle, const char *storage_id, const char *path, bool is_recursive, uid_t uid);
int ms_delete_invalid_folder_by_path(sqlite3 *handle, const char *storage_id, const char *folder_path, uid_t uid);
int ms_get_folder_scan_status(sqlite3 *handle, const char *storage_id, const char *path, int *scan_status);
typedef int (*SET_STORAGE_SCAN_STATUS)(sqlite3 *, const char *, int, uid_t);
typedef int (*INSERT_ITEM_SCAN)(sqlite3 *, const char *, const char *, uid_t);
typedef int (*GET_EXTRACT_LIST)(sqlite3 *, const char*, int, const char *, int, void*);
-typedef int (*UPDATE_ONE_EXTRACT_ITEM)(sqlite3 *, const char *, void *);
+typedef int (*UPDATE_ONE_EXTRACT_ITEM)(sqlite3 *, const char *, void *, uid_t);
typedef int (*DELETE_ALL_INVALID_ITEMS_IN_FOLDER)(sqlite3 *, const char *, const char *, bool, uid_t);
typedef int (*DELETE_INVALID_FOLDER_BY_PATH)(sqlite3 *, const char *, const char *, uid_t);
typedef int (*GET_FOLDER_SCAN_STATUS)(sqlite3 *, const char *, const char *, int *);
return ret;
}
-int ms_update_one_extract_item(sqlite3 *handle, const char* storage_id, void *data)
+int ms_update_one_extract_item(sqlite3 *handle, const char* storage_id, void *data, uid_t uid)
{
int ret = MS_MEDIA_ERR_NONE;
- ret = ((UPDATE_ONE_EXTRACT_ITEM)func_array[eUPDATE_ONE_EXTRACT_ITEM])(handle, storage_id, data);
+ ret = ((UPDATE_ONE_EXTRACT_ITEM)func_array[eUPDATE_ONE_EXTRACT_ITEM])(handle, storage_id, data, uid);
MS_DBG_RETVM_IF(ret != MS_MEDIA_ERR_NONE, ret, "UPDATE_ONE_EXTRACT_ITEM failed [%d]", ret);
return ret;
g_cond_clear(&extract_data_cond);
}
-static int __msc_folder_bulk_extract(sqlite3 *handle, const char *storage_id, const char *path, int scan_type, int pid, bool is_end)
+static int __msc_folder_bulk_extract(sqlite3 *handle, const char *storage_id, const char *path, int scan_type, int pid, bool is_end, uid_t uid)
{
MS_DBG_WARN("begin of __msc_folder_bulk_extract");
int ret = MS_MEDIA_ERR_NONE;
g_array_remove_index(data_array, 0);
g_mutex_lock(&decode_mutex);
- ms_update_one_extract_item(handle, storage_id, db_data);
+ ms_update_one_extract_item(handle, storage_id, db_data, uid);
g_mutex_unlock(&decode_mutex);
if (db_data) {
goto NEXT;
}
- ret = __msc_folder_bulk_extract(handle, extract_data->storage_id, extract_data->msg, extract_data->msg_type, extract_data->pid, end_flag);
+ ret = __msc_folder_bulk_extract(handle, extract_data->storage_id, extract_data->msg, extract_data->msg_type, extract_data->pid, end_flag, extract_data->uid);
NEXT:
g_directory_extract_processing = false;
}
/*extract meta*/
- ret = __msc_folder_bulk_extract(handle, extract_data->storage_id, extract_data->msg, extract_data->msg_type, extract_data->pid, end_flag);
+ ret = __msc_folder_bulk_extract(handle, extract_data->storage_id, extract_data->msg, extract_data->msg_type, extract_data->pid, end_flag, extract_data->uid);
MS_DBG_WARN("extract PAUSE");
__msc_pause_extract();
MS_DBG_WARN("extract RESUME");