Enlightenment CVS committal Author : raster Project : e17 Module : libs/emotion
Dir : e17/libs/emotion/src/lib Modified Files: Emotion.h emotion_private.h emotion_smart.c Log Message: support fetching of meta-data =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/emotion/src/lib/Emotion.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -3 -r1.3 -r1.4 --- Emotion.h 24 Jun 2004 10:55:43 -0000 1.3 +++ Emotion.h 24 Jul 2004 09:53:00 -0000 1.4 @@ -36,7 +36,19 @@ EMOTION_EVENT_10 }; -typedef enum _Emotion_Event Emotion_Event; +enum _Emotion_Meta_Info +{ + EMOTION_META_INFO_TRACK_TITLE, + EMOTION_META_INFO_TRACK_ARTIST, + EMOTION_META_INFO_TRACK_ALBUM, + EMOTION_META_INFO_TRACK_YEAR, + EMOTION_META_INFO_TRACK_GENRE, + EMOTION_META_INFO_TRACK_COMMENT, + EMOTION_META_INFO_TRACK_DISC_ID +}; + +typedef enum _Emotion_Event Emotion_Event; +typedef enum _Emotion_Meta_Info Emotion_Meta_Info; #define EMOTION_CHANNEL_AUTO -1 #define EMOTION_CHANNEL_DEFAULT 0 @@ -90,5 +102,6 @@ int emotion_object_ref_num_get (Evas_Object *obj); int emotion_object_spu_button_count_get (Evas_Object *obj); int emotion_object_spu_button_get (Evas_Object *obj); - +const char *emotion_object_meta_info_get (Evas_Object *obj, Emotion_Meta_Info meta); + #endif =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/emotion/src/lib/emotion_private.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -3 -r1.2 -r1.3 --- emotion_private.h 24 Jun 2004 10:55:43 -0000 1.2 +++ emotion_private.h 24 Jul 2004 09:53:00 -0000 1.3 @@ -7,6 +7,14 @@ #include "config.h" +#define META_TRACK_TITLE 1 +#define META_TRACK_ARTIST 2 +#define META_TRACK_GENRE 3 +#define META_TRACK_COMMENT 4 +#define META_TRACK_ALBUM 5 +#define META_TRACK_YEAR 6 +#define META_TRACK_DISCID 7 + typedef struct _Emotion_Video_Module Emotion_Video_Module; struct _Emotion_Video_Module @@ -57,6 +65,7 @@ void (*speed_set) (void *ef, double speed); double (*speed_get) (void *ef); int (*eject) (void *ef); + const char * (*meta_get) (void *ef, int meta); void *handle; }; =================================================================== RCS file: /cvsroot/enlightenment/e17/libs/emotion/src/lib/emotion_smart.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -3 -r1.7 -r1.8 --- emotion_smart.c 23 Jul 2004 03:15:30 -0000 1.7 +++ emotion_smart.c 24 Jul 2004 09:53:00 -0000 1.8 @@ -694,6 +694,43 @@ return sd->spu.button; } +const char * +emotion_object_meta_info_get(Evas_Object *obj, Emotion_Meta_Info meta) +{ + Smart_Data *sd; + + E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, NULL); + if (!sd->module) return NULL; + if (!sd->video) return NULL; + switch (meta) + { + case EMOTION_META_INFO_TRACK_TITLE: + return sd->module->meta_get(sd->video, META_TRACK_TITLE); + break; + case EMOTION_META_INFO_TRACK_ARTIST: + return sd->module->meta_get(sd->video, META_TRACK_ARTIST); + break; + case EMOTION_META_INFO_TRACK_ALBUM: + return sd->module->meta_get(sd->video, META_TRACK_ALBUM); + break; + case EMOTION_META_INFO_TRACK_YEAR: + return sd->module->meta_get(sd->video, META_TRACK_YEAR); + break; + case EMOTION_META_INFO_TRACK_GENRE: + return sd->module->meta_get(sd->video, META_TRACK_GENRE); + break; + case EMOTION_META_INFO_TRACK_COMMENT: + return sd->module->meta_get(sd->video, META_TRACK_COMMENT); + break; + case EMOTION_META_INFO_TRACK_DISC_ID: + return sd->module->meta_get(sd->video, META_TRACK_DISCID); + break; + default: + break; + } + return NULL; +} + ------------------------------------------------------- This SF.Net email is sponsored by BEA Weblogic Workshop FREE Java Enterprise J2EE developer tools! Get your free copy of BEA WebLogic Workshop 8.1 today. http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click _______________________________________________ enlightenment-cvs mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs