summaryrefslogtreecommitdiff
path: root/src/lib/emotion/emotion_modules.h
diff options
context:
space:
mode:
authorCedric Bail <cedric.bail@samsung.com>2013-05-09 13:54:57 +0200
committerCedric Bail <cedric.bail@samsung.com>2013-05-10 10:48:33 +0900
commitd92783d5f7ed43b5070a28e0862ca55dbf67d97c (patch)
treef6de47d1c53c6321a4d5849c23e601668948cd6a /src/lib/emotion/emotion_modules.h
parentf6bd3f695f58df033a134cc19b71b7abeb5f6a92 (diff)
emotion: rename Emotion_Module.h to emotion_modules.h
Diffstat (limited to 'src/lib/emotion/emotion_modules.h')
-rw-r--r--src/lib/emotion/emotion_modules.h135
1 files changed, 135 insertions, 0 deletions
diff --git a/src/lib/emotion/emotion_modules.h b/src/lib/emotion/emotion_modules.h
new file mode 100644
index 0000000000..0ece2c1d9c
--- /dev/null
+++ b/src/lib/emotion/emotion_modules.h
@@ -0,0 +1,135 @@
1#ifndef _EMOTION_MODULE_H_
2#define _EMOTION_MODULE_H_ 1
3
4#include "Emotion.h"
5
6#define META_TRACK_TITLE 1
7#define META_TRACK_ARTIST 2
8#define META_TRACK_GENRE 3
9#define META_TRACK_COMMENT 4
10#define META_TRACK_ALBUM 5
11#define META_TRACK_YEAR 6
12#define META_TRACK_DISCID 7
13#define META_TRACK_COUNT 8
14
15typedef enum _Emotion_Format Emotion_Format;
16typedef struct _Emotion_Engine Emotion_Engine;
17typedef struct _Emotion_Module_Options Emotion_Module_Options;
18typedef struct _Eina_Emotion_Plugins Eina_Emotion_Plugins;
19
20enum _Emotion_Format
21{
22 EMOTION_FORMAT_NONE,
23 EMOTION_FORMAT_I420,
24 EMOTION_FORMAT_YV12,
25 EMOTION_FORMAT_YUY2, /* unused for now since evas does not support yuy2 format */
26 EMOTION_FORMAT_BGRA
27};
28
29struct _Emotion_Module_Options
30{
31 Eina_Bool no_video : 1;
32 Eina_Bool no_audio : 1;
33};
34
35struct _Emotion_Engine
36{
37#define EMOTION_ENGINE_API_VERSION (1U)
38 unsigned version;
39
40#define EMOTION_ENGINE_PRIORITY_DEFAULT (50)
41 int priority; /* default priority, may be overwritten by user. Try to keep from 0-100. */
42
43 const char *name;
44 void *(*add)(const Emotion_Engine *api, Evas_Object *obj, const Emotion_Module_Options *opts);
45 void (*del)(void *ef);
46
47 Eina_Bool (*file_open) (void *ef, const char *file);
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
108EAPI void *_emotion_video_get(const Evas_Object *obj);
109EAPI void _emotion_frame_new(Evas_Object *obj);
110EAPI void _emotion_video_pos_update(Evas_Object *obj, double pos, double len);
111EAPI void _emotion_frame_resize(Evas_Object *obj, int w, int h, double ratio);
112EAPI void _emotion_frame_refill(Evas_Object *obj, double w, double h);
113EAPI void _emotion_decode_stop(Evas_Object *obj);
114EAPI void _emotion_open_done(Evas_Object *obj);
115EAPI void _emotion_playback_started(Evas_Object *obj);
116EAPI void _emotion_playback_finished(Evas_Object *obj);
117EAPI void _emotion_audio_level_change(Evas_Object *obj);
118EAPI void _emotion_channels_change(Evas_Object *obj);
119EAPI void _emotion_title_set(Evas_Object *obj, char *title);
120EAPI void _emotion_progress_set(Evas_Object *obj, char *info, double stat);
121EAPI void _emotion_file_ref_set(Evas_Object *obj, const char *file, int num);
122EAPI void _emotion_spu_button_num_set(Evas_Object *obj, int num);
123EAPI void _emotion_spu_button_set(Evas_Object *obj, int button);
124EAPI void _emotion_seek_done(Evas_Object *obj);
125EAPI void _emotion_image_reset(Evas_Object *obj);
126
127EAPI void _emotion_pending_object_ref(void);
128EAPI void _emotion_pending_object_unref(void);
129
130EAPI const char *emotion_webcam_custom_get(const char *device);
131
132EAPI Eina_Bool _emotion_module_register(const Emotion_Engine *api);
133EAPI Eina_Bool _emotion_module_unregister(const Emotion_Engine *api);
134
135#endif