gst-element-maker fails when generating derived from element
I'm trying to generate boilerplate for GStreamer Element, derived from GstElement.
For this I run this command:
./gst-element-maker my_element element
Then I get this error:
./gst-element-maker: 383: gst-indent: not found
pkg is gstreamer-1.0
gstmyelement.c:61:8: error: unknown type name ‘GstIndex’
61 | static GstIndex *gst_my_element_get_index (GstElement * element);
| ^~~~~~~~
gstmyelement.c:62:61: error: unknown type name ‘GstIndex’; did you mean ‘GstContext’?
62 | static void gst_my_element_set_index (GstElement * element, GstIndex * index);
| ^~~~~~~~
| GstContext
gstmyelement.c: In function ‘gst_my_element_class_init’:
gstmyelement.c:149:34: error: assignment to ‘GstPad * (*)(GstElement *, GstPadTemplate *, const gchar *, const GstCaps *)’ {aka ‘struct _GstPad * (*)(struct _GstElement *, struct _GstPadTemplate *, const char *, const struct _GstCaps *)’} from incompatible pointer type ‘GstPad * (*)(GstElement *, GstPadTemplate *, const gchar *)’ {aka ‘struct _GstPad * (*)(struct _GstElement *, struct _GstPadTemplate *, const char *)’} [-Werror=incompatible-pointer-types]
149 | element_class->request_new_pad = GST_DEBUG_FUNCPTR (gst_my_element_request_new_pad);
| ^
gstmyelement.c:154:16: error: ‘GstElementClass’ {aka ‘struct _GstElementClass’} has no member named ‘get_index’
154 | element_class->get_index = GST_DEBUG_FUNCPTR (gst_my_element_get_index);
| ^~
gstmyelement.c:155:18: error: ‘GstElementClass’ {aka ‘struct _GstElementClass’} has no member named ‘set_index’; did you mean ‘set_context’?
155 | element_class->set_index = GST_DEBUG_FUNCPTR (gst_my_element_set_index);
| ^~~~~~~~~
| set_context
In file included from /usr/include/gstreamer-1.0/gst/gst.h:55,
from gstmyelement.c:37:
gstmyelement.c:155:49: error: ‘gst_my_element_set_index’ undeclared (first use in this function); did you mean ‘gst_my_element_get_index’?
155 | element_class->set_index = GST_DEBUG_FUNCPTR (gst_my_element_set_index);
| ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/gstreamer-1.0/gst/gstinfo.h:1433:50: note: in definition of macro ‘GST_DEBUG_FUNCPTR’
1433 | (_gst_debug_register_funcptr((GstDebugFuncPtr)(ptr), #ptr) , ptr)
| ^~~
gstmyelement.c:155:49: note: each undeclared identifier is reported only once for each function it appears in
155 | element_class->set_index = GST_DEBUG_FUNCPTR (gst_my_element_set_index);
| ^~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/gstreamer-1.0/gst/gstinfo.h:1433:50: note: in definition of macro ‘GST_DEBUG_FUNCPTR’
1433 | (_gst_debug_register_funcptr((GstDebugFuncPtr)(ptr), #ptr) , ptr)
| ^~~
/usr/include/gstreamer-1.0/gst/gstinfo.h:1433:62: error: left-hand operand of comma expression has no effect [-Werror=unused-value]
1433 | (_gst_debug_register_funcptr((GstDebugFuncPtr)(ptr), #ptr) , ptr)
| ^
gstmyelement.c:155:30: note: in expansion of macro ‘GST_DEBUG_FUNCPTR’
155 | element_class->set_index = GST_DEBUG_FUNCPTR (gst_my_element_set_index);
| ^~~~~~~~~~~~~~~~~
gstmyelement.c: In function ‘gst_my_element_init’:
gstmyelement.c:168:3: error: implicit declaration of function ‘gst_pad_set_getcaps_function’; did you mean ‘gst_pad_set_getrange_function’? [-Werror=implicit-function-declaration]
168 | gst_pad_set_getcaps_function (myelement->sinkpad,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| gst_pad_set_getrange_function
gstmyelement.c:170:3: error: implicit declaration of function ‘gst_pad_set_setcaps_function’; did you mean ‘gst_pad_set_getrange_function’? [-Werror=implicit-function-declaration]
170 | gst_pad_set_setcaps_function (myelement->sinkpad,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
| gst_pad_set_getrange_function
gstmyelement.c:172:3: error: implicit declaration of function ‘gst_pad_set_acceptcaps_function’; did you mean ‘gst_pad_set_activate_function’? [-Werror=implicit-function-declaration]
172 | gst_pad_set_acceptcaps_function (myelement->sinkpad,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| gst_pad_set_activate_function
gstmyelement.c:174:3: error: implicit declaration of function ‘gst_pad_set_fixatecaps_function’; did you mean ‘gst_pad_set_activate_function’? [-Werror=implicit-function-declaration]
174 | gst_pad_set_fixatecaps_function (myelement->sinkpad,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| gst_pad_set_activate_function
In file included from /usr/include/gstreamer-1.0/gst/gstelement.h:87,
from /usr/include/gstreamer-1.0/gst/gstbin.h:27,
from /usr/include/gstreamer-1.0/gst/gst.h:35,
from gstmyelement.c:37:
/usr/include/gstreamer-1.0/gst/gstinfo.h:1433:62: error: passing argument 2 of ‘gst_pad_set_activate_function_full’ from incompatible pointer type [-Werror=incompatible-pointer-types]
1433 | (_gst_debug_register_funcptr((GstDebugFuncPtr)(ptr), #ptr) , ptr)
/usr/include/gstreamer-1.0/gst/gstpad.h:1412:89: note: in definition of macro ‘gst_pad_set_activate_function’
1412 | #define gst_pad_set_activate_function(p,f) gst_pad_set_activate_function_full((p),(f),NULL,NULL)
| ^
gstmyelement.c:177:13: note: in expansion of macro ‘GST_DEBUG_FUNCPTR’
177 | GST_DEBUG_FUNCPTR(gst_my_element_sink_activate));
| ^~~~~~~~~~~~~~~~~
/usr/include/gstreamer-1.0/gst/gstpad.h:1376:89: note: expected ‘GstPadActivateFunction’ {aka ‘int (*)(struct _GstPad *, struct _GstObject *)’} but argument is of type ‘gboolean (*)(GstPad *)’ {aka ‘int (*)(struct _GstPad *)’}
1376 | GstPadActivateFunction activate,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
gstmyelement.c:178:3: error: implicit declaration of function ‘gst_pad_set_activatepush_function’; did you mean ‘gst_pad_set_activate_function’? [-Werror=implicit-function-declaration]
178 | gst_pad_set_activatepush_function (myelement->sinkpad,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| gst_pad_set_activate_function
gstmyelement.c:180:3: error: implicit declaration of function ‘gst_pad_set_activatepull_function’; did you mean ‘gst_pad_set_activate_function’? [-Werror=implicit-function-declaration]
180 | gst_pad_set_activatepull_function (myelement->sinkpad,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| gst_pad_set_activate_function
In file included from /usr/include/gstreamer-1.0/gst/gstelement.h:87,
from /usr/include/gstreamer-1.0/gst/gstbin.h:27,
from /usr/include/gstreamer-1.0/gst/gst.h:35,
from gstmyelement.c:37:
/usr/include/gstreamer-1.0/gst/gstinfo.h:1433:62: error: passing argument 2 of ‘gst_pad_set_link_function_full’ from incompatible pointer type [-Werror=incompatible-pointer-types]
1433 | (_gst_debug_register_funcptr((GstDebugFuncPtr)(ptr), #ptr) , ptr)
gstmyelement.c:182:3: note: in expansion of macro ‘gst_pad_set_link_function’
182 | gst_pad_set_link_function (myelement->sinkpad,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
gstmyelement.c:183:13: note: in expansion of macro ‘GST_DEBUG_FUNCPTR’
183 | GST_DEBUG_FUNCPTR(gst_my_element_sink_link));
| ^~~~~~~~~~~~~~~~~
/usr/include/gstreamer-1.0/gst/gstpad.h:1424:85: note: expected ‘GstPadLinkFunction’ {aka ‘enum <anonymous> (*)(struct _GstPad *, struct _GstObject *, struct _GstPad *)’} but argument is of type ‘GstPadLinkReturn (*)(GstPad *, GstPad *)’ {aka ‘enum <anonymous> (*)(struct _GstPad *, struct _GstPad *)’}
1424 | GstPadLinkFunction link,
| ~~~~~~~~~~~~~~~~~~~^~~~
/usr/include/gstreamer-1.0/gst/gstinfo.h:1433:62: error: passing argument 2 of ‘gst_pad_set_unlink_function_full’ from incompatible pointer type [-Werror=incompatible-pointer-types]
1433 | (_gst_debug_register_funcptr((GstDebugFuncPtr)(ptr), #ptr) , ptr)
/usr/include/gstreamer-1.0/gst/gstpad.h:1434:87: note: in definition of macro ‘gst_pad_set_unlink_function’
1434 | #define gst_pad_set_unlink_function(p,f) gst_pad_set_unlink_function_full((p),(f),NULL,NULL)
| ^
gstmyelement.c:185:13: note: in expansion of macro ‘GST_DEBUG_FUNCPTR’
185 | GST_DEBUG_FUNCPTR(gst_my_element_sink_unlink));
| ^~~~~~~~~~~~~~~~~
/usr/include/gstreamer-1.0/gst/gstpad.h:1429:87: note: expected ‘GstPadUnlinkFunction’ {aka ‘void (*)(struct _GstPad *, struct _GstObject *)’} but argument is of type ‘void (*)(GstPad *)’ {aka ‘void (*)(struct _GstPad *)’}
1429 | GstPadUnlinkFunction unlink,
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~
/usr/include/gstreamer-1.0/gst/gstinfo.h:1433:62: error: passing argument 2 of ‘gst_pad_set_chain_function_full’ from incompatible pointer type [-Werror=incompatible-pointer-types]
1433 | (_gst_debug_register_funcptr((GstDebugFuncPtr)(ptr), #ptr) , ptr)
/usr/include/gstreamer-1.0/gst/gstpad.h:1414:86: note: in definition of macro ‘gst_pad_set_chain_function’
1414 | #define gst_pad_set_chain_function(p,f) gst_pad_set_chain_function_full((p),(f),NULL,NULL)
| ^
gstmyelement.c:187:13: note: in expansion of macro ‘GST_DEBUG_FUNCPTR’
187 | GST_DEBUG_FUNCPTR(gst_my_element_sink_chain));
| ^~~~~~~~~~~~~~~~~
/usr/include/gstreamer-1.0/gst/gstpad.h:1388:86: note: expected ‘GstPadChainFunction’ {aka ‘enum <anonymous> (*)(struct _GstPad *, struct _GstObject *, struct _GstBuffer *)’} but argument is of type ‘GstFlowReturn (*)(GstPad *, GstBuffer *)’ {aka ‘enum <anonymous> (*)(struct _GstPad *, struct _GstBuffer *)’}
1388 | GstPadChainFunction chain,
| ~~~~~~~~~~~~~~~~~~~~^~~~~
/usr/include/gstreamer-1.0/gst/gstinfo.h:1433:62: error: passing argument 2 of ‘gst_pad_set_chain_list_function_full’ from incompatible pointer type [-Werror=incompatible-pointer-types]
1433 | (_gst_debug_register_funcptr((GstDebugFuncPtr)(ptr), #ptr) , ptr)
/usr/include/gstreamer-1.0/gst/gstpad.h:1415:91: note: in definition of macro ‘gst_pad_set_chain_list_function’
1415 | #define gst_pad_set_chain_list_function(p,f) gst_pad_set_chain_list_function_full((p),(f),NULL,NULL)
| ^
gstmyelement.c:189:13: note: in expansion of macro ‘GST_DEBUG_FUNCPTR’
189 | GST_DEBUG_FUNCPTR(gst_my_element_sink_chainlist));
| ^~~~~~~~~~~~~~~~~
/usr/include/gstreamer-1.0/gst/gstpad.h:1393:90: note: expected ‘GstPadChainListFunction’ {aka ‘enum <anonymous> (*)(struct _GstPad *, struct _GstObject *, struct _GstBufferList *)’} but argument is of type ‘GstFlowReturn (*)(GstPad *, GstBufferList *)’ {aka ‘enum <anonymous> (*)(struct _GstPad *, struct _GstBufferList *)’}
1393 | GstPadChainListFunction chainlist,
| ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
/usr/include/gstreamer-1.0/gst/gstinfo.h:1433:62: error: passing argument 2 of ‘gst_pad_set_event_function_full’ from incompatible pointer type [-Werror=incompatible-pointer-types]
1433 | (_gst_debug_register_funcptr((GstDebugFuncPtr)(ptr), #ptr) , ptr)
/usr/include/gstreamer-1.0/gst/gstpad.h:1417:86: note: in definition of macro ‘gst_pad_set_event_function’
1417 | #define gst_pad_set_event_function(p,f) gst_pad_set_event_function_full((p),(f),NULL,NULL)
| ^
gstmyelement.c:191:13: note: in expansion of macro ‘GST_DEBUG_FUNCPTR’
191 | GST_DEBUG_FUNCPTR(gst_my_element_sink_event));
| ^~~~~~~~~~~~~~~~~
/usr/include/gstreamer-1.0/gst/gstpad.h:1403:86: note: expected ‘GstPadEventFunction’ {aka ‘int (*)(struct _GstPad *, struct _GstObject *, struct _GstEvent *)’} but argument is of type ‘gboolean (*)(GstPad *, GstEvent *)’ {aka ‘int (*)(struct _GstPad *, struct _GstEvent *)’}
1403 | GstPadEventFunction event,
| ~~~~~~~~~~~~~~~~~~~~^~~~~
/usr/include/gstreamer-1.0/gst/gstinfo.h:1433:62: error: passing argument 2 of ‘gst_pad_set_query_function_full’ from incompatible pointer type [-Werror=incompatible-pointer-types]
1433 | (_gst_debug_register_funcptr((GstDebugFuncPtr)(ptr), #ptr) , ptr)
/usr/include/gstreamer-1.0/gst/gstpad.h:1558:80: note: in definition of macro ‘gst_pad_set_query_function’
1558 | #define gst_pad_set_query_function(p,f) gst_pad_set_query_function_full((p),(f),NULL,NULL)
| ^
gstmyelement.c:193:13: note: in expansion of macro ‘GST_DEBUG_FUNCPTR’
193 | GST_DEBUG_FUNCPTR(gst_my_element_sink_query));
| ^~~~~~~~~~~~~~~~~
/usr/include/gstreamer-1.0/gst/gstpad.h:1551:75: note: expected ‘GstPadQueryFunction’ {aka ‘int (*)(struct _GstPad *, struct _GstObject *, struct _GstQuery *)’} but argument is of type ‘gboolean (*)(GstPad *, GstQuery *)’ {aka ‘int (*)(struct _GstPad *, struct _GstQuery *)’}
1551 | void gst_pad_set_query_function_full (GstPad *pad, GstPadQueryFunction query,
| ~~~~~~~~~~~~~~~~~~~~^~~~~
gstmyelement.c:194:3: error: implicit declaration of function ‘gst_pad_set_bufferalloc_function’; did you mean ‘gst_pad_set_query_function’? [-Werror=implicit-function-declaration]
194 | gst_pad_set_bufferalloc_function (myelement->sinkpad,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| gst_pad_set_query_function
In file included from /usr/include/gstreamer-1.0/gst/gstelement.h:87,
from /usr/include/gstreamer-1.0/gst/gstbin.h:27,
from /usr/include/gstreamer-1.0/gst/gst.h:35,
from gstmyelement.c:37:
/usr/include/gstreamer-1.0/gst/gstinfo.h:1433:62: error: passing argument 2 of ‘gst_pad_set_iterate_internal_links_function_full’ from incompatible pointer type [-Werror=incompatible-pointer-types]
1433 | (_gst_debug_register_funcptr((GstDebugFuncPtr)(ptr), #ptr) , ptr)
/usr/include/gstreamer-1.0/gst/gstpad.h:1540:112: note: in definition of macro ‘gst_pad_set_iterate_internal_links_function’
1540 | #define gst_pad_set_iterate_internal_links_function(p,f) gst_pad_set_iterate_internal_links_function_full((p),(f),NULL,NULL)
| ^
gstmyelement.c:197:13: note: in expansion of macro ‘GST_DEBUG_FUNCPTR’
197 | GST_DEBUG_FUNCPTR(gst_my_element_sink_iterintlink));
| ^~~~~~~~~~~~~~~~~
/usr/include/gstreamer-1.0/gst/gstpad.h:1530:92: note: expected ‘GstPadIterIntLinkFunction’ {aka ‘struct _GstIterator * (*)(struct _GstPad *, struct _GstObject *)’} but argument is of type ‘GstIterator * (*)(GstPad *)’ {aka ‘struct _GstIterator * (*)(struct _GstPad *)’}
1530 | GstPadIterIntLinkFunction iterintlink,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
/usr/include/gstreamer-1.0/gst/gstinfo.h:1433:62: error: passing argument 2 of ‘gst_pad_set_activate_function_full’ from incompatible pointer type [-Werror=incompatible-pointer-types]
1433 | (_gst_debug_register_funcptr((GstDebugFuncPtr)(ptr), #ptr) , ptr)
/usr/include/gstreamer-1.0/gst/gstpad.h:1412:89: note: in definition of macro ‘gst_pad_set_activate_function’
1412 | #define gst_pad_set_activate_function(p,f) gst_pad_set_activate_function_full((p),(f),NULL,NULL)
| ^
gstmyelement.c:214:13: note: in expansion of macro ‘GST_DEBUG_FUNCPTR’
214 | GST_DEBUG_FUNCPTR(gst_my_element_src_activate));
| ^~~~~~~~~~~~~~~~~
/usr/include/gstreamer-1.0/gst/gstpad.h:1376:89: note: expected ‘GstPadActivateFunction’ {aka ‘int (*)(struct _GstPad *, struct _GstObject *)’} but argument is of type ‘gboolean (*)(GstPad *)’ {aka ‘int (*)(struct _GstPad *)’}
1376 | GstPadActivateFunction activate,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
/usr/include/gstreamer-1.0/gst/gstinfo.h:1433:62: error: passing argument 2 of ‘gst_pad_set_link_function_full’ from incompatible pointer type [-Werror=incompatible-pointer-types]
1433 | (_gst_debug_register_funcptr((GstDebugFuncPtr)(ptr), #ptr) , ptr)
gstmyelement.c:219:3: note: in expansion of macro ‘gst_pad_set_link_function’
219 | gst_pad_set_link_function (myelement->srcpad,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
gstmyelement.c:220:13: note: in expansion of macro ‘GST_DEBUG_FUNCPTR’
220 | GST_DEBUG_FUNCPTR(gst_my_element_src_link));
| ^~~~~~~~~~~~~~~~~
/usr/include/gstreamer-1.0/gst/gstpad.h:1424:85: note: expected ‘GstPadLinkFunction’ {aka ‘enum <anonymous> (*)(struct _GstPad *, struct _GstObject *, struct _GstPad *)’} but argument is of type ‘GstPadLinkReturn (*)(GstPad *, GstPad *)’ {aka ‘enum <anonymous> (*)(struct _GstPad *, struct _GstPad *)’}
1424 | GstPadLinkFunction link,
| ~~~~~~~~~~~~~~~~~~~^~~~
/usr/include/gstreamer-1.0/gst/gstinfo.h:1433:62: error: passing argument 2 of ‘gst_pad_set_unlink_function_full’ from incompatible pointer type [-Werror=incompatible-pointer-types]
1433 | (_gst_debug_register_funcptr((GstDebugFuncPtr)(ptr), #ptr) , ptr)
/usr/include/gstreamer-1.0/gst/gstpad.h:1434:87: note: in definition of macro ‘gst_pad_set_unlink_function’
1434 | #define gst_pad_set_unlink_function(p,f) gst_pad_set_unlink_function_full((p),(f),NULL,NULL)
| ^
gstmyelement.c:222:13: note: in expansion of macro ‘GST_DEBUG_FUNCPTR’
222 | GST_DEBUG_FUNCPTR(gst_my_element_src_unlink));
| ^~~~~~~~~~~~~~~~~
/usr/include/gstreamer-1.0/gst/gstpad.h:1429:87: note: expected ‘GstPadUnlinkFunction’ {aka ‘void (*)(struct _GstPad *, struct _GstObject *)’} but argument is of type ‘void (*)(GstPad *)’ {aka ‘void (*)(struct _GstPad *)’}
1429 | GstPadUnlinkFunction unlink,
| ~~~~~~~~~~~~~~~~~~~~~^~~~~~
/usr/include/gstreamer-1.0/gst/gstinfo.h:1433:62: error: passing argument 2 of ‘gst_pad_set_getrange_function_full’ from incompatible pointer type [-Werror=incompatible-pointer-types]
1433 | (_gst_debug_register_funcptr((GstDebugFuncPtr)(ptr), #ptr) , ptr)
/usr/include/gstreamer-1.0/gst/gstpad.h:1416:89: note: in definition of macro ‘gst_pad_set_getrange_function’
1416 | #define gst_pad_set_getrange_function(p,f) gst_pad_set_getrange_function_full((p),(f),NULL,NULL)
| ^
gstmyelement.c:224:13: note: in expansion of macro ‘GST_DEBUG_FUNCPTR’
224 | GST_DEBUG_FUNCPTR(gst_my_element_src_getrange));
| ^~~~~~~~~~~~~~~~~
/usr/include/gstreamer-1.0/gst/gstpad.h:1398:89: note: expected ‘GstPadGetRangeFunction’ {aka ‘enum <anonymous> (*)(struct _GstPad *, struct _GstObject *, long unsigned int, unsigned int, struct _GstBuffer **)’} but argument is of type ‘GstFlowReturn (*)(GstPad *, guint64, guint, GstBuffer **)’ {aka ‘enum <anonymous> (*)(struct _GstPad *, long unsigned int, unsigned int, struct _GstBuffer **)’}
1398 | GstPadGetRangeFunction get,
| ~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/gstreamer-1.0/gst/gstinfo.h:1433:62: error: passing argument 2 of ‘gst_pad_set_event_function_full’ from incompatible pointer type [-Werror=incompatible-pointer-types]
1433 | (_gst_debug_register_funcptr((GstDebugFuncPtr)(ptr), #ptr) , ptr)
/usr/include/gstreamer-1.0/gst/gstpad.h:1417:86: note: in definition of macro ‘gst_pad_set_event_function’
1417 | #define gst_pad_set_event_function(p,f) gst_pad_set_event_function_full((p),(f),NULL,NULL)
| ^
gstmyelement.c:226:13: note: in expansion of macro ‘GST_DEBUG_FUNCPTR’
226 | GST_DEBUG_FUNCPTR(gst_my_element_src_event));
| ^~~~~~~~~~~~~~~~~
/usr/include/gstreamer-1.0/gst/gstpad.h:1403:86: note: expected ‘GstPadEventFunction’ {aka ‘int (*)(struct _GstPad *, struct _GstObject *, struct _GstEvent *)’} but argument is of type ‘gboolean (*)(GstPad *, GstEvent *)’ {aka ‘int (*)(struct _GstPad *, struct _GstEvent *)’}
1403 | GstPadEventFunction event,
| ~~~~~~~~~~~~~~~~~~~~^~~~~
/usr/include/gstreamer-1.0/gst/gstinfo.h:1433:62: error: passing argument 2 of ‘gst_pad_set_query_function_full’ from incompatible pointer type [-Werror=incompatible-pointer-types]
1433 | (_gst_debug_register_funcptr((GstDebugFuncPtr)(ptr), #ptr) , ptr)
/usr/include/gstreamer-1.0/gst/gstpad.h:1558:80: note: in definition of macro ‘gst_pad_set_query_function’
1558 | #define gst_pad_set_query_function(p,f) gst_pad_set_query_function_full((p),(f),NULL,NULL)
| ^
gstmyelement.c:228:13: note: in expansion of macro ‘GST_DEBUG_FUNCPTR’
228 | GST_DEBUG_FUNCPTR(gst_my_element_src_query));
| ^~~~~~~~~~~~~~~~~
/usr/include/gstreamer-1.0/gst/gstpad.h:1551:75: note: expected ‘GstPadQueryFunction’ {aka ‘int (*)(struct _GstPad *, struct _GstObject *, struct _GstQuery *)’} but argument is of type ‘gboolean (*)(GstPad *, GstQuery *)’ {aka ‘int (*)(struct _GstPad *, struct _GstQuery *)’}
1551 | void gst_pad_set_query_function_full (GstPad *pad, GstPadQueryFunction query,
| ~~~~~~~~~~~~~~~~~~~~^~~~~
/usr/include/gstreamer-1.0/gst/gstinfo.h:1433:62: error: passing argument 2 of ‘gst_pad_set_iterate_internal_links_function_full’ from incompatible pointer type [-Werror=incompatible-pointer-types]
1433 | (_gst_debug_register_funcptr((GstDebugFuncPtr)(ptr), #ptr) , ptr)
/usr/include/gstreamer-1.0/gst/gstpad.h:1540:112: note: in definition of macro ‘gst_pad_set_iterate_internal_links_function’
1540 | #define gst_pad_set_iterate_internal_links_function(p,f) gst_pad_set_iterate_internal_links_function_full((p),(f),NULL,NULL)
| ^
gstmyelement.c:230:13: note: in expansion of macro ‘GST_DEBUG_FUNCPTR’
230 | GST_DEBUG_FUNCPTR(gst_my_element_src_iterintlink));
| ^~~~~~~~~~~~~~~~~
/usr/include/gstreamer-1.0/gst/gstpad.h:1530:92: note: expected ‘GstPadIterIntLinkFunction’ {aka ‘struct _GstIterator * (*)(struct _GstPad *, struct _GstObject *)’} but argument is of type ‘GstIterator * (*)(GstPad *)’ {aka ‘struct _GstIterator * (*)(struct _GstPad *)’}
1530 | GstPadIterIntLinkFunction iterintlink,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
In file included from /usr/include/glib-2.0/gobject/gobject.h:24,
from /usr/include/glib-2.0/gobject/gbinding.h:29,
from /usr/include/glib-2.0/glib-object.h:22,
from /usr/include/gstreamer-1.0/gst/gstenumtypes.h:7,
from /usr/include/gstreamer-1.0/gst/gst.h:31,
from gstmyelement.c:37:
gstmyelement.c: In function ‘gst_my_element_change_state’:
gstmyelement.c:326:28: error: ‘parent_class’ undeclared (first use in this function)
326 | ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
| ^~~~~~~~~~~~
/usr/include/glib-2.0/gobject/gtype.h:2303:51: note: in definition of macro ‘_G_TYPE_CCC’
2303 | ((ct*) g_type_check_class_cast ((GTypeClass*) cp, gt))
| ^~
/usr/include/gstreamer-1.0/gst/gstelement.h:63:42: note: in expansion of macro ‘G_TYPE_CHECK_CLASS_CAST’
63 | #define GST_ELEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_ELEMENT, GstElementClass))
| ^~~~~~~~~~~~~~~~~~~~~~~
gstmyelement.c:326:9: note: in expansion of macro ‘GST_ELEMENT_CLASS’
326 | ret = GST_ELEMENT_CLASS (parent_class)->change_state (element, transition);
| ^~~~~~~~~~~~~~~~~
gstmyelement.c:309:17: error: variable ‘myelement’ set but not used [-Werror=unused-but-set-variable]
309 | GstMyElement *myelement;
| ^~~~~~~~~
In file included from /usr/include/glib-2.0/gobject/gobject.h:24,
from /usr/include/glib-2.0/gobject/gbinding.h:29,
from /usr/include/glib-2.0/glib-object.h:22,
from /usr/include/gstreamer-1.0/gst/gstenumtypes.h:7,
from /usr/include/gstreamer-1.0/gst/gst.h:31,
from gstmyelement.c:37:
gstmyelement.c: In function ‘gst_my_element_set_clock’:
gstmyelement.c:353:29: error: ‘parent_class’ undeclared (first use in this function)
353 | return GST_ELEMENT_CLASS (parent_class)->set_clock (element, clock);
| ^~~~~~~~~~~~
/usr/include/glib-2.0/gobject/gtype.h:2303:51: note: in definition of macro ‘_G_TYPE_CCC’
2303 | ((ct*) g_type_check_class_cast ((GTypeClass*) cp, gt))
| ^~
/usr/include/gstreamer-1.0/gst/gstelement.h:63:42: note: in expansion of macro ‘G_TYPE_CHECK_CLASS_CAST’
63 | #define GST_ELEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_ELEMENT, GstElementClass))
| ^~~~~~~~~~~~~~~~~~~~~~~
gstmyelement.c:353:10: note: in expansion of macro ‘GST_ELEMENT_CLASS’
353 | return GST_ELEMENT_CLASS (parent_class)->set_clock (element, clock);
| ^~~~~~~~~~~~~~~~~
gstmyelement.c: At top level:
gstmyelement.c:356:8: error: unknown type name ‘GstIndex’
356 | static GstIndex *
| ^~~~~~~~
gstmyelement.c:364:49: error: unknown type name ‘GstIndex’; did you mean ‘GstContext’?
364 | gst_my_element_set_index (GstElement * element, GstIndex * index)
| ^~~~~~~~
| GstContext
In file included from /usr/include/glib-2.0/gobject/gobject.h:24,
from /usr/include/glib-2.0/gobject/gbinding.h:29,
from /usr/include/glib-2.0/glib-object.h:22,
from /usr/include/gstreamer-1.0/gst/gstenumtypes.h:7,
from /usr/include/gstreamer-1.0/gst/gst.h:31,
from gstmyelement.c:37:
gstmyelement.c: In function ‘gst_my_element_query’:
gstmyelement.c:386:32: error: ‘parent_class’ undeclared (first use in this function)
386 | ret = GST_ELEMENT_CLASS (parent_class)->query (element, query);
| ^~~~~~~~~~~~
/usr/include/glib-2.0/gobject/gtype.h:2303:51: note: in definition of macro ‘_G_TYPE_CCC’
2303 | ((ct*) g_type_check_class_cast ((GTypeClass*) cp, gt))
| ^~
/usr/include/gstreamer-1.0/gst/gstelement.h:63:42: note: in expansion of macro ‘G_TYPE_CHECK_CLASS_CAST’
63 | #define GST_ELEMENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GST_TYPE_ELEMENT, GstElementClass))
| ^~~~~~~~~~~~~~~~~~~~~~~
gstmyelement.c:386:13: note: in expansion of macro ‘GST_ELEMENT_CLASS’
386 | ret = GST_ELEMENT_CLASS (parent_class)->query (element, query);
| ^~~~~~~~~~~~~~~~~
gstmyelement.c: In function ‘gst_my_element_sink_activate’:
gstmyelement.c:460:7: error: implicit declaration of function ‘gst_pad_check_pull_range’; did you mean ‘gst_pad_pull_range’? [-Werror=implicit-function-declaration]
460 | if (gst_pad_check_pull_range (pad)) {
| ^~~~~~~~~~~~~~~~~~~~~~~~
| gst_pad_pull_range
gstmyelement.c:462:11: error: implicit declaration of function ‘gst_pad_activate_pull’; did you mean ‘gst_pad_activate_mode’? [-Werror=implicit-function-declaration]
462 | ret = gst_pad_activate_pull (pad, TRUE);
| ^~~~~~~~~~~~~~~~~~~~~
| gst_pad_activate_mode
gstmyelement.c:465:11: error: implicit declaration of function ‘gst_pad_activate_push’; did you mean ‘gst_pad_activate_mode’? [-Werror=implicit-function-declaration]
465 | ret = gst_pad_activate_push (pad, TRUE);
| ^~~~~~~~~~~~~~~~~~~~~
| gst_pad_activate_mode
gstmyelement.c: In function ‘gst_my_element_sink_event’:
gstmyelement.c:567:41: error: passing argument 2 of ‘gst_pad_event_default’ from incompatible pointer type [-Werror=incompatible-pointer-types]
567 | res = gst_pad_event_default (pad, event);
| ^~~~~
| |
| GstEvent * {aka struct _GstEvent *}
In file included from /usr/include/gstreamer-1.0/gst/gstelement.h:87,
from /usr/include/gstreamer-1.0/gst/gstbin.h:27,
from /usr/include/gstreamer-1.0/gst/gst.h:35,
from gstmyelement.c:37:
/usr/include/gstreamer-1.0/gst/gstpad.h:1493:60: note: expected ‘GstObject *’ {aka ‘struct _GstObject *’} but argument is of type ‘GstEvent *’ {aka ‘struct _GstEvent *’}
1493 | gboolean gst_pad_event_default (GstPad *pad, GstObject *parent,
| ~~~~~~~~~~~^~~~~~
gstmyelement.c:567:13: error: too few arguments to function ‘gst_pad_event_default’
567 | res = gst_pad_event_default (pad, event);
| ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/gstreamer-1.0/gst/gstelement.h:87,
from /usr/include/gstreamer-1.0/gst/gstbin.h:27,
from /usr/include/gstreamer-1.0/gst/gst.h:35,
from gstmyelement.c:37:
/usr/include/gstreamer-1.0/gst/gstpad.h:1493:11: note: declared here
1493 | gboolean gst_pad_event_default (GstPad *pad, GstObject *parent,
| ^~~~~~~~~~~~~~~~~~~~~
gstmyelement.c: In function ‘gst_my_element_sink_query’:
gstmyelement.c:587:41: error: passing argument 2 of ‘gst_pad_query_default’ from incompatible pointer type [-Werror=incompatible-pointer-types]
587 | res = gst_pad_query_default (pad, query);
| ^~~~~
| |
| GstQuery * {aka struct _GstQuery *}
In file included from /usr/include/gstreamer-1.0/gst/gstelement.h:87,
from /usr/include/gstreamer-1.0/gst/gstbin.h:27,
from /usr/include/gstreamer-1.0/gst/gst.h:35,
from gstmyelement.c:37:
/usr/include/gstreamer-1.0/gst/gstpad.h:1555:60: note: expected ‘GstObject *’ {aka ‘struct _GstObject *’} but argument is of type ‘GstQuery *’ {aka ‘struct _GstQuery *’}
1555 | gboolean gst_pad_query_default (GstPad *pad, GstObject *parent,
| ~~~~~~~~~~~^~~~~~
gstmyelement.c:587:13: error: too few arguments to function ‘gst_pad_query_default’
587 | res = gst_pad_query_default (pad, query);
| ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/gstreamer-1.0/gst/gstelement.h:87,
from /usr/include/gstreamer-1.0/gst/gstbin.h:27,
from /usr/include/gstreamer-1.0/gst/gst.h:35,
from gstmyelement.c:37:
/usr/include/gstreamer-1.0/gst/gstpad.h:1555:11: note: declared here
1555 | gboolean gst_pad_query_default (GstPad *pad, GstObject *parent,
| ^~~~~~~~~~~~~~~~~~~~~
gstmyelement.c: In function ‘gst_my_element_sink_bufferalloc’:
gstmyelement.c:607:3: error: implicit declaration of function ‘gst_buffer_set_caps’; did you mean ‘gst_buffer_set_flags’? [-Werror=implicit-function-declaration]
607 | gst_buffer_set_caps (*buf, caps);
| ^~~~~~~~~~~~~~~~~~~
| gst_buffer_set_flags
gstmyelement.c: In function ‘gst_my_element_sink_iterintlink’:
gstmyelement.c:623:10: error: too few arguments to function ‘gst_pad_iterate_internal_links_default’
623 | iter = gst_pad_iterate_internal_links_default (pad);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/gstreamer-1.0/gst/gstelement.h:87,
from /usr/include/gstreamer-1.0/gst/gstbin.h:27,
from /usr/include/gstreamer-1.0/gst/gst.h:35,
from gstmyelement.c:37:
/usr/include/gstreamer-1.0/gst/gstpad.h:1538:25: note: declared here
1538 | GstIterator * gst_pad_iterate_internal_links_default (GstPad * pad, GstObject *parent);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gstmyelement.c: In function ‘gst_my_element_src_event’:
gstmyelement.c:791:41: error: passing argument 2 of ‘gst_pad_event_default’ from incompatible pointer type [-Werror=incompatible-pointer-types]
791 | res = gst_pad_event_default (pad, event);
| ^~~~~
| |
| GstEvent * {aka struct _GstEvent *}
In file included from /usr/include/gstreamer-1.0/gst/gstelement.h:87,
from /usr/include/gstreamer-1.0/gst/gstbin.h:27,
from /usr/include/gstreamer-1.0/gst/gst.h:35,
from gstmyelement.c:37:
/usr/include/gstreamer-1.0/gst/gstpad.h:1493:60: note: expected ‘GstObject *’ {aka ‘struct _GstObject *’} but argument is of type ‘GstEvent *’ {aka ‘struct _GstEvent *’}
1493 | gboolean gst_pad_event_default (GstPad *pad, GstObject *parent,
| ~~~~~~~~~~~^~~~~~
gstmyelement.c:791:13: error: too few arguments to function ‘gst_pad_event_default’
791 | res = gst_pad_event_default (pad, event);
| ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/gstreamer-1.0/gst/gstelement.h:87,
from /usr/include/gstreamer-1.0/gst/gstbin.h:27,
from /usr/include/gstreamer-1.0/gst/gst.h:35,
from gstmyelement.c:37:
/usr/include/gstreamer-1.0/gst/gstpad.h:1493:11: note: declared here
1493 | gboolean gst_pad_event_default (GstPad *pad, GstObject *parent,
| ^~~~~~~~~~~~~~~~~~~~~
gstmyelement.c: In function ‘gst_my_element_src_query’:
gstmyelement.c:811:41: error: passing argument 2 of ‘gst_pad_query_default’ from incompatible pointer type [-Werror=incompatible-pointer-types]
811 | res = gst_pad_query_default (pad, query);
| ^~~~~
| |
| GstQuery * {aka struct _GstQuery *}
In file included from /usr/include/gstreamer-1.0/gst/gstelement.h:87,
from /usr/include/gstreamer-1.0/gst/gstbin.h:27,
from /usr/include/gstreamer-1.0/gst/gst.h:35,
from gstmyelement.c:37:
/usr/include/gstreamer-1.0/gst/gstpad.h:1555:60: note: expected ‘GstObject *’ {aka ‘struct _GstObject *’} but argument is of type ‘GstQuery *’ {aka ‘struct _GstQuery *’}
1555 | gboolean gst_pad_query_default (GstPad *pad, GstObject *parent,
| ~~~~~~~~~~~^~~~~~
gstmyelement.c:811:13: error: too few arguments to function ‘gst_pad_query_default’
811 | res = gst_pad_query_default (pad, query);
| ^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/gstreamer-1.0/gst/gstelement.h:87,
from /usr/include/gstreamer-1.0/gst/gstbin.h:27,
from /usr/include/gstreamer-1.0/gst/gst.h:35,
from gstmyelement.c:37:
/usr/include/gstreamer-1.0/gst/gstpad.h:1555:11: note: declared here
1555 | gboolean gst_pad_query_default (GstPad *pad, GstObject *parent,
| ^~~~~~~~~~~~~~~~~~~~~
gstmyelement.c: In function ‘gst_my_element_src_iterintlink’:
gstmyelement.c:829:10: error: too few arguments to function ‘gst_pad_iterate_internal_links_default’
829 | iter = gst_pad_iterate_internal_links_default (pad);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/gstreamer-1.0/gst/gstelement.h:87,
from /usr/include/gstreamer-1.0/gst/gstbin.h:27,
from /usr/include/gstreamer-1.0/gst/gst.h:35,
from gstmyelement.c:37:
/usr/include/gstreamer-1.0/gst/gstpad.h:1538:25: note: declared here
1538 | GstIterator * gst_pad_iterate_internal_links_default (GstPad * pad, GstObject *parent);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gstmyelement.c: In function ‘gst_my_element_set_clock’:
gstmyelement.c:354:1: error: control reaches end of non-void function [-Werror=return-type]
354 | }
| ^
cc1: all warnings being treated as errors
So, what should I do in order to generate compilable element boilerplate?