LoginSignup
1
1

More than 5 years have passed since last update.

Building GStreamer 0.10

Last updated at Posted at 2019-04-11

Ubuntu 18.04 LTS で GStreamer 1.0 と 0.10 の混在環境をつくります。0.10 は apt で落とせなかったのでソースからビルドしました。release tag から引っ張っているのにもかかわらず、一部ソースコードを変更する必要があるのがハマりポイントです。

ビルドと動作環境

Ubuntu 18.04 LTS Bionic on VMWare Fusion

Repositories of GStreamer and the tags

gst-libav が liboil に依存していて、それがパッケージになかったので、ソースコードからビルドします。

liboil: https://liboil.freedesktop.org/download/

Required modules

sudo apt install bison flex gtk-doc-tools libxml2-dev subversion

How to build

The prefix to be set when running configure is /mnt/hgfs/mogawa/src/gstreamer/gstreamer/build. Please replace this path as appropriate for your environment.

To build the plugins, set a .pc files directory.

export PKG_CONFIG_PATH=/mnt/hgfs/mogawa/src/gstreamer/gstreamer/build/lib/pkgconfig

gstreamer

Replace the code because make fails.

sed -i  -e '/YYLEX_PARAM/d' -e '/parse-param.*scanner/i %lex-param { void *scanner }' gst/parse/grammar.y

Run the scripts for build.

./autogen.sh
mkdir build
./configure --prefix=/mnt/hgfs/mogawa/src/gstreamer/gstreamer/build
make
make install

gst-plugins-base

Run the scripts for build.

./autogen.sh
./configure --prefix=/mnt/hgfs/mogawa/src/gstreamer/gstreamer/build
make
make install

gst-plugins-good

Replace the code because make fails.

diff --git a/sys/v4l2/gstv4l2bufferpool.c b/sys/v4l2/gstv4l2bufferpool.c
index b81c6a411..856d46b37 100644
--- a/sys/v4l2/gstv4l2bufferpool.c
+++ b/sys/v4l2/gstv4l2bufferpool.c
@@ -181,7 +181,7 @@ gst_v4l2_buffer_new (GstV4l2BufferPool * pool, guint index, GstCaps * caps)
     GST_LOG_OBJECT (pool->v4l2elem, "  MMAP offset:  %u",
         ret->vbuffer.m.offset);
   GST_LOG_OBJECT (pool->v4l2elem, "  length:    %u", ret->vbuffer.length);
-  GST_LOG_OBJECT (pool->v4l2elem, "  input:     %u", ret->vbuffer.input);
+  //GST_LOG_OBJECT (pool->v4l2elem, "  input:     %u", ret->vbuffer.input);

   data = (guint8 *) v4l2_mmap (0, ret->vbuffer.length,
       PROT_READ | PROT_WRITE, MAP_SHARED, pool->video_fd,

diff --git a/sys/v4l2/v4l2_calls.c b/sys/v4l2/v4l2_calls.c
index 309bfb668..ca10bc4e7 100644
--- a/sys/v4l2/v4l2_calls.c
+++ b/sys/v4l2/v4l2_calls.c
@@ -294,8 +294,12 @@ gst_v4l2_fill_lists (GstV4l2Object * v4l2object)
         break;
       case V4L2_CID_HFLIP:
       case V4L2_CID_VFLIP:
+#ifndef V4L2_CID_PAN_RESET
       case V4L2_CID_HCENTER:
+#endif
+#ifndef V4L2_CID_TILT_RESET
       case V4L2_CID_VCENTER:
+#endif
 #ifdef V4L2_CID_PAN_RESET
       case V4L2_CID_PAN_RESET:
 #endif

Run the scripts for build.

./autogen.sh
./configure --prefix=/mnt/hgfs/mogawa/src/gstreamer/gstreamer/build
make
make install

gst-plugins-bad

Run the scripts for build.

./autogen.sh
./configure --prefix=/mnt/hgfs/mogawa/src/gstreamer/gstreamer/build
make
make install

gst-plugins-ugly

Run the scripts for build.

./autogen.sh
./configure --prefix=/mnt/hgfs/mogawa/src/gstreamer/gstreamer/build
make
make install

gst-libav

Before building gst-libav, liboil is required to build.

./autogen.sh
./configure --prefix=/mnt/hgfs/mogawa/src/gstreamer/gstreamer/build
make
make install

Run the scripts for build.

./autogen.sh
./configure --prefix=/mnt/hgfs/mogawa/src/gstreamer/gstreamer/build
make
make install

Operational Acceptance testing

GST_PLUGIN_SYSTEM_PATH=../../../gst-plugins-base/build/lib/ ./gst-inspect-0.10

You can see the plugins you want to use.

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1