aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/emotion/generic/emotion_generic.h
blob: 1536a0e9f99a7276c64e0b8c00317140d7dd61d7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
#ifndef EMOTION_GENERIC_H
#define EMOTION_GENERIC_H

#include "Emotion_Generic_Plugin.h"

/* default values */

typedef struct _Emotion_Generic_Video       Emotion_Generic_Video;
typedef struct _Emotion_Generic_Player       Emotion_Generic_Player;
typedef struct _Emotion_Generic_Cmd_Buffer       Emotion_Generic_Cmd_Buffer;
typedef struct _Emotion_Generic_Channel Emotion_Generic_Channel;
typedef struct _Emotion_Generic_Meta	    Emotion_Generic_Meta;

struct _Emotion_Generic_Player
{
   Ecore_Exe *exe;
};

struct _Emotion_Generic_Channel
{
   int id;
   const char *name;
};

struct _Emotion_Generic_Meta
{
   const char *title;
   const char *artist;
   const char *album;
   const char *year;
   const char *genre;
   const char *comment;
   const char *disc_id;
   const char *count;
};

struct _Emotion_Generic_Cmd_Buffer
{
   char *tmp;
   int type;
   ssize_t i, total;
   int s_len;
   int num_params, cur_param;
   int padding;
   union {
	struct {
	     int width;
	     int height;
	} size;
	int i_num;
	float f_num;
	struct {
	     int total;
	     int current;
	     Emotion_Generic_Channel *channels;
	} track;
	Emotion_Generic_Meta meta;
   } param;
};

typedef struct _Emotion_Engine_Generic
{
   Emotion_Engine engine;
   char *path;
} Emotion_Engine_Generic;

/* emotion/generic main structure */
struct _Emotion_Generic_Video
{
   const Emotion_Engine_Generic *engine;
   const char		     *shmname;

   Emotion_Generic_Player    player;
   Emotion_Generic_Cmd_Buffer	cmd;
   Ecore_Event_Handler	     *player_add, *player_del, *player_data;
   Ecore_Idler               *player_restart;
   int			     drop;
   int			     fd_read, fd_write;
   Ecore_Fd_Handler	     *fd_handler;

   const char		     *filename;
   volatile double	     len;
   volatile double           pos;
   double                    fps;
   double                    ratio;
   int                       w, h;
   Evas_Object               *obj;
   Emotion_Generic_Video_Shared *shared;
   Emotion_Generic_Video_Frame frame;
   volatile int              fq;
   float		     volume;
   float		     speed;
   Emotion_Vis               vis;
   Eina_Bool		     initializing : 1;
   Eina_Bool		     ready : 1;
   Eina_Bool                 play : 1;
   Eina_Bool                 video_mute : 1;
   Eina_Bool                 audio_mute : 1;
   Eina_Bool                 spu_mute : 1;
   Eina_Bool		     seekable : 1;
   volatile Eina_Bool        opening : 1;
   volatile Eina_Bool        closing : 1;
   Eina_Bool		     file_changed : 1;
   Eina_Bool		     file_ready : 1;
   int			     audio_channels_count;
   int			     audio_channel_current;
   Emotion_Generic_Channel  *audio_channels;
   int			     video_channels_count;
   int			     video_channel_current;
   Emotion_Generic_Channel  *video_channels;
   int			     spu_channels_count;
   int			     spu_channel_current;
   Emotion_Generic_Channel  *spu_channels;
   Emotion_Generic_Meta	     meta;
  const char                 *subtitle_path;
};

#endif