summaryrefslogtreecommitdiff
path: root/legacy/emotion/src/modules/emotion_gstreamer.h
blob: 4b725bb36207a02534ebd36f7eed6a3a95fdec17 (plain) (blame)
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
#ifndef __EMOTION_GSTREAMER_H__
#define __EMOTION_GSTREAMER_H__

#include <Ecore_Data.h>

#include <gst/gst.h>

typedef struct _Emotion_Video_Sink Emotion_Video_Sink;

struct _Emotion_Video_Sink
{
  GstElement        *sink;
  unsigned long long length_time;
  unsigned long long length_frames;
  unsigned int       width;
  unsigned int       height;
  unsigned int       par_num;
  unsigned int       par_den;
  double             framerate;
};

typedef struct _Emotion_Audio_Sink Emotion_Audio_Sink;

struct _Emotion_Audio_Sink
{
  GstElement        *sink;
  unsigned long long length_time;
  unsigned long long length_samples;
  unsigned int       channels;
  unsigned int       samplerate;
};

typedef struct _Emotion_Gstreamer_Video Emotion_Gstreamer_Video;

struct _Emotion_Gstreamer_Video
{
  /* Gstreamer elements */
  GstElement *pipeline;
  
  /* Sinks */
  Ecore_List *video_sinks;
  Ecore_List *audio_sinks;

  /* Evas object */
  Evas_Object   *obj;
  unsigned char *obj_data;

  /* Characteristics */
  int          position;
  int          width;
  int          height;
  double       ratio;

  volatile int    seek_to;
  volatile int    get_poslen;
  volatile double seek_to_pos;

  int                       fd_ev_read;
  int                       fd_ev_write;
  Ecore_Fd_Handler         *fd_ev_handler;


  unsigned char play : 1;
  unsigned char video_mute : 1;
  unsigned char audio_mute : 1;
};

unsigned char         module_open  (Evas_Object           *obj,
				    Emotion_Video_Module **module,
				    void                 **video);

void                  module_close (Emotion_Video_Module *module,
				    void                 *video);


#endif /* __EMOTION_GSTREAMER_H__ */