Imported Upstream version 1.7.1
[platform/upstream/emotion.git] / src / modules / generic / emotion_generic.h
1 #ifndef EMOTION_GENERIC_H
2 #define EMOTION_GENERIC_H
3
4 #include "Emotion_Generic_Plugin.h"
5
6 /* default values */
7
8 typedef struct _Emotion_Generic_Video       Emotion_Generic_Video;
9 typedef struct _Emotion_Generic_Player       Emotion_Generic_Player;
10 typedef struct _Emotion_Generic_Cmd_Buffer       Emotion_Generic_Cmd_Buffer;
11 typedef struct _Emotion_Generic_Channel Emotion_Generic_Channel;
12 typedef struct _Emotion_Generic_Meta        Emotion_Generic_Meta;
13
14 struct _Emotion_Generic_Player
15 {
16    Ecore_Exe *exe;
17 };
18
19 struct _Emotion_Generic_Channel
20 {
21    int id;
22    const char *name;
23 };
24
25 struct _Emotion_Generic_Meta
26 {
27    const char *title;
28    const char *artist;
29    const char *album;
30    const char *year;
31    const char *genre;
32    const char *comment;
33    const char *disc_id;
34    const char *count;
35 };
36
37 struct _Emotion_Generic_Cmd_Buffer
38 {
39    char *tmp;
40    int type;
41    ssize_t i, total;
42    int s_len;
43    int num_params, cur_param;
44    int padding;
45    union {
46         struct {
47              int width;
48              int height;
49         } size;
50         int i_num;
51         float f_num;
52         struct {
53              int total;
54              int current;
55              Emotion_Generic_Channel *channels;
56         } track;
57         Emotion_Generic_Meta meta;
58    } param;
59 };
60
61 /* emotion/generic main structure */
62 struct _Emotion_Generic_Video
63 {
64    const char                *cmdline;
65    const char                *shmname;
66
67    Emotion_Generic_Player    player;
68    Emotion_Generic_Cmd_Buffer   cmd;
69    Ecore_Event_Handler       *player_add, *player_del, *player_data;
70    Ecore_Idler               *player_restart;
71    int                       drop;
72    int                       fd_read, fd_write;
73    Ecore_Fd_Handler          *fd_handler;
74
75    const char                *filename;
76    volatile double           len;
77    volatile double           pos;
78    double                    fps;
79    double                    ratio;
80    int                       w, h;
81    Evas_Object               *obj;
82    Emotion_Generic_Video_Shared *shared;
83    Emotion_Generic_Video_Frame frame;
84    volatile int              fq;
85    float                     volume;
86    float                     speed;
87    Emotion_Vis               vis;
88    Eina_Bool                 initializing : 1;
89    Eina_Bool                 ready : 1;
90    Eina_Bool                 play : 1;
91    Eina_Bool                 video_mute : 1;
92    Eina_Bool                 audio_mute : 1;
93    Eina_Bool                 spu_mute : 1;
94    Eina_Bool                 seekable : 1;
95    volatile Eina_Bool        opening : 1;
96    volatile Eina_Bool        closing : 1;
97    Eina_Bool                 file_changed : 1;
98    Eina_Bool                 file_ready : 1;
99    int                       audio_channels_count;
100    int                       audio_channel_current;
101    Emotion_Generic_Channel  *audio_channels;
102    int                       video_channels_count;
103    int                       video_channel_current;
104    Emotion_Generic_Channel  *video_channels;
105    int                       spu_channels_count;
106    int                       spu_channel_current;
107    Emotion_Generic_Channel  *spu_channels;
108    Emotion_Generic_Meta      meta;
109 };
110
111 #endif
112