return true;
}
+static int __bulk_test(int argc, char **argv)
+{
+ GDir *dir = NULL;
+ GError *error = NULL;
+ char *path = NULL;
+ const char *name;
+
+ dir = g_dir_open(argv[1], 0, &error);
+ if (error != NULL) {
+ printf("Failed to open directory[%s]\n", argv[1]);
+ printf("ex) mm_file_test /opt/usr/home/owner/media/Music/ >> result.txt \n");
+ g_error_free(error);
+ return 0;
+ }
+
+ while ((name = g_dir_read_name(dir))) {
+ if (name[0] == '.')
+ continue;
+
+ path = g_build_path(G_DIR_SEPARATOR_S, argv[1], name, NULL);
+
+ if (argv[2] == NULL)
+ mmfile_get_file_infomation((void *)path, NULL, true);
+ else
+ mmfile_get_video_frame((void *)path, argv[2], true);
+
+ g_free(path);
+ }
+
+ g_dir_close(dir);
+
+ return 0;
+}
int main(int argc, char **argv)
{
struct stat statbuf;
bool file_test = true; /*if you want to test mm_file_create_content_XXX_from_memory() set file_test to false */
+ if (g_file_test(argv[1], G_FILE_TEST_IS_DIR))
+ return __bulk_test(argc, argv);
+
if (__is_file_exist(argv[1])) {
int ret = lstat(argv[1], &statbuf);
if (ret < 0) {
printf("# video fps: %d\n", ccontent.video_fps);
printf("# video track id: %d\n", ccontent.video_track_id);
printf("# video width/height: %d x %d\n", ccontent.video_w, ccontent.video_h);
- printf("# video thumbnail: %p\n", ccontent.thumbnail.value.p_val);
+ //printf("# video thumbnail: %p\n", ccontent.thumbnail.value.p_val);
+ printf("# video thumbnail size: %d\n", ccontent.thumbnail.len);
}
}
printf("# part of a set: [%s]\n", ctag.part_of_set.value.s_val);
printf("# description: [%s]\n", ctag.description.value.s_val);
printf("# comment: [%s]\n", ctag.comment.value.s_val);
- printf("# artwork: [%p]\n", ctag.artwork.value.p_val);
+ //printf("# artwork: [%p]\n", ctag.artwork.value.p_val);
printf("# artwork_size: [%d]\n", ctag.artwork_size.value.i_val);
printf("# artwork_mime: [%s]\n", ctag.artwork_mime.value.s_val);
printf("# track number: [%s]\n", ctag.track_num.value.s_val);