Gstreamer's plugin writer's Guide does not provide a complete plugin source code list, nor describe how to build and install a plugin. In this regard, we have studied gstreamer plugin template, it is found that it is a project based on Autoconf and automake. Generally, it runs autogen directly. sh will automatically generate configure, then configure, And then you only need make, make install. Make install will install the generated. So to the/usr/local/lib/gstreamer-0.10 directory. Try to build, but find the make error, because there is a warning, and the compilation option has-werror, so that the warning will also be processed as an error and cannot continue. After research, we found that in Configure. AC, The as_compiler_flag function (a custom function, the definition prototype is under the M4 directory) defines-werror, so add a line before the aas_compiler_flag setting code:
Ststst_plugin_cvs = "no"
OK. Here, we will summarize how to build and install a plugin:
1. Go to the src directory./tools/make_element <plugin Name>. The make_element script generates the plug-in Skelton code based on the stststplugin. C template.
2. Delete the stststplugin. * And ststtransform. * codes that are not written by us.
3. Edit makefile. AM in the src directory and change the original stststplugin to the name of the plug-in we wrote, that is, to define the source file. Note that it is not only about modifying the value assignment, but also the variables in the original form such as libstststplugin.... These variable names must also be modified. Otherwise, make will say that the target cannot be found. Therefore, it is recommended that you directly open makefile. Am and replace the gstplugin with our plugin name in the file.
4. return to the plugin root directory and execute. /autogen. sh. If you do not want autogen to automatically call configure, you can :. /autoge. sh -- noconfigure (For details, refer. /autogen. sh -- Help)
5. Make; make install.
Of course, configure. AC, makefile. am files can be customized, and more commands can be written in them, because this is a project of Autoconf/automake. For more information, see the Autoconf and automake manuals.
Note: The make_element script provided by gstreamer has an error. The grep statement contains about 30th rows:
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service