summaryrefslogtreecommitdiff
path: root/legacy/emotion/src/lib
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@gmail.com>2008-09-25 23:15:21 +0000
committerGustavo Sverzut Barbieri <barbieri@gmail.com>2008-09-25 23:15:21 +0000
commitd29b7694cb99cfcbf9598976733824bea02fa0b8 (patch)
tree624fb2973b2ea9516417d09f8dd53ad5f36fb48e /legacy/emotion/src/lib
parent42d39725b43c3739744114d361e826c7bf014aff (diff)
emotion+visualization: export and reorder.
done: * module api changed, vis_set is not close to vis_get, vis_supported was added. * exported these properties in emotion_object. * gstreamer plugin now starts with no visualization. todo: * add xine support. * make gstreamer able to dynamically change visualization. PS: gstreamer module really needs a cleanup, losts of functions need "static" or add proper prefix, including "gst" to avoid it clash with other symbols. SVN revision: 36260
Diffstat (limited to '')
-rw-r--r--legacy/emotion/src/lib/Emotion.h29
-rw-r--r--legacy/emotion/src/lib/emotion_private.h27
-rw-r--r--legacy/emotion/src/lib/emotion_smart.c33
3 files changed, 65 insertions, 24 deletions
diff --git a/legacy/emotion/src/lib/Emotion.h b/legacy/emotion/src/lib/Emotion.h
index e55757f0c3..04bd444f3f 100644
--- a/legacy/emotion/src/lib/Emotion.h
+++ b/legacy/emotion/src/lib/Emotion.h
@@ -74,9 +74,34 @@ enum _Emotion_Meta_Info
74 EMOTION_META_INFO_TRACK_COUNT 74 EMOTION_META_INFO_TRACK_COUNT
75}; 75};
76 76
77enum _Emotion_Vis
78{
79 EMOTION_VIS_NONE,
80 EMOTION_VIS_GOOM,
81 EMOTION_VIS_LIBVISUAL_BUMPSCOPE,
82 EMOTION_VIS_LIBVISUAL_CORONA,
83 EMOTION_VIS_LIBVISUAL_DANCING_PARTICLES,
84 EMOTION_VIS_LIBVISUAL_GDKPIXBUF,
85 EMOTION_VIS_LIBVISUAL_G_FORCE,
86 EMOTION_VIS_LIBVISUAL_GOOM,
87 EMOTION_VIS_LIBVISUAL_INFINITE,
88 EMOTION_VIS_LIBVISUAL_JAKDAW,
89 EMOTION_VIS_LIBVISUAL_JESS,
90 EMOTION_VIS_LIBVISUAL_LV_ANALYSER,
91 EMOTION_VIS_LIBVISUAL_LV_FLOWER,
92 EMOTION_VIS_LIBVISUAL_LV_GLTEST,
93 EMOTION_VIS_LIBVISUAL_LV_SCOPE,
94 EMOTION_VIS_LIBVISUAL_MADSPIN,
95 EMOTION_VIS_LIBVISUAL_NEBULUS,
96 EMOTION_VIS_LIBVISUAL_OINKSIE,
97 EMOTION_VIS_LIBVISUAL_PLASMA,
98 EMOTION_VIS_LAST /* sentinel */
99};
100
77typedef enum _Emotion_Module Emotion_Module; 101typedef enum _Emotion_Module Emotion_Module;
78typedef enum _Emotion_Event Emotion_Event; 102typedef enum _Emotion_Event Emotion_Event;
79typedef enum _Emotion_Meta_Info Emotion_Meta_Info; 103typedef enum _Emotion_Meta_Info Emotion_Meta_Info;
104typedef enum _Emotion_Vis Emotion_Vis;
80 105
81#define EMOTION_CHANNEL_AUTO -1 106#define EMOTION_CHANNEL_AUTO -1
82#define EMOTION_CHANNEL_DEFAULT 0 107#define EMOTION_CHANNEL_DEFAULT 0
@@ -140,6 +165,10 @@ EAPI int emotion_object_spu_button_count_get (Evas_Object *obj);
140EAPI int emotion_object_spu_button_get (Evas_Object *obj); 165EAPI int emotion_object_spu_button_get (Evas_Object *obj);
141EAPI const char *emotion_object_meta_info_get (Evas_Object *obj, Emotion_Meta_Info meta); 166EAPI const char *emotion_object_meta_info_get (Evas_Object *obj, Emotion_Meta_Info meta);
142 167
168EAPI void emotion_object_vis_set (Evas_Object *obj, Emotion_Vis visualization);
169EAPI Emotion_Vis emotion_object_vis_get (Evas_Object *obj);
170EAPI Evas_Bool emotion_object_vis_supported (Evas_Object *obj, Emotion_Vis visualization);
171
143#ifdef __cplusplus 172#ifdef __cplusplus
144} 173}
145#endif 174#endif
diff --git a/legacy/emotion/src/lib/emotion_private.h b/legacy/emotion/src/lib/emotion_private.h
index 4d9256183b..ede8c865c3 100644
--- a/legacy/emotion/src/lib/emotion_private.h
+++ b/legacy/emotion/src/lib/emotion_private.h
@@ -6,6 +6,7 @@
6#include <Ecore_Job.h> 6#include <Ecore_Job.h>
7#include <Ecore_Data.h> 7#include <Ecore_Data.h>
8#include <Ecore_Str.h> 8#include <Ecore_Str.h>
9#include <Emotion.h>
9 10
10#include <stdlib.h> 11#include <stdlib.h>
11#include <stdio.h> 12#include <stdio.h>
@@ -23,7 +24,6 @@
23#define META_TRACK_COUNT 8 24#define META_TRACK_COUNT 8
24 25
25typedef enum _Emotion_Format Emotion_Format; 26typedef enum _Emotion_Format Emotion_Format;
26typedef enum _Emotion_Vis Emotion_Vis;
27typedef struct _Emotion_Video_Module Emotion_Video_Module; 27typedef struct _Emotion_Video_Module Emotion_Video_Module;
28typedef struct _Emotion_Module_Options Emotion_Module_Options; 28typedef struct _Emotion_Module_Options Emotion_Module_Options;
29 29
@@ -36,28 +36,6 @@ enum _Emotion_Format
36 EMOTION_FORMAT_BGRA 36 EMOTION_FORMAT_BGRA
37}; 37};
38 38
39enum _Emotion_Vis
40{
41 EMOTION_VIS_GOOM,
42 EMOTION_VIS_LIBVISUAL_BUMPSCOPE,
43 EMOTION_VIS_LIBVISUAL_CORONA,
44 EMOTION_VIS_LIBVISUAL_DANCING_PARTICLES,
45 EMOTION_VIS_LIBVISUAL_GDKPIXBUF,
46 EMOTION_VIS_LIBVISUAL_G_FORCE,
47 EMOTION_VIS_LIBVISUAL_GOOM,
48 EMOTION_VIS_LIBVISUAL_INFINITE,
49 EMOTION_VIS_LIBVISUAL_JAKDAW,
50 EMOTION_VIS_LIBVISUAL_JESS,
51 EMOTION_VIS_LIBVISUAL_LV_ANALYSER,
52 EMOTION_VIS_LIBVISUAL_LV_FLOWER,
53 EMOTION_VIS_LIBVISUAL_LV_GLTEST,
54 EMOTION_VIS_LIBVISUAL_LV_SCOPE,
55 EMOTION_VIS_LIBVISUAL_MADSPIN,
56 EMOTION_VIS_LIBVISUAL_NEBULUS,
57 EMOTION_VIS_LIBVISUAL_OINKSIE,
58 EMOTION_VIS_LIBVISUAL_PLASMA
59};
60
61struct _Emotion_Module_Options 39struct _Emotion_Module_Options
62{ 40{
63 unsigned char no_video : 1; 41 unsigned char no_video : 1;
@@ -74,13 +52,14 @@ struct _Emotion_Video_Module
74 void (*stop) (void *ef); 52 void (*stop) (void *ef);
75 void (*size_get) (void *ef, int *w, int *h); 53 void (*size_get) (void *ef, int *w, int *h);
76 void (*pos_set) (void *ef, double pos); 54 void (*pos_set) (void *ef, double pos);
77 void (*vis_set) (void *ef, Emotion_Vis vis);
78 double (*len_get) (void *ef); 55 double (*len_get) (void *ef);
79 int (*fps_num_get) (void *ef); 56 int (*fps_num_get) (void *ef);
80 int (*fps_den_get) (void *ef); 57 int (*fps_den_get) (void *ef);
81 double (*fps_get) (void *ef); 58 double (*fps_get) (void *ef);
82 double (*pos_get) (void *ef); 59 double (*pos_get) (void *ef);
60 void (*vis_set) (void *ef, Emotion_Vis vis);
83 Emotion_Vis (*vis_get) (void *ef); 61 Emotion_Vis (*vis_get) (void *ef);
62 Evas_Bool (*vis_supported) (void *ef, Emotion_Vis vis);
84 double (*ratio_get) (void *ef); 63 double (*ratio_get) (void *ef);
85 int (*video_handled) (void *ef); 64 int (*video_handled) (void *ef);
86 int (*audio_handled) (void *ef); 65 int (*audio_handled) (void *ef);
diff --git a/legacy/emotion/src/lib/emotion_smart.c b/legacy/emotion/src/lib/emotion_smart.c
index 848bc2ea29..f77ce76fb5 100644
--- a/legacy/emotion/src/lib/emotion_smart.c
+++ b/legacy/emotion/src/lib/emotion_smart.c
@@ -815,8 +815,41 @@ emotion_object_meta_info_get(Evas_Object *obj, Emotion_Meta_Info meta)
815 return NULL; 815 return NULL;
816} 816}
817 817
818EAPI void
819emotion_object_vis_set(Evas_Object *obj, Emotion_Vis visualization)
820{
821 Smart_Data *sd;
822
823 E_SMART_OBJ_GET(sd, obj, E_OBJ_NAME);
824 if (!sd->module) return;
825 if (!sd->video) return;
826 if (!sd->module->vis_set) return;
827 sd->module->vis_set(sd->video, visualization);
828}
829
830EAPI Emotion_Vis
831emotion_object_vis_get(Evas_Object *obj)
832{
833 Smart_Data *sd;
834
835 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, EMOTION_VIS_NONE);
836 if (!sd->module) return EMOTION_VIS_NONE;
837 if (!sd->video) return EMOTION_VIS_NONE;
838 if (!sd->module->vis_get) return EMOTION_VIS_NONE;
839 return sd->module->vis_get(sd->video);
840}
818 841
842EAPI Evas_Bool
843emotion_object_vis_supported(Evas_Object *obj, Emotion_Vis visualization)
844{
845 Smart_Data *sd;
819 846
847 E_SMART_OBJ_GET_RETURN(sd, obj, E_OBJ_NAME, 0);
848 if (!sd->module) return 0;
849 if (!sd->video) return 0;
850 if (!sd->module->vis_supported) return 0;
851 return sd->module->vis_supported(sd->video, visualization);
852}
820 853
821 854
822 855