summaryrefslogtreecommitdiff
path: root/tools/element-templates/basetransform
blob: e5fd24cf3a215a45253c11aabff130c0e7ca7ed1 (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
/* vim: set filetype=c: */
% ClassName
GstBaseTransform
% TYPE_CLASS_NAME
GST_TYPE_BASE_TRANSFORM
% pads
sinkpad-simple srcpad-simple
% pkg-config
gstreamer-base-0.10
% pads
sinkpad-simple srcpad-simple
% includes
#include <gst/base/gstbasetransform.h>
% prototypes
static GstCaps *gst_replace_transform_caps (GstBaseTransform * trans,
    GstPadDirection direction, GstCaps * caps);
static void
gst_replace_fixate_caps (GstBaseTransform * trans,
    GstPadDirection direction, GstCaps * caps, GstCaps * othercaps);
static gboolean
gst_replace_transform_size (GstBaseTransform * trans,
    GstPadDirection direction,
    GstCaps * caps, guint size, GstCaps * othercaps, guint * othersize);
static gboolean
gst_replace_get_unit_size (GstBaseTransform * trans, GstCaps * caps,
    guint * size);
static gboolean
gst_replace_set_caps (GstBaseTransform * trans, GstCaps * incaps,
    GstCaps * outcaps);
static gboolean gst_replace_start (GstBaseTransform * trans);
static gboolean gst_replace_stop (GstBaseTransform * trans);
static gboolean gst_replace_event (GstBaseTransform * trans, GstEvent * event);
static GstFlowReturn
gst_replace_transform (GstBaseTransform * trans, GstBuffer * inbuf,
    GstBuffer * outbuf);
static GstFlowReturn
gst_replace_transform_ip (GstBaseTransform * trans, GstBuffer * buf);
static GstFlowReturn
gst_replace_prepare_output_buffer (GstBaseTransform * trans,
    GstBuffer * input, gint size, GstCaps * caps, GstBuffer ** buf);
static gboolean
gst_replace_src_event (GstBaseTransform * trans, GstEvent * event);
static void
gst_replace_before_transform (GstBaseTransform * trans, GstBuffer * buffer);
% declare-class
  GstBaseTransformClass *base_transform_class = GST_BASE_TRANSFORM_CLASS (klass);
% set-methods
  base_transform_class->transform_caps = GST_DEBUG_FUNCPTR (gst_replace_transform_caps);
  base_transform_class->fixate_caps = GST_DEBUG_FUNCPTR (gst_replace_fixate_caps);
  base_transform_class->transform_size = GST_DEBUG_FUNCPTR (gst_replace_transform_size);
  base_transform_class->get_unit_size = GST_DEBUG_FUNCPTR (gst_replace_get_unit_size);
  base_transform_class->set_caps = GST_DEBUG_FUNCPTR (gst_replace_set_caps);
  base_transform_class->start = GST_DEBUG_FUNCPTR (gst_replace_start);
  base_transform_class->stop = GST_DEBUG_FUNCPTR (gst_replace_stop);
  base_transform_class->event = GST_DEBUG_FUNCPTR (gst_replace_event);
  base_transform_class->transform = GST_DEBUG_FUNCPTR (gst_replace_transform);
  base_transform_class->transform_ip = GST_DEBUG_FUNCPTR (gst_replace_transform_ip);
  base_transform_class->prepare_output_buffer = GST_DEBUG_FUNCPTR (gst_replace_prepare_output_buffer);
  base_transform_class->src_event = GST_DEBUG_FUNCPTR (gst_replace_src_event);
  base_transform_class->before_transform = GST_DEBUG_FUNCPTR (gst_replace_before_transform);
% methods

static GstCaps *
gst_replace_transform_caps (GstBaseTransform * trans,
    GstPadDirection direction, GstCaps * caps)
{

  return NULL;
}

static void
gst_replace_fixate_caps (GstBaseTransform * trans,
    GstPadDirection direction, GstCaps * caps, GstCaps * othercaps)
{

}

static gboolean
gst_replace_transform_size (GstBaseTransform * trans,
    GstPadDirection direction,
    GstCaps * caps, guint size, GstCaps * othercaps, guint * othersize)
{

  return FALSE;
}

static gboolean
gst_replace_get_unit_size (GstBaseTransform * trans, GstCaps * caps,
    guint * size)
{

  return FALSE;
}

static gboolean
gst_replace_set_caps (GstBaseTransform * trans, GstCaps * incaps,
    GstCaps * outcaps)
{

  return FALSE;
}

static gboolean
gst_replace_start (GstBaseTransform * trans)
{

  return FALSE;
}

static gboolean
gst_replace_stop (GstBaseTransform * trans)
{

  return FALSE;
}

static gboolean
gst_replace_event (GstBaseTransform * trans, GstEvent * event)
{

  return FALSE;
}

static GstFlowReturn
gst_replace_transform (GstBaseTransform * trans, GstBuffer * inbuf,
    GstBuffer * outbuf)
{

  return GST_FLOW_ERROR;
}

static GstFlowReturn
gst_replace_transform_ip (GstBaseTransform * trans, GstBuffer * buf)
{

  return GST_FLOW_ERROR;
}

static GstFlowReturn
gst_replace_prepare_output_buffer (GstBaseTransform * trans,
    GstBuffer * input, gint size, GstCaps * caps, GstBuffer ** buf)
{

  return GST_FLOW_ERROR;
}

static gboolean
gst_replace_src_event (GstBaseTransform * trans, GstEvent * event)
{

  return FALSE;
}

static void
gst_replace_before_transform (GstBaseTransform * trans, GstBuffer * buffer)
{

}
% end