rage - display metadata on title change event

printf the metdata so we have some debug
v-0.4.0
Carsten Haitzler 7 years ago
parent 18b174d822
commit 1ea14a8477
  1. 6
      src/bin/key.c
  2. 24
      src/bin/video.c
  3. 3
      src/bin/video.h
  4. 15
      src/bin/winvid.c

@ -98,12 +98,6 @@ key_handle(Evas_Object *win, Evas_Event_Key_Down *ev)
(!strcmp(ev->keyname, "p")) ||
(!strcmp(ev->key, "XF86AudioPlay")))
{
printf("ch: %i/%i [%s]\n", video_chapter_get(inf->vid), video_chapter_count(inf->vid), video_chapter_name_get(inf->vid, video_chapter_get(inf->vid)));
printf("ti: %s\n", video_title_get(inf->vid));
printf("au: %i/%i [%s]\n", video_audio_channel_get(inf->vid), video_audio_channel_count(inf->vid), video_audio_channel_name_get(inf->vid, video_audio_channel_get(inf->vid)));
printf("vi: %i/%i [%s]\n", video_video_channel_get(inf->vid), video_video_channel_count(inf->vid), video_video_channel_name_get(inf->vid, video_video_channel_get(inf->vid)));
printf("sp: %i/%i [%s]\n", video_spu_channel_get(inf->vid), video_spu_channel_count(inf->vid), video_spu_channel_name_get(inf->vid, video_spu_channel_get(inf->vid)));
win_do_play_pause(win);
}
else if ((!strcmp(ev->keyname, "s")) ||

@ -979,6 +979,30 @@ video_meta_album_get(Evas_Object *obj)
return emotion_object_meta_info_get(sd->o_vid, EMOTION_META_INFO_TRACK_ALBUM);
}
const char *
video_meta_year_get(Evas_Object *obj)
{
Video *sd = evas_object_smart_data_get(obj);
if (!sd) return NULL;
return emotion_object_meta_info_get(sd->o_vid, EMOTION_META_INFO_TRACK_YEAR);
}
const char *
video_meta_genre_get(Evas_Object *obj)
{
Video *sd = evas_object_smart_data_get(obj);
if (!sd) return NULL;
return emotion_object_meta_info_get(sd->o_vid, EMOTION_META_INFO_TRACK_GENRE);
}
const char *
video_meta_comment_get(Evas_Object *obj)
{
Video *sd = evas_object_smart_data_get(obj);
if (!sd) return NULL;
return emotion_object_meta_info_get(sd->o_vid, EMOTION_META_INFO_TRACK_COMMENT);
}
void
video_file_autosub_set(Evas_Object *obj, const char *file, const char *sub)
{

@ -52,6 +52,9 @@ Eina_Bool video_lowquality_get(Evas_Object *obj);
const char *video_meta_title_get(Evas_Object *obj);
const char *video_meta_artist_get(Evas_Object *obj);
const char *video_meta_album_get(Evas_Object *obj);
const char *video_meta_year_get(Evas_Object *obj);
const char *video_meta_genre_get(Evas_Object *obj);
const char *video_meta_comment_get(Evas_Object *obj);
void video_file_autosub_set(Evas_Object *obj, const char *file, const char *sub);
#endif

@ -64,8 +64,21 @@ _cb_length(void *data, Evas_Object *obj EINA_UNUSED, void *event EINA_UNUSED)
}
static void
_cb_title(void *data, Evas_Object *obj EINA_UNUSED, void *event EINA_UNUSED)
_cb_title(void *data, Evas_Object *obj, void *event EINA_UNUSED)
{
printf("title change........\n");
printf(" meta title: %s\n", video_meta_title_get(obj));
printf(" meta album: %s\n", video_meta_album_get(obj));
printf(" meta artist: %s\n", video_meta_artist_get(obj));
printf(" meta year: %s\n", video_meta_year_get(obj));
printf(" meta genre: %s\n", video_meta_genre_get(obj));
printf(" meta comment: %s\n", video_meta_comment_get(obj));
printf(" chapt: %i/%i [%s]\n", video_chapter_get(obj), video_chapter_count(obj), video_chapter_name_get(obj, video_chapter_get(obj)));
printf(" title: %s\n", video_title_get(obj));
printf(" audio: %i/%i [%s]\n", video_audio_channel_get(obj), video_audio_channel_count(obj), video_audio_channel_name_get(obj, video_audio_channel_get(obj)));
printf(" video: %i/%i [%s]\n", video_video_channel_get(obj), video_video_channel_count(obj), video_video_channel_name_get(obj, video_video_channel_get(obj)));
printf(" spu : %i/%i [%s]\n", video_spu_channel_get(obj), video_spu_channel_count(obj), video_spu_channel_name_get(obj, video_spu_channel_get(obj)));
win_title_update(data);
}

Loading…
Cancel
Save