2004-06-18 08:38:03 -07:00
|
|
|
#ifndef EMOTION_XINE_H
|
|
|
|
#define EMOTION_XINE_H
|
|
|
|
|
|
|
|
#include <xine.h>
|
2004-07-18 01:04:41 -07:00
|
|
|
#include <unistd.h>
|
|
|
|
#include <fcntl.h>
|
|
|
|
#include <pthread.h>
|
2004-06-18 08:38:03 -07:00
|
|
|
|
|
|
|
typedef struct _Emotion_Xine_Video Emotion_Xine_Video;
|
|
|
|
typedef struct _Emotion_Xine_Video_Frame Emotion_Xine_Video_Frame;
|
2004-06-23 23:11:36 -07:00
|
|
|
typedef struct _Emotion_Xine_Event Emotion_Xine_Event;
|
2004-06-18 08:38:03 -07:00
|
|
|
|
|
|
|
struct _Emotion_Xine_Video
|
|
|
|
{
|
|
|
|
xine_video_port_t *video;
|
|
|
|
xine_audio_port_t *audio;
|
|
|
|
xine_stream_t *stream;
|
2004-06-23 23:11:36 -07:00
|
|
|
xine_event_queue_t *queue;
|
2004-06-18 08:38:03 -07:00
|
|
|
int fd;
|
|
|
|
double len;
|
|
|
|
double pos;
|
|
|
|
double fps;
|
|
|
|
double ratio;
|
|
|
|
int w, h;
|
|
|
|
Evas_Object *obj;
|
|
|
|
Emotion_Xine_Video_Frame *cur_frame;
|
2004-07-18 01:04:41 -07:00
|
|
|
volatile int seek_to;
|
|
|
|
volatile int get_poslen;
|
|
|
|
volatile double seek_to_pos;
|
2004-06-18 08:38:03 -07:00
|
|
|
Ecore_Timer *timer;
|
2004-06-24 06:59:05 -07:00
|
|
|
int fd_read;
|
|
|
|
int fd_write;
|
|
|
|
Ecore_Fd_Handler *fd_handler;
|
|
|
|
int fd_ev_read;
|
|
|
|
int fd_ev_write;
|
|
|
|
Ecore_Fd_Handler *fd_ev_handler;
|
2004-06-18 08:38:03 -07:00
|
|
|
unsigned char play : 1;
|
|
|
|
unsigned char just_loaded : 1;
|
|
|
|
unsigned char video_mute : 1;
|
|
|
|
unsigned char audio_mute : 1;
|
|
|
|
unsigned char spu_mute : 1;
|
2004-07-18 01:04:41 -07:00
|
|
|
volatile unsigned char delete_me : 1;
|
|
|
|
|
|
|
|
pthread_t seek_th;
|
|
|
|
pthread_t get_pos_len_th;
|
|
|
|
pthread_cond_t seek_cond;
|
|
|
|
pthread_cond_t get_pos_len_cond;
|
|
|
|
pthread_mutex_t seek_mutex;
|
|
|
|
pthread_mutex_t get_pos_len_mutex;
|
2004-06-18 08:38:03 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _Emotion_Xine_Video_Frame
|
|
|
|
{
|
|
|
|
int w, h;
|
|
|
|
double ratio;
|
|
|
|
unsigned char *y, *u, *v;
|
|
|
|
int y_stride, u_stride, v_stride;
|
|
|
|
Evas_Object *obj;
|
|
|
|
double timestamp;
|
|
|
|
void (*done_func)(void *data);
|
|
|
|
void *done_data;
|
|
|
|
void *frame;
|
|
|
|
};
|
|
|
|
|
2004-06-23 23:11:36 -07:00
|
|
|
struct _Emotion_Xine_Event
|
|
|
|
{
|
|
|
|
int type;
|
|
|
|
char *xine_event;
|
|
|
|
};
|
|
|
|
|
2004-06-18 08:38:03 -07:00
|
|
|
Emotion_Video_Module *module_open (void);
|
|
|
|
void module_close(Emotion_Video_Module *module);
|
|
|
|
|
|
|
|
#endif
|