summaryrefslogtreecommitdiff
path: root/tools/element-templates/basesink
blob: bf018283df382640a5cb70cd326044e6301f0725 (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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
/* vim: set filetype=c: */
% ClassName
GstBaseSink
% TYPE_CLASS_NAME
GST_TYPE_BASE_SINK
% pads
sinkpad-simple
% pkg-config
gstreamer-base-0.10
% includes
#include <gst/base/gstbasesink.h>
% prototypes
static GstCaps *gst_replace_get_caps (GstBaseSink * sink);
static gboolean gst_replace_set_caps (GstBaseSink * sink, GstCaps * caps);
static GstFlowReturn
gst_replace_buffer_alloc (GstBaseSink * sink, guint64 offset, guint size,
    GstCaps * caps, GstBuffer ** buf);
static void
gst_replace_get_times (GstBaseSink * sink, GstBuffer * buffer,
    GstClockTime * start, GstClockTime * end);
static gboolean gst_replace_start (GstBaseSink * sink);
static gboolean gst_replace_stop (GstBaseSink * sink);
static gboolean gst_replace_unlock (GstBaseSink * sink);
static gboolean gst_replace_event (GstBaseSink * sink, GstEvent * event);
static GstFlowReturn
gst_replace_preroll (GstBaseSink * sink, GstBuffer * buffer);
static GstFlowReturn
gst_replace_render (GstBaseSink * sink, GstBuffer * buffer);
static GstStateChangeReturn gst_replace_async_play (GstBaseSink * sink);
static gboolean gst_replace_activate_pull (GstBaseSink * sink, gboolean active);
static void gst_replace_fixate (GstBaseSink * sink, GstCaps * caps);
static gboolean gst_replace_unlock_stop (GstBaseSink * sink);
static GstFlowReturn
gst_replace_render_list (GstBaseSink * sink, GstBufferList * buffer_list);
% declare-class
  GstBaseSinkClass *base_sink_class = GST_BASE_SINK_CLASS (klass);
% set-methods
  base_sink_class->get_caps = GST_DEBUG_FUNCPTR (gst_replace_get_caps);
  base_sink_class->set_caps = GST_DEBUG_FUNCPTR (gst_replace_set_caps);
  base_sink_class->buffer_alloc = GST_DEBUG_FUNCPTR (gst_replace_buffer_alloc);
  base_sink_class->get_times = GST_DEBUG_FUNCPTR (gst_replace_get_times);
  base_sink_class->start = GST_DEBUG_FUNCPTR (gst_replace_start);
  base_sink_class->stop = GST_DEBUG_FUNCPTR (gst_replace_stop);
  base_sink_class->unlock = GST_DEBUG_FUNCPTR (gst_replace_unlock);
  base_sink_class->event = GST_DEBUG_FUNCPTR (gst_replace_event);
  base_sink_class->preroll = GST_DEBUG_FUNCPTR (gst_replace_preroll);
  base_sink_class->render = GST_DEBUG_FUNCPTR (gst_replace_render);
  base_sink_class->async_play = GST_DEBUG_FUNCPTR (gst_replace_async_play);
  base_sink_class->activate_pull = GST_DEBUG_FUNCPTR (gst_replace_activate_pull);
  base_sink_class->fixate = GST_DEBUG_FUNCPTR (gst_replace_fixate);
  base_sink_class->unlock_stop = GST_DEBUG_FUNCPTR (gst_replace_unlock_stop);
  base_sink_class->render_list = GST_DEBUG_FUNCPTR (gst_replace_render_list);
% methods


static GstCaps *
gst_replace_get_caps (GstBaseSink * sink)
{

  return NULL;
}

static gboolean
gst_replace_set_caps (GstBaseSink * sink, GstCaps * caps)
{

  return FALSE;
}

static GstFlowReturn
gst_replace_buffer_alloc (GstBaseSink * sink, guint64 offset, guint size,
    GstCaps * caps, GstBuffer ** buf)
{

  return GST_FLOW_ERROR;
}

static void
gst_replace_get_times (GstBaseSink * sink, GstBuffer * buffer,
    GstClockTime * start, GstClockTime * end)
{

}

static gboolean
gst_replace_start (GstBaseSink * sink)
{

  return TRUE;
}

static gboolean
gst_replace_stop (GstBaseSink * sink)
{

  return TRUE;
}

static gboolean
gst_replace_unlock (GstBaseSink * sink)
{

  return TRUE;
}

static gboolean
gst_replace_event (GstBaseSink * sink, GstEvent * event)
{

  return TRUE;
}

static GstFlowReturn
gst_replace_preroll (GstBaseSink * sink, GstBuffer * buffer)
{

  return GST_FLOW_OK;
}

static GstFlowReturn
gst_replace_render (GstBaseSink * sink, GstBuffer * buffer)
{

  return GST_FLOW_OK;
}

static GstStateChangeReturn
gst_replace_async_play (GstBaseSink * sink)
{

  return GST_STATE_CHANGE_SUCCESS;
}

static gboolean
gst_replace_activate_pull (GstBaseSink * sink, gboolean active)
{

  return TRUE;
}

static void
gst_replace_fixate (GstBaseSink * sink, GstCaps * caps)
{

}

static gboolean
gst_replace_unlock_stop (GstBaseSink * sink)
{

  return TRUE;
}

static GstFlowReturn
gst_replace_render_list (GstBaseSink * sink, GstBufferList * buffer_list)
{

  return GST_FLOW_OK;
}
% end