int media_svc_append_query(const char *query, uid_t uid);
int media_svc_send_query(uid_t uid);
+int media_svc_get_media_type(const char *path, int *mediatype);
+
#ifdef __cplusplus
}
#endif
int get_media_type(void *handle, const char *path, int *mediatype, char **err_msg)
{
-#if 0
int ret = MEDIA_SVC_PLUGIN_ERROR_NONE;
if (handle == NULL) {
__set_error_message(ret, err_msg);
return MEDIA_SVC_PLUGIN_ERROR;
}
-#endif
+
return MEDIA_SVC_PLUGIN_ERROR_NONE;
}
media_svc_error("STANDARD ERROR [%s]", strerror_r(errno, buf, BUF_LENGHT));
}
+
+int _media_svc_get_media_type(const char *path, int *mediatype)
+{
+ int ret = MS_MEDIA_ERR_NONE;
+ char mime_type[256] = {0};
+ media_svc_media_type_e media_type = MEDIA_SVC_MEDIA_TYPE_OTHER;
+
+ ret = __media_svc_get_mime_type(path, mime_type);
+ if (ret == MS_MEDIA_ERR_NONE) {
+ __media_svc_get_media_type(path, mime_type, &media_type);
+ } else {
+ media_svc_error("__media_svc_get_mime_type failed");
+ }
+
+ *mediatype = media_type;
+
+ return ret;
+}
+
return ret;
}
+int media_svc_get_media_type(const char *path, int *mediatype)
+{
+ media_svc_retvm_if(path == NULL, MS_MEDIA_ERR_INVALID_PARAMETER, "path is NULL");
+
+ return _media_svc_get_media_type(path, mediatype);
+}
+
+
int _media_svc_extract_music_metadata_for_update(sqlite3 *handle, media_svc_content_info_s *content_info, media_svc_media_type_e media_type);
char *_media_svc_get_title_from_path(const char *path);
void _media_svc_print_stderror(void);
+int _media_svc_get_media_type(const char *path, int *mediatype);
#ifdef __cplusplus
}