raster pushed a commit to branch master.

http://git.enlightenment.org/apps/rage.git/commit/?id=1ea14a8477f6331a0da8859ea46754c082d0b87b

commit 1ea14a8477f6331a0da8859ea46754c082d0b87b
Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
Date:   Mon Dec 21 14:50:50 2015 +0900

    rage - display metadata on title change event
    
    printf the metdata so we have some debug
---
 src/bin/key.c    |  6 ------
 src/bin/video.c  | 24 ++++++++++++++++++++++++
 src/bin/video.h  |  3 +++
 src/bin/winvid.c | 15 ++++++++++++++-
 4 files changed, 41 insertions(+), 7 deletions(-)

diff --git a/src/bin/key.c b/src/bin/key.c
index aa9e968..268dcce 100644
--- a/src/bin/key.c
+++ b/src/bin/key.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")) ||
diff --git a/src/bin/video.c b/src/bin/video.c
index d8ff3ac..6bda771 100644
--- a/src/bin/video.c
+++ b/src/bin/video.c
@@ -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)
 {
diff --git a/src/bin/video.h b/src/bin/video.h
index ab1961e..1da8212 100644
--- a/src/bin/video.h
+++ b/src/bin/video.h
@@ -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
diff --git a/src/bin/winvid.c b/src/bin/winvid.c
index 2bec061..55348e0 100644
--- a/src/bin/winvid.c
+++ b/src/bin/winvid.c
@@ -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);
 }
 

-- 


Reply via email to