Dear friend:
I am trying to modify the dsexample as my plugin. I did the following process:
(1) copy the “gst-dsexample” folder and rename as “gst-myplugin”
(2) modify all the files’ name of the folder in this folder from “dsexample” to “myplugin” include .c, .cpp, .h, makefile
(3) modify all the variables, classs, and functions in the files from “dsexample” to “myplugin”
I check the all files very carefully one by one. And I thank all the modification is right. However, when run “sudo make”
there is a error as below:
gstmyplugin.cpp: In function ‘GType gst_myplugin_get_type()’:
/usr/include/glib-2.0/gobject/gtype.h:1978:56: error: invalid application of ‘sizeof’ to incomplete type ‘GstMyplugin {aka _GstMyplugin}’
sizeof (TypeName),
^
/usr/include/glib-2.0/gobject/gtype.h:1995:3: note: in expansion of macro ‘_G_DEFINE_TYPE_EXTENDED_BEGIN_REGISTER’
_G_DEFINE_TYPE_EXTENDED_BEGIN_REGISTER(TypeName, type_name, TYPE_PARENT, flags)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/glib-2.0/gobject/gtype.h:1737:60: note: in expansion of macro ‘_G_DEFINE_TYPE_EXTENDED_BEGIN’
#define G_DEFINE_TYPE_EXTENDED(TN, t_n, T_P, f, C) _G_DEFINE_TYPE_EXTENDED_BEGIN (TN, t_n, T_P, f) {C;} _G_DEFINE_TYPE_EXTENDED_END()
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/glib-2.0/gobject/gtype.h:1595:43: note: in expansion of macro ‘G_DEFINE_TYPE_EXTENDED’
#define G_DEFINE_TYPE(TN, t_n, T_P) G_DEFINE_TYPE_EXTENDED (TN, t_n, T_P, 0, {})
^~~~~~~~~~~~~~~~~~~~~~
gstmyplugin.cpp:98:1: note: in expansion of macro ‘G_DEFINE_TYPE’
G_DEFINE_TYPE (GstMyplugin, gst_myplugin, GST_TYPE_BASE_TRANSFORM);
^
gstmyplugin.cpp: In function ‘void gst_myplugine_init(GstMyplugin*)’:
gstmyplugin.cpp:220:11: error: invalid use of incomplete type ‘GstMyplugin {aka struct _GstMyplugin}’
myplugin->unique_id = DEFAULT_UNIQUE_ID;
…
I guess the error “GstMyplugin” has not registered. I have no idea to solve the problem. Please help me. Thank you very much.