Create a plug-Gstreamer

Reference links

Step by step to create a GStreamer plugin (ZZ)

Configuration Steps

  The basic and "step by step to create a GStreamer plugin (ZZ)" the same procedure as described here briefly finishing

1 for a template gst-template to create plug-ins
  If you do not git installed, first install git:
  sudo apt-get install git-core
  reacquisition template:
  git clone git://anongit.freedesktop.org/gstreamer/gst-template.git

2, resulting in gstexamplefilter.c gstexamplefilter.h file
  into the directory gst-template / gst-plugin / src
  cd gst-template/gst-plugin/src
  ../tools/make_element ExampleFilter

  note here, I still can not run make_element in windows, either terminal or cmd PowerShell, therefore follow the online method to open the windows, the specific process reference win10 subsystem on linux open, upgrade and use . After opening Ubuntu terminal, under the letter of the windows in the directory mnt more.
  After use will encounter some problems, it listed here:
  A) open linux subsystem is completely new system, except in accordance with the necessary package, gstreamer is also a need here reinstalled;
  b) the Linux platform, the Windows format Linux is converted to text format , the first step to open the file using vim, then enter the control mode:
  :set fileformat=unix
  c) autoreconf: not found , the compiler wayland occur when such a mistake "autoreconf: not found", " No package 'libffi' found" due to lack autoreconf linux system tool, this tool is installed
  sudo apt-get install autoconf automake libtool
  sudo apt-get install libffi-dev
  d)Solve configure.ac:172: error: Possibly undefined Macro: AC_MSG_ERROR , need only
  apt-get install pkg-config
  

Linux environment compiler (.so)

3, modify Makefile.am file (note: this is the Makefile in the src directory am)
  sudo gedit Makefile.am

plugin_LTLIBRARIES = libgstexamplefilter. la
######################################
libgstexamplefilter_la_SOURCES = gstexamplefilter.c
######################################
libgstexamplefilter_la_CFLAGS = $(GST_CFLAGS)
libgstexamplefilter_la_LIBADD = $(GST_LIBS)
libgstexamplefilter_la_LDFLAGS = $(GST_PLUGIN_LDFLAGS)
libgstexamplefilter_la_LIBTOOLFLAGS = --tag=disable-static
######################################
noinst_HEADERS = gstexamplefilter.h

4, enter the directory gst-template / gst-plugin, modify files on autogen.sh entering a directory
  cd..
  edit files autogen.sh:
  sudo gedit autogen.sh
  added in the beginning of autogen.sh:
  srcfile=src/gstexamplefilter.c

5, run autogen sh, generating the Makefile
  ./autogen.sh

6, to begin the installation :
  ./configure
  make
  sudo make install
  the src / .libs there libgstexamplefilter.la, libgstexamplefilter SO.

. 7, the insert was added to the library gstreamer libgstexamplefilter la, libgstexamplefilter.so these two files are copied to the system directory / usr / lib / gstreamer-xxx .

  follow relates some settings and cache update environment variables, I have not tested this part, you need to take a look at the reference documentation can be tested.

Compiled under Windows environment (.dll)

  Writing gstreamer plugins in windows have to answer, but the document link does not work, mainly mentioned 1, Create a new GStreamer project in VS as explained in the docs; 2, Add the template sources of gst-template.

  Gstreamer detailed Guide - Using gst-template to create a simple plug- in is also related methods, but the picture almost all fail, but do still follow the steps can be completed.
  Create a new dll project, forget the process can take a look at using VS2015 C ++ to create dynamic link library and call , copy gstbase.c and gstbase.h to the next base project directory; at the beginning of gstbase.c add the following macro:
  #define VERSION (“0.10.36”)
  Similar vs2010 gstreamer development environmental installation configuration environment, which adds share \ vs \ 2010 \ libs \ gstreamer-1.0.prop property sheet, and then compile the project; copy the resulting dll to lib \ gstreamer 1.0-\ under execution bin \ gst-inspect- 1.0.exe see your plug-ins have not been found.
  

  

Published 24 original articles · won praise 8 · views 20000 +

Guess you like

Origin blog.csdn.net/yangjf91/article/details/88654853