summaryrefslogtreecommitdiff
path: root/legacy/emotion/src/modules/emotion_gstreamer.h
blob: cf106c3b552fcdf53600f6cef7e6f2d43952aa4c (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
77
#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;
  gdouble     length_time;
  gint        width;
  gint        height;
  gint        fps_num;
  gint        fps_den;
  guint32     fourcc;
};

typedef struct _Emotion_Audio_Sink Emotion_Audio_Sink;

struct _Emotion_Audio_Sink
{
  GstElement *sink;
  gdouble     length_time;
  gint        channels;
  gint        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;

  int               video_sink_nbr;
  int               audio_sink_nbr;

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

  /* Characteristics of stream */
  int               position;
  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__ */