Create the gstreamer plugin step by step

Source: Internet
Author: User

1. Obtain the template GST-template for creating the plug-in.

Method 1: CVs
$ CVS-D: pserver: anoncvs@cvs.freedesktop.org/CVS/gstreamer Login
Password: [Root Password]
$ CVS-Z3-D: pserver: anoncvs@cvs.freedesktop.org:/CVS/gstreamer Co GST-template

Method 2: git
If git is not installed, install git first:
$ Sudo apt-Get install Git-core
Then obtain the template:          
$ Git clone git: // anongit.free?top.org/gstreamer/stp-template.git

2. Go to the directory GST-template/GST-plugin/src.
$ Cd gst-template/GST-plugin/src
$ ../Tools/make_element examplefilter
(Pay attention to the sequence here, otherwise the compilation will fail to find the stststplugin. c error)
Generate files
Gstexamplefilter. c gstexamplefilter. h

3. Modify the makefile. Am file (Note: makefile. AM in the src directory)
$ Sudo gedit makefile. AM

Plugin_ltlibraries = libstexamplefilter. La

Libststexamplefilter_la_sources = maid. c

Libststexamplefilter_la_cflags = $ (ststst_cflags)
Libststexamplefilter_la_libadd = $ (ststst_libs)
Libststexamplefilter_la_ldflags = $ (ststst_plugin_ldflags)
Libststexamplefilter_la_libtoolflags = -- tag = Disable-static

Noinst_headers = maid. h

There are seven rows in total

4. Import the pkg_config_path environment variable and enter the following in the command line:

$ Export pkg_config_path =/usr/lib/pkgconfig

5. Go to the directory GST-template/GST-plugin and modify the file autogen. Sh.
Go to the directory at the previous level
$ CD ..
Edit the autogen. Sh file:

$ Sudo
Gedit autogen. Sh

(The following error may occur: Can't.
Exec "libtoolize": No file or directory at/usr/bin/autoreconf line 196. Solution: APT-Get install libtool)


If the template is obtained through CVs, modify the original
Srcfile = src/Main. c
New:
Srcfile = src/gstexamplefilter. c

If the template is obtained through git, add it at the beginning of autogen. sh:
Srcfile = src/gstexamplefilter. c

6. Run autogen. Sh to generate the MAKEFILE file.

$./Autogen. Sh

7. Start installation:
$./Configure
$ Make
$ Sudo make install

Go to the SRC subdirectory.
$ CD SRC

The. libs directory will be generated during LS-a query.
(Note:. libs is a hidden directory)
Enter. libs
$ Cd. libs
$ LS-

You will find that

Libststexamplefilter. La
Libststexamplefilter. So

8. Add the plug-in to the gstreamer library.
Put libststexamplefilter. La
Libststexamplefilter. So
These two files are copied to the system directory:/usr/lib/gstreamer-0.10

$ Sudo CP libstexamplefilter. La/usr/lib/gstreamer-0.10/libststexamplefilter. La

$ Sudo
CP libststexamplefilter. So/usr/lib/gstreamer-0.10/libststexamplefilter. So

(There seems to be no need to copy here, and there are these two files under the gstreamer-0.10 directory)


Check the plug-in:
$ GST-inspect examplefilter

If the plug-in information is displayed, the plug-in is created.

Refer:

Http://hi.baidu.com/zhxust/blog/item/8161ab637d89ac6a0d33fa45. Html

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.