How correctly distribute GStreamer package with Cerbero?

givip pataridzegivi at gmail.com
Sun May 19 14:15:23 UTC 2019


I have some source code, that should work with GStreamer version 1.17+ on
Ubuntu 16.04 LTS only.
Because the default version of GStreamer on this version of Ubuntu is 1.8.3,
I want to create a package with all necessary dependencies and my recipe's
binaries.

I'm trying to do this task about 3 days and not successfully yet, I assume,
because of lack of info and examples.

Some questions to guru:


1. Why *meson* build system doesn't put binaries to /bin/ folder and I have
to copy them manually? I defined explicitly /prefix/ option and /libdir/
directory, but anyway it builds everything to
/cerbero/build/sources/linux_x86_64/dd-stream-server-0.1/_builddir/. I
already know workaround for that, I need implement *post_install* method for
this recipe, but really this is the only way??

Without binary, *cerbero* tells me, that required binary wasn't found and I
had to copy if manually.

Meson.build code
```
project('dd-stream-server', 'c', default_options: ['libdir=lib' ,
'prefix=/home/givip/gst/cerbero/build/dist/linux_x86_64'])

gstreamer = dependency('gstreamer-1.0', method : 'pkg-config')
glib = dependency('glib-2.0', method : 'pkg-config')
gobject = dependency('gobject-2.0', method : 'pkg-config')
libffi_dep = dependency('libffi', version : '>= 3.0.0', fallback :
['libffi', 'ffi_dep'])

incdir = include_directories(
       
'/home/givip/gst/cerbero/build/dist/linux_x86_64/lib/gstreamer-1.0/include',
       
'/home/givip/gst/cerbero/build/dist/linux_x86_64/include/gstreamer-1.0/',
       
'/home/givip/gst/cerbero/build/dist/linux_x86_64/lib/glib-2.0/include',
        '/home/givip/gst/cerbero/build/dist/linux_x86_64/include/glib-2.0',
)

executable('dd-stream-server', 'stream-server.c', dependencies: [gstreamer,
glib, gobject, libffi_dep], include_directories: incdir)

```

2. I need to pack my app with exact versions of GStreamer's stuff into
package. But how I can figure out, what I need before I started creating
package? I had to start packaging process each time, check what depending
lib is missing, then add it to recipe and again start package. Whats I'm
doing wrong?
Also what is the sense of /deps/ in recipe file? I can delete it and nothing
changes....

Recipe code:
```
# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python


class Recipe(recipe.Recipe):
    name = 'dd-stream-server'
    version = '0.1'

    remotes = {
        'local': '~/gst/dd-stream-server'
    }
    commit = 'local/master'
    btype = BuildType.MESON

    use_system_libs = True

    deps = [
        'glib',
        'gstreamer-1.0',
        'gst-plugins-base-1.0',
        'gst-plugins-bad-1.0',
        'gst-plugins-good-1.0'
    ]

    files_libs = [
        'libglib-2.0',
        'libgobject-2.0',
        'libgstaudio-1.0',
        'libgsttag-1.0',
        'libgstvideo-1.0',
        'libspandsp',
        'libffi',
        'libgstrtp-1.0'
# I'm adding dependecies here only after $ cerbero pachage dd-stream 
# fails and I see what library was the reason
    ]

    files_bins = ['dd-stream-server']
```

3. In Package class, with uncomment /deps/ var, *cerbero* starts to build
separately each dependency, as I understand, for creating one package with
everything, that I need I should put depedencies to /files/ var, is this
correct?

Package code:
```
# -*- Mode: Python -*- vi:si:et:sw=4:sts=4:ts=4:syntax=python


class Package(package.Package):

    name = 'dd-stream'
    shortdesc = 'dd-stream'
    longdesc = 'plugin for capture'
    uuid = 'testuid'
    version = '0.1'

    # deps = [
    #     'gstreamer-1.0-codecs',
    #     'gstreamer-1.0-core',
    #     'gstreamer-1.0-net'
    # ]

    files = [
        'gstreamer-1.0',
        'dd-stream-server',
        'gst-plugins-base-1.0:plugins_core',
        'gst-plugins-good-1.0:plugins_capture',
        'gst-plugins-good-1.0:plugins_net',
        'gst-plugins-bad-1.0:plugins_codecs'
        ]
```



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/


More information about the gstreamer-devel mailing list