编译自己的gstreamer插件

来源:百度文库 编辑:神马文学网 时间:2024/06/13 12:14:14

1. 从模板生成gstreamer插件

 

gst-template是gstreamer插件的开发模板,在gst-plugin/tools目录下有一个make_element,在gst-plugin/src目录下,运行../tools/make_element myfilter,就可以生成一个myfilter插件。

 

    在gst-plugin目录下的autogen.sh可以自动生成congifure和makefile.in文件,如果这个脚本运行不成功。可以用下面的方法:

 

编译:

#libtool --mode=compile cc `pkg-config --cflags gstreamer-0.10` -DPACKAGE="Gstreamer" -DHAVE_USER_MTU -Wall -Wimplicit -g -o gstmyfilter.o -c gstmyfilter.c

 

链接:

#libtool --mode=link cc -module -avoid-version -rpath /usr/local/lib/gstreamer-0.10/ -export-symbols-regex gst_plugin_desc -o gstmyfilter.la gstmyfilter.lo `pkg-config --libs gstreamer-0.10`

 

安装:

#libtool --mode=install install gstmyfilter.la /usr/local/lib/gstreamer-0.10/

 

之后,就可以在自己的应用程序中创建myfilter的element。

这个过程已经测试成功了。