summaryrefslogtreecommitdiff
path: root/src/lib/emotion/emotion_private.h
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@gmail.com>2013-01-10 03:43:32 +0000
committerGustavo Sverzut Barbieri <barbieri@gmail.com>2013-01-10 03:43:32 +0000
commitdfb84c1657bfb14a5236b881193b81f4c0b8a69b (patch)
treeb51b210fc88a21eec8e5907b8bbfe12ebc669f90 /src/lib/emotion/emotion_private.h
parent532284dbbe4259a9f2291f44d3eff376849e8031 (diff)
efl: merge emotion.
this one was quite a huge work, but hopefully it's correct. NOTES: * removed vlc generic module, it should go into a separate package. * gstreamer is enabled by default (see --disable-gstreamer) * xine is disabled by default (see --enable-gstreamer) * generic is always built statically if supported * gstreamer and xine can't be configured as static (just lacks command line options, build system supports it) * v4l2 is enabled by default on linux if eeze is built (see --disable-v4l2) * emotion_test moved to src/tests/emotion and depends on EFL_ENABLE_TESTS (--with-tests), but is still installed if enabled. TODO (need your help!): * fix warnings with gstreamer and xine engine * call engine shutdown functions if building as static * remove direct usage of PACKAGE_*_DIR and use eina_prefix * add eina_prefix checkme file as evas and others * add support for $EFL_RUN_IN_TREE * create separate package for emotion_generic_modules * check docs hierarchy (doxygen is segv'in here) SVN revision: 82501
Diffstat (limited to 'src/lib/emotion/emotion_private.h')
-rw-r--r--src/lib/emotion/emotion_private.h137
1 files changed, 137 insertions, 0 deletions
diff --git a/src/lib/emotion/emotion_private.h b/src/lib/emotion/emotion_private.h
new file mode 100644
index 0000000000..73a1b7ddf0
--- /dev/null
+++ b/src/lib/emotion/emotion_private.h
@@ -0,0 +1,137 @@
1#ifndef EMOTION_PRIVATE_H
2#define EMOTION_PRIVATE_H
3
4#define META_TRACK_TITLE 1
5#define META_TRACK_ARTIST 2
6#define META_TRACK_GENRE 3
7#define META_TRACK_COMMENT 4
8#define META_TRACK_ALBUM 5
9#define META_TRACK_YEAR 6
10#define META_TRACK_DISCID 7
11#define META_TRACK_COUNT 8
12
13typedef enum _Emotion_Format Emotion_Format;
14typedef struct _Emotion_Video_Module Emotion_Video_Module;
15typedef struct _Emotion_Module_Options Emotion_Module_Options;
16typedef struct _Eina_Emotion_Plugins Eina_Emotion_Plugins;
17
18typedef Eina_Bool (*Emotion_Module_Open)(Evas_Object *, const Emotion_Video_Module **, void **, Emotion_Module_Options *);
19typedef void (*Emotion_Module_Close)(Emotion_Video_Module *module, void *);
20
21enum _Emotion_Format
22{
23 EMOTION_FORMAT_NONE,
24 EMOTION_FORMAT_I420,
25 EMOTION_FORMAT_YV12,
26 EMOTION_FORMAT_YUY2, /* unused for now since evas does not support yuy2 format */
27 EMOTION_FORMAT_BGRA
28};
29
30struct _Emotion_Module_Options
31{
32 const char *player;
33 Eina_Bool no_video : 1;
34 Eina_Bool no_audio : 1;
35};
36
37struct _Eina_Emotion_Plugins
38{
39 Emotion_Module_Open open;
40 Emotion_Module_Close close;
41};
42
43struct _Emotion_Video_Module
44{
45 unsigned char (*init) (Evas_Object *obj, void **video, Emotion_Module_Options *opt);
46 int (*shutdown) (void *video);
47 unsigned char (*file_open) (const char *file, Evas_Object *obj, void *video);
48 void (*file_close) (void *ef);
49 void (*play) (void *ef, double pos);
50 void (*stop) (void *ef);
51 void (*size_get) (void *ef, int *w, int *h);
52 void (*pos_set) (void *ef, double pos);
53 double (*len_get) (void *ef);
54 double (*buffer_size_get) (void *ef);
55 int (*fps_num_get) (void *ef);
56 int (*fps_den_get) (void *ef);
57 double (*fps_get) (void *ef);
58 double (*pos_get) (void *ef);
59 void (*vis_set) (void *ef, Emotion_Vis vis);
60 Emotion_Vis (*vis_get) (void *ef);
61 Eina_Bool (*vis_supported) (void *ef, Emotion_Vis vis);
62 double (*ratio_get) (void *ef);
63 int (*video_handled) (void *ef);
64 int (*audio_handled) (void *ef);
65 int (*seekable) (void *ef);
66 void (*frame_done) (void *ef);
67 Emotion_Format (*format_get) (void *ef);
68 void (*video_data_size_get) (void *ef, int *w, int *h);
69 int (*yuv_rows_get) (void *ef, int w, int h, unsigned char **yrows, unsigned char **urows, unsigned char **vrows);
70 int (*bgra_data_get) (void *ef, unsigned char **bgra_data);
71 void (*event_feed) (void *ef, int event);
72 void (*event_mouse_button_feed) (void *ef, int button, int x, int y);
73 void (*event_mouse_move_feed) (void *ef, int x, int y);
74 int (*video_channel_count) (void *ef);
75 void (*video_channel_set) (void *ef, int channel);
76 int (*video_channel_get) (void *ef);
77 void (*video_subtitle_file_set) (void *ef, const char *filepath);
78 const char * (*video_subtitle_file_get) (void *ef);
79 const char * (*video_channel_name_get) (void *ef, int channel);
80 void (*video_channel_mute_set) (void *ef, int mute);
81 int (*video_channel_mute_get) (void *ef);
82 int (*audio_channel_count) (void *ef);
83 void (*audio_channel_set) (void *ef, int channel);
84 int (*audio_channel_get) (void *ef);
85 const char * (*audio_channel_name_get) (void *ef, int channel);
86 void (*audio_channel_mute_set) (void *ef, int mute);
87 int (*audio_channel_mute_get) (void *ef);
88 void (*audio_channel_volume_set) (void *ef, double vol);
89 double (*audio_channel_volume_get) (void *ef);
90 int (*spu_channel_count) (void *ef);
91 void (*spu_channel_set) (void *ef, int channel);
92 int (*spu_channel_get) (void *ef);
93 const char * (*spu_channel_name_get) (void *ef, int channel);
94 void (*spu_channel_mute_set) (void *ef, int mute);
95 int (*spu_channel_mute_get) (void *ef);
96 int (*chapter_count) (void *ef);
97 void (*chapter_set) (void *ef, int chapter);
98 int (*chapter_get) (void *ef);
99 const char * (*chapter_name_get) (void *ef, int chapter);
100 void (*speed_set) (void *ef, double speed);
101 double (*speed_get) (void *ef);
102 int (*eject) (void *ef);
103 const char * (*meta_get) (void *ef, int meta);
104 void (*priority_set) (void *ef, Eina_Bool priority);
105 Eina_Bool (*priority_get) (void *ef);
106
107 Eina_Emotion_Plugins *plugin;
108};
109
110EAPI void *_emotion_video_get(const Evas_Object *obj);
111EAPI void _emotion_frame_new(Evas_Object *obj);
112EAPI void _emotion_video_pos_update(Evas_Object *obj, double pos, double len);
113EAPI void _emotion_frame_resize(Evas_Object *obj, int w, int h, double ratio);
114EAPI void _emotion_frame_refill(Evas_Object *obj, double w, double h);
115EAPI void _emotion_decode_stop(Evas_Object *obj);
116EAPI void _emotion_open_done(Evas_Object *obj);
117EAPI void _emotion_playback_started(Evas_Object *obj);
118EAPI void _emotion_playback_finished(Evas_Object *obj);
119EAPI void _emotion_audio_level_change(Evas_Object *obj);
120EAPI void _emotion_channels_change(Evas_Object *obj);
121EAPI void _emotion_title_set(Evas_Object *obj, char *title);
122EAPI void _emotion_progress_set(Evas_Object *obj, char *info, double stat);
123EAPI void _emotion_file_ref_set(Evas_Object *obj, const char *file, int num);
124EAPI void _emotion_spu_button_num_set(Evas_Object *obj, int num);
125EAPI void _emotion_spu_button_set(Evas_Object *obj, int button);
126EAPI void _emotion_seek_done(Evas_Object *obj);
127EAPI void _emotion_image_reset(Evas_Object *obj);
128
129EAPI Eina_Bool _emotion_module_register(const char *name, Emotion_Module_Open open, Emotion_Module_Close close);
130EAPI Eina_Bool _emotion_module_unregister(const char *name);
131
132EAPI const char *emotion_webcam_custom_get(const char *device);
133
134EAPI void _emotion_pending_object_ref(void);
135EAPI void _emotion_pending_object_unref(void);
136
137#endif